diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index 92e0c7438b9..07feb823492 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.16.1 \ No newline at end of file +0.17.0 \ No newline at end of file diff --git a/examples/go.mod b/examples/go.mod index a5964db4d32..9ef0e256679 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -6,10 +6,10 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2/config v1.28.1 github.com/aws/aws-sdk-go-v2/service/iam v1.37.3 - github.com/pulumi/providertest v0.1.2 + github.com/pulumi/providertest v0.1.3 github.com/pulumi/pulumi-aws/provider/v6 v6.0.0-00010101000000-000000000000 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1 - github.com/pulumi/pulumi/pkg/v3 v3.136.1 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.94.0 + github.com/pulumi/pulumi/pkg/v3 v3.137.0 github.com/stretchr/testify v1.9.0 ) @@ -387,7 +387,7 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect github.com/hashicorp/terraform-json v0.23.0 // indirect - github.com/hashicorp/terraform-plugin-framework v1.12.0 // indirect + github.com/hashicorp/terraform-plugin-framework v1.13.0 // indirect github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 // indirect github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 // indirect github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 // indirect @@ -450,8 +450,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-yaml v1.10.3 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.136.1 // indirect + github.com/pulumi/pulumi-yaml v1.11.1 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.137.0 // 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 e262d7b6b77..c9b1be60d29 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -2172,8 +2172,8 @@ github.com/hashicorp/terraform-json v0.19.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2D github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= -github.com/hashicorp/terraform-plugin-framework v1.12.0 h1:7HKaueHPaikX5/7cbC1r9d1m12iYHY+FlNZEGxQ42CQ= -github.com/hashicorp/terraform-plugin-framework v1.12.0/go.mod h1:N/IOQ2uYjW60Jp39Cp3mw7I/OpC/GfZ0385R0YibmkE= +github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ532Bh2BobF4H+yBiYJ/scw= +github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E= github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 h1:gm5b1kHgFFhaKFhm4h2TgvMUlNzFAtUqlcOWnWPm+9E= @@ -2444,18 +2444,18 @@ 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.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng= -github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= +github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5AepHg= +github.com/pulumi/providertest v0.1.3/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/v3 v3.93.1 h1:EEf5W3buVR5pcCKTXGouDS1/oY6TqVUIRKLksl5h4Es= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1/go.mod h1:jNpOSGkfTeZSnSjpGBHHiyllciCEDRqFaZhLUpQPlpo= -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/pulumi-terraform-bridge/v3 v3.94.0 h1:wRJxFAQVV5Bg+BUVKpsNTWDIBSPCZUnbtxTyujZiM2o= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.94.0/go.mod h1:S7rLe9paLUP2U7iwJhNJslwQszlgUfND83KRVCogbog= +github.com/pulumi/pulumi-yaml v1.11.1 h1:ULUL9fpb2Bwgf3jJHx0FamKYm0ld0KxBQr/uSAslRLk= +github.com/pulumi/pulumi-yaml v1.11.1/go.mod h1:RdXRBupRGGAD1kbYNG1V1h6pyFnXisvQsl0AANvVjGI= +github.com/pulumi/pulumi/pkg/v3 v3.137.0 h1:/KPFQQaB5W0/GhVxSTGnEzv3ZW5uieGN5Q2q+Lsr+Zw= +github.com/pulumi/pulumi/pkg/v3 v3.137.0/go.mod h1:ZQXJUTysDwq/mtilutRBKguH6DI+3b2WgNcOrs0whJ0= +github.com/pulumi/pulumi/sdk/v3 v3.137.0 h1:bxhYpOY7Z4xt+VmezEpHuhjpOekkaMqOjzxFg/1OhCw= +github.com/pulumi/pulumi/sdk/v3 v3.137.0/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-minimal.json b/provider/cmd/pulumi-resource-aws/schema-minimal.json index ba644bc083f..4e981c00709 100644 --- a/provider/cmd/pulumi-resource-aws/schema-minimal.json +++ b/provider/cmd/pulumi-resource-aws/schema-minimal.json @@ -174058,7 +174058,7 @@ } }, "aws:amplify/branch:Branch": { - "description": "Provides an Amplify Branch 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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n framework: \"React\",\n stage: \"PRODUCTION\",\n environmentVariables: {\n REACT_APP_API_SERVER: \"https://api.example.com\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n framework=\"React\",\n stage=\"PRODUCTION\",\n environment_variables={\n \"REACT_APP_API_SERVER\": \"https://api.example.com\",\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n Framework = \"React\",\n Stage = \"PRODUCTION\",\n EnvironmentVariables = \n {\n { \"REACT_APP_API_SERVER\", \"https://api.example.com\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify\"\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 := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tFramework: pulumi.String(\"React\"),\n\t\t\tStage: pulumi.String(\"PRODUCTION\"),\n\t\t\tEnvironmentVariables: pulumi.StringMap{\n\t\t\t\t\"REACT_APP_API_SERVER\": pulumi.String(\"https://api.example.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .framework(\"React\")\n .stage(\"PRODUCTION\")\n .environmentVariables(Map.of(\"REACT_APP_API_SERVER\", \"https://api.example.com\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n framework: React\n stage: PRODUCTION\n environmentVariables:\n REACT_APP_API_SERVER: https://api.example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic Authentication\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableBasicAuth: true,\n basicAuthCredentials: std.base64encode({\n input: \"username:password\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_basic_auth=True,\n basic_auth_credentials=std.base64encode(input=\"username:password\").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 example = new Aws.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableBasicAuth = true,\n BasicAuthCredentials = Std.Base64encode.Invoke(new()\n {\n Input = \"username:password\",\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/amplify\"\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\texample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeBase64encode, err := std.Base64encode(ctx, \u0026std.Base64encodeArgs{\n\t\t\tInput: \"username:password\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tEnableBasicAuth: pulumi.Bool(true),\n\t\t\tBasicAuthCredentials: pulumi.String(invokeBase64encode.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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableBasicAuth(true)\n .basicAuthCredentials(StdFunctions.base64encode(Base64encodeArgs.builder()\n .input(\"username:password\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableBasicAuth: true\n basicAuthCredentials:\n fn::invoke:\n Function: std:base64encode\n Arguments:\n input: username:password\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Notifications\n\nAmplify Console uses EventBridge (formerly known as CloudWatch Events) and SNS for email notifications. To implement the same functionality, you need to set `enable_notification` in a `aws.amplify.Branch` resource, as well as creating an EventBridge Rule, an SNS topic, and SNS subscriptions.\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableNotification: true,\n});\n// EventBridge Rule for Amplify notifications\nconst amplifyAppMasterEventRule = new aws.cloudwatch.EventRule(\"amplify_app_master\", {\n name: pulumi.interpolate`amplify-${app.id}-${master.branchName}-branch-notification`,\n description: pulumi.interpolate`AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}`,\n eventPattern: pulumi.jsonStringify({\n detail: {\n appId: [example.id],\n branchName: [master.branchName],\n jobStatus: [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n source: [\"aws.amplify\"],\n }),\n});\n// SNS Topic for Amplify notifications\nconst amplifyAppMasterTopic = new aws.sns.Topic(\"amplify_app_master\", {name: pulumi.interpolate`amplify-${app.id}_${master.branchName}`});\nconst amplifyAppMasterEventTarget = new aws.cloudwatch.EventTarget(\"amplify_app_master\", {\n rule: amplifyAppMasterEventRule.name,\n targetId: master.branchName,\n arn: amplifyAppMasterTopic.arn,\n inputTransformer: {\n inputPaths: {\n jobId: \"$.detail.jobId\",\n appId: \"$.detail.appId\",\n region: \"$.region\",\n branch: \"$.detail.branchName\",\n status: \"$.detail.jobStatus\",\n },\n inputTemplate: \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n});\nconst amplifyAppMaster = pulumi.all([master.arn, amplifyAppMasterTopic.arn]).apply(([masterArn, amplifyAppMasterTopicArn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: `Allow_Publish_Events ${masterArn}`,\n effect: \"Allow\",\n actions: [\"SNS:Publish\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n resources: [amplifyAppMasterTopicArn],\n }],\n}));\nconst amplifyAppMasterTopicPolicy = new aws.sns.TopicPolicy(\"amplify_app_master\", {\n arn: amplifyAppMasterTopic.arn,\n policy: amplifyAppMaster.apply(amplifyAppMaster =\u003e amplifyAppMaster.json),\n});\nconst _this = new aws.sns.TopicSubscription(\"this\", {\n topic: amplifyAppMasterTopic.arn,\n protocol: \"email\",\n endpoint: \"user@acme.com\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_notification=True)\n# EventBridge Rule for Amplify notifications\namplify_app_master_event_rule = aws.cloudwatch.EventRule(\"amplify_app_master\",\n name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}-{branch_name}-branch-notification\"),\n description=master.branch_name.apply(lambda branch_name: f\"AWS Amplify build notifications for : App: {app['id']} Branch: {branch_name}\"),\n event_pattern=pulumi.Output.json_dumps({\n \"detail\": {\n \"appId\": [example.id],\n \"branchName\": [master.branch_name],\n \"jobStatus\": [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n \"source\": [\"aws.amplify\"],\n }))\n# SNS Topic for Amplify notifications\namplify_app_master_topic = aws.sns.Topic(\"amplify_app_master\", name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}_{branch_name}\"))\namplify_app_master_event_target = aws.cloudwatch.EventTarget(\"amplify_app_master\",\n rule=amplify_app_master_event_rule.name,\n target_id=master.branch_name,\n arn=amplify_app_master_topic.arn,\n input_transformer={\n \"input_paths\": {\n \"job_id\": \"$.detail.jobId\",\n \"app_id\": \"$.detail.appId\",\n \"region\": \"$.region\",\n \"branch\": \"$.detail.branchName\",\n \"status\": \"$.detail.jobStatus\",\n },\n \"input_template\": \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n })\namplify_app_master = pulumi.Output.all(\n masterArn=master.arn,\n amplifyAppMasterTopicArn=amplify_app_master_topic.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[{\n \"sid\": f\"Allow_Publish_Events {resolved_outputs['masterArn']}\",\n \"effect\": \"Allow\",\n \"actions\": [\"SNS:Publish\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"resources\": [%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)],\n}]))\n\namplify_app_master_topic_policy = aws.sns.TopicPolicy(\"amplify_app_master\",\n arn=amplify_app_master_topic.arn,\n policy=amplify_app_master.json)\nthis = aws.sns.TopicSubscription(\"this\",\n topic=amplify_app_master_topic.arn,\n protocol=\"email\",\n endpoint=\"user@acme.com\")\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableNotification = true,\n });\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new Aws.CloudWatch.EventRule(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}-{branchName}-branch-notification\"),\n Description = master.BranchName.Apply(branchName =\u003e $\"AWS Amplify build notifications for : App: {app.Id} Branch: {branchName}\"),\n EventPattern = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"detail\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"appId\"] = new[]\n {\n example.Id,\n },\n [\"branchName\"] = new[]\n {\n master.BranchName,\n },\n [\"jobStatus\"] = new[]\n {\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n },\n },\n [\"detail-type\"] = new[]\n {\n \"Amplify Deployment Status Change\",\n },\n [\"source\"] = new[]\n {\n \"aws.amplify\",\n },\n })),\n });\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Aws.Sns.Topic(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}_{branchName}\"),\n });\n\n var amplifyAppMasterEventTarget = new Aws.CloudWatch.EventTarget(\"amplify_app_master\", new()\n {\n Rule = amplifyAppMasterEventRule.Name,\n TargetId = master.BranchName,\n Arn = amplifyAppMasterTopic.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"jobId\", \"$.detail.jobId\" },\n { \"appId\", \"$.detail.appId\" },\n { \"region\", \"$.region\" },\n { \"branch\", \"$.detail.branchName\" },\n { \"status\", \"$.detail.jobStatus\" },\n },\n InputTemplate = \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n });\n\n var amplifyAppMaster = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = $\"Allow_Publish_Events {master.Arn}\",\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Publish\",\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 Resources = new[]\n {\n amplifyAppMasterTopic.Arn,\n },\n },\n },\n });\n\n var amplifyAppMasterTopicPolicy = new Aws.Sns.TopicPolicy(\"amplify_app_master\", new()\n {\n Arn = amplifyAppMasterTopic.Arn,\n Policy = amplifyAppMaster.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var @this = new Aws.Sns.TopicSubscription(\"this\", new()\n {\n Topic = amplifyAppMasterTopic.Arn,\n Protocol = \"email\",\n Endpoint = \"user@acme.com\",\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/amplify\"\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/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\nName: pulumi.String(\"app\"),\n})\nif err != nil {\nreturn err\n}\nmaster, err := amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\nAppId: example.ID(),\nBranchName: pulumi.String(\"master\"),\nEnableNotification: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\n// EventBridge Rule for Amplify notifications\namplifyAppMasterEventRule, err := cloudwatch.NewEventRule(ctx, \"amplify_app_master\", \u0026cloudwatch.EventRuleArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v-%v-branch-notification\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nDescription: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"AWS Amplify build notifications for : App: %v Branch: %v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nEventPattern: pulumi.All(example.ID(),master.BranchName).ApplyT(func(_args []interface{}) (string, error) {\nid := _args[0].(string)\nbranchName := _args[1].(string)\nvar _zero string\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"detail\": map[string]interface{}{\n\"appId\": []string{\nid,\n},\n\"branchName\": []string{\nbranchName,\n},\n\"jobStatus\": []string{\n\"SUCCEED\",\n\"FAILED\",\n\"STARTED\",\n},\n},\n\"detail-type\": []string{\n\"Amplify Deployment Status Change\",\n},\n\"source\": []string{\n\"aws.amplify\",\n},\n})\nif err != nil {\nreturn _zero, err\n}\njson0 := string(tmpJSON0)\nreturn json0, nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n// SNS Topic for Amplify notifications\namplifyAppMasterTopic, err := sns.NewTopic(ctx, \"amplify_app_master\", \u0026sns.TopicArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v_%v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n_, err = cloudwatch.NewEventTarget(ctx, \"amplify_app_master\", \u0026cloudwatch.EventTargetArgs{\nRule: amplifyAppMasterEventRule.Name,\nTargetId: master.BranchName,\nArn: amplifyAppMasterTopic.Arn,\nInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\nInputPaths: pulumi.StringMap{\n\"jobId\": pulumi.String(\"$.detail.jobId\"),\n\"appId\": pulumi.String(\"$.detail.appId\"),\n\"region\": pulumi.String(\"$.region\"),\n\"branch\": pulumi.String(\"$.detail.branchName\"),\n\"status\": pulumi.String(\"$.detail.jobStatus\"),\n},\nInputTemplate: pulumi.String(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\"),\n},\n})\nif err != nil {\nreturn err\n}\namplifyAppMaster := pulumi.All(master.Arn,amplifyAppMasterTopic.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nmasterArn := _args[0].(string)\namplifyAppMasterTopicArn := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: fmt.Sprintf(\"Allow_Publish_Events %v\", masterArn),\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Publish\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nResources: interface{}{\namplifyAppMasterTopicArn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"amplify_app_master\", \u0026sns.TopicPolicyArgs{\nArn: amplifyAppMasterTopic.Arn,\nPolicy: pulumi.String(amplifyAppMaster.ApplyT(func(amplifyAppMaster iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026amplifyAppMaster.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = sns.NewTopicSubscription(ctx, \"this\", \u0026sns.TopicSubscriptionArgs{\nTopic: amplifyAppMasterTopic.Arn,\nProtocol: pulumi.String(\"email\"),\nEndpoint: pulumi.String(\"user@acme.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\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 com.pulumi.aws.sns.TopicSubscription;\nimport com.pulumi.aws.sns.TopicSubscriptionArgs;\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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableNotification(true)\n .build());\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new EventRule(\"amplifyAppMasterEventRule\", EventRuleArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s-%s-branch-notification\", app.id(),branchName)))\n .description(master.branchName().applyValue(branchName -\u003e String.format(\"AWS Amplify build notifications for : App: %s Branch: %s\", app.id(),branchName)))\n .eventPattern(Output.tuple(example.id(), master.branchName()).applyValue(values -\u003e {\n var id = values.t1;\n var branchName = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"detail\", jsonObject(\n jsonProperty(\"appId\", jsonArray(id)),\n jsonProperty(\"branchName\", jsonArray(branchName)),\n jsonProperty(\"jobStatus\", jsonArray(\n \"SUCCEED\", \n \"FAILED\", \n \"STARTED\"\n ))\n )),\n jsonProperty(\"detail-type\", jsonArray(\"Amplify Deployment Status Change\")),\n jsonProperty(\"source\", jsonArray(\"aws.amplify\"))\n ));\n }))\n .build());\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Topic(\"amplifyAppMasterTopic\", TopicArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s_%s\", app.id(),branchName)))\n .build());\n\n var amplifyAppMasterEventTarget = new EventTarget(\"amplifyAppMasterEventTarget\", EventTargetArgs.builder()\n .rule(amplifyAppMasterEventRule.name())\n .targetId(master.branchName())\n .arn(amplifyAppMasterTopic.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"jobId\", \"$.detail.jobId\"),\n Map.entry(\"appId\", \"$.detail.appId\"),\n Map.entry(\"region\", \"$.region\"),\n Map.entry(\"branch\", \"$.detail.branchName\"),\n Map.entry(\"status\", \"$.detail.jobStatus\")\n ))\n .inputTemplate(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\")\n .build())\n .build());\n\n final var amplifyAppMaster = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(master.arn().applyValue(arn -\u003e String.format(\"Allow_Publish_Events %s\", arn)))\n .effect(\"Allow\")\n .actions(\"SNS:Publish\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .resources(amplifyAppMasterTopic.arn())\n .build())\n .build());\n\n var amplifyAppMasterTopicPolicy = new TopicPolicy(\"amplifyAppMasterTopicPolicy\", TopicPolicyArgs.builder()\n .arn(amplifyAppMasterTopic.arn())\n .policy(amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(amplifyAppMaster -\u003e amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var this_ = new TopicSubscription(\"this\", TopicSubscriptionArgs.builder()\n .topic(amplifyAppMasterTopic.arn())\n .protocol(\"email\")\n .endpoint(\"user@acme.com\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableNotification: true\n # EventBridge Rule for Amplify notifications\n amplifyAppMasterEventRule:\n type: aws:cloudwatch:EventRule\n name: amplify_app_master\n properties:\n name: amplify-${app.id}-${master.branchName}-branch-notification\n description: 'AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}'\n eventPattern:\n fn::toJSON:\n detail:\n appId:\n - ${example.id}\n branchName:\n - ${master.branchName}\n jobStatus:\n - SUCCEED\n - FAILED\n - STARTED\n detail-type:\n - Amplify Deployment Status Change\n source:\n - aws.amplify\n amplifyAppMasterEventTarget:\n type: aws:cloudwatch:EventTarget\n name: amplify_app_master\n properties:\n rule: ${amplifyAppMasterEventRule.name}\n targetId: ${master.branchName}\n arn: ${amplifyAppMasterTopic.arn}\n inputTransformer:\n inputPaths:\n jobId: $.detail.jobId\n appId: $.detail.appId\n region: $.region\n branch: $.detail.branchName\n status: $.detail.jobStatus\n inputTemplate: '\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \"'\n # SNS Topic for Amplify notifications\n amplifyAppMasterTopic:\n type: aws:sns:Topic\n name: amplify_app_master\n properties:\n name: amplify-${app.id}_${master.branchName}\n amplifyAppMasterTopicPolicy:\n type: aws:sns:TopicPolicy\n name: amplify_app_master\n properties:\n arn: ${amplifyAppMasterTopic.arn}\n policy: ${amplifyAppMaster.json}\n this:\n type: aws:sns:TopicSubscription\n properties:\n topic: ${amplifyAppMasterTopic.arn}\n protocol: email\n endpoint: user@acme.com\nvariables:\n amplifyAppMaster:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow_Publish_Events ${master.arn}\n effect: Allow\n actions:\n - SNS:Publish\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n resources:\n - ${amplifyAppMasterTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amplify branch using `app_id` and `branch_name`. For example:\n\n```sh\n$ pulumi import aws:amplify/branch:Branch master d2ypk4k47z8u6/master\n```\n", + "description": "Provides an Amplify Branch 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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n framework: \"React\",\n stage: \"PRODUCTION\",\n environmentVariables: {\n REACT_APP_API_SERVER: \"https://api.example.com\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n framework=\"React\",\n stage=\"PRODUCTION\",\n environment_variables={\n \"REACT_APP_API_SERVER\": \"https://api.example.com\",\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n Framework = \"React\",\n Stage = \"PRODUCTION\",\n EnvironmentVariables = \n {\n { \"REACT_APP_API_SERVER\", \"https://api.example.com\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify\"\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 := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tFramework: pulumi.String(\"React\"),\n\t\t\tStage: pulumi.String(\"PRODUCTION\"),\n\t\t\tEnvironmentVariables: pulumi.StringMap{\n\t\t\t\t\"REACT_APP_API_SERVER\": pulumi.String(\"https://api.example.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .framework(\"React\")\n .stage(\"PRODUCTION\")\n .environmentVariables(Map.of(\"REACT_APP_API_SERVER\", \"https://api.example.com\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n framework: React\n stage: PRODUCTION\n environmentVariables:\n REACT_APP_API_SERVER: https://api.example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic Authentication\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableBasicAuth: true,\n basicAuthCredentials: std.base64encode({\n input: \"username:password\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_basic_auth=True,\n basic_auth_credentials=std.base64encode(input=\"username:password\").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 example = new Aws.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableBasicAuth = true,\n BasicAuthCredentials = Std.Base64encode.Invoke(new()\n {\n Input = \"username:password\",\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/amplify\"\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\texample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeBase64encode, err := std.Base64encode(ctx, \u0026std.Base64encodeArgs{\n\t\t\tInput: \"username:password\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tEnableBasicAuth: pulumi.Bool(true),\n\t\t\tBasicAuthCredentials: pulumi.String(invokeBase64encode.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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableBasicAuth(true)\n .basicAuthCredentials(StdFunctions.base64encode(Base64encodeArgs.builder()\n .input(\"username:password\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableBasicAuth: true\n basicAuthCredentials:\n fn::invoke:\n Function: std:base64encode\n Arguments:\n input: username:password\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Notifications\n\nAmplify Console uses EventBridge (formerly known as CloudWatch Events) and SNS for email notifications. To implement the same functionality, you need to set `enable_notification` in a `aws.amplify.Branch` resource, as well as creating an EventBridge Rule, an SNS topic, and SNS subscriptions.\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableNotification: true,\n});\n// EventBridge Rule for Amplify notifications\nconst amplifyAppMasterEventRule = new aws.cloudwatch.EventRule(\"amplify_app_master\", {\n name: pulumi.interpolate`amplify-${app.id}-${master.branchName}-branch-notification`,\n description: pulumi.interpolate`AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}`,\n eventPattern: pulumi.jsonStringify({\n detail: {\n appId: [example.id],\n branchName: [master.branchName],\n jobStatus: [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n source: [\"aws.amplify\"],\n }),\n});\n// SNS Topic for Amplify notifications\nconst amplifyAppMasterTopic = new aws.sns.Topic(\"amplify_app_master\", {name: pulumi.interpolate`amplify-${app.id}_${master.branchName}`});\nconst amplifyAppMasterEventTarget = new aws.cloudwatch.EventTarget(\"amplify_app_master\", {\n rule: amplifyAppMasterEventRule.name,\n targetId: master.branchName,\n arn: amplifyAppMasterTopic.arn,\n inputTransformer: {\n inputPaths: {\n jobId: \"$.detail.jobId\",\n appId: \"$.detail.appId\",\n region: \"$.region\",\n branch: \"$.detail.branchName\",\n status: \"$.detail.jobStatus\",\n },\n inputTemplate: \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n});\nconst amplifyAppMaster = pulumi.all([master.arn, amplifyAppMasterTopic.arn]).apply(([masterArn, amplifyAppMasterTopicArn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: `Allow_Publish_Events ${masterArn}`,\n effect: \"Allow\",\n actions: [\"SNS:Publish\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n resources: [amplifyAppMasterTopicArn],\n }],\n}));\nconst amplifyAppMasterTopicPolicy = new aws.sns.TopicPolicy(\"amplify_app_master\", {\n arn: amplifyAppMasterTopic.arn,\n policy: amplifyAppMaster.apply(amplifyAppMaster =\u003e amplifyAppMaster.json),\n});\nconst _this = new aws.sns.TopicSubscription(\"this\", {\n topic: amplifyAppMasterTopic.arn,\n protocol: \"email\",\n endpoint: \"user@acme.com\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_notification=True)\n# EventBridge Rule for Amplify notifications\namplify_app_master_event_rule = aws.cloudwatch.EventRule(\"amplify_app_master\",\n name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}-{branch_name}-branch-notification\"),\n description=master.branch_name.apply(lambda branch_name: f\"AWS Amplify build notifications for : App: {app['id']} Branch: {branch_name}\"),\n event_pattern=pulumi.Output.json_dumps({\n \"detail\": {\n \"appId\": [example.id],\n \"branchName\": [master.branch_name],\n \"jobStatus\": [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n \"source\": [\"aws.amplify\"],\n }))\n# SNS Topic for Amplify notifications\namplify_app_master_topic = aws.sns.Topic(\"amplify_app_master\", name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}_{branch_name}\"))\namplify_app_master_event_target = aws.cloudwatch.EventTarget(\"amplify_app_master\",\n rule=amplify_app_master_event_rule.name,\n target_id=master.branch_name,\n arn=amplify_app_master_topic.arn,\n input_transformer={\n \"input_paths\": {\n \"jobId\": \"$.detail.jobId\",\n \"appId\": \"$.detail.appId\",\n \"region\": \"$.region\",\n \"branch\": \"$.detail.branchName\",\n \"status\": \"$.detail.jobStatus\",\n },\n \"input_template\": \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n })\namplify_app_master = pulumi.Output.all(\n masterArn=master.arn,\n amplifyAppMasterTopicArn=amplify_app_master_topic.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[{\n \"sid\": f\"Allow_Publish_Events {resolved_outputs['masterArn']}\",\n \"effect\": \"Allow\",\n \"actions\": [\"SNS:Publish\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"resources\": [%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)],\n}]))\n\namplify_app_master_topic_policy = aws.sns.TopicPolicy(\"amplify_app_master\",\n arn=amplify_app_master_topic.arn,\n policy=amplify_app_master.json)\nthis = aws.sns.TopicSubscription(\"this\",\n topic=amplify_app_master_topic.arn,\n protocol=\"email\",\n endpoint=\"user@acme.com\")\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableNotification = true,\n });\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new Aws.CloudWatch.EventRule(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}-{branchName}-branch-notification\"),\n Description = master.BranchName.Apply(branchName =\u003e $\"AWS Amplify build notifications for : App: {app.Id} Branch: {branchName}\"),\n EventPattern = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"detail\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"appId\"] = new[]\n {\n example.Id,\n },\n [\"branchName\"] = new[]\n {\n master.BranchName,\n },\n [\"jobStatus\"] = new[]\n {\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n },\n },\n [\"detail-type\"] = new[]\n {\n \"Amplify Deployment Status Change\",\n },\n [\"source\"] = new[]\n {\n \"aws.amplify\",\n },\n })),\n });\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Aws.Sns.Topic(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}_{branchName}\"),\n });\n\n var amplifyAppMasterEventTarget = new Aws.CloudWatch.EventTarget(\"amplify_app_master\", new()\n {\n Rule = amplifyAppMasterEventRule.Name,\n TargetId = master.BranchName,\n Arn = amplifyAppMasterTopic.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"jobId\", \"$.detail.jobId\" },\n { \"appId\", \"$.detail.appId\" },\n { \"region\", \"$.region\" },\n { \"branch\", \"$.detail.branchName\" },\n { \"status\", \"$.detail.jobStatus\" },\n },\n InputTemplate = \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n });\n\n var amplifyAppMaster = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = $\"Allow_Publish_Events {master.Arn}\",\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Publish\",\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 Resources = new[]\n {\n amplifyAppMasterTopic.Arn,\n },\n },\n },\n });\n\n var amplifyAppMasterTopicPolicy = new Aws.Sns.TopicPolicy(\"amplify_app_master\", new()\n {\n Arn = amplifyAppMasterTopic.Arn,\n Policy = amplifyAppMaster.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var @this = new Aws.Sns.TopicSubscription(\"this\", new()\n {\n Topic = amplifyAppMasterTopic.Arn,\n Protocol = \"email\",\n Endpoint = \"user@acme.com\",\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/amplify\"\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/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\nName: pulumi.String(\"app\"),\n})\nif err != nil {\nreturn err\n}\nmaster, err := amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\nAppId: example.ID(),\nBranchName: pulumi.String(\"master\"),\nEnableNotification: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\n// EventBridge Rule for Amplify notifications\namplifyAppMasterEventRule, err := cloudwatch.NewEventRule(ctx, \"amplify_app_master\", \u0026cloudwatch.EventRuleArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v-%v-branch-notification\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nDescription: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"AWS Amplify build notifications for : App: %v Branch: %v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nEventPattern: pulumi.All(example.ID(),master.BranchName).ApplyT(func(_args []interface{}) (string, error) {\nid := _args[0].(string)\nbranchName := _args[1].(string)\nvar _zero string\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"detail\": map[string]interface{}{\n\"appId\": []string{\nid,\n},\n\"branchName\": []string{\nbranchName,\n},\n\"jobStatus\": []string{\n\"SUCCEED\",\n\"FAILED\",\n\"STARTED\",\n},\n},\n\"detail-type\": []string{\n\"Amplify Deployment Status Change\",\n},\n\"source\": []string{\n\"aws.amplify\",\n},\n})\nif err != nil {\nreturn _zero, err\n}\njson0 := string(tmpJSON0)\nreturn json0, nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n// SNS Topic for Amplify notifications\namplifyAppMasterTopic, err := sns.NewTopic(ctx, \"amplify_app_master\", \u0026sns.TopicArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v_%v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n_, err = cloudwatch.NewEventTarget(ctx, \"amplify_app_master\", \u0026cloudwatch.EventTargetArgs{\nRule: amplifyAppMasterEventRule.Name,\nTargetId: master.BranchName,\nArn: amplifyAppMasterTopic.Arn,\nInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\nInputPaths: pulumi.StringMap{\n\"jobId\": pulumi.String(\"$.detail.jobId\"),\n\"appId\": pulumi.String(\"$.detail.appId\"),\n\"region\": pulumi.String(\"$.region\"),\n\"branch\": pulumi.String(\"$.detail.branchName\"),\n\"status\": pulumi.String(\"$.detail.jobStatus\"),\n},\nInputTemplate: pulumi.String(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\"),\n},\n})\nif err != nil {\nreturn err\n}\namplifyAppMaster := pulumi.All(master.Arn,amplifyAppMasterTopic.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nmasterArn := _args[0].(string)\namplifyAppMasterTopicArn := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: fmt.Sprintf(\"Allow_Publish_Events %v\", masterArn),\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Publish\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nResources: interface{}{\namplifyAppMasterTopicArn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"amplify_app_master\", \u0026sns.TopicPolicyArgs{\nArn: amplifyAppMasterTopic.Arn,\nPolicy: pulumi.String(amplifyAppMaster.ApplyT(func(amplifyAppMaster iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026amplifyAppMaster.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = sns.NewTopicSubscription(ctx, \"this\", \u0026sns.TopicSubscriptionArgs{\nTopic: amplifyAppMasterTopic.Arn,\nProtocol: pulumi.String(\"email\"),\nEndpoint: pulumi.String(\"user@acme.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\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 com.pulumi.aws.sns.TopicSubscription;\nimport com.pulumi.aws.sns.TopicSubscriptionArgs;\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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableNotification(true)\n .build());\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new EventRule(\"amplifyAppMasterEventRule\", EventRuleArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s-%s-branch-notification\", app.id(),branchName)))\n .description(master.branchName().applyValue(branchName -\u003e String.format(\"AWS Amplify build notifications for : App: %s Branch: %s\", app.id(),branchName)))\n .eventPattern(Output.tuple(example.id(), master.branchName()).applyValue(values -\u003e {\n var id = values.t1;\n var branchName = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"detail\", jsonObject(\n jsonProperty(\"appId\", jsonArray(id)),\n jsonProperty(\"branchName\", jsonArray(branchName)),\n jsonProperty(\"jobStatus\", jsonArray(\n \"SUCCEED\", \n \"FAILED\", \n \"STARTED\"\n ))\n )),\n jsonProperty(\"detail-type\", jsonArray(\"Amplify Deployment Status Change\")),\n jsonProperty(\"source\", jsonArray(\"aws.amplify\"))\n ));\n }))\n .build());\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Topic(\"amplifyAppMasterTopic\", TopicArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s_%s\", app.id(),branchName)))\n .build());\n\n var amplifyAppMasterEventTarget = new EventTarget(\"amplifyAppMasterEventTarget\", EventTargetArgs.builder()\n .rule(amplifyAppMasterEventRule.name())\n .targetId(master.branchName())\n .arn(amplifyAppMasterTopic.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"jobId\", \"$.detail.jobId\"),\n Map.entry(\"appId\", \"$.detail.appId\"),\n Map.entry(\"region\", \"$.region\"),\n Map.entry(\"branch\", \"$.detail.branchName\"),\n Map.entry(\"status\", \"$.detail.jobStatus\")\n ))\n .inputTemplate(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\")\n .build())\n .build());\n\n final var amplifyAppMaster = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(master.arn().applyValue(arn -\u003e String.format(\"Allow_Publish_Events %s\", arn)))\n .effect(\"Allow\")\n .actions(\"SNS:Publish\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .resources(amplifyAppMasterTopic.arn())\n .build())\n .build());\n\n var amplifyAppMasterTopicPolicy = new TopicPolicy(\"amplifyAppMasterTopicPolicy\", TopicPolicyArgs.builder()\n .arn(amplifyAppMasterTopic.arn())\n .policy(amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(amplifyAppMaster -\u003e amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var this_ = new TopicSubscription(\"this\", TopicSubscriptionArgs.builder()\n .topic(amplifyAppMasterTopic.arn())\n .protocol(\"email\")\n .endpoint(\"user@acme.com\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableNotification: true\n # EventBridge Rule for Amplify notifications\n amplifyAppMasterEventRule:\n type: aws:cloudwatch:EventRule\n name: amplify_app_master\n properties:\n name: amplify-${app.id}-${master.branchName}-branch-notification\n description: 'AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}'\n eventPattern:\n fn::toJSON:\n detail:\n appId:\n - ${example.id}\n branchName:\n - ${master.branchName}\n jobStatus:\n - SUCCEED\n - FAILED\n - STARTED\n detail-type:\n - Amplify Deployment Status Change\n source:\n - aws.amplify\n amplifyAppMasterEventTarget:\n type: aws:cloudwatch:EventTarget\n name: amplify_app_master\n properties:\n rule: ${amplifyAppMasterEventRule.name}\n targetId: ${master.branchName}\n arn: ${amplifyAppMasterTopic.arn}\n inputTransformer:\n inputPaths:\n jobId: $.detail.jobId\n appId: $.detail.appId\n region: $.region\n branch: $.detail.branchName\n status: $.detail.jobStatus\n inputTemplate: '\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \"'\n # SNS Topic for Amplify notifications\n amplifyAppMasterTopic:\n type: aws:sns:Topic\n name: amplify_app_master\n properties:\n name: amplify-${app.id}_${master.branchName}\n amplifyAppMasterTopicPolicy:\n type: aws:sns:TopicPolicy\n name: amplify_app_master\n properties:\n arn: ${amplifyAppMasterTopic.arn}\n policy: ${amplifyAppMaster.json}\n this:\n type: aws:sns:TopicSubscription\n properties:\n topic: ${amplifyAppMasterTopic.arn}\n protocol: email\n endpoint: user@acme.com\nvariables:\n amplifyAppMaster:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow_Publish_Events ${master.arn}\n effect: Allow\n actions:\n - SNS:Publish\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n resources:\n - ${amplifyAppMasterTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amplify branch using `app_id` and `branch_name`. For example:\n\n```sh\n$ pulumi import aws:amplify/branch:Branch master d2ypk4k47z8u6/master\n```\n", "properties": { "appId": { "type": "string", @@ -178408,7 +178408,7 @@ } }, "aws:apigatewayv2/integration:Integration": { - "description": "Manages an Amazon API Gateway Version 2 integration.\nMore information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html).\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"MOCK\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"MOCK\")\n```\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"MOCK\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"MOCK\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"MOCK\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: MOCK\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Lambda Integration\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.lambda.Function(\"example\", {\n code: new pulumi.asset.FileArchive(\"example.zip\"),\n name: \"Example\",\n role: exampleAwsIamRole.arn,\n handler: \"index.handler\",\n runtime: aws.lambda.Runtime.NodeJS20dX,\n});\nconst exampleIntegration = new aws.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"AWS_PROXY\",\n connectionType: \"INTERNET\",\n contentHandlingStrategy: \"CONVERT_TO_TEXT\",\n description: \"Lambda example\",\n integrationMethod: \"POST\",\n integrationUri: example.invokeArn,\n passthroughBehavior: \"WHEN_NO_MATCH\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.Function(\"example\",\n code=pulumi.FileArchive(\"example.zip\"),\n name=\"Example\",\n role=example_aws_iam_role[\"arn\"],\n handler=\"index.handler\",\n runtime=aws.lambda_.Runtime.NODE_JS20D_X)\nexample_integration = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"AWS_PROXY\",\n connection_type=\"INTERNET\",\n content_handling_strategy=\"CONVERT_TO_TEXT\",\n description=\"Lambda example\",\n integration_method=\"POST\",\n integration_uri=example.invoke_arn,\n passthrough_behavior=\"WHEN_NO_MATCH\")\n```\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.Lambda.Function(\"example\", new()\n {\n Code = new FileArchive(\"example.zip\"),\n Name = \"Example\",\n Role = exampleAwsIamRole.Arn,\n Handler = \"index.handler\",\n Runtime = Aws.Lambda.Runtime.NodeJS20dX,\n });\n\n var exampleIntegration = new Aws.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"AWS_PROXY\",\n ConnectionType = \"INTERNET\",\n ContentHandlingStrategy = \"CONVERT_TO_TEXT\",\n Description = \"Lambda example\",\n IntegrationMethod = \"POST\",\n IntegrationUri = example.InvokeArn,\n PassthroughBehavior = \"WHEN_NO_MATCH\",\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/apigatewayv2\"\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\texample, err := lambda.NewFunction(ctx, \"example\", \u0026lambda.FunctionArgs{\n\t\t\tCode: pulumi.NewFileArchive(\"example.zip\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tHandler: pulumi.String(\"index.handler\"),\n\t\t\tRuntime: pulumi.String(lambda.RuntimeNodeJS20dX),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tConnectionType: pulumi.String(\"INTERNET\"),\n\t\t\tContentHandlingStrategy: pulumi.String(\"CONVERT_TO_TEXT\"),\n\t\t\tDescription: pulumi.String(\"Lambda example\"),\n\t\t\tIntegrationMethod: pulumi.String(\"POST\"),\n\t\t\tIntegrationUri: example.InvokeArn,\n\t\t\tPassthroughBehavior: pulumi.String(\"WHEN_NO_MATCH\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.Function;\nimport com.pulumi.aws.lambda.FunctionArgs;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.asset.FileArchive;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Function(\"example\", FunctionArgs.builder()\n .code(new FileArchive(\"example.zip\"))\n .name(\"Example\")\n .role(exampleAwsIamRole.arn())\n .handler(\"index.handler\")\n .runtime(\"nodejs20.x\")\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"AWS_PROXY\")\n .connectionType(\"INTERNET\")\n .contentHandlingStrategy(\"CONVERT_TO_TEXT\")\n .description(\"Lambda example\")\n .integrationMethod(\"POST\")\n .integrationUri(example.invokeArn())\n .passthroughBehavior(\"WHEN_NO_MATCH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:Function\n properties:\n code:\n fn::FileArchive: example.zip\n name: Example\n role: ${exampleAwsIamRole.arn}\n handler: index.handler\n runtime: nodejs20.x\n exampleIntegration:\n type: aws:apigatewayv2:Integration\n name: example\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: AWS_PROXY\n connectionType: INTERNET\n contentHandlingStrategy: CONVERT_TO_TEXT\n description: Lambda example\n integrationMethod: POST\n integrationUri: ${example.invokeArn}\n passthroughBehavior: WHEN_NO_MATCH\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### AWS Service Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"SQS example\",\n integrationType: \"AWS_PROXY\",\n integrationSubtype: \"SQS-SendMessage\",\n requestParameters: {\n QueueUrl: \"$request.header.queueUrl\",\n MessageBody: \"$request.body.message\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"SQS example\",\n integration_type=\"AWS_PROXY\",\n integration_subtype=\"SQS-SendMessage\",\n request_parameters={\n \"QueueUrl\": \"$request.header.queueUrl\",\n \"MessageBody\": \"$request.body.message\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"SQS example\",\n IntegrationType = \"AWS_PROXY\",\n IntegrationSubtype = \"SQS-SendMessage\",\n RequestParameters = \n {\n { \"QueueUrl\", \"$request.header.queueUrl\" },\n { \"MessageBody\", \"$request.body.message\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"SQS example\"),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tIntegrationSubtype: pulumi.String(\"SQS-SendMessage\"),\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"QueueUrl\": pulumi.String(\"$request.header.queueUrl\"),\n\t\t\t\t\"MessageBody\": pulumi.String(\"$request.body.message\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"SQS example\")\n .integrationType(\"AWS_PROXY\")\n .integrationSubtype(\"SQS-SendMessage\")\n .requestParameters(Map.ofEntries(\n Map.entry(\"QueueUrl\", \"$request.header.queueUrl\"),\n Map.entry(\"MessageBody\", \"$request.body.message\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: SQS example\n integrationType: AWS_PROXY\n integrationSubtype: SQS-SendMessage\n requestParameters:\n QueueUrl: $request.header.queueUrl\n MessageBody: $request.body.message\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Private Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"Example with a load balancer\",\n integrationType: \"HTTP_PROXY\",\n integrationUri: exampleAwsLbListener.arn,\n integrationMethod: \"ANY\",\n connectionType: \"VPC_LINK\",\n connectionId: exampleAwsApigatewayv2VpcLink.id,\n tlsConfig: {\n serverNameToVerify: \"example.com\",\n },\n requestParameters: {\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n responseParameters: [\n {\n statusCode: \"403\",\n mappings: {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n statusCode: \"200\",\n mappings: {\n \"overwrite:statuscode\": \"204\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"Example with a load balancer\",\n integration_type=\"HTTP_PROXY\",\n integration_uri=example_aws_lb_listener[\"arn\"],\n integration_method=\"ANY\",\n connection_type=\"VPC_LINK\",\n connection_id=example_aws_apigatewayv2_vpc_link[\"id\"],\n tls_config={\n \"server_name_to_verify\": \"example.com\",\n },\n request_parameters={\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n response_parameters=[\n {\n \"status_code\": \"403\",\n \"mappings\": {\n \"append_header_auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n \"status_code\": \"200\",\n \"mappings\": {\n \"overwrite_statuscode\": \"204\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"Example with a load balancer\",\n IntegrationType = \"HTTP_PROXY\",\n IntegrationUri = exampleAwsLbListener.Arn,\n IntegrationMethod = \"ANY\",\n ConnectionType = \"VPC_LINK\",\n ConnectionId = exampleAwsApigatewayv2VpcLink.Id,\n TlsConfig = new Aws.ApiGatewayV2.Inputs.IntegrationTlsConfigArgs\n {\n ServerNameToVerify = \"example.com\",\n },\n RequestParameters = \n {\n { \"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\" },\n { \"overwrite:path\", \"staticValueForIntegration\" },\n },\n ResponseParameters = new[]\n {\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"403\",\n Mappings = \n {\n { \"append:header.auth\", \"$context.authorizer.authorizerResponse\" },\n },\n },\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"200\",\n Mappings = \n {\n { \"overwrite:statuscode\", \"204\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"Example with a load balancer\"),\n\t\t\tIntegrationType: pulumi.String(\"HTTP_PROXY\"),\n\t\t\tIntegrationUri: pulumi.Any(exampleAwsLbListener.Arn),\n\t\t\tIntegrationMethod: pulumi.String(\"ANY\"),\n\t\t\tConnectionType: pulumi.String(\"VPC_LINK\"),\n\t\t\tConnectionId: pulumi.Any(exampleAwsApigatewayv2VpcLink.Id),\n\t\t\tTlsConfig: \u0026apigatewayv2.IntegrationTlsConfigArgs{\n\t\t\t\tServerNameToVerify: pulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"append:header.authforintegration\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\"overwrite:path\": pulumi.String(\"staticValueForIntegration\"),\n\t\t\t},\n\t\t\tResponseParameters: apigatewayv2.IntegrationResponseParameterArray{\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"403\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"append:header.auth\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"200\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"overwrite:statuscode\": pulumi.String(\"204\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationTlsConfigArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationResponseParameterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"Example with a load balancer\")\n .integrationType(\"HTTP_PROXY\")\n .integrationUri(exampleAwsLbListener.arn())\n .integrationMethod(\"ANY\")\n .connectionType(\"VPC_LINK\")\n .connectionId(exampleAwsApigatewayv2VpcLink.id())\n .tlsConfig(IntegrationTlsConfigArgs.builder()\n .serverNameToVerify(\"example.com\")\n .build())\n .requestParameters(Map.ofEntries(\n Map.entry(\"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\"),\n Map.entry(\"overwrite:path\", \"staticValueForIntegration\")\n ))\n .responseParameters( \n IntegrationResponseParameterArgs.builder()\n .statusCode(403)\n .mappings(Map.of(\"append:header.auth\", \"$context.authorizer.authorizerResponse\"))\n .build(),\n IntegrationResponseParameterArgs.builder()\n .statusCode(200)\n .mappings(Map.of(\"overwrite:statuscode\", \"204\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: Example with a load balancer\n integrationType: HTTP_PROXY\n integrationUri: ${exampleAwsLbListener.arn}\n integrationMethod: ANY\n connectionType: VPC_LINK\n connectionId: ${exampleAwsApigatewayv2VpcLink.id}\n tlsConfig:\n serverNameToVerify: example.com\n requestParameters:\n append:header.authforintegration: $context.authorizer.authorizerResponse\n overwrite:path: staticValueForIntegration\n responseParameters:\n - statusCode: 403\n mappings:\n append:header.auth: $context.authorizer.authorizerResponse\n - statusCode: 200\n mappings:\n overwrite:statuscode: '204'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_apigatewayv2_integration` using the API identifier and integration identifier. For example:\n\n```sh\n$ pulumi import aws:apigatewayv2/integration:Integration example aabbccddee/1122334\n```\n-\u003e __Note:__ The API Gateway managed integration created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported.\n\n", + "description": "Manages an Amazon API Gateway Version 2 integration.\nMore information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html).\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"MOCK\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"MOCK\")\n```\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"MOCK\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"MOCK\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"MOCK\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: MOCK\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Lambda Integration\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.lambda.Function(\"example\", {\n code: new pulumi.asset.FileArchive(\"example.zip\"),\n name: \"Example\",\n role: exampleAwsIamRole.arn,\n handler: \"index.handler\",\n runtime: aws.lambda.Runtime.NodeJS20dX,\n});\nconst exampleIntegration = new aws.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"AWS_PROXY\",\n connectionType: \"INTERNET\",\n contentHandlingStrategy: \"CONVERT_TO_TEXT\",\n description: \"Lambda example\",\n integrationMethod: \"POST\",\n integrationUri: example.invokeArn,\n passthroughBehavior: \"WHEN_NO_MATCH\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.Function(\"example\",\n code=pulumi.FileArchive(\"example.zip\"),\n name=\"Example\",\n role=example_aws_iam_role[\"arn\"],\n handler=\"index.handler\",\n runtime=aws.lambda_.Runtime.NODE_JS20D_X)\nexample_integration = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"AWS_PROXY\",\n connection_type=\"INTERNET\",\n content_handling_strategy=\"CONVERT_TO_TEXT\",\n description=\"Lambda example\",\n integration_method=\"POST\",\n integration_uri=example.invoke_arn,\n passthrough_behavior=\"WHEN_NO_MATCH\")\n```\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.Lambda.Function(\"example\", new()\n {\n Code = new FileArchive(\"example.zip\"),\n Name = \"Example\",\n Role = exampleAwsIamRole.Arn,\n Handler = \"index.handler\",\n Runtime = Aws.Lambda.Runtime.NodeJS20dX,\n });\n\n var exampleIntegration = new Aws.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"AWS_PROXY\",\n ConnectionType = \"INTERNET\",\n ContentHandlingStrategy = \"CONVERT_TO_TEXT\",\n Description = \"Lambda example\",\n IntegrationMethod = \"POST\",\n IntegrationUri = example.InvokeArn,\n PassthroughBehavior = \"WHEN_NO_MATCH\",\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/apigatewayv2\"\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\texample, err := lambda.NewFunction(ctx, \"example\", \u0026lambda.FunctionArgs{\n\t\t\tCode: pulumi.NewFileArchive(\"example.zip\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tHandler: pulumi.String(\"index.handler\"),\n\t\t\tRuntime: pulumi.String(lambda.RuntimeNodeJS20dX),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tConnectionType: pulumi.String(\"INTERNET\"),\n\t\t\tContentHandlingStrategy: pulumi.String(\"CONVERT_TO_TEXT\"),\n\t\t\tDescription: pulumi.String(\"Lambda example\"),\n\t\t\tIntegrationMethod: pulumi.String(\"POST\"),\n\t\t\tIntegrationUri: example.InvokeArn,\n\t\t\tPassthroughBehavior: pulumi.String(\"WHEN_NO_MATCH\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.Function;\nimport com.pulumi.aws.lambda.FunctionArgs;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.asset.FileArchive;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Function(\"example\", FunctionArgs.builder()\n .code(new FileArchive(\"example.zip\"))\n .name(\"Example\")\n .role(exampleAwsIamRole.arn())\n .handler(\"index.handler\")\n .runtime(\"nodejs20.x\")\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"AWS_PROXY\")\n .connectionType(\"INTERNET\")\n .contentHandlingStrategy(\"CONVERT_TO_TEXT\")\n .description(\"Lambda example\")\n .integrationMethod(\"POST\")\n .integrationUri(example.invokeArn())\n .passthroughBehavior(\"WHEN_NO_MATCH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:Function\n properties:\n code:\n fn::FileArchive: example.zip\n name: Example\n role: ${exampleAwsIamRole.arn}\n handler: index.handler\n runtime: nodejs20.x\n exampleIntegration:\n type: aws:apigatewayv2:Integration\n name: example\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: AWS_PROXY\n connectionType: INTERNET\n contentHandlingStrategy: CONVERT_TO_TEXT\n description: Lambda example\n integrationMethod: POST\n integrationUri: ${example.invokeArn}\n passthroughBehavior: WHEN_NO_MATCH\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### AWS Service Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"SQS example\",\n integrationType: \"AWS_PROXY\",\n integrationSubtype: \"SQS-SendMessage\",\n requestParameters: {\n QueueUrl: \"$request.header.queueUrl\",\n MessageBody: \"$request.body.message\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"SQS example\",\n integration_type=\"AWS_PROXY\",\n integration_subtype=\"SQS-SendMessage\",\n request_parameters={\n \"QueueUrl\": \"$request.header.queueUrl\",\n \"MessageBody\": \"$request.body.message\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"SQS example\",\n IntegrationType = \"AWS_PROXY\",\n IntegrationSubtype = \"SQS-SendMessage\",\n RequestParameters = \n {\n { \"QueueUrl\", \"$request.header.queueUrl\" },\n { \"MessageBody\", \"$request.body.message\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"SQS example\"),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tIntegrationSubtype: pulumi.String(\"SQS-SendMessage\"),\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"QueueUrl\": pulumi.String(\"$request.header.queueUrl\"),\n\t\t\t\t\"MessageBody\": pulumi.String(\"$request.body.message\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"SQS example\")\n .integrationType(\"AWS_PROXY\")\n .integrationSubtype(\"SQS-SendMessage\")\n .requestParameters(Map.ofEntries(\n Map.entry(\"QueueUrl\", \"$request.header.queueUrl\"),\n Map.entry(\"MessageBody\", \"$request.body.message\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: SQS example\n integrationType: AWS_PROXY\n integrationSubtype: SQS-SendMessage\n requestParameters:\n QueueUrl: $request.header.queueUrl\n MessageBody: $request.body.message\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Private Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"Example with a load balancer\",\n integrationType: \"HTTP_PROXY\",\n integrationUri: exampleAwsLbListener.arn,\n integrationMethod: \"ANY\",\n connectionType: \"VPC_LINK\",\n connectionId: exampleAwsApigatewayv2VpcLink.id,\n tlsConfig: {\n serverNameToVerify: \"example.com\",\n },\n requestParameters: {\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n responseParameters: [\n {\n statusCode: \"403\",\n mappings: {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n statusCode: \"200\",\n mappings: {\n \"overwrite:statuscode\": \"204\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"Example with a load balancer\",\n integration_type=\"HTTP_PROXY\",\n integration_uri=example_aws_lb_listener[\"arn\"],\n integration_method=\"ANY\",\n connection_type=\"VPC_LINK\",\n connection_id=example_aws_apigatewayv2_vpc_link[\"id\"],\n tls_config={\n \"server_name_to_verify\": \"example.com\",\n },\n request_parameters={\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n response_parameters=[\n {\n \"status_code\": \"403\",\n \"mappings\": {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n \"status_code\": \"200\",\n \"mappings\": {\n \"overwrite:statuscode\": \"204\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"Example with a load balancer\",\n IntegrationType = \"HTTP_PROXY\",\n IntegrationUri = exampleAwsLbListener.Arn,\n IntegrationMethod = \"ANY\",\n ConnectionType = \"VPC_LINK\",\n ConnectionId = exampleAwsApigatewayv2VpcLink.Id,\n TlsConfig = new Aws.ApiGatewayV2.Inputs.IntegrationTlsConfigArgs\n {\n ServerNameToVerify = \"example.com\",\n },\n RequestParameters = \n {\n { \"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\" },\n { \"overwrite:path\", \"staticValueForIntegration\" },\n },\n ResponseParameters = new[]\n {\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"403\",\n Mappings = \n {\n { \"append:header.auth\", \"$context.authorizer.authorizerResponse\" },\n },\n },\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"200\",\n Mappings = \n {\n { \"overwrite:statuscode\", \"204\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"Example with a load balancer\"),\n\t\t\tIntegrationType: pulumi.String(\"HTTP_PROXY\"),\n\t\t\tIntegrationUri: pulumi.Any(exampleAwsLbListener.Arn),\n\t\t\tIntegrationMethod: pulumi.String(\"ANY\"),\n\t\t\tConnectionType: pulumi.String(\"VPC_LINK\"),\n\t\t\tConnectionId: pulumi.Any(exampleAwsApigatewayv2VpcLink.Id),\n\t\t\tTlsConfig: \u0026apigatewayv2.IntegrationTlsConfigArgs{\n\t\t\t\tServerNameToVerify: pulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"append:header.authforintegration\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\"overwrite:path\": pulumi.String(\"staticValueForIntegration\"),\n\t\t\t},\n\t\t\tResponseParameters: apigatewayv2.IntegrationResponseParameterArray{\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"403\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"append:header.auth\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"200\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"overwrite:statuscode\": pulumi.String(\"204\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationTlsConfigArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationResponseParameterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"Example with a load balancer\")\n .integrationType(\"HTTP_PROXY\")\n .integrationUri(exampleAwsLbListener.arn())\n .integrationMethod(\"ANY\")\n .connectionType(\"VPC_LINK\")\n .connectionId(exampleAwsApigatewayv2VpcLink.id())\n .tlsConfig(IntegrationTlsConfigArgs.builder()\n .serverNameToVerify(\"example.com\")\n .build())\n .requestParameters(Map.ofEntries(\n Map.entry(\"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\"),\n Map.entry(\"overwrite:path\", \"staticValueForIntegration\")\n ))\n .responseParameters( \n IntegrationResponseParameterArgs.builder()\n .statusCode(403)\n .mappings(Map.of(\"append:header.auth\", \"$context.authorizer.authorizerResponse\"))\n .build(),\n IntegrationResponseParameterArgs.builder()\n .statusCode(200)\n .mappings(Map.of(\"overwrite:statuscode\", \"204\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: Example with a load balancer\n integrationType: HTTP_PROXY\n integrationUri: ${exampleAwsLbListener.arn}\n integrationMethod: ANY\n connectionType: VPC_LINK\n connectionId: ${exampleAwsApigatewayv2VpcLink.id}\n tlsConfig:\n serverNameToVerify: example.com\n requestParameters:\n append:header.authforintegration: $context.authorizer.authorizerResponse\n overwrite:path: staticValueForIntegration\n responseParameters:\n - statusCode: 403\n mappings:\n append:header.auth: $context.authorizer.authorizerResponse\n - statusCode: 200\n mappings:\n overwrite:statuscode: '204'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_apigatewayv2_integration` using the API identifier and integration identifier. For example:\n\n```sh\n$ pulumi import aws:apigatewayv2/integration:Integration example aabbccddee/1122334\n```\n-\u003e __Note:__ The API Gateway managed integration created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported.\n\n", "properties": { "apiId": { "type": "string", @@ -182277,7 +182277,7 @@ } }, "aws:applicationinsights/application:Application": { - "description": "Provides a ApplicationInsights Application 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 exampleGroup = new aws.resourcegroups.Group(\"example\", {\n name: \"example\",\n resourceQuery: {\n query: JSON.stringify({\n ResourceTypeFilters: [\"AWS::EC2::Instance\"],\n TagFilters: [{\n Key: \"Stage\",\n Values: [\"Test\"],\n }],\n }),\n },\n});\nconst example = new aws.applicationinsights.Application(\"example\", {resourceGroupName: exampleGroup.name});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_group = aws.resourcegroups.Group(\"example\",\n name=\"example\",\n resource_query={\n \"query\": json.dumps({\n \"resource_type_filters\": [\"AWS::EC2::Instance\"],\n \"tag_filters\": [{\n \"key\": \"Stage\",\n \"values\": [\"Test\"],\n }],\n }),\n })\nexample = aws.applicationinsights.Application(\"example\", resource_group_name=example_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 exampleGroup = new Aws.ResourceGroups.Group(\"example\", new()\n {\n Name = \"example\",\n ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs\n {\n Query = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceTypeFilters\"] = new[]\n {\n \"AWS::EC2::Instance\",\n },\n [\"TagFilters\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Key\"] = \"Stage\",\n [\"Values\"] = new[]\n {\n \"Test\",\n },\n },\n },\n }),\n },\n });\n\n var example = new Aws.ApplicationInsights.Application(\"example\", new()\n {\n ResourceGroupName = exampleGroup.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/applicationinsights\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups\"\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\"ResourceTypeFilters\": []string{\n\t\t\t\t\"AWS::EC2::Instance\",\n\t\t\t},\n\t\t\t\"TagFilters\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Key\": \"Stage\",\n\t\t\t\t\t\"Values\": []string{\n\t\t\t\t\t\t\"Test\",\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\texampleGroup, err := resourcegroups.NewGroup(ctx, \"example\", \u0026resourcegroups.GroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceQuery: \u0026resourcegroups.GroupResourceQueryArgs{\n\t\t\t\tQuery: pulumi.String(json0),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = applicationinsights.NewApplication(ctx, \"example\", \u0026applicationinsights.ApplicationArgs{\n\t\t\tResourceGroupName: exampleGroup.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.resourcegroups.Group;\nimport com.pulumi.aws.resourcegroups.GroupArgs;\nimport com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;\nimport com.pulumi.aws.applicationinsights.Application;\nimport com.pulumi.aws.applicationinsights.ApplicationArgs;\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 exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .name(\"example\")\n .resourceQuery(GroupResourceQueryArgs.builder()\n .query(serializeJson(\n jsonObject(\n jsonProperty(\"ResourceTypeFilters\", jsonArray(\"AWS::EC2::Instance\")),\n jsonProperty(\"TagFilters\", jsonArray(jsonObject(\n jsonProperty(\"Key\", \"Stage\"),\n jsonProperty(\"Values\", jsonArray(\"Test\"))\n )))\n )))\n .build())\n .build());\n\n var example = new Application(\"example\", ApplicationArgs.builder()\n .resourceGroupName(exampleGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:applicationinsights:Application\n properties:\n resourceGroupName: ${exampleGroup.name}\n exampleGroup:\n type: aws:resourcegroups:Group\n name: example\n properties:\n name: example\n resourceQuery:\n query:\n fn::toJSON:\n ResourceTypeFilters:\n - AWS::EC2::Instance\n TagFilters:\n - Key: Stage\n Values:\n - Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ApplicationInsights Applications using the `resource_group_name`. For example:\n\n```sh\n$ pulumi import aws:applicationinsights/application:Application some some-application\n```\n", + "description": "Provides a ApplicationInsights Application 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 exampleGroup = new aws.resourcegroups.Group(\"example\", {\n name: \"example\",\n resourceQuery: {\n query: JSON.stringify({\n ResourceTypeFilters: [\"AWS::EC2::Instance\"],\n TagFilters: [{\n Key: \"Stage\",\n Values: [\"Test\"],\n }],\n }),\n },\n});\nconst example = new aws.applicationinsights.Application(\"example\", {resourceGroupName: exampleGroup.name});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_group = aws.resourcegroups.Group(\"example\",\n name=\"example\",\n resource_query={\n \"query\": json.dumps({\n \"ResourceTypeFilters\": [\"AWS::EC2::Instance\"],\n \"TagFilters\": [{\n \"Key\": \"Stage\",\n \"Values\": [\"Test\"],\n }],\n }),\n })\nexample = aws.applicationinsights.Application(\"example\", resource_group_name=example_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 exampleGroup = new Aws.ResourceGroups.Group(\"example\", new()\n {\n Name = \"example\",\n ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs\n {\n Query = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceTypeFilters\"] = new[]\n {\n \"AWS::EC2::Instance\",\n },\n [\"TagFilters\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Key\"] = \"Stage\",\n [\"Values\"] = new[]\n {\n \"Test\",\n },\n },\n },\n }),\n },\n });\n\n var example = new Aws.ApplicationInsights.Application(\"example\", new()\n {\n ResourceGroupName = exampleGroup.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/applicationinsights\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups\"\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\"ResourceTypeFilters\": []string{\n\t\t\t\t\"AWS::EC2::Instance\",\n\t\t\t},\n\t\t\t\"TagFilters\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Key\": \"Stage\",\n\t\t\t\t\t\"Values\": []string{\n\t\t\t\t\t\t\"Test\",\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\texampleGroup, err := resourcegroups.NewGroup(ctx, \"example\", \u0026resourcegroups.GroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceQuery: \u0026resourcegroups.GroupResourceQueryArgs{\n\t\t\t\tQuery: pulumi.String(json0),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = applicationinsights.NewApplication(ctx, \"example\", \u0026applicationinsights.ApplicationArgs{\n\t\t\tResourceGroupName: exampleGroup.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.resourcegroups.Group;\nimport com.pulumi.aws.resourcegroups.GroupArgs;\nimport com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;\nimport com.pulumi.aws.applicationinsights.Application;\nimport com.pulumi.aws.applicationinsights.ApplicationArgs;\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 exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .name(\"example\")\n .resourceQuery(GroupResourceQueryArgs.builder()\n .query(serializeJson(\n jsonObject(\n jsonProperty(\"ResourceTypeFilters\", jsonArray(\"AWS::EC2::Instance\")),\n jsonProperty(\"TagFilters\", jsonArray(jsonObject(\n jsonProperty(\"Key\", \"Stage\"),\n jsonProperty(\"Values\", jsonArray(\"Test\"))\n )))\n )))\n .build())\n .build());\n\n var example = new Application(\"example\", ApplicationArgs.builder()\n .resourceGroupName(exampleGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:applicationinsights:Application\n properties:\n resourceGroupName: ${exampleGroup.name}\n exampleGroup:\n type: aws:resourcegroups:Group\n name: example\n properties:\n name: example\n resourceQuery:\n query:\n fn::toJSON:\n ResourceTypeFilters:\n - AWS::EC2::Instance\n TagFilters:\n - Key: Stage\n Values:\n - Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ApplicationInsights Applications using the `resource_group_name`. For example:\n\n```sh\n$ pulumi import aws:applicationinsights/application:Application some some-application\n```\n", "properties": { "arn": { "type": "string", @@ -190158,7 +190158,7 @@ } }, "aws:backup/plan:Plan": { - "description": "Provides an AWS Backup plan 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.backup.Plan(\"example\", {\n name: \"my_example_backup_plan\",\n rules: [{\n ruleName: \"my_example_backup_rule\",\n targetVaultName: test.name,\n schedule: \"cron(0 12 * * ? *)\",\n lifecycle: {\n deleteAfter: 14,\n },\n }],\n advancedBackupSettings: [{\n backupOptions: {\n WindowsVSS: \"enabled\",\n },\n resourceType: \"EC2\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.backup.Plan(\"example\",\n name=\"my_example_backup_plan\",\n rules=[{\n \"rule_name\": \"my_example_backup_rule\",\n \"target_vault_name\": test[\"name\"],\n \"schedule\": \"cron(0 12 * * ? *)\",\n \"lifecycle\": {\n \"delete_after\": 14,\n },\n }],\n advanced_backup_settings=[{\n \"backup_options\": {\n \"windows_vss\": \"enabled\",\n },\n \"resource_type\": \"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 example = new Aws.Backup.Plan(\"example\", new()\n {\n Name = \"my_example_backup_plan\",\n Rules = new[]\n {\n new Aws.Backup.Inputs.PlanRuleArgs\n {\n RuleName = \"my_example_backup_rule\",\n TargetVaultName = test.Name,\n Schedule = \"cron(0 12 * * ? *)\",\n Lifecycle = new Aws.Backup.Inputs.PlanRuleLifecycleArgs\n {\n DeleteAfter = 14,\n },\n },\n },\n AdvancedBackupSettings = new[]\n {\n new Aws.Backup.Inputs.PlanAdvancedBackupSettingArgs\n {\n BackupOptions = \n {\n { \"WindowsVSS\", \"enabled\" },\n },\n ResourceType = \"EC2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := backup.NewPlan(ctx, \"example\", \u0026backup.PlanArgs{\n\t\t\tName: pulumi.String(\"my_example_backup_plan\"),\n\t\t\tRules: backup.PlanRuleArray{\n\t\t\t\t\u0026backup.PlanRuleArgs{\n\t\t\t\t\tRuleName: pulumi.String(\"my_example_backup_rule\"),\n\t\t\t\t\tTargetVaultName: pulumi.Any(test.Name),\n\t\t\t\t\tSchedule: pulumi.String(\"cron(0 12 * * ? *)\"),\n\t\t\t\t\tLifecycle: \u0026backup.PlanRuleLifecycleArgs{\n\t\t\t\t\t\tDeleteAfter: pulumi.Int(14),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAdvancedBackupSettings: backup.PlanAdvancedBackupSettingArray{\n\t\t\t\t\u0026backup.PlanAdvancedBackupSettingArgs{\n\t\t\t\t\tBackupOptions: pulumi.StringMap{\n\t\t\t\t\t\t\"WindowsVSS\": pulumi.String(\"enabled\"),\n\t\t\t\t\t},\n\t\t\t\t\tResourceType: pulumi.String(\"EC2\"),\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.backup.Plan;\nimport com.pulumi.aws.backup.PlanArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleLifecycleArgs;\nimport com.pulumi.aws.backup.inputs.PlanAdvancedBackupSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Plan(\"example\", PlanArgs.builder()\n .name(\"my_example_backup_plan\")\n .rules(PlanRuleArgs.builder()\n .ruleName(\"my_example_backup_rule\")\n .targetVaultName(test.name())\n .schedule(\"cron(0 12 * * ? *)\")\n .lifecycle(PlanRuleLifecycleArgs.builder()\n .deleteAfter(14)\n .build())\n .build())\n .advancedBackupSettings(PlanAdvancedBackupSettingArgs.builder()\n .backupOptions(Map.of(\"WindowsVSS\", \"enabled\"))\n .resourceType(\"EC2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:backup:Plan\n properties:\n name: my_example_backup_plan\n rules:\n - ruleName: my_example_backup_rule\n targetVaultName: ${test.name}\n schedule: cron(0 12 * * ? *)\n lifecycle:\n deleteAfter: 14\n advancedBackupSettings:\n - backupOptions:\n WindowsVSS: enabled\n resourceType: EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup Plan using the `id`. For example:\n\n```sh\n$ pulumi import aws:backup/plan:Plan test \u003cid\u003e\n```\n", + "description": "Provides an AWS Backup plan 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.backup.Plan(\"example\", {\n name: \"my_example_backup_plan\",\n rules: [{\n ruleName: \"my_example_backup_rule\",\n targetVaultName: test.name,\n schedule: \"cron(0 12 * * ? *)\",\n lifecycle: {\n deleteAfter: 14,\n },\n }],\n advancedBackupSettings: [{\n backupOptions: {\n WindowsVSS: \"enabled\",\n },\n resourceType: \"EC2\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.backup.Plan(\"example\",\n name=\"my_example_backup_plan\",\n rules=[{\n \"rule_name\": \"my_example_backup_rule\",\n \"target_vault_name\": test[\"name\"],\n \"schedule\": \"cron(0 12 * * ? *)\",\n \"lifecycle\": {\n \"delete_after\": 14,\n },\n }],\n advanced_backup_settings=[{\n \"backup_options\": {\n \"WindowsVSS\": \"enabled\",\n },\n \"resource_type\": \"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 example = new Aws.Backup.Plan(\"example\", new()\n {\n Name = \"my_example_backup_plan\",\n Rules = new[]\n {\n new Aws.Backup.Inputs.PlanRuleArgs\n {\n RuleName = \"my_example_backup_rule\",\n TargetVaultName = test.Name,\n Schedule = \"cron(0 12 * * ? *)\",\n Lifecycle = new Aws.Backup.Inputs.PlanRuleLifecycleArgs\n {\n DeleteAfter = 14,\n },\n },\n },\n AdvancedBackupSettings = new[]\n {\n new Aws.Backup.Inputs.PlanAdvancedBackupSettingArgs\n {\n BackupOptions = \n {\n { \"WindowsVSS\", \"enabled\" },\n },\n ResourceType = \"EC2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := backup.NewPlan(ctx, \"example\", \u0026backup.PlanArgs{\n\t\t\tName: pulumi.String(\"my_example_backup_plan\"),\n\t\t\tRules: backup.PlanRuleArray{\n\t\t\t\t\u0026backup.PlanRuleArgs{\n\t\t\t\t\tRuleName: pulumi.String(\"my_example_backup_rule\"),\n\t\t\t\t\tTargetVaultName: pulumi.Any(test.Name),\n\t\t\t\t\tSchedule: pulumi.String(\"cron(0 12 * * ? *)\"),\n\t\t\t\t\tLifecycle: \u0026backup.PlanRuleLifecycleArgs{\n\t\t\t\t\t\tDeleteAfter: pulumi.Int(14),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAdvancedBackupSettings: backup.PlanAdvancedBackupSettingArray{\n\t\t\t\t\u0026backup.PlanAdvancedBackupSettingArgs{\n\t\t\t\t\tBackupOptions: pulumi.StringMap{\n\t\t\t\t\t\t\"WindowsVSS\": pulumi.String(\"enabled\"),\n\t\t\t\t\t},\n\t\t\t\t\tResourceType: pulumi.String(\"EC2\"),\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.backup.Plan;\nimport com.pulumi.aws.backup.PlanArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleLifecycleArgs;\nimport com.pulumi.aws.backup.inputs.PlanAdvancedBackupSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Plan(\"example\", PlanArgs.builder()\n .name(\"my_example_backup_plan\")\n .rules(PlanRuleArgs.builder()\n .ruleName(\"my_example_backup_rule\")\n .targetVaultName(test.name())\n .schedule(\"cron(0 12 * * ? *)\")\n .lifecycle(PlanRuleLifecycleArgs.builder()\n .deleteAfter(14)\n .build())\n .build())\n .advancedBackupSettings(PlanAdvancedBackupSettingArgs.builder()\n .backupOptions(Map.of(\"WindowsVSS\", \"enabled\"))\n .resourceType(\"EC2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:backup:Plan\n properties:\n name: my_example_backup_plan\n rules:\n - ruleName: my_example_backup_rule\n targetVaultName: ${test.name}\n schedule: cron(0 12 * * ? *)\n lifecycle:\n deleteAfter: 14\n advancedBackupSettings:\n - backupOptions:\n WindowsVSS: enabled\n resourceType: EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup Plan using the `id`. For example:\n\n```sh\n$ pulumi import aws:backup/plan:Plan test \u003cid\u003e\n```\n", "properties": { "advancedBackupSettings": { "type": "array", @@ -191988,7 +191988,7 @@ } }, "aws:bcmdata/export:Export": { - "description": "Resource for managing an AWS BCM Data Exports Export.\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 = new aws.bcmdata.Export(\"test\", {\"export\": {\n name: \"testexample\",\n dataQueries: [{\n queryStatement: \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n tableConfigurations: {\n COST_AND_USAGE_REPORT: {\n TIME_GRANULARITY: \"HOURLY\",\n INCLUDE_RESOURCES: \"FALSE\",\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: \"FALSE\",\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: \"FALSE\",\n },\n },\n }],\n destinationConfigurations: [{\n s3Destinations: [{\n s3Bucket: testAwsS3Bucket.bucket,\n s3Prefix: testAwsS3Bucket.bucketPrefix,\n s3Region: testAwsS3Bucket.region,\n s3OutputConfigurations: [{\n overwrite: \"OVERWRITE_REPORT\",\n format: \"TEXT_OR_CSV\",\n compression: \"GZIP\",\n outputType: \"CUSTOM\",\n }],\n }],\n }],\n refreshCadences: [{\n frequency: \"SYNCHRONOUS\",\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bcmdata.Export(\"test\", export={\n \"name\": \"testexample\",\n \"data_queries\": [{\n \"query_statement\": \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n \"table_configurations\": {\n \"cos_t__an_d__usag_e__report\": {\n \"tim_e__granularity\": \"HOURLY\",\n \"includ_e__resources\": \"FALSE\",\n \"includ_e__manua_l__discoun_t__compatibility\": \"FALSE\",\n \"includ_e__spli_t__cos_t__allocatio_n__data\": \"FALSE\",\n },\n },\n }],\n \"destination_configurations\": [{\n \"s3_destinations\": [{\n \"s3_bucket\": test_aws_s3_bucket[\"bucket\"],\n \"s3_prefix\": test_aws_s3_bucket[\"bucketPrefix\"],\n \"s3_region\": test_aws_s3_bucket[\"region\"],\n \"s3_output_configurations\": [{\n \"overwrite\": \"OVERWRITE_REPORT\",\n \"format\": \"TEXT_OR_CSV\",\n \"compression\": \"GZIP\",\n \"output_type\": \"CUSTOM\",\n }],\n }],\n }],\n \"refresh_cadences\": [{\n \"frequency\": \"SYNCHRONOUS\",\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.BcmData.Export(\"test\", new()\n {\n ExportDetails = new Aws.BcmData.Inputs.ExportExportArgs\n {\n Name = \"testexample\",\n DataQueries = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDataQueryArgs\n {\n QueryStatement = \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n TableConfigurations = \n {\n { \"COST_AND_USAGE_REPORT\", \n {\n { \"TIME_GRANULARITY\", \"HOURLY\" },\n { \"INCLUDE_RESOURCES\", \"FALSE\" },\n { \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\" },\n { \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\" },\n } },\n },\n },\n },\n DestinationConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationArgs\n {\n S3Destinations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationArgs\n {\n S3Bucket = testAwsS3Bucket.Bucket,\n S3Prefix = testAwsS3Bucket.BucketPrefix,\n S3Region = testAwsS3Bucket.Region,\n S3OutputConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs\n {\n Overwrite = \"OVERWRITE_REPORT\",\n Format = \"TEXT_OR_CSV\",\n Compression = \"GZIP\",\n OutputType = \"CUSTOM\",\n },\n },\n },\n },\n },\n },\n RefreshCadences = new[]\n {\n new Aws.BcmData.Inputs.ExportExportRefreshCadenceArgs\n {\n Frequency = \"SYNCHRONOUS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bcmdata\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bcmdata.NewExport(ctx, \"test\", \u0026bcmdata.ExportArgs{\n\t\t\tExport: \u0026bcmdata.ExportExportArgs{\n\t\t\t\tName: pulumi.String(\"testexample\"),\n\t\t\t\tDataQueries: bcmdata.ExportExportDataQueryArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDataQueryArgs{\n\t\t\t\t\t\tQueryStatement: pulumi.String(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\"),\n\t\t\t\t\t\tTableConfigurations: pulumi.StringMapMap{\n\t\t\t\t\t\t\t\"COST_AND_USAGE_REPORT\": pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"TIME_GRANULARITY\": pulumi.String(\"HOURLY\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_RESOURCES\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": pulumi.String(\"FALSE\"),\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\tDestinationConfigurations: bcmdata.ExportExportDestinationConfigurationArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationArgs{\n\t\t\t\t\t\tS3Destinations: bcmdata.ExportExportDestinationConfigurationS3DestinationArray{\n\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationArgs{\n\t\t\t\t\t\t\t\tS3Bucket: pulumi.Any(testAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\tS3Prefix: pulumi.Any(testAwsS3Bucket.BucketPrefix),\n\t\t\t\t\t\t\t\tS3Region: pulumi.Any(testAwsS3Bucket.Region),\n\t\t\t\t\t\t\t\tS3OutputConfigurations: bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArray{\n\t\t\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs{\n\t\t\t\t\t\t\t\t\t\tOverwrite: pulumi.String(\"OVERWRITE_REPORT\"),\n\t\t\t\t\t\t\t\t\t\tFormat: pulumi.String(\"TEXT_OR_CSV\"),\n\t\t\t\t\t\t\t\t\t\tCompression: pulumi.String(\"GZIP\"),\n\t\t\t\t\t\t\t\t\t\tOutputType: pulumi.String(\"CUSTOM\"),\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},\n\t\t\t\t},\n\t\t\t\tRefreshCadences: bcmdata.ExportExportRefreshCadenceArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportRefreshCadenceArgs{\n\t\t\t\t\t\tFrequency: pulumi.String(\"SYNCHRONOUS\"),\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.bcmdata.Export;\nimport com.pulumi.aws.bcmdata.ExportArgs;\nimport com.pulumi.aws.bcmdata.inputs.ExportExportArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Export(\"test\", ExportArgs.builder()\n .export(ExportExportArgs.builder()\n .name(\"testexample\")\n .dataQueries(ExportExportDataQueryArgs.builder()\n .queryStatement(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\")\n .tableConfigurations(Map.of(\"COST_AND_USAGE_REPORT\", Map.ofEntries(\n Map.entry(\"TIME_GRANULARITY\", \"HOURLY\"),\n Map.entry(\"INCLUDE_RESOURCES\", \"FALSE\"),\n Map.entry(\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\"),\n Map.entry(\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\")\n )))\n .build())\n .destinationConfigurations(ExportExportDestinationConfigurationArgs.builder()\n .s3Destinations(ExportExportDestinationConfigurationS3DestinationArgs.builder()\n .s3Bucket(testAwsS3Bucket.bucket())\n .s3Prefix(testAwsS3Bucket.bucketPrefix())\n .s3Region(testAwsS3Bucket.region())\n .s3OutputConfigurations(ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs.builder()\n .overwrite(\"OVERWRITE_REPORT\")\n .format(\"TEXT_OR_CSV\")\n .compression(\"GZIP\")\n .outputType(\"CUSTOM\")\n .build())\n .build())\n .build())\n .refreshCadences(ExportExportRefreshCadenceArgs.builder()\n .frequency(\"SYNCHRONOUS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:bcmdata:Export\n properties:\n export:\n name: testexample\n dataQueries:\n - queryStatement: SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\n tableConfigurations:\n COST_AND_USAGE_REPORT:\n TIME_GRANULARITY: HOURLY\n INCLUDE_RESOURCES: FALSE\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: FALSE\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: FALSE\n destinationConfigurations:\n - s3Destinations:\n - s3Bucket: ${testAwsS3Bucket.bucket}\n s3Prefix: ${testAwsS3Bucket.bucketPrefix}\n s3Region: ${testAwsS3Bucket.region}\n s3OutputConfigurations:\n - overwrite: OVERWRITE_REPORT\n format: TEXT_OR_CSV\n compression: GZIP\n outputType: CUSTOM\n refreshCadences:\n - frequency: SYNCHRONOUS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import BCM Data Exports Export using the export ARN. For example:\n\n```sh\n$ pulumi import aws:bcmdata/export:Export example arn:aws:bcm-data-exports:us-east-1:123456789012:export/CostUsageReport-9f1c75f3-f982-4d9a-b936-1e7ecab814b7\n```\n", + "description": "Resource for managing an AWS BCM Data Exports Export.\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 = new aws.bcmdata.Export(\"test\", {\"export\": {\n name: \"testexample\",\n dataQueries: [{\n queryStatement: \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n tableConfigurations: {\n COST_AND_USAGE_REPORT: {\n TIME_GRANULARITY: \"HOURLY\",\n INCLUDE_RESOURCES: \"FALSE\",\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: \"FALSE\",\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: \"FALSE\",\n },\n },\n }],\n destinationConfigurations: [{\n s3Destinations: [{\n s3Bucket: testAwsS3Bucket.bucket,\n s3Prefix: testAwsS3Bucket.bucketPrefix,\n s3Region: testAwsS3Bucket.region,\n s3OutputConfigurations: [{\n overwrite: \"OVERWRITE_REPORT\",\n format: \"TEXT_OR_CSV\",\n compression: \"GZIP\",\n outputType: \"CUSTOM\",\n }],\n }],\n }],\n refreshCadences: [{\n frequency: \"SYNCHRONOUS\",\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bcmdata.Export(\"test\", export={\n \"name\": \"testexample\",\n \"data_queries\": [{\n \"query_statement\": \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n \"table_configurations\": {\n \"COST_AND_USAGE_REPORT\": {\n \"TIME_GRANULARITY\": \"HOURLY\",\n \"INCLUDE_RESOURCES\": \"FALSE\",\n \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": \"FALSE\",\n \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": \"FALSE\",\n },\n },\n }],\n \"destination_configurations\": [{\n \"s3_destinations\": [{\n \"s3_bucket\": test_aws_s3_bucket[\"bucket\"],\n \"s3_prefix\": test_aws_s3_bucket[\"bucketPrefix\"],\n \"s3_region\": test_aws_s3_bucket[\"region\"],\n \"s3_output_configurations\": [{\n \"overwrite\": \"OVERWRITE_REPORT\",\n \"format\": \"TEXT_OR_CSV\",\n \"compression\": \"GZIP\",\n \"output_type\": \"CUSTOM\",\n }],\n }],\n }],\n \"refresh_cadences\": [{\n \"frequency\": \"SYNCHRONOUS\",\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.BcmData.Export(\"test\", new()\n {\n ExportDetails = new Aws.BcmData.Inputs.ExportExportArgs\n {\n Name = \"testexample\",\n DataQueries = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDataQueryArgs\n {\n QueryStatement = \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n TableConfigurations = \n {\n { \"COST_AND_USAGE_REPORT\", \n {\n { \"TIME_GRANULARITY\", \"HOURLY\" },\n { \"INCLUDE_RESOURCES\", \"FALSE\" },\n { \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\" },\n { \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\" },\n } },\n },\n },\n },\n DestinationConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationArgs\n {\n S3Destinations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationArgs\n {\n S3Bucket = testAwsS3Bucket.Bucket,\n S3Prefix = testAwsS3Bucket.BucketPrefix,\n S3Region = testAwsS3Bucket.Region,\n S3OutputConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs\n {\n Overwrite = \"OVERWRITE_REPORT\",\n Format = \"TEXT_OR_CSV\",\n Compression = \"GZIP\",\n OutputType = \"CUSTOM\",\n },\n },\n },\n },\n },\n },\n RefreshCadences = new[]\n {\n new Aws.BcmData.Inputs.ExportExportRefreshCadenceArgs\n {\n Frequency = \"SYNCHRONOUS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bcmdata\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bcmdata.NewExport(ctx, \"test\", \u0026bcmdata.ExportArgs{\n\t\t\tExport: \u0026bcmdata.ExportExportArgs{\n\t\t\t\tName: pulumi.String(\"testexample\"),\n\t\t\t\tDataQueries: bcmdata.ExportExportDataQueryArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDataQueryArgs{\n\t\t\t\t\t\tQueryStatement: pulumi.String(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\"),\n\t\t\t\t\t\tTableConfigurations: pulumi.StringMapMap{\n\t\t\t\t\t\t\t\"COST_AND_USAGE_REPORT\": pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"TIME_GRANULARITY\": pulumi.String(\"HOURLY\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_RESOURCES\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": pulumi.String(\"FALSE\"),\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\tDestinationConfigurations: bcmdata.ExportExportDestinationConfigurationArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationArgs{\n\t\t\t\t\t\tS3Destinations: bcmdata.ExportExportDestinationConfigurationS3DestinationArray{\n\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationArgs{\n\t\t\t\t\t\t\t\tS3Bucket: pulumi.Any(testAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\tS3Prefix: pulumi.Any(testAwsS3Bucket.BucketPrefix),\n\t\t\t\t\t\t\t\tS3Region: pulumi.Any(testAwsS3Bucket.Region),\n\t\t\t\t\t\t\t\tS3OutputConfigurations: bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArray{\n\t\t\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs{\n\t\t\t\t\t\t\t\t\t\tOverwrite: pulumi.String(\"OVERWRITE_REPORT\"),\n\t\t\t\t\t\t\t\t\t\tFormat: pulumi.String(\"TEXT_OR_CSV\"),\n\t\t\t\t\t\t\t\t\t\tCompression: pulumi.String(\"GZIP\"),\n\t\t\t\t\t\t\t\t\t\tOutputType: pulumi.String(\"CUSTOM\"),\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},\n\t\t\t\t},\n\t\t\t\tRefreshCadences: bcmdata.ExportExportRefreshCadenceArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportRefreshCadenceArgs{\n\t\t\t\t\t\tFrequency: pulumi.String(\"SYNCHRONOUS\"),\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.bcmdata.Export;\nimport com.pulumi.aws.bcmdata.ExportArgs;\nimport com.pulumi.aws.bcmdata.inputs.ExportExportArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Export(\"test\", ExportArgs.builder()\n .export(ExportExportArgs.builder()\n .name(\"testexample\")\n .dataQueries(ExportExportDataQueryArgs.builder()\n .queryStatement(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\")\n .tableConfigurations(Map.of(\"COST_AND_USAGE_REPORT\", Map.ofEntries(\n Map.entry(\"TIME_GRANULARITY\", \"HOURLY\"),\n Map.entry(\"INCLUDE_RESOURCES\", \"FALSE\"),\n Map.entry(\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\"),\n Map.entry(\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\")\n )))\n .build())\n .destinationConfigurations(ExportExportDestinationConfigurationArgs.builder()\n .s3Destinations(ExportExportDestinationConfigurationS3DestinationArgs.builder()\n .s3Bucket(testAwsS3Bucket.bucket())\n .s3Prefix(testAwsS3Bucket.bucketPrefix())\n .s3Region(testAwsS3Bucket.region())\n .s3OutputConfigurations(ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs.builder()\n .overwrite(\"OVERWRITE_REPORT\")\n .format(\"TEXT_OR_CSV\")\n .compression(\"GZIP\")\n .outputType(\"CUSTOM\")\n .build())\n .build())\n .build())\n .refreshCadences(ExportExportRefreshCadenceArgs.builder()\n .frequency(\"SYNCHRONOUS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:bcmdata:Export\n properties:\n export:\n name: testexample\n dataQueries:\n - queryStatement: SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\n tableConfigurations:\n COST_AND_USAGE_REPORT:\n TIME_GRANULARITY: HOURLY\n INCLUDE_RESOURCES: FALSE\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: FALSE\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: FALSE\n destinationConfigurations:\n - s3Destinations:\n - s3Bucket: ${testAwsS3Bucket.bucket}\n s3Prefix: ${testAwsS3Bucket.bucketPrefix}\n s3Region: ${testAwsS3Bucket.region}\n s3OutputConfigurations:\n - overwrite: OVERWRITE_REPORT\n format: TEXT_OR_CSV\n compression: GZIP\n outputType: CUSTOM\n refreshCadences:\n - frequency: SYNCHRONOUS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import BCM Data Exports Export using the export ARN. For example:\n\n```sh\n$ pulumi import aws:bcmdata/export:Export example arn:aws:bcm-data-exports:us-east-1:123456789012:export/CostUsageReport-9f1c75f3-f982-4d9a-b936-1e7ecab814b7\n```\n", "properties": { "export": { "$ref": "#/types/aws:bcmdata/ExportExport:ExportExport", @@ -202858,7 +202858,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\": 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### AppSync 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 invokeAppsyncMutation = new aws.cloudwatch.EventRule(\"invoke_appsync_mutation\", {\n name: \"invoke-appsync-mutation\",\n description: \"schedule_batch_test\",\n scheduleExpression: \"rate(5 minutes)\",\n});\nconst appsyncMutationRoleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst appsyncMutationRole = new aws.iam.Role(\"appsync_mutation_role\", {\n name: \"appsync-mutation-role\",\n assumeRolePolicy: appsyncMutationRoleTrust.then(appsyncMutationRoleTrust =\u003e appsyncMutationRoleTrust.json),\n});\nconst graphql_api = new aws.appsync.GraphQLApi(\"graphql-api\", {\n name: \"api\",\n authenticationType: \"AWS_IAM\",\n schema: ` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`,\n});\nconst invokeAppsyncMutationEventTarget = new aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\", {\n arn: std.replaceOutput({\n text: graphql_api.arn,\n search: \"apis\",\n replace: \"endpoints/graphql-api\",\n }).apply(invoke =\u003e invoke.result),\n rule: invokeAppsyncMutation.id,\n roleArn: appsyncMutationRole.arn,\n inputTransformer: {\n inputPaths: {\n input: \"$.detail.input\",\n },\n inputTemplate: ` {\n \"input\": \u003cinput\u003e\n }\n`,\n },\n appsyncTarget: {\n graphqlOperation: \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n});\nconst appsyncMutationRolePolicyDocument = aws.iam.getPolicyDocumentOutput({\n statements: [{\n actions: [\"appsync:GraphQL\"],\n effect: \"Allow\",\n resources: [graphql_api.arn],\n }],\n});\nconst appsyncMutationRolePolicy = new aws.iam.Policy(\"appsync_mutation_role_policy\", {\n name: \"appsync-mutation-role-policy\",\n policy: appsyncMutationRolePolicyDocument.apply(appsyncMutationRolePolicyDocument =\u003e appsyncMutationRolePolicyDocument.json),\n});\nconst appsyncMutationRoleAttachment = new aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", {\n policyArn: appsyncMutationRolePolicy.arn,\n role: appsyncMutationRole.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ninvoke_appsync_mutation = aws.cloudwatch.EventRule(\"invoke_appsync_mutation\",\n name=\"invoke-appsync-mutation\",\n description=\"schedule_batch_test\",\n schedule_expression=\"rate(5 minutes)\")\nappsync_mutation_role_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nappsync_mutation_role = aws.iam.Role(\"appsync_mutation_role\",\n name=\"appsync-mutation-role\",\n assume_role_policy=appsync_mutation_role_trust.json)\ngraphql_api = aws.appsync.GraphQLApi(\"graphql-api\",\n name=\"api\",\n authentication_type=\"AWS_IAM\",\n schema=\"\"\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\"\"\")\ninvoke_appsync_mutation_event_target = aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\",\n arn=std.replace_output(text=graphql_api.arn,\n search=\"apis\",\n replace=\"endpoints/graphql-api\").apply(lambda invoke: invoke.result),\n rule=invoke_appsync_mutation.id,\n role_arn=appsync_mutation_role.arn,\n input_transformer={\n \"input_paths\": {\n \"input\": \"$.detail.input\",\n },\n \"input_template\": \"\"\" {\n \"input\": \u003cinput\u003e\n }\n\"\"\",\n },\n appsync_target={\n \"graphql_operation\": \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n })\nappsync_mutation_role_policy_document = aws.iam.get_policy_document_output(statements=[{\n \"actions\": [\"appsync:GraphQL\"],\n \"effect\": \"Allow\",\n \"resources\": [graphql_api.arn],\n}])\nappsync_mutation_role_policy = aws.iam.Policy(\"appsync_mutation_role_policy\",\n name=\"appsync-mutation-role-policy\",\n policy=appsync_mutation_role_policy_document.json)\nappsync_mutation_role_attachment = aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\",\n policy_arn=appsync_mutation_role_policy.arn,\n role=appsync_mutation_role.name)\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 invokeAppsyncMutation = new Aws.CloudWatch.EventRule(\"invoke_appsync_mutation\", new()\n {\n Name = \"invoke-appsync-mutation\",\n Description = \"schedule_batch_test\",\n ScheduleExpression = \"rate(5 minutes)\",\n });\n\n var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Aws.Iam.Role(\"appsync_mutation_role\", new()\n {\n Name = \"appsync-mutation-role\",\n AssumeRolePolicy = appsyncMutationRoleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var graphql_api = new Aws.AppSync.GraphQLApi(\"graphql-api\", new()\n {\n Name = \"api\",\n AuthenticationType = \"AWS_IAM\",\n Schema = @\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\",\n });\n\n var invokeAppsyncMutationEventTarget = new Aws.CloudWatch.EventTarget(\"invoke_appsync_mutation\", new()\n {\n Arn = Std.Replace.Invoke(new()\n {\n Text = graphql_api.Arn,\n Search = \"apis\",\n Replace = \"endpoints/graphql-api\",\n }).Apply(invoke =\u003e invoke.Result),\n Rule = invokeAppsyncMutation.Id,\n RoleArn = appsyncMutationRole.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"input\", \"$.detail.input\" },\n },\n InputTemplate = @\" {\n \"\"input\"\": \u003cinput\u003e\n }\n\",\n },\n AppsyncTarget = new Aws.CloudWatch.Inputs.EventTargetAppsyncTargetArgs\n {\n GraphqlOperation = \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n });\n\n var appsyncMutationRolePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"appsync:GraphQL\",\n },\n Effect = \"Allow\",\n Resources = new[]\n {\n graphql_api.Arn,\n },\n },\n },\n });\n\n var appsyncMutationRolePolicy = new Aws.Iam.Policy(\"appsync_mutation_role_policy\", new()\n {\n Name = \"appsync-mutation-role-policy\",\n PolicyDocument = appsyncMutationRolePolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var appsyncMutationRoleAttachment = new Aws.Iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", new()\n {\n PolicyArn = appsyncMutationRolePolicy.Arn,\n Role = appsyncMutationRole.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync\"\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)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeAppsyncMutation, err := cloudwatch.NewEventRule(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"invoke-appsync-mutation\"),\n\t\t\tDescription: pulumi.String(\"schedule_batch_test\"),\n\t\t\tScheduleExpression: pulumi.String(\"rate(5 minutes)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRoleTrust, 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\tappsyncMutationRole, err := iam.NewRole(ctx, \"appsync_mutation_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(appsyncMutationRoleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appsync.NewGraphQLApi(ctx, \"graphql-api\", \u0026appsync.GraphQLApiArgs{\n\t\t\tName: pulumi.String(\"api\"),\n\t\t\tAuthenticationType: pulumi.String(\"AWS_IAM\"),\n\t\t\tSchema: pulumi.String(` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.String(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\tText: graphql_api.Arn,\n\t\t\t\tSearch: pulumi.String(\"apis\"),\n\t\t\t\tReplace: pulumi.String(\"endpoints/graphql-api\"),\n\t\t\t}, nil).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tRule: invokeAppsyncMutation.ID(),\n\t\t\tRoleArn: appsyncMutationRole.Arn,\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"input\": pulumi.String(\"$.detail.input\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\" {\\n \\\"input\\\": \u003cinput\u003e\\n }\\n\"),\n\t\t\t},\n\t\t\tAppsyncTarget: \u0026cloudwatch.EventTargetAppsyncTargetArgs{\n\t\t\t\tGraphqlOperation: pulumi.String(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRolePolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"appsync:GraphQL\"),\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgraphql_api.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tappsyncMutationRolePolicy, err := iam.NewPolicy(ctx, \"appsync_mutation_role_policy\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role-policy\"),\n\t\t\tPolicy: pulumi.String(appsyncMutationRolePolicyDocument.ApplyT(func(appsyncMutationRolePolicyDocument iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026appsyncMutationRolePolicyDocument.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, \"appsync_mutation_role_attachment\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: appsyncMutationRolePolicy.Arn,\n\t\t\tRole: appsyncMutationRole.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.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\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.appsync.GraphQLApi;\nimport com.pulumi.aws.appsync.GraphQLApiArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetAppsyncTargetArgs;\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 java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var invokeAppsyncMutation = new EventRule(\"invokeAppsyncMutation\", EventRuleArgs.builder()\n .name(\"invoke-appsync-mutation\")\n .description(\"schedule_batch_test\")\n .scheduleExpression(\"rate(5 minutes)\")\n .build());\n\n final var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Role(\"appsyncMutationRole\", RoleArgs.builder()\n .name(\"appsync-mutation-role\")\n .assumeRolePolicy(appsyncMutationRoleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var graphql_api = new GraphQLApi(\"graphql-api\", GraphQLApiArgs.builder()\n .name(\"api\")\n .authenticationType(\"AWS_IAM\")\n .schema(\"\"\"\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n \"\"\")\n .build());\n\n var invokeAppsyncMutationEventTarget = new EventTarget(\"invokeAppsyncMutationEventTarget\", EventTargetArgs.builder()\n .arn(StdFunctions.replace().applyValue(invoke -\u003e invoke.result()))\n .rule(invokeAppsyncMutation.id())\n .roleArn(appsyncMutationRole.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.of(\"input\", \"$.detail.input\"))\n .inputTemplate(\"\"\"\n {\n \"input\": \u003cinput\u003e\n }\n \"\"\")\n .build())\n .appsyncTarget(EventTargetAppsyncTargetArgs.builder()\n .graphqlOperation(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\")\n .build())\n .build());\n\n final var appsyncMutationRolePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"appsync:GraphQL\")\n .effect(\"Allow\")\n .resources(graphql_api.arn())\n .build())\n .build());\n\n var appsyncMutationRolePolicy = new Policy(\"appsyncMutationRolePolicy\", PolicyArgs.builder()\n .name(\"appsync-mutation-role-policy\")\n .policy(appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(appsyncMutationRolePolicyDocument -\u003e appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var appsyncMutationRoleAttachment = new RolePolicyAttachment(\"appsyncMutationRoleAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(appsyncMutationRolePolicy.arn())\n .role(appsyncMutationRole.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n invokeAppsyncMutation:\n type: aws:cloudwatch:EventRule\n name: invoke_appsync_mutation\n properties:\n name: invoke-appsync-mutation\n description: schedule_batch_test\n scheduleExpression: rate(5 minutes)\n invokeAppsyncMutationEventTarget:\n type: aws:cloudwatch:EventTarget\n name: invoke_appsync_mutation\n properties:\n arn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${[\"graphql-api\"].arn}\n search: apis\n replace: endpoints/graphql-api\n Return: result\n rule: ${invokeAppsyncMutation.id}\n roleArn: ${appsyncMutationRole.arn}\n inputTransformer:\n inputPaths:\n input: $.detail.input\n inputTemplate: |2\n {\n \"input\": \u003cinput\u003e\n }\n appsyncTarget:\n graphqlOperation: 'mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}'\n appsyncMutationRole:\n type: aws:iam:Role\n name: appsync_mutation_role\n properties:\n name: appsync-mutation-role\n assumeRolePolicy: ${appsyncMutationRoleTrust.json}\n appsyncMutationRolePolicy:\n type: aws:iam:Policy\n name: appsync_mutation_role_policy\n properties:\n name: appsync-mutation-role-policy\n policy: ${appsyncMutationRolePolicyDocument.json}\n appsyncMutationRoleAttachment:\n type: aws:iam:RolePolicyAttachment\n name: appsync_mutation_role_attachment\n properties:\n policyArn: ${appsyncMutationRolePolicy.arn}\n role: ${appsyncMutationRole.name}\n graphql-api:\n type: aws:appsync:GraphQLApi\n properties:\n name: api\n authenticationType: AWS_IAM\n schema: |2\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\nvariables:\n appsyncMutationRoleTrust:\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 appsyncMutationRolePolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - appsync:GraphQL\n effect: Allow\n resources:\n - ${[\"graphql-api\"].arn}\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### AppSync 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 invokeAppsyncMutation = new aws.cloudwatch.EventRule(\"invoke_appsync_mutation\", {\n name: \"invoke-appsync-mutation\",\n description: \"schedule_batch_test\",\n scheduleExpression: \"rate(5 minutes)\",\n});\nconst appsyncMutationRoleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst appsyncMutationRole = new aws.iam.Role(\"appsync_mutation_role\", {\n name: \"appsync-mutation-role\",\n assumeRolePolicy: appsyncMutationRoleTrust.then(appsyncMutationRoleTrust =\u003e appsyncMutationRoleTrust.json),\n});\nconst graphql_api = new aws.appsync.GraphQLApi(\"graphql-api\", {\n name: \"api\",\n authenticationType: \"AWS_IAM\",\n schema: ` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`,\n});\nconst invokeAppsyncMutationEventTarget = new aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\", {\n arn: std.replaceOutput({\n text: graphql_api.arn,\n search: \"apis\",\n replace: \"endpoints/graphql-api\",\n }).apply(invoke =\u003e invoke.result),\n rule: invokeAppsyncMutation.id,\n roleArn: appsyncMutationRole.arn,\n inputTransformer: {\n inputPaths: {\n input: \"$.detail.input\",\n },\n inputTemplate: ` {\n \"input\": \u003cinput\u003e\n }\n`,\n },\n appsyncTarget: {\n graphqlOperation: \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n});\nconst appsyncMutationRolePolicyDocument = aws.iam.getPolicyDocumentOutput({\n statements: [{\n actions: [\"appsync:GraphQL\"],\n effect: \"Allow\",\n resources: [graphql_api.arn],\n }],\n});\nconst appsyncMutationRolePolicy = new aws.iam.Policy(\"appsync_mutation_role_policy\", {\n name: \"appsync-mutation-role-policy\",\n policy: appsyncMutationRolePolicyDocument.apply(appsyncMutationRolePolicyDocument =\u003e appsyncMutationRolePolicyDocument.json),\n});\nconst appsyncMutationRoleAttachment = new aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", {\n policyArn: appsyncMutationRolePolicy.arn,\n role: appsyncMutationRole.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ninvoke_appsync_mutation = aws.cloudwatch.EventRule(\"invoke_appsync_mutation\",\n name=\"invoke-appsync-mutation\",\n description=\"schedule_batch_test\",\n schedule_expression=\"rate(5 minutes)\")\nappsync_mutation_role_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nappsync_mutation_role = aws.iam.Role(\"appsync_mutation_role\",\n name=\"appsync-mutation-role\",\n assume_role_policy=appsync_mutation_role_trust.json)\ngraphql_api = aws.appsync.GraphQLApi(\"graphql-api\",\n name=\"api\",\n authentication_type=\"AWS_IAM\",\n schema=\"\"\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\"\"\")\ninvoke_appsync_mutation_event_target = aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\",\n arn=std.replace_output(text=graphql_api.arn,\n search=\"apis\",\n replace=\"endpoints/graphql-api\").apply(lambda invoke: invoke.result),\n rule=invoke_appsync_mutation.id,\n role_arn=appsync_mutation_role.arn,\n input_transformer={\n \"input_paths\": {\n \"input\": \"$.detail.input\",\n },\n \"input_template\": \"\"\" {\n \"input\": \u003cinput\u003e\n }\n\"\"\",\n },\n appsync_target={\n \"graphql_operation\": \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n })\nappsync_mutation_role_policy_document = aws.iam.get_policy_document_output(statements=[{\n \"actions\": [\"appsync:GraphQL\"],\n \"effect\": \"Allow\",\n \"resources\": [graphql_api.arn],\n}])\nappsync_mutation_role_policy = aws.iam.Policy(\"appsync_mutation_role_policy\",\n name=\"appsync-mutation-role-policy\",\n policy=appsync_mutation_role_policy_document.json)\nappsync_mutation_role_attachment = aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\",\n policy_arn=appsync_mutation_role_policy.arn,\n role=appsync_mutation_role.name)\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 invokeAppsyncMutation = new Aws.CloudWatch.EventRule(\"invoke_appsync_mutation\", new()\n {\n Name = \"invoke-appsync-mutation\",\n Description = \"schedule_batch_test\",\n ScheduleExpression = \"rate(5 minutes)\",\n });\n\n var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Aws.Iam.Role(\"appsync_mutation_role\", new()\n {\n Name = \"appsync-mutation-role\",\n AssumeRolePolicy = appsyncMutationRoleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var graphql_api = new Aws.AppSync.GraphQLApi(\"graphql-api\", new()\n {\n Name = \"api\",\n AuthenticationType = \"AWS_IAM\",\n Schema = @\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\",\n });\n\n var invokeAppsyncMutationEventTarget = new Aws.CloudWatch.EventTarget(\"invoke_appsync_mutation\", new()\n {\n Arn = Std.Replace.Invoke(new()\n {\n Text = graphql_api.Arn,\n Search = \"apis\",\n Replace = \"endpoints/graphql-api\",\n }).Apply(invoke =\u003e invoke.Result),\n Rule = invokeAppsyncMutation.Id,\n RoleArn = appsyncMutationRole.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"input\", \"$.detail.input\" },\n },\n InputTemplate = @\" {\n \"\"input\"\": \u003cinput\u003e\n }\n\",\n },\n AppsyncTarget = new Aws.CloudWatch.Inputs.EventTargetAppsyncTargetArgs\n {\n GraphqlOperation = \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n });\n\n var appsyncMutationRolePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"appsync:GraphQL\",\n },\n Effect = \"Allow\",\n Resources = new[]\n {\n graphql_api.Arn,\n },\n },\n },\n });\n\n var appsyncMutationRolePolicy = new Aws.Iam.Policy(\"appsync_mutation_role_policy\", new()\n {\n Name = \"appsync-mutation-role-policy\",\n PolicyDocument = appsyncMutationRolePolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var appsyncMutationRoleAttachment = new Aws.Iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", new()\n {\n PolicyArn = appsyncMutationRolePolicy.Arn,\n Role = appsyncMutationRole.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync\"\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)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeAppsyncMutation, err := cloudwatch.NewEventRule(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"invoke-appsync-mutation\"),\n\t\t\tDescription: pulumi.String(\"schedule_batch_test\"),\n\t\t\tScheduleExpression: pulumi.String(\"rate(5 minutes)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRoleTrust, 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\tappsyncMutationRole, err := iam.NewRole(ctx, \"appsync_mutation_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(appsyncMutationRoleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appsync.NewGraphQLApi(ctx, \"graphql-api\", \u0026appsync.GraphQLApiArgs{\n\t\t\tName: pulumi.String(\"api\"),\n\t\t\tAuthenticationType: pulumi.String(\"AWS_IAM\"),\n\t\t\tSchema: pulumi.String(` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.String(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\tText: graphql_api.Arn,\n\t\t\t\tSearch: pulumi.String(\"apis\"),\n\t\t\t\tReplace: pulumi.String(\"endpoints/graphql-api\"),\n\t\t\t}, nil).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tRule: invokeAppsyncMutation.ID(),\n\t\t\tRoleArn: appsyncMutationRole.Arn,\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"input\": pulumi.String(\"$.detail.input\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\" {\\n \\\"input\\\": \u003cinput\u003e\\n }\\n\"),\n\t\t\t},\n\t\t\tAppsyncTarget: \u0026cloudwatch.EventTargetAppsyncTargetArgs{\n\t\t\t\tGraphqlOperation: pulumi.String(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRolePolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"appsync:GraphQL\"),\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgraphql_api.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tappsyncMutationRolePolicy, err := iam.NewPolicy(ctx, \"appsync_mutation_role_policy\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role-policy\"),\n\t\t\tPolicy: pulumi.String(appsyncMutationRolePolicyDocument.ApplyT(func(appsyncMutationRolePolicyDocument iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026appsyncMutationRolePolicyDocument.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, \"appsync_mutation_role_attachment\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: appsyncMutationRolePolicy.Arn,\n\t\t\tRole: appsyncMutationRole.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.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\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.appsync.GraphQLApi;\nimport com.pulumi.aws.appsync.GraphQLApiArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetAppsyncTargetArgs;\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 java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var invokeAppsyncMutation = new EventRule(\"invokeAppsyncMutation\", EventRuleArgs.builder()\n .name(\"invoke-appsync-mutation\")\n .description(\"schedule_batch_test\")\n .scheduleExpression(\"rate(5 minutes)\")\n .build());\n\n final var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Role(\"appsyncMutationRole\", RoleArgs.builder()\n .name(\"appsync-mutation-role\")\n .assumeRolePolicy(appsyncMutationRoleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var graphql_api = new GraphQLApi(\"graphql-api\", GraphQLApiArgs.builder()\n .name(\"api\")\n .authenticationType(\"AWS_IAM\")\n .schema(\"\"\"\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n \"\"\")\n .build());\n\n var invokeAppsyncMutationEventTarget = new EventTarget(\"invokeAppsyncMutationEventTarget\", EventTargetArgs.builder()\n .arn(StdFunctions.replace().applyValue(invoke -\u003e invoke.result()))\n .rule(invokeAppsyncMutation.id())\n .roleArn(appsyncMutationRole.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.of(\"input\", \"$.detail.input\"))\n .inputTemplate(\"\"\"\n {\n \"input\": \u003cinput\u003e\n }\n \"\"\")\n .build())\n .appsyncTarget(EventTargetAppsyncTargetArgs.builder()\n .graphqlOperation(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\")\n .build())\n .build());\n\n final var appsyncMutationRolePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"appsync:GraphQL\")\n .effect(\"Allow\")\n .resources(graphql_api.arn())\n .build())\n .build());\n\n var appsyncMutationRolePolicy = new Policy(\"appsyncMutationRolePolicy\", PolicyArgs.builder()\n .name(\"appsync-mutation-role-policy\")\n .policy(appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(appsyncMutationRolePolicyDocument -\u003e appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var appsyncMutationRoleAttachment = new RolePolicyAttachment(\"appsyncMutationRoleAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(appsyncMutationRolePolicy.arn())\n .role(appsyncMutationRole.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n invokeAppsyncMutation:\n type: aws:cloudwatch:EventRule\n name: invoke_appsync_mutation\n properties:\n name: invoke-appsync-mutation\n description: schedule_batch_test\n scheduleExpression: rate(5 minutes)\n invokeAppsyncMutationEventTarget:\n type: aws:cloudwatch:EventTarget\n name: invoke_appsync_mutation\n properties:\n arn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${[\"graphql-api\"].arn}\n search: apis\n replace: endpoints/graphql-api\n Return: result\n rule: ${invokeAppsyncMutation.id}\n roleArn: ${appsyncMutationRole.arn}\n inputTransformer:\n inputPaths:\n input: $.detail.input\n inputTemplate: |2\n {\n \"input\": \u003cinput\u003e\n }\n appsyncTarget:\n graphqlOperation: 'mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}'\n appsyncMutationRole:\n type: aws:iam:Role\n name: appsync_mutation_role\n properties:\n name: appsync-mutation-role\n assumeRolePolicy: ${appsyncMutationRoleTrust.json}\n appsyncMutationRolePolicy:\n type: aws:iam:Policy\n name: appsync_mutation_role_policy\n properties:\n name: appsync-mutation-role-policy\n policy: ${appsyncMutationRolePolicyDocument.json}\n appsyncMutationRoleAttachment:\n type: aws:iam:RolePolicyAttachment\n name: appsync_mutation_role_attachment\n properties:\n policyArn: ${appsyncMutationRolePolicy.arn}\n role: ${appsyncMutationRole.name}\n graphql-api:\n type: aws:appsync:GraphQLApi\n properties:\n name: api\n authenticationType: AWS_IAM\n schema: |2\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\nvariables:\n appsyncMutationRoleTrust:\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 appsyncMutationRolePolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - appsync:GraphQL\n effect: Allow\n resources:\n - ${[\"graphql-api\"].arn}\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": { "appsyncTarget": { "$ref": "#/types/aws:cloudwatch/EventTargetAppsyncTarget:EventTargetAppsyncTarget", @@ -204024,7 +204024,7 @@ } }, "aws:cloudwatch/metricAlarm:MetricAlarm": { - "description": "Provides a CloudWatch Metric Alarm 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 foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example in Conjunction with Scaling Policies\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bat = new aws.autoscaling.Policy(\"bat\", {\n name: \"foobar3-test\",\n scalingAdjustment: 4,\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 300,\n autoscalingGroupName: bar.name,\n});\nconst batMetricAlarm = new aws.cloudwatch.MetricAlarm(\"bat\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n dimensions: {\n AutoScalingGroupName: bar.name,\n },\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n alarmActions: [bat.arn],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbat = aws.autoscaling.Policy(\"bat\",\n name=\"foobar3-test\",\n scaling_adjustment=4,\n adjustment_type=\"ChangeInCapacity\",\n cooldown=300,\n autoscaling_group_name=bar[\"name\"])\nbat_metric_alarm = aws.cloudwatch.MetricAlarm(\"bat\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n dimensions={\n \"AutoScalingGroupName\": bar[\"name\"],\n },\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n alarm_actions=[bat.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 bat = new Aws.AutoScaling.Policy(\"bat\", new()\n {\n Name = \"foobar3-test\",\n ScalingAdjustment = 4,\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 300,\n AutoscalingGroupName = bar.Name,\n });\n\n var batMetricAlarm = new Aws.CloudWatch.MetricAlarm(\"bat\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n Dimensions = \n {\n { \"AutoScalingGroupName\", bar.Name },\n },\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n AlarmActions = new[]\n {\n bat.Arn,\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-aws/sdk/v6/go/aws/cloudwatch\"\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\tbat, err := autoscaling.NewPolicy(ctx, \"bat\", \u0026autoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foobar3-test\"),\n\t\t\tScalingAdjustment: pulumi.Int(4),\n\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\tCooldown: pulumi.Int(300),\n\t\t\tAutoscalingGroupName: pulumi.Any(bar.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewMetricAlarm(ctx, \"bat\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"AutoScalingGroupName\": pulumi.Any(bar.Name),\n\t\t\t},\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tbat.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.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bat = new Policy(\"bat\", PolicyArgs.builder()\n .name(\"foobar3-test\")\n .scalingAdjustment(4)\n .adjustmentType(\"ChangeInCapacity\")\n .cooldown(300)\n .autoscalingGroupName(bar.name())\n .build());\n\n var batMetricAlarm = new MetricAlarm(\"batMetricAlarm\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .dimensions(Map.of(\"AutoScalingGroupName\", bar.name()))\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .alarmActions(bat.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bat:\n type: aws:autoscaling:Policy\n properties:\n name: foobar3-test\n scalingAdjustment: 4\n adjustmentType: ChangeInCapacity\n cooldown: 300\n autoscalingGroupName: ${bar.name}\n batMetricAlarm:\n type: aws:cloudwatch:MetricAlarm\n name: bat\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n dimensions:\n AutoScalingGroupName: ${bar.name}\n alarmDescription: This metric monitors ec2 cpu utilization\n alarmActions:\n - ${bat.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example with an Expression\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n threshold: 10,\n alarmDescription: \"Request error rate has exceeded 10%\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"m2/m1*100\",\n label: \"Error Rate\",\n returnData: true,\n },\n {\n id: \"m1\",\n metric: {\n metricName: \"RequestCount\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n {\n id: \"m2\",\n metric: {\n metricName: \"HTTPCode_ELB_5XX_Count\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n threshold=10,\n alarm_description=\"Request error rate has exceeded 10%\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"m2/m1*100\",\n \"label\": \"Error Rate\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"metric\": {\n \"metric_name\": \"RequestCount\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"load_balancer\": \"app/web\",\n },\n },\n },\n {\n \"id\": \"m2\",\n \"metric\": {\n \"metric_name\": \"HTTPCode_ELB_5XX_Count\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"load_balancer\": \"app/web\",\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 foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n Threshold = 10,\n AlarmDescription = \"Request error rate has exceeded 10%\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"m2/m1*100\",\n Label = \"Error Rate\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"RequestCount\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\n },\n },\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m2\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"HTTPCode_ELB_5XX_Count\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThreshold: pulumi.Float64(10),\n\t\t\tAlarmDescription: pulumi.String(\"Request error rate has exceeded 10%\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"m2/m1*100\"),\n\t\t\t\t\tLabel: pulumi.String(\"Error Rate\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"RequestCount\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"HTTPCode_ELB_5XX_Count\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .threshold(10)\n .alarmDescription(\"Request error rate has exceeded 10%\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"m2/m1*100\")\n .label(\"Error Rate\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"RequestCount\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m2\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"HTTPCode_ELB_5XX_Count\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n threshold: 10\n alarmDescription: Request error rate has exceeded 10%\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: m2/m1*100\n label: Error Rate\n returnData: 'true'\n - id: m1\n metric:\n metricName: RequestCount\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\n - id: m2\n metric:\n metricName: HTTPCode_ELB_5XX_Count\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\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 xxAnomalyDetection = new aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanUpperThreshold\",\n evaluationPeriods: 2,\n thresholdMetricId: \"e1\",\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"ANOMALY_DETECTION_BAND(m1)\",\n label: \"CPUUtilization (Expected)\",\n returnData: true,\n },\n {\n id: \"m1\",\n returnData: true,\n metric: {\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n stat: \"Average\",\n unit: \"Count\",\n dimensions: {\n InstanceId: \"i-abc123\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nxx_anomaly_detection = aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanUpperThreshold\",\n evaluation_periods=2,\n threshold_metric_id=\"e1\",\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"ANOMALY_DETECTION_BAND(m1)\",\n \"label\": \"CPUUtilization (Expected)\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"return_data\": True,\n \"metric\": {\n \"metric_name\": \"CPUUtilization\",\n \"namespace\": \"AWS/EC2\",\n \"period\": 120,\n \"stat\": \"Average\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"instance_id\": \"i-abc123\",\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 xxAnomalyDetection = new Aws.CloudWatch.MetricAlarm(\"xx_anomaly_detection\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanUpperThreshold\",\n EvaluationPeriods = 2,\n ThresholdMetricId = \"e1\",\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"ANOMALY_DETECTION_BAND(m1)\",\n Label = \"CPUUtilization (Expected)\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n ReturnData = true,\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Stat = \"Average\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"InstanceId\", \"i-abc123\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"xx_anomaly_detection\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanUpperThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThresholdMetricId: pulumi.String(\"e1\"),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"ANOMALY_DETECTION_BAND(m1)\"),\n\t\t\t\t\tLabel: pulumi.String(\"CPUUtilization (Expected)\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"InstanceId\": pulumi.String(\"i-abc123\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var xxAnomalyDetection = new MetricAlarm(\"xxAnomalyDetection\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanUpperThreshold\")\n .evaluationPeriods(2)\n .thresholdMetricId(\"e1\")\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"ANOMALY_DETECTION_BAND(m1)\")\n .label(\"CPUUtilization (Expected)\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .returnData(\"true\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .stat(\"Average\")\n .unit(\"Count\")\n .dimensions(Map.of(\"InstanceId\", \"i-abc123\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n xxAnomalyDetection:\n type: aws:cloudwatch:MetricAlarm\n name: xx_anomaly_detection\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanUpperThreshold\n evaluationPeriods: 2\n thresholdMetricId: e1\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: ANOMALY_DETECTION_BAND(m1)\n label: CPUUtilization (Expected)\n returnData: 'true'\n - id: m1\n returnData: 'true'\n metric:\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n stat: Average\n unit: Count\n dimensions:\n InstanceId: i-abc123\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example of monitoring Healthy Hosts on NLB using Target Group and NLB\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst nlbHealthyhosts = new aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\", {\n name: \"alarmname\",\n comparisonOperator: \"LessThanThreshold\",\n evaluationPeriods: 1,\n metricName: \"HealthyHostCount\",\n namespace: \"AWS/NetworkELB\",\n period: 60,\n statistic: \"Average\",\n threshold: logstashServersCount,\n alarmDescription: \"Number of healthy nodes in Target Group\",\n actionsEnabled: true,\n alarmActions: [sns.arn],\n okActions: [sns.arn],\n dimensions: {\n TargetGroup: lb_tg.arnSuffix,\n LoadBalancer: lb.arnSuffix,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnlb_healthyhosts = aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\",\n name=\"alarmname\",\n comparison_operator=\"LessThanThreshold\",\n evaluation_periods=1,\n metric_name=\"HealthyHostCount\",\n namespace=\"AWS/NetworkELB\",\n period=60,\n statistic=\"Average\",\n threshold=logstash_servers_count,\n alarm_description=\"Number of healthy nodes in Target Group\",\n actions_enabled=True,\n alarm_actions=[sns[\"arn\"]],\n ok_actions=[sns[\"arn\"]],\n dimensions={\n \"TargetGroup\": lb_tg[\"arnSuffix\"],\n \"LoadBalancer\": lb[\"arnSuffix\"],\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 nlbHealthyhosts = new Aws.CloudWatch.MetricAlarm(\"nlb_healthyhosts\", new()\n {\n Name = \"alarmname\",\n ComparisonOperator = \"LessThanThreshold\",\n EvaluationPeriods = 1,\n MetricName = \"HealthyHostCount\",\n Namespace = \"AWS/NetworkELB\",\n Period = 60,\n Statistic = \"Average\",\n Threshold = logstashServersCount,\n AlarmDescription = \"Number of healthy nodes in Target Group\",\n ActionsEnabled = true,\n AlarmActions = new[]\n {\n sns.Arn,\n },\n OkActions = new[]\n {\n sns.Arn,\n },\n Dimensions = \n {\n { \"TargetGroup\", lb_tg.ArnSuffix },\n { \"LoadBalancer\", lb.ArnSuffix },\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"nlb_healthyhosts\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"alarmname\"),\n\t\t\tComparisonOperator: pulumi.String(\"LessThanThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(1),\n\t\t\tMetricName: pulumi.String(\"HealthyHostCount\"),\n\t\t\tNamespace: pulumi.String(\"AWS/NetworkELB\"),\n\t\t\tPeriod: pulumi.Int(60),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Any(logstashServersCount),\n\t\t\tAlarmDescription: pulumi.String(\"Number of healthy nodes in Target Group\"),\n\t\t\tActionsEnabled: pulumi.Bool(true),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tOkActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"TargetGroup\": pulumi.Any(lb_tg.ArnSuffix),\n\t\t\t\t\"LoadBalancer\": pulumi.Any(lb.ArnSuffix),\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var nlbHealthyhosts = new MetricAlarm(\"nlbHealthyhosts\", MetricAlarmArgs.builder()\n .name(\"alarmname\")\n .comparisonOperator(\"LessThanThreshold\")\n .evaluationPeriods(1)\n .metricName(\"HealthyHostCount\")\n .namespace(\"AWS/NetworkELB\")\n .period(60)\n .statistic(\"Average\")\n .threshold(logstashServersCount)\n .alarmDescription(\"Number of healthy nodes in Target Group\")\n .actionsEnabled(\"true\")\n .alarmActions(sns.arn())\n .okActions(sns.arn())\n .dimensions(Map.ofEntries(\n Map.entry(\"TargetGroup\", lb_tg.arnSuffix()),\n Map.entry(\"LoadBalancer\", lb.arnSuffix())\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n nlbHealthyhosts:\n type: aws:cloudwatch:MetricAlarm\n name: nlb_healthyhosts\n properties:\n name: alarmname\n comparisonOperator: LessThanThreshold\n evaluationPeriods: 1\n metricName: HealthyHostCount\n namespace: AWS/NetworkELB\n period: 60\n statistic: Average\n threshold: ${logstashServersCount}\n alarmDescription: Number of healthy nodes in Target Group\n actionsEnabled: 'true'\n alarmActions:\n - ${sns.arn}\n okActions:\n - ${sns.arn}\n dimensions:\n TargetGroup: ${[\"lb-tg\"].arnSuffix}\n LoadBalancer: ${lb.arnSuffix}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** You cannot create a metric alarm consisting of both `statistic` and `extended_statistic` parameters.\nYou must choose one or the other\n\n## Import\n\nUsing `pulumi import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/metricAlarm:MetricAlarm test alarm-12345\n```\n", + "description": "Provides a CloudWatch Metric Alarm 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 foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example in Conjunction with Scaling Policies\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bat = new aws.autoscaling.Policy(\"bat\", {\n name: \"foobar3-test\",\n scalingAdjustment: 4,\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 300,\n autoscalingGroupName: bar.name,\n});\nconst batMetricAlarm = new aws.cloudwatch.MetricAlarm(\"bat\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n dimensions: {\n AutoScalingGroupName: bar.name,\n },\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n alarmActions: [bat.arn],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbat = aws.autoscaling.Policy(\"bat\",\n name=\"foobar3-test\",\n scaling_adjustment=4,\n adjustment_type=\"ChangeInCapacity\",\n cooldown=300,\n autoscaling_group_name=bar[\"name\"])\nbat_metric_alarm = aws.cloudwatch.MetricAlarm(\"bat\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n dimensions={\n \"AutoScalingGroupName\": bar[\"name\"],\n },\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n alarm_actions=[bat.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 bat = new Aws.AutoScaling.Policy(\"bat\", new()\n {\n Name = \"foobar3-test\",\n ScalingAdjustment = 4,\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 300,\n AutoscalingGroupName = bar.Name,\n });\n\n var batMetricAlarm = new Aws.CloudWatch.MetricAlarm(\"bat\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n Dimensions = \n {\n { \"AutoScalingGroupName\", bar.Name },\n },\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n AlarmActions = new[]\n {\n bat.Arn,\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-aws/sdk/v6/go/aws/cloudwatch\"\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\tbat, err := autoscaling.NewPolicy(ctx, \"bat\", \u0026autoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foobar3-test\"),\n\t\t\tScalingAdjustment: pulumi.Int(4),\n\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\tCooldown: pulumi.Int(300),\n\t\t\tAutoscalingGroupName: pulumi.Any(bar.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewMetricAlarm(ctx, \"bat\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"AutoScalingGroupName\": pulumi.Any(bar.Name),\n\t\t\t},\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tbat.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.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bat = new Policy(\"bat\", PolicyArgs.builder()\n .name(\"foobar3-test\")\n .scalingAdjustment(4)\n .adjustmentType(\"ChangeInCapacity\")\n .cooldown(300)\n .autoscalingGroupName(bar.name())\n .build());\n\n var batMetricAlarm = new MetricAlarm(\"batMetricAlarm\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .dimensions(Map.of(\"AutoScalingGroupName\", bar.name()))\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .alarmActions(bat.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bat:\n type: aws:autoscaling:Policy\n properties:\n name: foobar3-test\n scalingAdjustment: 4\n adjustmentType: ChangeInCapacity\n cooldown: 300\n autoscalingGroupName: ${bar.name}\n batMetricAlarm:\n type: aws:cloudwatch:MetricAlarm\n name: bat\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n dimensions:\n AutoScalingGroupName: ${bar.name}\n alarmDescription: This metric monitors ec2 cpu utilization\n alarmActions:\n - ${bat.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example with an Expression\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n threshold: 10,\n alarmDescription: \"Request error rate has exceeded 10%\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"m2/m1*100\",\n label: \"Error Rate\",\n returnData: true,\n },\n {\n id: \"m1\",\n metric: {\n metricName: \"RequestCount\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n {\n id: \"m2\",\n metric: {\n metricName: \"HTTPCode_ELB_5XX_Count\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n threshold=10,\n alarm_description=\"Request error rate has exceeded 10%\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"m2/m1*100\",\n \"label\": \"Error Rate\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"metric\": {\n \"metric_name\": \"RequestCount\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"LoadBalancer\": \"app/web\",\n },\n },\n },\n {\n \"id\": \"m2\",\n \"metric\": {\n \"metric_name\": \"HTTPCode_ELB_5XX_Count\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"LoadBalancer\": \"app/web\",\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 foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n Threshold = 10,\n AlarmDescription = \"Request error rate has exceeded 10%\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"m2/m1*100\",\n Label = \"Error Rate\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"RequestCount\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\n },\n },\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m2\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"HTTPCode_ELB_5XX_Count\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThreshold: pulumi.Float64(10),\n\t\t\tAlarmDescription: pulumi.String(\"Request error rate has exceeded 10%\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"m2/m1*100\"),\n\t\t\t\t\tLabel: pulumi.String(\"Error Rate\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"RequestCount\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"HTTPCode_ELB_5XX_Count\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .threshold(10)\n .alarmDescription(\"Request error rate has exceeded 10%\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"m2/m1*100\")\n .label(\"Error Rate\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"RequestCount\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m2\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"HTTPCode_ELB_5XX_Count\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n threshold: 10\n alarmDescription: Request error rate has exceeded 10%\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: m2/m1*100\n label: Error Rate\n returnData: 'true'\n - id: m1\n metric:\n metricName: RequestCount\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\n - id: m2\n metric:\n metricName: HTTPCode_ELB_5XX_Count\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\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 xxAnomalyDetection = new aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanUpperThreshold\",\n evaluationPeriods: 2,\n thresholdMetricId: \"e1\",\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"ANOMALY_DETECTION_BAND(m1)\",\n label: \"CPUUtilization (Expected)\",\n returnData: true,\n },\n {\n id: \"m1\",\n returnData: true,\n metric: {\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n stat: \"Average\",\n unit: \"Count\",\n dimensions: {\n InstanceId: \"i-abc123\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nxx_anomaly_detection = aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanUpperThreshold\",\n evaluation_periods=2,\n threshold_metric_id=\"e1\",\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"ANOMALY_DETECTION_BAND(m1)\",\n \"label\": \"CPUUtilization (Expected)\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"return_data\": True,\n \"metric\": {\n \"metric_name\": \"CPUUtilization\",\n \"namespace\": \"AWS/EC2\",\n \"period\": 120,\n \"stat\": \"Average\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"InstanceId\": \"i-abc123\",\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 xxAnomalyDetection = new Aws.CloudWatch.MetricAlarm(\"xx_anomaly_detection\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanUpperThreshold\",\n EvaluationPeriods = 2,\n ThresholdMetricId = \"e1\",\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"ANOMALY_DETECTION_BAND(m1)\",\n Label = \"CPUUtilization (Expected)\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n ReturnData = true,\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Stat = \"Average\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"InstanceId\", \"i-abc123\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"xx_anomaly_detection\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanUpperThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThresholdMetricId: pulumi.String(\"e1\"),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"ANOMALY_DETECTION_BAND(m1)\"),\n\t\t\t\t\tLabel: pulumi.String(\"CPUUtilization (Expected)\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"InstanceId\": pulumi.String(\"i-abc123\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var xxAnomalyDetection = new MetricAlarm(\"xxAnomalyDetection\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanUpperThreshold\")\n .evaluationPeriods(2)\n .thresholdMetricId(\"e1\")\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"ANOMALY_DETECTION_BAND(m1)\")\n .label(\"CPUUtilization (Expected)\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .returnData(\"true\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .stat(\"Average\")\n .unit(\"Count\")\n .dimensions(Map.of(\"InstanceId\", \"i-abc123\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n xxAnomalyDetection:\n type: aws:cloudwatch:MetricAlarm\n name: xx_anomaly_detection\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanUpperThreshold\n evaluationPeriods: 2\n thresholdMetricId: e1\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: ANOMALY_DETECTION_BAND(m1)\n label: CPUUtilization (Expected)\n returnData: 'true'\n - id: m1\n returnData: 'true'\n metric:\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n stat: Average\n unit: Count\n dimensions:\n InstanceId: i-abc123\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example of monitoring Healthy Hosts on NLB using Target Group and NLB\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst nlbHealthyhosts = new aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\", {\n name: \"alarmname\",\n comparisonOperator: \"LessThanThreshold\",\n evaluationPeriods: 1,\n metricName: \"HealthyHostCount\",\n namespace: \"AWS/NetworkELB\",\n period: 60,\n statistic: \"Average\",\n threshold: logstashServersCount,\n alarmDescription: \"Number of healthy nodes in Target Group\",\n actionsEnabled: true,\n alarmActions: [sns.arn],\n okActions: [sns.arn],\n dimensions: {\n TargetGroup: lb_tg.arnSuffix,\n LoadBalancer: lb.arnSuffix,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnlb_healthyhosts = aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\",\n name=\"alarmname\",\n comparison_operator=\"LessThanThreshold\",\n evaluation_periods=1,\n metric_name=\"HealthyHostCount\",\n namespace=\"AWS/NetworkELB\",\n period=60,\n statistic=\"Average\",\n threshold=logstash_servers_count,\n alarm_description=\"Number of healthy nodes in Target Group\",\n actions_enabled=True,\n alarm_actions=[sns[\"arn\"]],\n ok_actions=[sns[\"arn\"]],\n dimensions={\n \"TargetGroup\": lb_tg[\"arnSuffix\"],\n \"LoadBalancer\": lb[\"arnSuffix\"],\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 nlbHealthyhosts = new Aws.CloudWatch.MetricAlarm(\"nlb_healthyhosts\", new()\n {\n Name = \"alarmname\",\n ComparisonOperator = \"LessThanThreshold\",\n EvaluationPeriods = 1,\n MetricName = \"HealthyHostCount\",\n Namespace = \"AWS/NetworkELB\",\n Period = 60,\n Statistic = \"Average\",\n Threshold = logstashServersCount,\n AlarmDescription = \"Number of healthy nodes in Target Group\",\n ActionsEnabled = true,\n AlarmActions = new[]\n {\n sns.Arn,\n },\n OkActions = new[]\n {\n sns.Arn,\n },\n Dimensions = \n {\n { \"TargetGroup\", lb_tg.ArnSuffix },\n { \"LoadBalancer\", lb.ArnSuffix },\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"nlb_healthyhosts\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"alarmname\"),\n\t\t\tComparisonOperator: pulumi.String(\"LessThanThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(1),\n\t\t\tMetricName: pulumi.String(\"HealthyHostCount\"),\n\t\t\tNamespace: pulumi.String(\"AWS/NetworkELB\"),\n\t\t\tPeriod: pulumi.Int(60),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Any(logstashServersCount),\n\t\t\tAlarmDescription: pulumi.String(\"Number of healthy nodes in Target Group\"),\n\t\t\tActionsEnabled: pulumi.Bool(true),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tOkActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"TargetGroup\": pulumi.Any(lb_tg.ArnSuffix),\n\t\t\t\t\"LoadBalancer\": pulumi.Any(lb.ArnSuffix),\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var nlbHealthyhosts = new MetricAlarm(\"nlbHealthyhosts\", MetricAlarmArgs.builder()\n .name(\"alarmname\")\n .comparisonOperator(\"LessThanThreshold\")\n .evaluationPeriods(1)\n .metricName(\"HealthyHostCount\")\n .namespace(\"AWS/NetworkELB\")\n .period(60)\n .statistic(\"Average\")\n .threshold(logstashServersCount)\n .alarmDescription(\"Number of healthy nodes in Target Group\")\n .actionsEnabled(\"true\")\n .alarmActions(sns.arn())\n .okActions(sns.arn())\n .dimensions(Map.ofEntries(\n Map.entry(\"TargetGroup\", lb_tg.arnSuffix()),\n Map.entry(\"LoadBalancer\", lb.arnSuffix())\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n nlbHealthyhosts:\n type: aws:cloudwatch:MetricAlarm\n name: nlb_healthyhosts\n properties:\n name: alarmname\n comparisonOperator: LessThanThreshold\n evaluationPeriods: 1\n metricName: HealthyHostCount\n namespace: AWS/NetworkELB\n period: 60\n statistic: Average\n threshold: ${logstashServersCount}\n alarmDescription: Number of healthy nodes in Target Group\n actionsEnabled: 'true'\n alarmActions:\n - ${sns.arn}\n okActions:\n - ${sns.arn}\n dimensions:\n TargetGroup: ${[\"lb-tg\"].arnSuffix}\n LoadBalancer: ${lb.arnSuffix}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** You cannot create a metric alarm consisting of both `statistic` and `extended_statistic` parameters.\nYou must choose one or the other\n\n## Import\n\nUsing `pulumi import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/metricAlarm:MetricAlarm test alarm-12345\n```\n", "properties": { "actionsEnabled": { "type": "boolean", @@ -207847,7 +207847,7 @@ } }, "aws:codepipeline/pipeline:Pipeline": { - "description": "Provides a CodePipeline.\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: \"GitHub\",\n});\nconst codepipelineBucket = new aws.s3.BucketV2(\"codepipeline_bucket\", {bucket: \"test-bucket\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"codepipeline.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst codepipelineRole = new aws.iam.Role(\"codepipeline_role\", {\n name: \"test-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst s3kmskey = aws.kms.getAlias({\n name: \"alias/myKmsKey\",\n});\nconst codepipeline = new aws.codepipeline.Pipeline(\"codepipeline\", {\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n artifactStores: [{\n location: codepipelineBucket.bucket,\n type: \"S3\",\n encryptionKey: {\n id: s3kmskey.then(s3kmskey =\u003e s3kmskey.arn),\n type: \"KMS\",\n },\n }],\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/example\",\n BranchName: \"main\",\n },\n }],\n },\n {\n name: \"Build\",\n actions: [{\n name: \"Build\",\n category: \"Build\",\n owner: \"AWS\",\n provider: \"CodeBuild\",\n inputArtifacts: [\"source_output\"],\n outputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ProjectName: \"test\",\n },\n }],\n },\n {\n name: \"Deploy\",\n actions: [{\n name: \"Deploy\",\n category: \"Deploy\",\n owner: \"AWS\",\n provider: \"CloudFormation\",\n inputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ActionMode: \"REPLACE_ON_FAILURE\",\n Capabilities: \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n OutputFileName: \"CreateStackOutput.json\",\n StackName: \"MyStack\",\n TemplatePath: \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ],\n});\nconst codepipelineBucketPab = new aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", {\n bucket: codepipelineBucket.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true,\n});\nconst codepipelinePolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n resources: [\n codepipelineBucket.arn,\n pulumi.interpolate`${codepipelineBucket.arn}/*`,\n ],\n },\n {\n effect: \"Allow\",\n actions: [\"codestar-connections:UseConnection\"],\n resources: [example.arn],\n },\n {\n effect: \"Allow\",\n actions: [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n resources: [\"*\"],\n },\n ],\n});\nconst codepipelinePolicyRolePolicy = new aws.iam.RolePolicy(\"codepipeline_policy\", {\n name: \"codepipeline_policy\",\n role: codepipelineRole.id,\n policy: codepipelinePolicy.apply(codepipelinePolicy =\u003e codepipelinePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"GitHub\")\ncodepipeline_bucket = aws.s3.BucketV2(\"codepipeline_bucket\", bucket=\"test-bucket\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"codepipeline.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ncodepipeline_role = aws.iam.Role(\"codepipeline_role\",\n name=\"test-role\",\n assume_role_policy=assume_role.json)\ns3kmskey = aws.kms.get_alias(name=\"alias/myKmsKey\")\ncodepipeline = aws.codepipeline.Pipeline(\"codepipeline\",\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role.arn,\n artifact_stores=[{\n \"location\": codepipeline_bucket.bucket,\n \"type\": \"S3\",\n \"encryption_key\": {\n \"id\": s3kmskey.arn,\n \"type\": \"KMS\",\n },\n }],\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/example\",\n \"branch_name\": \"main\",\n },\n }],\n },\n {\n \"name\": \"Build\",\n \"actions\": [{\n \"name\": \"Build\",\n \"category\": \"Build\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeBuild\",\n \"input_artifacts\": [\"source_output\"],\n \"output_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"project_name\": \"test\",\n },\n }],\n },\n {\n \"name\": \"Deploy\",\n \"actions\": [{\n \"name\": \"Deploy\",\n \"category\": \"Deploy\",\n \"owner\": \"AWS\",\n \"provider\": \"CloudFormation\",\n \"input_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"action_mode\": \"REPLACE_ON_FAILURE\",\n \"capabilities\": \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n \"output_file_name\": \"CreateStackOutput.json\",\n \"stack_name\": \"MyStack\",\n \"template_path\": \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ])\ncodepipeline_bucket_pab = aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\",\n bucket=codepipeline_bucket.id,\n block_public_acls=True,\n block_public_policy=True,\n ignore_public_acls=True,\n restrict_public_buckets=True)\ncodepipeline_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n \"resources\": [\n codepipeline_bucket.arn,\n codepipeline_bucket.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"codestar-connections:UseConnection\"],\n \"resources\": [example.arn],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n \"resources\": [\"*\"],\n },\n])\ncodepipeline_policy_role_policy = aws.iam.RolePolicy(\"codepipeline_policy\",\n name=\"codepipeline_policy\",\n role=codepipeline_role.id,\n policy=codepipeline_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.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"GitHub\",\n });\n\n var codepipelineBucket = new Aws.S3.BucketV2(\"codepipeline_bucket\", new()\n {\n Bucket = \"test-bucket\",\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 \"codepipeline.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var codepipelineRole = new Aws.Iam.Role(\"codepipeline_role\", new()\n {\n Name = \"test-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var s3kmskey = Aws.Kms.GetAlias.Invoke(new()\n {\n Name = \"alias/myKmsKey\",\n });\n\n var codepipeline = new Aws.CodePipeline.Pipeline(\"codepipeline\", new()\n {\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n ArtifactStores = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineArtifactStoreArgs\n {\n Location = codepipelineBucket.Bucket,\n Type = \"S3\",\n EncryptionKey = new Aws.CodePipeline.Inputs.PipelineArtifactStoreEncryptionKeyArgs\n {\n Id = s3kmskey.Apply(getAliasResult =\u003e getAliasResult.Arn),\n Type = \"KMS\",\n },\n },\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/example\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Build\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Build\",\n Category = \"Build\",\n Owner = \"AWS\",\n Provider = \"CodeBuild\",\n InputArtifacts = new[]\n {\n \"source_output\",\n },\n OutputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ProjectName\", \"test\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Deploy\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Deploy\",\n Category = \"Deploy\",\n Owner = \"AWS\",\n Provider = \"CloudFormation\",\n InputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ActionMode\", \"REPLACE_ON_FAILURE\" },\n { \"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\" },\n { \"OutputFileName\", \"CreateStackOutput.json\" },\n { \"StackName\", \"MyStack\" },\n { \"TemplatePath\", \"build_output::sam-templated.yaml\" },\n },\n },\n },\n },\n },\n });\n\n var codepipelineBucketPab = new Aws.S3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", new()\n {\n Bucket = codepipelineBucket.Id,\n BlockPublicAcls = true,\n BlockPublicPolicy = true,\n IgnorePublicAcls = true,\n RestrictPublicBuckets = true,\n });\n\n var codepipelinePolicy = 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 \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n codepipelineBucket.Arn,\n $\"{codepipelineBucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codestar-connections:UseConnection\",\n },\n Resources = new[]\n {\n example.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var codepipelinePolicyRolePolicy = new Aws.Iam.RolePolicy(\"codepipeline_policy\", new()\n {\n Name = \"codepipeline_policy\",\n Role = codepipelineRole.Id,\n Policy = codepipelinePolicy.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/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\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\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"GitHub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelineBucket, err := s3.NewBucketV2(ctx, \"codepipeline_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"test-bucket\"),\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\"codepipeline.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\tcodepipelineRole, err := iam.NewRole(ctx, \"codepipeline_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test-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\ts3kmskey, err := kms.LookupAlias(ctx, \u0026kms.LookupAliasArgs{\n\t\t\tName: \"alias/myKmsKey\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"codepipeline\", \u0026codepipeline.PipelineArgs{\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: codepipelineRole.Arn,\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\t\u0026codepipeline.PipelineArtifactStoreArgs{\n\t\t\t\t\tLocation: codepipelineBucket.Bucket,\n\t\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\t\tEncryptionKey: \u0026codepipeline.PipelineArtifactStoreEncryptionKeyArgs{\n\t\t\t\t\t\tId: pulumi.String(s3kmskey.Arn),\n\t\t\t\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\t\t\t},\n\t\t\t\t},\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/example\"),\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\tName: pulumi.String(\"Build\"),\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(\"Build\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Build\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeBuild\"),\n\t\t\t\t\t\t\tInputArtifacts: 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\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ProjectName\": pulumi.String(\"test\"),\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\tName: pulumi.String(\"Deploy\"),\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(\"Deploy\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Deploy\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CloudFormation\"),\n\t\t\t\t\t\t\tInputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ActionMode\": pulumi.String(\"REPLACE_ON_FAILURE\"),\n\t\t\t\t\t\t\t\t\"Capabilities\": pulumi.String(\"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n\t\t\t\t\t\t\t\t\"OutputFileName\": pulumi.String(\"CreateStackOutput.json\"),\n\t\t\t\t\t\t\t\t\"StackName\": pulumi.String(\"MyStack\"),\n\t\t\t\t\t\t\t\t\"TemplatePath\": pulumi.String(\"build_output::sam-templated.yaml\"),\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\t_, err = s3.NewBucketPublicAccessBlock(ctx, \"codepipeline_bucket_pab\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: codepipelineBucket.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(true),\n\t\t\tBlockPublicPolicy: pulumi.Bool(true),\n\t\t\tIgnorePublicAcls: pulumi.Bool(true),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelinePolicy := 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(\"s3:GetObject\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetObjectVersion\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketVersioning\"),\n\t\t\t\t\t\tpulumi.String(\"s3:PutObjectAcl\"),\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\tcodepipelineBucket.Arn,\n\t\t\t\t\t\tcodepipelineBucket.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},\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(\"codestar-connections:UseConnection\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn,\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(\"codebuild:BatchGetBuilds\"),\n\t\t\t\t\t\tpulumi.String(\"codebuild:StartBuild\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"*\"),\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, \"codepipeline_policy\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"codepipeline_policy\"),\n\t\t\tRole: codepipelineRole.ID(),\n\t\t\tPolicy: pulumi.String(codepipelinePolicy.ApplyT(func(codepipelinePolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026codepipelinePolicy.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.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\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.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.kms.KmsFunctions;\nimport com.pulumi.aws.kms.inputs.GetAliasArgs;\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.PipelineArtifactStoreEncryptionKeyArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\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 example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"GitHub\")\n .build());\n\n var codepipelineBucket = new BucketV2(\"codepipelineBucket\", BucketV2Args.builder()\n .bucket(\"test-bucket\")\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(\"codepipeline.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var codepipelineRole = new Role(\"codepipelineRole\", RoleArgs.builder()\n .name(\"test-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var s3kmskey = KmsFunctions.getAlias(GetAliasArgs.builder()\n .name(\"alias/myKmsKey\")\n .build());\n\n var codepipeline = new Pipeline(\"codepipeline\", PipelineArgs.builder()\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .artifactStores(PipelineArtifactStoreArgs.builder()\n .location(codepipelineBucket.bucket())\n .type(\"S3\")\n .encryptionKey(PipelineArtifactStoreEncryptionKeyArgs.builder()\n .id(s3kmskey.applyValue(getAliasResult -\u003e getAliasResult.arn()))\n .type(\"KMS\")\n .build())\n .build())\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/example\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Build\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Build\")\n .category(\"Build\")\n .owner(\"AWS\")\n .provider(\"CodeBuild\")\n .inputArtifacts(\"source_output\")\n .outputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.of(\"ProjectName\", \"test\"))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Deploy\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Deploy\")\n .category(\"Deploy\")\n .owner(\"AWS\")\n .provider(\"CloudFormation\")\n .inputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.ofEntries(\n Map.entry(\"ActionMode\", \"REPLACE_ON_FAILURE\"),\n Map.entry(\"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n Map.entry(\"OutputFileName\", \"CreateStackOutput.json\"),\n Map.entry(\"StackName\", \"MyStack\"),\n Map.entry(\"TemplatePath\", \"build_output::sam-templated.yaml\")\n ))\n .build())\n .build())\n .build());\n\n var codepipelineBucketPab = new BucketPublicAccessBlock(\"codepipelineBucketPab\", BucketPublicAccessBlockArgs.builder()\n .bucket(codepipelineBucket.id())\n .blockPublicAcls(true)\n .blockPublicPolicy(true)\n .ignorePublicAcls(true)\n .restrictPublicBuckets(true)\n .build());\n\n final var codepipelinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\")\n .resources( \n codepipelineBucket.arn(),\n codepipelineBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"codestar-connections:UseConnection\")\n .resources(example.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\")\n .resources(\"*\")\n .build())\n .build());\n\n var codepipelinePolicyRolePolicy = new RolePolicy(\"codepipelinePolicyRolePolicy\", RolePolicyArgs.builder()\n .name(\"codepipeline_policy\")\n .role(codepipelineRole.id())\n .policy(codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(codepipelinePolicy -\u003e codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n codepipeline:\n type: aws:codepipeline:Pipeline\n properties:\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n artifactStores:\n - location: ${codepipelineBucket.bucket}\n type: S3\n encryptionKey:\n id: ${s3kmskey.arn}\n type: KMS\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/example\n BranchName: main\n - name: Build\n actions:\n - name: Build\n category: Build\n owner: AWS\n provider: CodeBuild\n inputArtifacts:\n - source_output\n outputArtifacts:\n - build_output\n version: '1'\n configuration:\n ProjectName: test\n - name: Deploy\n actions:\n - name: Deploy\n category: Deploy\n owner: AWS\n provider: CloudFormation\n inputArtifacts:\n - build_output\n version: '1'\n configuration:\n ActionMode: REPLACE_ON_FAILURE\n Capabilities: CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\n OutputFileName: CreateStackOutput.json\n StackName: MyStack\n TemplatePath: build_output::sam-templated.yaml\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: GitHub\n codepipelineBucket:\n type: aws:s3:BucketV2\n name: codepipeline_bucket\n properties:\n bucket: test-bucket\n codepipelineBucketPab:\n type: aws:s3:BucketPublicAccessBlock\n name: codepipeline_bucket_pab\n properties:\n bucket: ${codepipelineBucket.id}\n blockPublicAcls: true\n blockPublicPolicy: true\n ignorePublicAcls: true\n restrictPublicBuckets: true\n codepipelineRole:\n type: aws:iam:Role\n name: codepipeline_role\n properties:\n name: test-role\n assumeRolePolicy: ${assumeRole.json}\n codepipelinePolicyRolePolicy:\n type: aws:iam:RolePolicy\n name: codepipeline_policy\n properties:\n name: codepipeline_policy\n role: ${codepipelineRole.id}\n policy: ${codepipelinePolicy.json}\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 - codepipeline.amazonaws.com\n actions:\n - sts:AssumeRole\n codepipelinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - s3:GetObject\n - s3:GetObjectVersion\n - s3:GetBucketVersioning\n - s3:PutObjectAcl\n - s3:PutObject\n resources:\n - ${codepipelineBucket.arn}\n - ${codepipelineBucket.arn}/*\n - effect: Allow\n actions:\n - codestar-connections:UseConnection\n resources:\n - ${example.arn}\n - effect: Allow\n actions:\n - codebuild:BatchGetBuilds\n - codebuild:StartBuild\n resources:\n - '*'\n s3kmskey:\n fn::invoke:\n Function: aws:kms:getAlias\n Arguments:\n name: alias/myKmsKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodePipelines using the name. For example:\n\n```sh\n$ pulumi import aws:codepipeline/pipeline:Pipeline foo example\n```\n", + "description": "Provides a CodePipeline.\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: \"GitHub\",\n});\nconst codepipelineBucket = new aws.s3.BucketV2(\"codepipeline_bucket\", {bucket: \"test-bucket\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"codepipeline.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst codepipelineRole = new aws.iam.Role(\"codepipeline_role\", {\n name: \"test-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst s3kmskey = aws.kms.getAlias({\n name: \"alias/myKmsKey\",\n});\nconst codepipeline = new aws.codepipeline.Pipeline(\"codepipeline\", {\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n artifactStores: [{\n location: codepipelineBucket.bucket,\n type: \"S3\",\n encryptionKey: {\n id: s3kmskey.then(s3kmskey =\u003e s3kmskey.arn),\n type: \"KMS\",\n },\n }],\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/example\",\n BranchName: \"main\",\n },\n }],\n },\n {\n name: \"Build\",\n actions: [{\n name: \"Build\",\n category: \"Build\",\n owner: \"AWS\",\n provider: \"CodeBuild\",\n inputArtifacts: [\"source_output\"],\n outputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ProjectName: \"test\",\n },\n }],\n },\n {\n name: \"Deploy\",\n actions: [{\n name: \"Deploy\",\n category: \"Deploy\",\n owner: \"AWS\",\n provider: \"CloudFormation\",\n inputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ActionMode: \"REPLACE_ON_FAILURE\",\n Capabilities: \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n OutputFileName: \"CreateStackOutput.json\",\n StackName: \"MyStack\",\n TemplatePath: \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ],\n});\nconst codepipelineBucketPab = new aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", {\n bucket: codepipelineBucket.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true,\n});\nconst codepipelinePolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n resources: [\n codepipelineBucket.arn,\n pulumi.interpolate`${codepipelineBucket.arn}/*`,\n ],\n },\n {\n effect: \"Allow\",\n actions: [\"codestar-connections:UseConnection\"],\n resources: [example.arn],\n },\n {\n effect: \"Allow\",\n actions: [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n resources: [\"*\"],\n },\n ],\n});\nconst codepipelinePolicyRolePolicy = new aws.iam.RolePolicy(\"codepipeline_policy\", {\n name: \"codepipeline_policy\",\n role: codepipelineRole.id,\n policy: codepipelinePolicy.apply(codepipelinePolicy =\u003e codepipelinePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"GitHub\")\ncodepipeline_bucket = aws.s3.BucketV2(\"codepipeline_bucket\", bucket=\"test-bucket\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"codepipeline.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ncodepipeline_role = aws.iam.Role(\"codepipeline_role\",\n name=\"test-role\",\n assume_role_policy=assume_role.json)\ns3kmskey = aws.kms.get_alias(name=\"alias/myKmsKey\")\ncodepipeline = aws.codepipeline.Pipeline(\"codepipeline\",\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role.arn,\n artifact_stores=[{\n \"location\": codepipeline_bucket.bucket,\n \"type\": \"S3\",\n \"encryption_key\": {\n \"id\": s3kmskey.arn,\n \"type\": \"KMS\",\n },\n }],\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 \"ConnectionArn\": example.arn,\n \"FullRepositoryId\": \"my-organization/example\",\n \"BranchName\": \"main\",\n },\n }],\n },\n {\n \"name\": \"Build\",\n \"actions\": [{\n \"name\": \"Build\",\n \"category\": \"Build\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeBuild\",\n \"input_artifacts\": [\"source_output\"],\n \"output_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"ProjectName\": \"test\",\n },\n }],\n },\n {\n \"name\": \"Deploy\",\n \"actions\": [{\n \"name\": \"Deploy\",\n \"category\": \"Deploy\",\n \"owner\": \"AWS\",\n \"provider\": \"CloudFormation\",\n \"input_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"ActionMode\": \"REPLACE_ON_FAILURE\",\n \"Capabilities\": \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n \"OutputFileName\": \"CreateStackOutput.json\",\n \"StackName\": \"MyStack\",\n \"TemplatePath\": \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ])\ncodepipeline_bucket_pab = aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\",\n bucket=codepipeline_bucket.id,\n block_public_acls=True,\n block_public_policy=True,\n ignore_public_acls=True,\n restrict_public_buckets=True)\ncodepipeline_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n \"resources\": [\n codepipeline_bucket.arn,\n codepipeline_bucket.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"codestar-connections:UseConnection\"],\n \"resources\": [example.arn],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n \"resources\": [\"*\"],\n },\n])\ncodepipeline_policy_role_policy = aws.iam.RolePolicy(\"codepipeline_policy\",\n name=\"codepipeline_policy\",\n role=codepipeline_role.id,\n policy=codepipeline_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.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"GitHub\",\n });\n\n var codepipelineBucket = new Aws.S3.BucketV2(\"codepipeline_bucket\", new()\n {\n Bucket = \"test-bucket\",\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 \"codepipeline.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var codepipelineRole = new Aws.Iam.Role(\"codepipeline_role\", new()\n {\n Name = \"test-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var s3kmskey = Aws.Kms.GetAlias.Invoke(new()\n {\n Name = \"alias/myKmsKey\",\n });\n\n var codepipeline = new Aws.CodePipeline.Pipeline(\"codepipeline\", new()\n {\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n ArtifactStores = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineArtifactStoreArgs\n {\n Location = codepipelineBucket.Bucket,\n Type = \"S3\",\n EncryptionKey = new Aws.CodePipeline.Inputs.PipelineArtifactStoreEncryptionKeyArgs\n {\n Id = s3kmskey.Apply(getAliasResult =\u003e getAliasResult.Arn),\n Type = \"KMS\",\n },\n },\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/example\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Build\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Build\",\n Category = \"Build\",\n Owner = \"AWS\",\n Provider = \"CodeBuild\",\n InputArtifacts = new[]\n {\n \"source_output\",\n },\n OutputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ProjectName\", \"test\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Deploy\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Deploy\",\n Category = \"Deploy\",\n Owner = \"AWS\",\n Provider = \"CloudFormation\",\n InputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ActionMode\", \"REPLACE_ON_FAILURE\" },\n { \"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\" },\n { \"OutputFileName\", \"CreateStackOutput.json\" },\n { \"StackName\", \"MyStack\" },\n { \"TemplatePath\", \"build_output::sam-templated.yaml\" },\n },\n },\n },\n },\n },\n });\n\n var codepipelineBucketPab = new Aws.S3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", new()\n {\n Bucket = codepipelineBucket.Id,\n BlockPublicAcls = true,\n BlockPublicPolicy = true,\n IgnorePublicAcls = true,\n RestrictPublicBuckets = true,\n });\n\n var codepipelinePolicy = 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 \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n codepipelineBucket.Arn,\n $\"{codepipelineBucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codestar-connections:UseConnection\",\n },\n Resources = new[]\n {\n example.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var codepipelinePolicyRolePolicy = new Aws.Iam.RolePolicy(\"codepipeline_policy\", new()\n {\n Name = \"codepipeline_policy\",\n Role = codepipelineRole.Id,\n Policy = codepipelinePolicy.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/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\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\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"GitHub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelineBucket, err := s3.NewBucketV2(ctx, \"codepipeline_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"test-bucket\"),\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\"codepipeline.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\tcodepipelineRole, err := iam.NewRole(ctx, \"codepipeline_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test-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\ts3kmskey, err := kms.LookupAlias(ctx, \u0026kms.LookupAliasArgs{\n\t\t\tName: \"alias/myKmsKey\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"codepipeline\", \u0026codepipeline.PipelineArgs{\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: codepipelineRole.Arn,\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\t\u0026codepipeline.PipelineArtifactStoreArgs{\n\t\t\t\t\tLocation: codepipelineBucket.Bucket,\n\t\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\t\tEncryptionKey: \u0026codepipeline.PipelineArtifactStoreEncryptionKeyArgs{\n\t\t\t\t\t\tId: pulumi.String(s3kmskey.Arn),\n\t\t\t\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\t\t\t},\n\t\t\t\t},\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/example\"),\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\tName: pulumi.String(\"Build\"),\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(\"Build\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Build\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeBuild\"),\n\t\t\t\t\t\t\tInputArtifacts: 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\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ProjectName\": pulumi.String(\"test\"),\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\tName: pulumi.String(\"Deploy\"),\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(\"Deploy\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Deploy\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CloudFormation\"),\n\t\t\t\t\t\t\tInputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ActionMode\": pulumi.String(\"REPLACE_ON_FAILURE\"),\n\t\t\t\t\t\t\t\t\"Capabilities\": pulumi.String(\"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n\t\t\t\t\t\t\t\t\"OutputFileName\": pulumi.String(\"CreateStackOutput.json\"),\n\t\t\t\t\t\t\t\t\"StackName\": pulumi.String(\"MyStack\"),\n\t\t\t\t\t\t\t\t\"TemplatePath\": pulumi.String(\"build_output::sam-templated.yaml\"),\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\t_, err = s3.NewBucketPublicAccessBlock(ctx, \"codepipeline_bucket_pab\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: codepipelineBucket.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(true),\n\t\t\tBlockPublicPolicy: pulumi.Bool(true),\n\t\t\tIgnorePublicAcls: pulumi.Bool(true),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelinePolicy := 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(\"s3:GetObject\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetObjectVersion\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketVersioning\"),\n\t\t\t\t\t\tpulumi.String(\"s3:PutObjectAcl\"),\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\tcodepipelineBucket.Arn,\n\t\t\t\t\t\tcodepipelineBucket.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},\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(\"codestar-connections:UseConnection\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn,\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(\"codebuild:BatchGetBuilds\"),\n\t\t\t\t\t\tpulumi.String(\"codebuild:StartBuild\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"*\"),\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, \"codepipeline_policy\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"codepipeline_policy\"),\n\t\t\tRole: codepipelineRole.ID(),\n\t\t\tPolicy: pulumi.String(codepipelinePolicy.ApplyT(func(codepipelinePolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026codepipelinePolicy.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.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\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.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.kms.KmsFunctions;\nimport com.pulumi.aws.kms.inputs.GetAliasArgs;\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.PipelineArtifactStoreEncryptionKeyArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\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 example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"GitHub\")\n .build());\n\n var codepipelineBucket = new BucketV2(\"codepipelineBucket\", BucketV2Args.builder()\n .bucket(\"test-bucket\")\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(\"codepipeline.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var codepipelineRole = new Role(\"codepipelineRole\", RoleArgs.builder()\n .name(\"test-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var s3kmskey = KmsFunctions.getAlias(GetAliasArgs.builder()\n .name(\"alias/myKmsKey\")\n .build());\n\n var codepipeline = new Pipeline(\"codepipeline\", PipelineArgs.builder()\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .artifactStores(PipelineArtifactStoreArgs.builder()\n .location(codepipelineBucket.bucket())\n .type(\"S3\")\n .encryptionKey(PipelineArtifactStoreEncryptionKeyArgs.builder()\n .id(s3kmskey.applyValue(getAliasResult -\u003e getAliasResult.arn()))\n .type(\"KMS\")\n .build())\n .build())\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/example\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Build\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Build\")\n .category(\"Build\")\n .owner(\"AWS\")\n .provider(\"CodeBuild\")\n .inputArtifacts(\"source_output\")\n .outputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.of(\"ProjectName\", \"test\"))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Deploy\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Deploy\")\n .category(\"Deploy\")\n .owner(\"AWS\")\n .provider(\"CloudFormation\")\n .inputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.ofEntries(\n Map.entry(\"ActionMode\", \"REPLACE_ON_FAILURE\"),\n Map.entry(\"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n Map.entry(\"OutputFileName\", \"CreateStackOutput.json\"),\n Map.entry(\"StackName\", \"MyStack\"),\n Map.entry(\"TemplatePath\", \"build_output::sam-templated.yaml\")\n ))\n .build())\n .build())\n .build());\n\n var codepipelineBucketPab = new BucketPublicAccessBlock(\"codepipelineBucketPab\", BucketPublicAccessBlockArgs.builder()\n .bucket(codepipelineBucket.id())\n .blockPublicAcls(true)\n .blockPublicPolicy(true)\n .ignorePublicAcls(true)\n .restrictPublicBuckets(true)\n .build());\n\n final var codepipelinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\")\n .resources( \n codepipelineBucket.arn(),\n codepipelineBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"codestar-connections:UseConnection\")\n .resources(example.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\")\n .resources(\"*\")\n .build())\n .build());\n\n var codepipelinePolicyRolePolicy = new RolePolicy(\"codepipelinePolicyRolePolicy\", RolePolicyArgs.builder()\n .name(\"codepipeline_policy\")\n .role(codepipelineRole.id())\n .policy(codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(codepipelinePolicy -\u003e codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n codepipeline:\n type: aws:codepipeline:Pipeline\n properties:\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n artifactStores:\n - location: ${codepipelineBucket.bucket}\n type: S3\n encryptionKey:\n id: ${s3kmskey.arn}\n type: KMS\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/example\n BranchName: main\n - name: Build\n actions:\n - name: Build\n category: Build\n owner: AWS\n provider: CodeBuild\n inputArtifacts:\n - source_output\n outputArtifacts:\n - build_output\n version: '1'\n configuration:\n ProjectName: test\n - name: Deploy\n actions:\n - name: Deploy\n category: Deploy\n owner: AWS\n provider: CloudFormation\n inputArtifacts:\n - build_output\n version: '1'\n configuration:\n ActionMode: REPLACE_ON_FAILURE\n Capabilities: CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\n OutputFileName: CreateStackOutput.json\n StackName: MyStack\n TemplatePath: build_output::sam-templated.yaml\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: GitHub\n codepipelineBucket:\n type: aws:s3:BucketV2\n name: codepipeline_bucket\n properties:\n bucket: test-bucket\n codepipelineBucketPab:\n type: aws:s3:BucketPublicAccessBlock\n name: codepipeline_bucket_pab\n properties:\n bucket: ${codepipelineBucket.id}\n blockPublicAcls: true\n blockPublicPolicy: true\n ignorePublicAcls: true\n restrictPublicBuckets: true\n codepipelineRole:\n type: aws:iam:Role\n name: codepipeline_role\n properties:\n name: test-role\n assumeRolePolicy: ${assumeRole.json}\n codepipelinePolicyRolePolicy:\n type: aws:iam:RolePolicy\n name: codepipeline_policy\n properties:\n name: codepipeline_policy\n role: ${codepipelineRole.id}\n policy: ${codepipelinePolicy.json}\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 - codepipeline.amazonaws.com\n actions:\n - sts:AssumeRole\n codepipelinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - s3:GetObject\n - s3:GetObjectVersion\n - s3:GetBucketVersioning\n - s3:PutObjectAcl\n - s3:PutObject\n resources:\n - ${codepipelineBucket.arn}\n - ${codepipelineBucket.arn}/*\n - effect: Allow\n actions:\n - codestar-connections:UseConnection\n resources:\n - ${example.arn}\n - effect: Allow\n actions:\n - codebuild:BatchGetBuilds\n - codebuild:StartBuild\n resources:\n - '*'\n s3kmskey:\n fn::invoke:\n Function: aws:kms:getAlias\n Arguments:\n name: alias/myKmsKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodePipelines using the name. For example:\n\n```sh\n$ pulumi import aws:codepipeline/pipeline:Pipeline foo example\n```\n", "properties": { "arn": { "type": "string", @@ -208226,7 +208226,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\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", + "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 \"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 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", @@ -218141,7 +218141,7 @@ } }, "aws:datazone/domain:Domain": { - "description": "Resource for managing an AWS DataZone 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 domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"my_domain_execution_role\",\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: \"domain_execution_policy\",\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 example = new aws.datazone.Domain(\"example\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\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=\"my_domain_execution_role\",\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\": \"domain_execution_policy\",\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 }])\nexample = aws.datazone.Domain(\"example\",\n name=\"example\",\n domain_execution_role=domain_execution_role.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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"my_domain_execution_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\"] = 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 = \"domain_execution_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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\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/datazone\"\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(\"my_domain_execution_role\"),\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(\"domain_execution_policy\"),\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\t_, err = datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.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.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 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(\"my_domain_execution_role\")\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(\"domain_execution_policy\")\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 example = new Domain(\"example\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\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: my_domain_execution_role\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: domain_execution_policy\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 example:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Domain using the `domain_id`. For example:\n\n```sh\n$ pulumi import aws:datazone/domain:Domain example domain-id-12345678\n```\n", + "description": "Resource for managing an AWS DataZone 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 domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"my_domain_execution_role\",\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: \"domain_execution_policy\",\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 example = new aws.datazone.Domain(\"example\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\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=\"my_domain_execution_role\",\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\": \"domain_execution_policy\",\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 }])\nexample = aws.datazone.Domain(\"example\",\n name=\"example\",\n domain_execution_role=domain_execution_role.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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"my_domain_execution_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\"] = 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 = \"domain_execution_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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\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/datazone\"\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(\"my_domain_execution_role\"),\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(\"domain_execution_policy\"),\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\t_, err = datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.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.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 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(\"my_domain_execution_role\")\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(\"domain_execution_policy\")\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 example = new Domain(\"example\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\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: my_domain_execution_role\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: domain_execution_policy\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 example:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Domain using the `domain_id`. For example:\n\n```sh\n$ pulumi import aws:datazone/domain:Domain example domain-id-12345678\n```\n", "properties": { "arn": { "type": "string", @@ -218643,7 +218643,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, \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", + "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", @@ -218803,7 +218803,7 @@ } }, "aws:datazone/formType:FormType": { - "description": "Resource for managing an AWS DataZone Form Type.\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-role\",\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-policy\",\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 test = new aws.datazone.Domain(\"test\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testFormType = new aws.datazone.FormType(\"test\", {\n description: \"desc\",\n name: \"SageMakerModelFormType\",\n domainIdentifier: test.id,\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n model: {\n smithy: `\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\n`,\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-role\",\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-policy\",\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 = aws.datazone.Domain(\"test\",\n name=\"example\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_form_type = aws.datazone.FormType(\"test\",\n description=\"desc\",\n name=\"SageMakerModelFormType\",\n domain_identifier=test.id,\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n model={\n \"smithy\": \"\"\"\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-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\"] = 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-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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var test = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testFormType = new Aws.DataZone.FormType(\"test\", new()\n {\n Description = \"desc\",\n Name = \"SageMakerModelFormType\",\n DomainIdentifier = test.Id,\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n Model = new Aws.DataZone.Inputs.FormTypeModelArgs\n {\n Smithy = @\"\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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/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-role\"),\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-policy\"),\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\ttest, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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: test.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\t_, err = datazone.NewFormType(ctx, \"test\", \u0026datazone.FormTypeArgs{\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tName: pulumi.String(\"SageMakerModelFormType\"),\n\t\t\tDomainIdentifier: test.ID(),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tModel: \u0026datazone.FormTypeModelArgs{\n\t\t\t\tSmithy: pulumi.String(`\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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.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.datazone.FormType;\nimport com.pulumi.aws.datazone.FormTypeArgs;\nimport com.pulumi.aws.datazone.inputs.FormTypeModelArgs;\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-role\")\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-policy\")\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 test = new Domain(\"test\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testFormType = new FormType(\"testFormType\", FormTypeArgs.builder()\n .description(\"desc\")\n .name(\"SageMakerModelFormType\")\n .domainIdentifier(test.id())\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .model(FormTypeModelArgs.builder()\n .smithy(\"\"\"\n\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\n \"\"\")\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-role\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-policy\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 test:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example name\n description: desc\n skipDeletionCheck: true\n testFormType:\n type: aws:datazone:FormType\n name: test\n properties:\n description: desc\n name: SageMakerModelFormType\n domainIdentifier: ${test.id}\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n model:\n smithy: |\n \tstructure SageMakerModelFormType {\n \t\t\t@required\n \t\t\t@amazon.datazone#searchable\n \t\t\tmodelName: String\n\n \t\t\t@required\n \t\t\tmodelArn: String\n\n \t\t\t@required\n \t\t\tcreationTime: String\n \t\t\t}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Form Type using a comma separated value of `domain_identifier`,`name`,`revision`. For example:\n\n```sh\n$ pulumi import aws:datazone/formType:FormType example domain_identifier,name,revision\n```\n", + "description": "Resource for managing an AWS DataZone Form Type.\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-role\",\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-policy\",\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 test = new aws.datazone.Domain(\"test\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testFormType = new aws.datazone.FormType(\"test\", {\n description: \"desc\",\n name: \"SageMakerModelFormType\",\n domainIdentifier: test.id,\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n model: {\n smithy: `\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\n`,\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-role\",\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-policy\",\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 = aws.datazone.Domain(\"test\",\n name=\"example\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_form_type = aws.datazone.FormType(\"test\",\n description=\"desc\",\n name=\"SageMakerModelFormType\",\n domain_identifier=test.id,\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n model={\n \"smithy\": \"\"\"\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-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\"] = 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-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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var test = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testFormType = new Aws.DataZone.FormType(\"test\", new()\n {\n Description = \"desc\",\n Name = \"SageMakerModelFormType\",\n DomainIdentifier = test.Id,\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n Model = new Aws.DataZone.Inputs.FormTypeModelArgs\n {\n Smithy = @\"\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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/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-role\"),\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-policy\"),\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\ttest, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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: test.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\t_, err = datazone.NewFormType(ctx, \"test\", \u0026datazone.FormTypeArgs{\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tName: pulumi.String(\"SageMakerModelFormType\"),\n\t\t\tDomainIdentifier: test.ID(),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tModel: \u0026datazone.FormTypeModelArgs{\n\t\t\t\tSmithy: pulumi.String(`\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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.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.datazone.FormType;\nimport com.pulumi.aws.datazone.FormTypeArgs;\nimport com.pulumi.aws.datazone.inputs.FormTypeModelArgs;\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-role\")\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-policy\")\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 test = new Domain(\"test\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testFormType = new FormType(\"testFormType\", FormTypeArgs.builder()\n .description(\"desc\")\n .name(\"SageMakerModelFormType\")\n .domainIdentifier(test.id())\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .model(FormTypeModelArgs.builder()\n .smithy(\"\"\"\n\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\n \"\"\")\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-role\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-policy\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 test:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example name\n description: desc\n skipDeletionCheck: true\n testFormType:\n type: aws:datazone:FormType\n name: test\n properties:\n description: desc\n name: SageMakerModelFormType\n domainIdentifier: ${test.id}\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n model:\n smithy: |\n \tstructure SageMakerModelFormType {\n \t\t\t@required\n \t\t\t@amazon.datazone#searchable\n \t\t\tmodelName: String\n\n \t\t\t@required\n \t\t\tmodelArn: String\n\n \t\t\t@required\n \t\t\tcreationTime: String\n \t\t\t}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Form Type using a comma separated value of `domain_identifier`,`name`,`revision`. For example:\n\n```sh\n$ pulumi import aws:datazone/formType:FormType example domain_identifier,name,revision\n```\n", "properties": { "createdAt": { "type": "string", @@ -218962,7 +218962,7 @@ } }, "aws:datazone/glossary:Glossary": { - "description": "Resource for managing an AWS DataZone Glossary.\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 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 test = 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: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example_name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testGlossary = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n domainIdentifier: testProject.domainIdentifier,\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 = 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.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example_name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_glossary = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n domain_identifier=test_project.domain_identifier)\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 test = 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 = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example_name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testGlossary = new Aws.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testProject.DomainIdentifier,\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/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\ttest, 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: test.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\t_, err = datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: testProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\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 test = new Domain(\"test\", 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(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example_name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testGlossary = new Glossary(\"testGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testProject.domainIdentifier())\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 test:\n type: aws:datazone:Domain\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: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example_name\n description: desc\n skipDeletionCheck: true\n testGlossary:\n type: aws:datazone:Glossary\n name: test\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n domainIdentifier: ${testProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\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 = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testAwsDatazoneProject.id,\n status: \"DISABLED\",\n domainIdentifier: testAwsDatazoneProject.domainIdentifier,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_aws_datazone_project[\"id\"],\n status=\"DISABLED\",\n domain_identifier=test_aws_datazone_project[\"domainIdentifier\"])\n```\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.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testAwsDatazoneProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testAwsDatazoneProject.DomainIdentifier,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: pulumi.Any(testAwsDatazoneProject.Id),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: pulumi.Any(testAwsDatazoneProject.DomainIdentifier),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Glossary(\"test\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testAwsDatazoneProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testAwsDatazoneProject.domainIdentifier())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:datazone:Glossary\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testAwsDatazoneProject.id}\n status: DISABLED\n domainIdentifier: ${testAwsDatazoneProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary using the import Datazone Glossary using a comma-delimited string combining the domain id, glossary id, and the id of the project it's under. For example:\n\n```sh\n$ pulumi import aws:datazone/glossary:Glossary example domain-id,glossary-id,owning-project-identifier\n```\n", + "description": "Resource for managing an AWS DataZone Glossary.\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 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 test = 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: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example_name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testGlossary = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n domainIdentifier: testProject.domainIdentifier,\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 = 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.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example_name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_glossary = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n domain_identifier=test_project.domain_identifier)\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 test = 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 = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example_name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testGlossary = new Aws.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testProject.DomainIdentifier,\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/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\ttest, 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: test.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\t_, err = datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: testProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\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 test = new Domain(\"test\", 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(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example_name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testGlossary = new Glossary(\"testGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testProject.domainIdentifier())\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 test:\n type: aws:datazone:Domain\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: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example_name\n description: desc\n skipDeletionCheck: true\n testGlossary:\n type: aws:datazone:Glossary\n name: test\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n domainIdentifier: ${testProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\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 = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testAwsDatazoneProject.id,\n status: \"DISABLED\",\n domainIdentifier: testAwsDatazoneProject.domainIdentifier,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_aws_datazone_project[\"id\"],\n status=\"DISABLED\",\n domain_identifier=test_aws_datazone_project[\"domainIdentifier\"])\n```\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.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testAwsDatazoneProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testAwsDatazoneProject.DomainIdentifier,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: pulumi.Any(testAwsDatazoneProject.Id),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: pulumi.Any(testAwsDatazoneProject.DomainIdentifier),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Glossary(\"test\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testAwsDatazoneProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testAwsDatazoneProject.domainIdentifier())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:datazone:Glossary\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testAwsDatazoneProject.id}\n status: DISABLED\n domainIdentifier: ${testAwsDatazoneProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary using the import Datazone Glossary using a comma-delimited string combining the domain id, glossary id, and the id of the project it's under. For example:\n\n```sh\n$ pulumi import aws:datazone/glossary:Glossary example domain-id,glossary-id,owning-project-identifier\n```\n", "properties": { "description": { "type": "string", @@ -219041,7 +219041,7 @@ } }, "aws:datazone/glossaryTerm:GlossaryTerm": { - "description": "Resource for managing an AWS DataZone Glossary Term.\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.iam.Role(\"example\", {\n name: \"example\",\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\",\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 exampleDomain = new aws.datazone.Domain(\"example\", {\n name: \"example_name\",\n domainExecutionRole: example.arn,\n});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {name: \"example_name\"});\nconst exampleProject = new aws.datazone.Project(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example\",\n skipDeletionCheck: true,\n});\nconst exampleGlossary = new aws.datazone.Glossary(\"example\", {\n description: \"description\",\n name: \"example\",\n owningProjectIdentifier: exampleProject.id,\n status: \"ENABLED\",\n domainIdentifier: exampleProject.domainIdentifier,\n});\nconst exampleGlossaryTerm = new aws.datazone.GlossaryTerm(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryIdentifier: exampleGlossary.id,\n name: \"example\",\n status: \"ENABLED\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"example\",\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\",\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 }])\nexample_domain = aws.datazone.Domain(\"example\",\n name=\"example_name\",\n domain_execution_role=example.arn)\nexample_security_group = aws.ec2.SecurityGroup(\"example\", name=\"example_name\")\nexample_project = aws.datazone.Project(\"example\",\n domain_identifier=example_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example\",\n skip_deletion_check=True)\nexample_glossary = aws.datazone.Glossary(\"example\",\n description=\"description\",\n name=\"example\",\n owning_project_identifier=example_project.id,\n status=\"ENABLED\",\n domain_identifier=example_project.domain_identifier)\nexample_glossary_term = aws.datazone.GlossaryTerm(\"example\",\n domain_identifier=example_domain.id,\n glossary_identifier=example_glossary.id,\n name=\"example\",\n status=\"ENABLED\")\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.Iam.Role(\"example\", new()\n {\n Name = \"example\",\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\",\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 exampleDomain = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example_name\",\n DomainExecutionRole = example.Arn,\n });\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = \"example_name\",\n });\n\n var exampleProject = new Aws.DataZone.Project(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example\",\n SkipDeletionCheck = true,\n });\n\n var exampleGlossary = new Aws.DataZone.Glossary(\"example\", new()\n {\n Description = \"description\",\n Name = \"example\",\n OwningProjectIdentifier = exampleProject.Id,\n Status = \"ENABLED\",\n DomainIdentifier = exampleProject.DomainIdentifier,\n });\n\n var exampleGlossaryTerm = new Aws.DataZone.GlossaryTerm(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryIdentifier = exampleGlossary.Id,\n Name = \"example\",\n Status = \"ENABLED\",\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/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\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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\texampleDomain, err := datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tDomainExecutionRole: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"example\", \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\texampleProject, err := datazone.NewProject(ctx, \"example\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: exampleDomain.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\"),\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\texampleGlossary, err := datazone.NewGlossary(ctx, \"example\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tOwningProjectIdentifier: exampleProject.ID(),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t\tDomainIdentifier: exampleProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewGlossaryTerm(ctx, \"example\", \u0026datazone.GlossaryTermArgs{\n\t\t\tDomainIdentifier: exampleDomain.ID(),\n\t\t\tGlossaryIdentifier: exampleGlossary.ID(),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport com.pulumi.aws.datazone.GlossaryTerm;\nimport com.pulumi.aws.datazone.GlossaryTermArgs;\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 Role(\"example\", RoleArgs.builder()\n .name(\"example\")\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\")\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 exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .name(\"example_name\")\n .domainExecutionRole(example.arn())\n .build());\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example_name\")\n .build());\n\n var exampleProject = new Project(\"exampleProject\", ProjectArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example\")\n .skipDeletionCheck(true)\n .build());\n\n var exampleGlossary = new Glossary(\"exampleGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example\")\n .owningProjectIdentifier(exampleProject.id())\n .status(\"ENABLED\")\n .domainIdentifier(exampleProject.domainIdentifier())\n .build());\n\n var exampleGlossaryTerm = new GlossaryTerm(\"exampleGlossaryTerm\", GlossaryTermArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryIdentifier(exampleGlossary.id())\n .name(\"example\")\n .status(\"ENABLED\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: example\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\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 exampleDomain:\n type: aws:datazone:Domain\n name: example\n properties:\n name: example_name\n domainExecutionRole: ${example.arn}\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: example_name\n exampleProject:\n type: aws:datazone:Project\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example\n skipDeletionCheck: true\n exampleGlossary:\n type: aws:datazone:Glossary\n name: example\n properties:\n description: description\n name: example\n owningProjectIdentifier: ${exampleProject.id}\n status: ENABLED\n domainIdentifier: ${exampleProject.domainIdentifier}\n exampleGlossaryTerm:\n type: aws:datazone:GlossaryTerm\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryIdentifier: ${exampleGlossary.id}\n name: example\n status: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary Term using a comma-delimited string combining the `domain_identifier`, `id`, and the `glossary_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/glossaryTerm:GlossaryTerm example domain-id,glossary-term-id,glossary-id\n```\n", + "description": "Resource for managing an AWS DataZone Glossary Term.\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.iam.Role(\"example\", {\n name: \"example\",\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\",\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 exampleDomain = new aws.datazone.Domain(\"example\", {\n name: \"example_name\",\n domainExecutionRole: example.arn,\n});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {name: \"example_name\"});\nconst exampleProject = new aws.datazone.Project(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example\",\n skipDeletionCheck: true,\n});\nconst exampleGlossary = new aws.datazone.Glossary(\"example\", {\n description: \"description\",\n name: \"example\",\n owningProjectIdentifier: exampleProject.id,\n status: \"ENABLED\",\n domainIdentifier: exampleProject.domainIdentifier,\n});\nconst exampleGlossaryTerm = new aws.datazone.GlossaryTerm(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryIdentifier: exampleGlossary.id,\n name: \"example\",\n status: \"ENABLED\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"example\",\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\",\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 }])\nexample_domain = aws.datazone.Domain(\"example\",\n name=\"example_name\",\n domain_execution_role=example.arn)\nexample_security_group = aws.ec2.SecurityGroup(\"example\", name=\"example_name\")\nexample_project = aws.datazone.Project(\"example\",\n domain_identifier=example_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example\",\n skip_deletion_check=True)\nexample_glossary = aws.datazone.Glossary(\"example\",\n description=\"description\",\n name=\"example\",\n owning_project_identifier=example_project.id,\n status=\"ENABLED\",\n domain_identifier=example_project.domain_identifier)\nexample_glossary_term = aws.datazone.GlossaryTerm(\"example\",\n domain_identifier=example_domain.id,\n glossary_identifier=example_glossary.id,\n name=\"example\",\n status=\"ENABLED\")\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.Iam.Role(\"example\", new()\n {\n Name = \"example\",\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\",\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 exampleDomain = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example_name\",\n DomainExecutionRole = example.Arn,\n });\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = \"example_name\",\n });\n\n var exampleProject = new Aws.DataZone.Project(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example\",\n SkipDeletionCheck = true,\n });\n\n var exampleGlossary = new Aws.DataZone.Glossary(\"example\", new()\n {\n Description = \"description\",\n Name = \"example\",\n OwningProjectIdentifier = exampleProject.Id,\n Status = \"ENABLED\",\n DomainIdentifier = exampleProject.DomainIdentifier,\n });\n\n var exampleGlossaryTerm = new Aws.DataZone.GlossaryTerm(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryIdentifier = exampleGlossary.Id,\n Name = \"example\",\n Status = \"ENABLED\",\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/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\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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\texampleDomain, err := datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tDomainExecutionRole: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"example\", \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\texampleProject, err := datazone.NewProject(ctx, \"example\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: exampleDomain.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\"),\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\texampleGlossary, err := datazone.NewGlossary(ctx, \"example\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tOwningProjectIdentifier: exampleProject.ID(),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t\tDomainIdentifier: exampleProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewGlossaryTerm(ctx, \"example\", \u0026datazone.GlossaryTermArgs{\n\t\t\tDomainIdentifier: exampleDomain.ID(),\n\t\t\tGlossaryIdentifier: exampleGlossary.ID(),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport com.pulumi.aws.datazone.GlossaryTerm;\nimport com.pulumi.aws.datazone.GlossaryTermArgs;\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 Role(\"example\", RoleArgs.builder()\n .name(\"example\")\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\")\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 exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .name(\"example_name\")\n .domainExecutionRole(example.arn())\n .build());\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example_name\")\n .build());\n\n var exampleProject = new Project(\"exampleProject\", ProjectArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example\")\n .skipDeletionCheck(true)\n .build());\n\n var exampleGlossary = new Glossary(\"exampleGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example\")\n .owningProjectIdentifier(exampleProject.id())\n .status(\"ENABLED\")\n .domainIdentifier(exampleProject.domainIdentifier())\n .build());\n\n var exampleGlossaryTerm = new GlossaryTerm(\"exampleGlossaryTerm\", GlossaryTermArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryIdentifier(exampleGlossary.id())\n .name(\"example\")\n .status(\"ENABLED\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: example\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\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 exampleDomain:\n type: aws:datazone:Domain\n name: example\n properties:\n name: example_name\n domainExecutionRole: ${example.arn}\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: example_name\n exampleProject:\n type: aws:datazone:Project\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example\n skipDeletionCheck: true\n exampleGlossary:\n type: aws:datazone:Glossary\n name: example\n properties:\n description: description\n name: example\n owningProjectIdentifier: ${exampleProject.id}\n status: ENABLED\n domainIdentifier: ${exampleProject.domainIdentifier}\n exampleGlossaryTerm:\n type: aws:datazone:GlossaryTerm\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryIdentifier: ${exampleGlossary.id}\n name: example\n status: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary Term using a comma-delimited string combining the `domain_identifier`, `id`, and the `glossary_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/glossaryTerm:GlossaryTerm example domain-id,glossary-term-id,glossary-id\n```\n", "properties": { "createdAt": { "type": "string", @@ -225019,7 +225019,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, \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", + "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 \"SnapshotCreator\": \"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 \"SnapshotCreator\": \"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", @@ -241290,7 +241290,7 @@ } }, "aws:ec2/spotFleetRequest:SpotFleetRequest": { - "description": "Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot\ninstances to be requested on the Spot market.\n\n\u003e **NOTE [AWS strongly discourages](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) the use of the legacy APIs called by this resource.\nWe recommend using the EC2 Fleet or Auto Scaling Group resources instead.\n\n## Example Usage\n\n### Using launch specifications\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Request a Spot fleet\nconst cheapCompute = new aws.ec2.SpotFleetRequest(\"cheap_compute\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.03\",\n allocationStrategy: \"diversified\",\n targetCapacity: 6,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m4.10xlarge\",\n ami: \"ami-1234\",\n spotPrice: \"2.793\",\n placementTenancy: \"dedicated\",\n iamInstanceProfileArn: example.arn,\n },\n {\n instanceType: \"m4.4xlarge\",\n ami: \"ami-5678\",\n keyName: \"my-key\",\n spotPrice: \"1.117\",\n iamInstanceProfileArn: example.arn,\n availabilityZone: \"us-west-1a\",\n subnetId: \"subnet-1234\",\n weightedCapacity: \"35\",\n rootBlockDevices: [{\n volumeSize: 300,\n volumeType: \"gp2\",\n }],\n tags: {\n Name: \"spot-fleet-example\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Request a Spot fleet\ncheap_compute = aws.ec2.SpotFleetRequest(\"cheap_compute\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.03\",\n allocation_strategy=\"diversified\",\n target_capacity=6,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m4.10xlarge\",\n \"ami\": \"ami-1234\",\n \"spot_price\": \"2.793\",\n \"placement_tenancy\": \"dedicated\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n },\n {\n \"instance_type\": \"m4.4xlarge\",\n \"ami\": \"ami-5678\",\n \"key_name\": \"my-key\",\n \"spot_price\": \"1.117\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n \"availability_zone\": \"us-west-1a\",\n \"subnet_id\": \"subnet-1234\",\n \"weighted_capacity\": \"35\",\n \"root_block_devices\": [{\n \"volume_size\": 300,\n \"volume_type\": \"gp2\",\n }],\n \"tags\": {\n \"name\": \"spot-fleet-example\",\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 // Request a Spot fleet\n var cheapCompute = new Aws.Ec2.SpotFleetRequest(\"cheap_compute\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.03\",\n AllocationStrategy = \"diversified\",\n TargetCapacity = 6,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.10xlarge\",\n Ami = \"ami-1234\",\n SpotPrice = \"2.793\",\n PlacementTenancy = \"dedicated\",\n IamInstanceProfileArn = example.Arn,\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.4xlarge\",\n Ami = \"ami-5678\",\n KeyName = \"my-key\",\n SpotPrice = \"1.117\",\n IamInstanceProfileArn = example.Arn,\n AvailabilityZone = \"us-west-1a\",\n SubnetId = \"subnet-1234\",\n WeightedCapacity = \"35\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 300,\n VolumeType = \"gp2\",\n },\n },\n Tags = \n {\n { \"Name\", \"spot-fleet-example\" },\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// Request a Spot fleet\n\t\t_, err := ec2.NewSpotFleetRequest(ctx, \"cheap_compute\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.03\"),\n\t\t\tAllocationStrategy: pulumi.String(\"diversified\"),\n\t\t\tTargetCapacity: pulumi.Int(6),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.10xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-1234\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"2.793\"),\n\t\t\t\t\tPlacementTenancy: pulumi.String(\"dedicated\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.4xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-5678\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"1.117\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-1a\"),\n\t\t\t\t\tSubnetId: pulumi.String(\"subnet-1234\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"35\"),\n\t\t\t\t\tRootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{\n\t\t\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{\n\t\t\t\t\t\t\tVolumeSize: pulumi.Int(300),\n\t\t\t\t\t\t\tVolumeType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\"Name\": pulumi.String(\"spot-fleet-example\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Request a Spot fleet\n var cheapCompute = new SpotFleetRequest(\"cheapCompute\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.03\")\n .allocationStrategy(\"diversified\")\n .targetCapacity(6)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.10xlarge\")\n .ami(\"ami-1234\")\n .spotPrice(\"2.793\")\n .placementTenancy(\"dedicated\")\n .iamInstanceProfileArn(example.arn())\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.4xlarge\")\n .ami(\"ami-5678\")\n .keyName(\"my-key\")\n .spotPrice(\"1.117\")\n .iamInstanceProfileArn(example.arn())\n .availabilityZone(\"us-west-1a\")\n .subnetId(\"subnet-1234\")\n .weightedCapacity(35)\n .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()\n .volumeSize(\"300\")\n .volumeType(\"gp2\")\n .build())\n .tags(Map.of(\"Name\", \"spot-fleet-example\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Request a Spot fleet\n cheapCompute:\n type: aws:ec2:SpotFleetRequest\n name: cheap_compute\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.03'\n allocationStrategy: diversified\n targetCapacity: 6\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m4.10xlarge\n ami: ami-1234\n spotPrice: '2.793'\n placementTenancy: dedicated\n iamInstanceProfileArn: ${example.arn}\n - instanceType: m4.4xlarge\n ami: ami-5678\n keyName: my-key\n spotPrice: '1.117'\n iamInstanceProfileArn: ${example.arn}\n availabilityZone: us-west-1a\n subnetId: subnet-1234\n weightedCapacity: 35\n rootBlockDevices:\n - volumeSize: '300'\n volumeType: gp2\n tags:\n Name: spot-fleet-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using launch templates\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.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\n\t\t\tName: pulumi.String(\"launch-template\"),\n\t\t\tImageId: pulumi.String(\"ami-516b9131\"),\n\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\tKeyName: pulumi.String(\"some-key\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\n\t\t\t\t\tLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\n\t\t\t\t\t\tId: foo.ID(),\n\t\t\t\t\t\tVersion: foo.LatestVersion,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttest_attach,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n options:\n dependson:\n - ${[\"test-attach\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** This provider does not support the functionality where multiple `subnet_id` or `availability_zone` parameters can be specified in the same\nlaunch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:\n\n### Using multiple launch specifications\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.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m1.small\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n {\n instanceType: \"m5.large\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m1.small\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\n },\n {\n \"instance_type\": \"m5.large\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\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 foo = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m1.small\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m5.large\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\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.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m5.large\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 SpotFleetRequest(\"foo\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m1.small\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m5.large\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:SpotFleetRequest\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m1.small\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n - instanceType: m5.large\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e In this example, we use a `dynamic` block to define zero or more `launch_specification` blocks, producing one for each element in the list of subnet ids.\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 subnets = config.requireObject(\"subnets\");\nconst example = new aws.ec2.SpotFleetRequest(\"example\", {\n launchSpecifications: .map(s =\u003e ({\n subnetId: s[1],\n })).map((v, k) =\u003e ({key: k, value: v})).map(entry =\u003e ({\n ami: \"ami-1234\",\n instanceType: \"m4.4xlarge\",\n subnetId: entry.value.subnetId,\n vpcSecurityGroupIds: \"sg-123456\",\n rootBlockDevices: [{\n volumeSize: 8,\n volumeType: \"gp2\",\n deleteOnTermination: true,\n }],\n tags: {\n Name: \"Spot Node\",\n tag_builder: \"builder\",\n },\n })),\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n targetCapacity: 3,\n validUntil: \"2019-11-04T20:44:20Z\",\n allocationStrategy: \"lowestPrice\",\n fleetType: \"request\",\n waitForFulfillment: true,\n terminateInstancesWithExpiration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nsubnets = config.require_object(\"subnets\")\nexample = aws.ec2.SpotFleetRequest(\"example\",\n launch_specifications=[{\n \"ami\": \"ami-1234\",\n \"instance_type\": \"m4.4xlarge\",\n \"subnet_id\": entry[\"value\"][\"subnetId\"],\n \"vpc_security_group_ids\": \"sg-123456\",\n \"root_block_devices\": [{\n \"volume_size\": 8,\n \"volume_type\": \"gp2\",\n \"delete_on_termination\": True,\n }],\n \"tags\": {\n \"name\": \"Spot Node\",\n \"tag_builder\": \"builder\",\n },\n } for entry in [{\"key\": k, \"value\": v} for k, v in [{\n \"subnetId\": s[1],\n } for s in subnets]]],\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n target_capacity=3,\n valid_until=\"2019-11-04T20:44:20Z\",\n allocation_strategy=\"lowestPrice\",\n fleet_type=\"request\",\n wait_for_fulfillment=True,\n terminate_instances_with_expiration=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 config = new Config();\n var subnets = config.RequireObject\u003cdynamic\u003e(\"subnets\");\n var example = new Aws.Ec2.SpotFleetRequest(\"example\", new()\n {\n LaunchSpecifications = .Select(s =\u003e \n {\n return \n {\n { \"subnetId\", s[1] },\n };\n }).ToList().Select((v, k) =\u003e new { Key = k, Value = v }).Select(entry =\u003e \n {\n return new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n Ami = \"ami-1234\",\n InstanceType = \"m4.4xlarge\",\n SubnetId = entry.Value.SubnetId,\n VpcSecurityGroupIds = \"sg-123456\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 8,\n VolumeType = \"gp2\",\n DeleteOnTermination = true,\n },\n },\n Tags = \n {\n { \"Name\", \"Spot Node\" },\n { \"tag_builder\", \"builder\" },\n },\n };\n }).ToList(),\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n TargetCapacity = 3,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n AllocationStrategy = \"lowestPrice\",\n FleetType = \"request\",\n WaitForFulfillment = true,\n TerminateInstancesWithExpiration = true,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using multiple launch configurations\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.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [vpcId],\n }],\n});\nconst foo = new aws.ec2.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n overrides: [\n {\n subnetId: example.then(example =\u003e example.ids?.[0]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[1]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[2]),\n },\n ],\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [vpc_id],\n}])\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n \"overrides\": [\n {\n \"subnet_id\": example.ids[0],\n },\n {\n \"subnet_id\": example.ids[1],\n },\n {\n \"subnet_id\": example.ids[2],\n },\n ],\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n vpcId,\n },\n },\n },\n });\n\n var foo = new Aws.Ec2.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n Overrides = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[2]),\n },\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nvpcId,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nfoo, err := ec2.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\nName: pulumi.String(\"launch-template\"),\nImageId: pulumi.String(\"ami-516b9131\"),\nInstanceType: pulumi.String(\"m1.small\"),\nKeyName: pulumi.String(\"some-key\"),\n})\nif err != nil {\nreturn err\n}\n_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\nIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\nSpotPrice: pulumi.String(\"0.005\"),\nTargetCapacity: pulumi.Int(2),\nValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\nLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\nLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\nId: foo.ID(),\nVersion: foo.LatestVersion,\n},\nOverrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[0]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[1]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[2]),\n},\n},\n},\n},\n}, pulumi.DependsOn([]pulumi.Resource{\ntest_attach,\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.GetSubnetsArgs;\nimport com.pulumi.aws.ec2.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(vpcId)\n .build())\n .build());\n\n var foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .overrides( \n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[2]))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n overrides:\n - subnetId: ${example.ids[0]}\n - subnetId: ${example.ids[1]}\n - subnetId: ${example.ids[2]}\n options:\n dependson:\n - ${[\"test-attach\"]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${vpcId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Spot Fleet Requests using `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e\n```\n", + "description": "Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot\ninstances to be requested on the Spot market.\n\n\u003e **NOTE [AWS strongly discourages](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) the use of the legacy APIs called by this resource.\nWe recommend using the EC2 Fleet or Auto Scaling Group resources instead.\n\n## Example Usage\n\n### Using launch specifications\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Request a Spot fleet\nconst cheapCompute = new aws.ec2.SpotFleetRequest(\"cheap_compute\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.03\",\n allocationStrategy: \"diversified\",\n targetCapacity: 6,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m4.10xlarge\",\n ami: \"ami-1234\",\n spotPrice: \"2.793\",\n placementTenancy: \"dedicated\",\n iamInstanceProfileArn: example.arn,\n },\n {\n instanceType: \"m4.4xlarge\",\n ami: \"ami-5678\",\n keyName: \"my-key\",\n spotPrice: \"1.117\",\n iamInstanceProfileArn: example.arn,\n availabilityZone: \"us-west-1a\",\n subnetId: \"subnet-1234\",\n weightedCapacity: \"35\",\n rootBlockDevices: [{\n volumeSize: 300,\n volumeType: \"gp2\",\n }],\n tags: {\n Name: \"spot-fleet-example\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Request a Spot fleet\ncheap_compute = aws.ec2.SpotFleetRequest(\"cheap_compute\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.03\",\n allocation_strategy=\"diversified\",\n target_capacity=6,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m4.10xlarge\",\n \"ami\": \"ami-1234\",\n \"spot_price\": \"2.793\",\n \"placement_tenancy\": \"dedicated\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n },\n {\n \"instance_type\": \"m4.4xlarge\",\n \"ami\": \"ami-5678\",\n \"key_name\": \"my-key\",\n \"spot_price\": \"1.117\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n \"availability_zone\": \"us-west-1a\",\n \"subnet_id\": \"subnet-1234\",\n \"weighted_capacity\": \"35\",\n \"root_block_devices\": [{\n \"volume_size\": 300,\n \"volume_type\": \"gp2\",\n }],\n \"tags\": {\n \"Name\": \"spot-fleet-example\",\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 // Request a Spot fleet\n var cheapCompute = new Aws.Ec2.SpotFleetRequest(\"cheap_compute\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.03\",\n AllocationStrategy = \"diversified\",\n TargetCapacity = 6,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.10xlarge\",\n Ami = \"ami-1234\",\n SpotPrice = \"2.793\",\n PlacementTenancy = \"dedicated\",\n IamInstanceProfileArn = example.Arn,\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.4xlarge\",\n Ami = \"ami-5678\",\n KeyName = \"my-key\",\n SpotPrice = \"1.117\",\n IamInstanceProfileArn = example.Arn,\n AvailabilityZone = \"us-west-1a\",\n SubnetId = \"subnet-1234\",\n WeightedCapacity = \"35\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 300,\n VolumeType = \"gp2\",\n },\n },\n Tags = \n {\n { \"Name\", \"spot-fleet-example\" },\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// Request a Spot fleet\n\t\t_, err := ec2.NewSpotFleetRequest(ctx, \"cheap_compute\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.03\"),\n\t\t\tAllocationStrategy: pulumi.String(\"diversified\"),\n\t\t\tTargetCapacity: pulumi.Int(6),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.10xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-1234\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"2.793\"),\n\t\t\t\t\tPlacementTenancy: pulumi.String(\"dedicated\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.4xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-5678\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"1.117\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-1a\"),\n\t\t\t\t\tSubnetId: pulumi.String(\"subnet-1234\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"35\"),\n\t\t\t\t\tRootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{\n\t\t\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{\n\t\t\t\t\t\t\tVolumeSize: pulumi.Int(300),\n\t\t\t\t\t\t\tVolumeType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\"Name\": pulumi.String(\"spot-fleet-example\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Request a Spot fleet\n var cheapCompute = new SpotFleetRequest(\"cheapCompute\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.03\")\n .allocationStrategy(\"diversified\")\n .targetCapacity(6)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.10xlarge\")\n .ami(\"ami-1234\")\n .spotPrice(\"2.793\")\n .placementTenancy(\"dedicated\")\n .iamInstanceProfileArn(example.arn())\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.4xlarge\")\n .ami(\"ami-5678\")\n .keyName(\"my-key\")\n .spotPrice(\"1.117\")\n .iamInstanceProfileArn(example.arn())\n .availabilityZone(\"us-west-1a\")\n .subnetId(\"subnet-1234\")\n .weightedCapacity(35)\n .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()\n .volumeSize(\"300\")\n .volumeType(\"gp2\")\n .build())\n .tags(Map.of(\"Name\", \"spot-fleet-example\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Request a Spot fleet\n cheapCompute:\n type: aws:ec2:SpotFleetRequest\n name: cheap_compute\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.03'\n allocationStrategy: diversified\n targetCapacity: 6\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m4.10xlarge\n ami: ami-1234\n spotPrice: '2.793'\n placementTenancy: dedicated\n iamInstanceProfileArn: ${example.arn}\n - instanceType: m4.4xlarge\n ami: ami-5678\n keyName: my-key\n spotPrice: '1.117'\n iamInstanceProfileArn: ${example.arn}\n availabilityZone: us-west-1a\n subnetId: subnet-1234\n weightedCapacity: 35\n rootBlockDevices:\n - volumeSize: '300'\n volumeType: gp2\n tags:\n Name: spot-fleet-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using launch templates\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.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\n\t\t\tName: pulumi.String(\"launch-template\"),\n\t\t\tImageId: pulumi.String(\"ami-516b9131\"),\n\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\tKeyName: pulumi.String(\"some-key\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\n\t\t\t\t\tLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\n\t\t\t\t\t\tId: foo.ID(),\n\t\t\t\t\t\tVersion: foo.LatestVersion,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttest_attach,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n options:\n dependson:\n - ${[\"test-attach\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** This provider does not support the functionality where multiple `subnet_id` or `availability_zone` parameters can be specified in the same\nlaunch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:\n\n### Using multiple launch specifications\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.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m1.small\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n {\n instanceType: \"m5.large\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m1.small\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\n },\n {\n \"instance_type\": \"m5.large\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\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 foo = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m1.small\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m5.large\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\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.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m5.large\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 SpotFleetRequest(\"foo\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m1.small\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m5.large\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:SpotFleetRequest\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m1.small\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n - instanceType: m5.large\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e In this example, we use a `dynamic` block to define zero or more `launch_specification` blocks, producing one for each element in the list of subnet ids.\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 subnets = config.requireObject(\"subnets\");\nconst example = new aws.ec2.SpotFleetRequest(\"example\", {\n launchSpecifications: .map(s =\u003e ({\n subnetId: s[1],\n })).map((v, k) =\u003e ({key: k, value: v})).map(entry =\u003e ({\n ami: \"ami-1234\",\n instanceType: \"m4.4xlarge\",\n subnetId: entry.value.subnetId,\n vpcSecurityGroupIds: \"sg-123456\",\n rootBlockDevices: [{\n volumeSize: 8,\n volumeType: \"gp2\",\n deleteOnTermination: true,\n }],\n tags: {\n Name: \"Spot Node\",\n tag_builder: \"builder\",\n },\n })),\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n targetCapacity: 3,\n validUntil: \"2019-11-04T20:44:20Z\",\n allocationStrategy: \"lowestPrice\",\n fleetType: \"request\",\n waitForFulfillment: true,\n terminateInstancesWithExpiration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nsubnets = config.require_object(\"subnets\")\nexample = aws.ec2.SpotFleetRequest(\"example\",\n launch_specifications=[{\n \"ami\": \"ami-1234\",\n \"instance_type\": \"m4.4xlarge\",\n \"subnet_id\": entry[\"value\"][\"subnetId\"],\n \"vpc_security_group_ids\": \"sg-123456\",\n \"root_block_devices\": [{\n \"volume_size\": 8,\n \"volume_type\": \"gp2\",\n \"delete_on_termination\": True,\n }],\n \"tags\": {\n \"Name\": \"Spot Node\",\n \"tag_builder\": \"builder\",\n },\n } for entry in [{\"key\": k, \"value\": v} for k, v in [{\n \"subnetId\": s[1],\n } for s in subnets]]],\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n target_capacity=3,\n valid_until=\"2019-11-04T20:44:20Z\",\n allocation_strategy=\"lowestPrice\",\n fleet_type=\"request\",\n wait_for_fulfillment=True,\n terminate_instances_with_expiration=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 config = new Config();\n var subnets = config.RequireObject\u003cdynamic\u003e(\"subnets\");\n var example = new Aws.Ec2.SpotFleetRequest(\"example\", new()\n {\n LaunchSpecifications = .Select(s =\u003e \n {\n return \n {\n { \"subnetId\", s[1] },\n };\n }).ToList().Select((v, k) =\u003e new { Key = k, Value = v }).Select(entry =\u003e \n {\n return new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n Ami = \"ami-1234\",\n InstanceType = \"m4.4xlarge\",\n SubnetId = entry.Value.SubnetId,\n VpcSecurityGroupIds = \"sg-123456\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 8,\n VolumeType = \"gp2\",\n DeleteOnTermination = true,\n },\n },\n Tags = \n {\n { \"Name\", \"Spot Node\" },\n { \"tag_builder\", \"builder\" },\n },\n };\n }).ToList(),\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n TargetCapacity = 3,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n AllocationStrategy = \"lowestPrice\",\n FleetType = \"request\",\n WaitForFulfillment = true,\n TerminateInstancesWithExpiration = true,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using multiple launch configurations\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.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [vpcId],\n }],\n});\nconst foo = new aws.ec2.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n overrides: [\n {\n subnetId: example.then(example =\u003e example.ids?.[0]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[1]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[2]),\n },\n ],\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [vpc_id],\n}])\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n \"overrides\": [\n {\n \"subnet_id\": example.ids[0],\n },\n {\n \"subnet_id\": example.ids[1],\n },\n {\n \"subnet_id\": example.ids[2],\n },\n ],\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n vpcId,\n },\n },\n },\n });\n\n var foo = new Aws.Ec2.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n Overrides = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[2]),\n },\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nvpcId,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nfoo, err := ec2.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\nName: pulumi.String(\"launch-template\"),\nImageId: pulumi.String(\"ami-516b9131\"),\nInstanceType: pulumi.String(\"m1.small\"),\nKeyName: pulumi.String(\"some-key\"),\n})\nif err != nil {\nreturn err\n}\n_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\nIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\nSpotPrice: pulumi.String(\"0.005\"),\nTargetCapacity: pulumi.Int(2),\nValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\nLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\nLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\nId: foo.ID(),\nVersion: foo.LatestVersion,\n},\nOverrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[0]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[1]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[2]),\n},\n},\n},\n},\n}, pulumi.DependsOn([]pulumi.Resource{\ntest_attach,\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.GetSubnetsArgs;\nimport com.pulumi.aws.ec2.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(vpcId)\n .build())\n .build());\n\n var foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .overrides( \n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[2]))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n overrides:\n - subnetId: ${example.ids[0]}\n - subnetId: ${example.ids[1]}\n - subnetId: ${example.ids[2]}\n options:\n dependson:\n - ${[\"test-attach\"]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${vpcId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Spot Fleet Requests using `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e\n```\n", "properties": { "allocationStrategy": { "type": "string", @@ -253002,7 +253002,7 @@ } }, "aws:ecs/taskDefinition:TaskDefinition": { - "description": "Manages a revision of an ECS task definition to be used in `aws.ecs.Service`.\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: JSON.stringify([\n {\n name: \"first\",\n image: \"service-first\",\n cpu: 10,\n memory: 512,\n essential: true,\n portMappings: [{\n containerPort: 80,\n hostPort: 80,\n }],\n },\n {\n name: \"second\",\n image: \"service-second\",\n cpu: 10,\n memory: 256,\n essential: true,\n portMappings: [{\n containerPort: 443,\n hostPort: 443,\n }],\n },\n ]),\n volumes: [{\n name: \"service-storage\",\n hostPath: \"/ecs/service-storage\",\n }],\n placementConstraints: [{\n type: \"memberOf\",\n expression: \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=json.dumps([\n {\n \"name\": \"first\",\n \"image\": \"service-first\",\n \"cpu\": 10,\n \"memory\": 512,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 80,\n \"hostPort\": 80,\n }],\n },\n {\n \"name\": \"second\",\n \"image\": \"service-second\",\n \"cpu\": 10,\n \"memory\": 256,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 443,\n \"hostPort\": 443,\n }],\n },\n ]),\n volumes=[{\n \"name\": \"service-storage\",\n \"host_path\": \"/ecs/service-storage\",\n }],\n placement_constraints=[{\n \"type\": \"memberOf\",\n \"expression\": \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"first\",\n [\"image\"] = \"service-first\",\n [\"cpu\"] = 10,\n [\"memory\"] = 512,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 80,\n [\"hostPort\"] = 80,\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"second\",\n [\"image\"] = \"service-second\",\n [\"cpu\"] = 10,\n [\"memory\"] = 256,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 443,\n [\"hostPort\"] = 443,\n },\n },\n },\n }),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n HostPath = \"/ecs/service-storage\",\n },\n },\n PlacementConstraints = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionPlacementConstraintArgs\n {\n Type = \"memberOf\",\n Expression = \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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/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\ttmpJSON0, err := json.Marshal([]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"first\",\n\t\t\t\t\"image\": \"service-first\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 512,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 80,\n\t\t\t\t\t\t\"hostPort\": 80,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"second\",\n\t\t\t\t\"image\": \"service-second\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 256,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 443,\n\t\t\t\t\t\t\"hostPort\": 443,\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 = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(json0),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tHostPath: pulumi.String(\"/ecs/service-storage\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tPlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{\n\t\t\t\t\u0026ecs.TaskDefinitionPlacementConstraintArgs{\n\t\t\t\t\tType: pulumi.String(\"memberOf\"),\n\t\t\t\t\tExpression: pulumi.String(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs;\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 service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(serializeJson(\n jsonArray(\n jsonObject(\n jsonProperty(\"name\", \"first\"),\n jsonProperty(\"image\", \"service-first\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 512),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 80),\n jsonProperty(\"hostPort\", 80)\n )))\n ), \n jsonObject(\n jsonProperty(\"name\", \"second\"),\n jsonProperty(\"image\", \"service-second\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 256),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 443),\n jsonProperty(\"hostPort\", 443)\n )))\n )\n )))\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .hostPath(\"/ecs/service-storage\")\n .build())\n .placementConstraints(TaskDefinitionPlacementConstraintArgs.builder()\n .type(\"memberOf\")\n .expression(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::toJSON:\n - name: first\n image: service-first\n cpu: 10\n memory: 512\n essential: true\n portMappings:\n - containerPort: 80\n hostPort: 80\n - name: second\n image: service-second\n cpu: 10\n memory: 256\n essential: true\n portMappings:\n - containerPort: 443\n hostPort: 443\n volumes:\n - name: service-storage\n hostPath: /ecs/service-storage\n placementConstraints:\n - type: memberOf\n expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With AppMesh Proxy\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n proxyConfiguration: {\n type: \"APPMESH\",\n containerName: \"applicationContainerName\",\n properties: {\n AppPorts: \"8080\",\n EgressIgnoredIPs: \"169.254.170.2,169.254.169.254\",\n IgnoredUID: \"1337\",\n ProxyEgressPort: \"15001\",\n ProxyIngressPort: \"15000\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n proxy_configuration={\n \"type\": \"APPMESH\",\n \"container_name\": \"applicationContainerName\",\n \"properties\": {\n \"app_ports\": \"8080\",\n \"egress_ignored_ips\": \"169.254.170.2,169.254.169.254\",\n \"ignored_uid\": \"1337\",\n \"proxy_egress_port\": \"15001\",\n \"proxy_ingress_port\": \"15000\",\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n ProxyConfiguration = new Aws.Ecs.Inputs.TaskDefinitionProxyConfigurationArgs\n {\n Type = \"APPMESH\",\n ContainerName = \"applicationContainerName\",\n Properties = \n {\n { \"AppPorts\", \"8080\" },\n { \"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\" },\n { \"IgnoredUID\", \"1337\" },\n { \"ProxyEgressPort\", \"15001\" },\n { \"ProxyIngressPort\", \"15000\" },\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-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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tProxyConfiguration: \u0026ecs.TaskDefinitionProxyConfigurationArgs{\n\t\t\t\tType: pulumi.String(\"APPMESH\"),\n\t\t\t\tContainerName: pulumi.String(\"applicationContainerName\"),\n\t\t\t\tProperties: pulumi.StringMap{\n\t\t\t\t\t\"AppPorts\": pulumi.String(\"8080\"),\n\t\t\t\t\t\"EgressIgnoredIPs\": pulumi.String(\"169.254.170.2,169.254.169.254\"),\n\t\t\t\t\t\"IgnoredUID\": pulumi.String(\"1337\"),\n\t\t\t\t\t\"ProxyEgressPort\": pulumi.String(\"15001\"),\n\t\t\t\t\t\"ProxyIngressPort\": pulumi.String(\"15000\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionProxyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .proxyConfiguration(TaskDefinitionProxyConfigurationArgs.builder()\n .type(\"APPMESH\")\n .containerName(\"applicationContainerName\")\n .properties(Map.ofEntries(\n Map.entry(\"AppPorts\", \"8080\"),\n Map.entry(\"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\"),\n Map.entry(\"IgnoredUID\", \"1337\"),\n Map.entry(\"ProxyEgressPort\", 15001),\n Map.entry(\"ProxyIngressPort\", 15000)\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n proxyConfiguration:\n type: APPMESH\n containerName: applicationContainerName\n properties:\n AppPorts: '8080'\n EgressIgnoredIPs: 169.254.170.2,169.254.169.254\n IgnoredUID: '1337'\n ProxyEgressPort: 15001\n ProxyIngressPort: 15000\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `docker_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n dockerVolumeConfiguration: {\n scope: \"shared\",\n autoprovision: true,\n driver: \"local\",\n driverOpts: {\n type: \"nfs\",\n device: `${fs.dnsName}:/`,\n o: `addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport`,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"docker_volume_configuration\": {\n \"scope\": \"shared\",\n \"autoprovision\": True,\n \"driver\": \"local\",\n \"driver_opts\": {\n \"type\": \"nfs\",\n \"device\": f\"{fs['dnsName']}:/\",\n \"o\": f\"addr={fs['dnsName']},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n DockerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs\n {\n Scope = \"shared\",\n Autoprovision = true,\n Driver = \"local\",\n DriverOpts = \n {\n { \"type\", \"nfs\" },\n { \"device\", $\"{fs.DnsName}:/\" },\n { \"o\", $\"addr={fs.DnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\" },\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tDockerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{\n\t\t\t\t\t\tScope: pulumi.String(\"shared\"),\n\t\t\t\t\t\tAutoprovision: pulumi.Bool(true),\n\t\t\t\t\t\tDriver: pulumi.String(\"local\"),\n\t\t\t\t\t\tDriverOpts: pulumi.StringMap{\n\t\t\t\t\t\t\t\"type\": pulumi.String(\"nfs\"),\n\t\t\t\t\t\t\t\"device\": pulumi.Sprintf(\"%v:/\", fs.DnsName),\n\t\t\t\t\t\t\t\"o\": pulumi.Sprintf(\"addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.DnsName),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .dockerVolumeConfiguration(TaskDefinitionVolumeDockerVolumeConfigurationArgs.builder()\n .scope(\"shared\")\n .autoprovision(true)\n .driver(\"local\")\n .driverOpts(Map.ofEntries(\n Map.entry(\"type\", \"nfs\"),\n Map.entry(\"device\", String.format(\"%s:/\", fs.dnsName())),\n Map.entry(\"o\", String.format(\"addr=%s,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.dnsName()))\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n dockerVolumeConfiguration:\n scope: shared\n autoprovision: true\n driver: local\n driverOpts:\n type: nfs\n device: ${fs.dnsName}:/\n o: addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `efs_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n efsVolumeConfiguration: {\n fileSystemId: fs.id,\n rootDirectory: \"/opt/data\",\n transitEncryption: \"ENABLED\",\n transitEncryptionPort: 2999,\n authorizationConfig: {\n accessPointId: test.id,\n iam: \"ENABLED\",\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"efs_volume_configuration\": {\n \"file_system_id\": fs[\"id\"],\n \"root_directory\": \"/opt/data\",\n \"transit_encryption\": \"ENABLED\",\n \"transit_encryption_port\": 2999,\n \"authorization_config\": {\n \"access_point_id\": test[\"id\"],\n \"iam\": \"ENABLED\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n EfsVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs\n {\n FileSystemId = fs.Id,\n RootDirectory = \"/opt/data\",\n TransitEncryption = \"ENABLED\",\n TransitEncryptionPort = 2999,\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs\n {\n AccessPointId = test.Id,\n Iam = \"ENABLED\",\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tEfsVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(fs.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"/opt/data\"),\n\t\t\t\t\t\tTransitEncryption: pulumi.String(\"ENABLED\"),\n\t\t\t\t\t\tTransitEncryptionPort: pulumi.Int(2999),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tAccessPointId: pulumi.Any(test.Id),\n\t\t\t\t\t\t\tIam: pulumi.String(\"ENABLED\"),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .efsVolumeConfiguration(TaskDefinitionVolumeEfsVolumeConfigurationArgs.builder()\n .fileSystemId(fs.id())\n .rootDirectory(\"/opt/data\")\n .transitEncryption(\"ENABLED\")\n .transitEncryptionPort(2999)\n .authorizationConfig(TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs.builder()\n .accessPointId(test.id())\n .iam(\"ENABLED\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n efsVolumeConfiguration:\n fileSystemId: ${fs.id}\n rootDirectory: /opt/data\n transitEncryption: ENABLED\n transitEncryptionPort: 2999\n authorizationConfig:\n accessPointId: ${test.id}\n iam: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `fsx_windows_file_server_volume_configuration`\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.secretsmanager.SecretVersion(\"test\", {\n secretId: testAwsSecretsmanagerSecret.id,\n secretString: JSON.stringify({\n username: \"admin\",\n password: testAwsDirectoryServiceDirectory.password,\n }),\n});\nconst service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n fsxWindowsFileServerVolumeConfiguration: {\n fileSystemId: testAwsFsxWindowsFileSystem.id,\n rootDirectory: \"\\\\data\",\n authorizationConfig: {\n credentialsParameter: test.arn,\n domain: testAwsDirectoryServiceDirectory.name,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.secretsmanager.SecretVersion(\"test\",\n secret_id=test_aws_secretsmanager_secret[\"id\"],\n secret_string=json.dumps({\n \"username\": \"admin\",\n \"password\": test_aws_directory_service_directory[\"password\"],\n }))\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"fsx_windows_file_server_volume_configuration\": {\n \"file_system_id\": test_aws_fsx_windows_file_system[\"id\"],\n \"root_directory\": \"\\\\data\",\n \"authorization_config\": {\n \"credentials_parameter\": test.arn,\n \"domain\": test_aws_directory_service_directory[\"name\"],\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 test = new Aws.SecretsManager.SecretVersion(\"test\", new()\n {\n SecretId = testAwsSecretsmanagerSecret.Id,\n SecretString = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"username\"] = \"admin\",\n [\"password\"] = testAwsDirectoryServiceDirectory.Password,\n }),\n });\n\n var service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n FsxWindowsFileServerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs\n {\n FileSystemId = testAwsFsxWindowsFileSystem.Id,\n RootDirectory = \"\\\\data\",\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs\n {\n CredentialsParameter = test.Arn,\n Domain = testAwsDirectoryServiceDirectory.Name,\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/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager\"\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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"username\": \"admin\",\n\t\t\t\"password\": testAwsDirectoryServiceDirectory.Password,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttest, err := secretsmanager.NewSecretVersion(ctx, \"test\", \u0026secretsmanager.SecretVersionArgs{\n\t\t\tSecretId: pulumi.Any(testAwsSecretsmanagerSecret.Id),\n\t\t\tSecretString: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tFsxWindowsFileServerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(testAwsFsxWindowsFileSystem.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"\\\\data\"),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tCredentialsParameter: test.Arn,\n\t\t\t\t\t\t\tDomain: pulumi.Any(testAwsDirectoryServiceDirectory.Name),\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.secretsmanager.SecretVersion;\nimport com.pulumi.aws.secretsmanager.SecretVersionArgs;\nimport com.pulumi.aws.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs;\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 SecretVersion(\"test\", SecretVersionArgs.builder()\n .secretId(testAwsSecretsmanagerSecret.id())\n .secretString(serializeJson(\n jsonObject(\n jsonProperty(\"username\", \"admin\"),\n jsonProperty(\"password\", testAwsDirectoryServiceDirectory.password())\n )))\n .build());\n\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .fsxWindowsFileServerVolumeConfiguration(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs.builder()\n .fileSystemId(testAwsFsxWindowsFileSystem.id())\n .rootDirectory(\"\\\\data\")\n .authorizationConfig(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs.builder()\n .credentialsParameter(test.arn())\n .domain(testAwsDirectoryServiceDirectory.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n fsxWindowsFileServerVolumeConfiguration:\n fileSystemId: ${testAwsFsxWindowsFileSystem.id}\n rootDirectory: \\data\n authorizationConfig:\n credentialsParameter: ${test.arn}\n domain: ${testAwsDirectoryServiceDirectory.name}\n test:\n type: aws:secretsmanager:SecretVersion\n properties:\n secretId: ${testAwsSecretsmanagerSecret.id}\n secretString:\n fn::toJSON:\n username: admin\n password: ${testAwsDirectoryServiceDirectory.password}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `container_definitions` and `inference_accelerator`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n containerDefinitions: `[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`,\n inferenceAccelerators: [{\n deviceName: \"device_1\",\n deviceType: \"eia1.medium\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n container_definitions=\"\"\"[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n\"\"\",\n inference_accelerators=[{\n \"device_name\": \"device_1\",\n \"device_type\": \"eia1.medium\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n ContainerDefinitions = @\"[\n {\n \"\"cpu\"\": 10,\n \"\"command\"\": [\"\"sleep\"\", \"\"10\"\"],\n \"\"entryPoint\"\": [\"\"/\"\"],\n \"\"environment\"\": [\n {\"\"name\"\": \"\"VARNAME\"\", \"\"value\"\": \"\"VARVAL\"\"}\n ],\n \"\"essential\"\": true,\n \"\"image\"\": \"\"jenkins\"\",\n \"\"memory\"\": 128,\n \"\"name\"\": \"\"jenkins\"\",\n \"\"portMappings\"\": [\n {\n \"\"containerPort\"\": 80,\n \"\"hostPort\"\": 8080\n }\n ],\n \"\"resourceRequirements\"\":[\n {\n \"\"type\"\":\"\"InferenceAccelerator\"\",\n \"\"value\"\":\"\"device_1\"\"\n }\n ]\n }\n]\n\",\n InferenceAccelerators = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionInferenceAcceleratorArgs\n {\n DeviceName = \"device_1\",\n DeviceType = \"eia1.medium\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`),\n\t\t\tInferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{\n\t\t\t\t\u0026ecs.TaskDefinitionInferenceAcceleratorArgs{\n\t\t\t\t\tDeviceName: pulumi.String(\"device_1\"),\n\t\t\t\t\tDeviceType: pulumi.String(\"eia1.medium\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionInferenceAcceleratorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .containerDefinitions(\"\"\"\n[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n \"\"\")\n .inferenceAccelerators(TaskDefinitionInferenceAcceleratorArgs.builder()\n .deviceName(\"device_1\")\n .deviceType(\"eia1.medium\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n containerDefinitions: |\n [\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n ]\n inferenceAccelerators:\n - deviceName: device_1\n deviceType: eia1.medium\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `runtime_platform` and `fargate`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n requiresCompatibilities: [\"FARGATE\"],\n networkMode: \"awsvpc\",\n cpu: \"1024\",\n memory: \"2048\",\n containerDefinitions: `[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`,\n runtimePlatform: {\n operatingSystemFamily: \"WINDOWS_SERVER_2019_CORE\",\n cpuArchitecture: \"X86_64\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n requires_compatibilities=[\"FARGATE\"],\n network_mode=\"awsvpc\",\n cpu=\"1024\",\n memory=\"2048\",\n container_definitions=\"\"\"[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n\"\"\",\n runtime_platform={\n \"operating_system_family\": \"WINDOWS_SERVER_2019_CORE\",\n \"cpu_architecture\": \"X86_64\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n RequiresCompatibilities = new[]\n {\n \"FARGATE\",\n },\n NetworkMode = \"awsvpc\",\n Cpu = \"1024\",\n Memory = \"2048\",\n ContainerDefinitions = @\"[\n {\n \"\"name\"\": \"\"iis\"\",\n \"\"image\"\": \"\"mcr.microsoft.com/windows/servercore/iis\"\",\n \"\"cpu\"\": 1024,\n \"\"memory\"\": 2048,\n \"\"essential\"\": true\n }\n]\n\",\n RuntimePlatform = new Aws.Ecs.Inputs.TaskDefinitionRuntimePlatformArgs\n {\n OperatingSystemFamily = \"WINDOWS_SERVER_2019_CORE\",\n CpuArchitecture = \"X86_64\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tRequiresCompatibilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"FARGATE\"),\n\t\t\t},\n\t\t\tNetworkMode: pulumi.String(\"awsvpc\"),\n\t\t\tCpu: pulumi.String(\"1024\"),\n\t\t\tMemory: pulumi.String(\"2048\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`),\n\t\t\tRuntimePlatform: \u0026ecs.TaskDefinitionRuntimePlatformArgs{\n\t\t\t\tOperatingSystemFamily: pulumi.String(\"WINDOWS_SERVER_2019_CORE\"),\n\t\t\t\tCpuArchitecture: pulumi.String(\"X86_64\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionRuntimePlatformArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .requiresCompatibilities(\"FARGATE\")\n .networkMode(\"awsvpc\")\n .cpu(1024)\n .memory(2048)\n .containerDefinitions(\"\"\"\n[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n \"\"\")\n .runtimePlatform(TaskDefinitionRuntimePlatformArgs.builder()\n .operatingSystemFamily(\"WINDOWS_SERVER_2019_CORE\")\n .cpuArchitecture(\"X86_64\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n requiresCompatibilities:\n - FARGATE\n networkMode: awsvpc\n cpu: 1024\n memory: 2048\n containerDefinitions: |\n [\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n ]\n runtimePlatform:\n operatingSystemFamily: WINDOWS_SERVER_2019_CORE\n cpuArchitecture: X86_64\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS Task Definitions using their ARNs. For example:\n\n```sh\n$ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123\n```\n", + "description": "Manages a revision of an ECS task definition to be used in `aws.ecs.Service`.\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: JSON.stringify([\n {\n name: \"first\",\n image: \"service-first\",\n cpu: 10,\n memory: 512,\n essential: true,\n portMappings: [{\n containerPort: 80,\n hostPort: 80,\n }],\n },\n {\n name: \"second\",\n image: \"service-second\",\n cpu: 10,\n memory: 256,\n essential: true,\n portMappings: [{\n containerPort: 443,\n hostPort: 443,\n }],\n },\n ]),\n volumes: [{\n name: \"service-storage\",\n hostPath: \"/ecs/service-storage\",\n }],\n placementConstraints: [{\n type: \"memberOf\",\n expression: \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=json.dumps([\n {\n \"name\": \"first\",\n \"image\": \"service-first\",\n \"cpu\": 10,\n \"memory\": 512,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 80,\n \"hostPort\": 80,\n }],\n },\n {\n \"name\": \"second\",\n \"image\": \"service-second\",\n \"cpu\": 10,\n \"memory\": 256,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 443,\n \"hostPort\": 443,\n }],\n },\n ]),\n volumes=[{\n \"name\": \"service-storage\",\n \"host_path\": \"/ecs/service-storage\",\n }],\n placement_constraints=[{\n \"type\": \"memberOf\",\n \"expression\": \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"first\",\n [\"image\"] = \"service-first\",\n [\"cpu\"] = 10,\n [\"memory\"] = 512,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 80,\n [\"hostPort\"] = 80,\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"second\",\n [\"image\"] = \"service-second\",\n [\"cpu\"] = 10,\n [\"memory\"] = 256,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 443,\n [\"hostPort\"] = 443,\n },\n },\n },\n }),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n HostPath = \"/ecs/service-storage\",\n },\n },\n PlacementConstraints = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionPlacementConstraintArgs\n {\n Type = \"memberOf\",\n Expression = \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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/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\ttmpJSON0, err := json.Marshal([]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"first\",\n\t\t\t\t\"image\": \"service-first\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 512,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 80,\n\t\t\t\t\t\t\"hostPort\": 80,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"second\",\n\t\t\t\t\"image\": \"service-second\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 256,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 443,\n\t\t\t\t\t\t\"hostPort\": 443,\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 = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(json0),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tHostPath: pulumi.String(\"/ecs/service-storage\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tPlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{\n\t\t\t\t\u0026ecs.TaskDefinitionPlacementConstraintArgs{\n\t\t\t\t\tType: pulumi.String(\"memberOf\"),\n\t\t\t\t\tExpression: pulumi.String(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs;\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 service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(serializeJson(\n jsonArray(\n jsonObject(\n jsonProperty(\"name\", \"first\"),\n jsonProperty(\"image\", \"service-first\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 512),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 80),\n jsonProperty(\"hostPort\", 80)\n )))\n ), \n jsonObject(\n jsonProperty(\"name\", \"second\"),\n jsonProperty(\"image\", \"service-second\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 256),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 443),\n jsonProperty(\"hostPort\", 443)\n )))\n )\n )))\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .hostPath(\"/ecs/service-storage\")\n .build())\n .placementConstraints(TaskDefinitionPlacementConstraintArgs.builder()\n .type(\"memberOf\")\n .expression(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::toJSON:\n - name: first\n image: service-first\n cpu: 10\n memory: 512\n essential: true\n portMappings:\n - containerPort: 80\n hostPort: 80\n - name: second\n image: service-second\n cpu: 10\n memory: 256\n essential: true\n portMappings:\n - containerPort: 443\n hostPort: 443\n volumes:\n - name: service-storage\n hostPath: /ecs/service-storage\n placementConstraints:\n - type: memberOf\n expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With AppMesh Proxy\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n proxyConfiguration: {\n type: \"APPMESH\",\n containerName: \"applicationContainerName\",\n properties: {\n AppPorts: \"8080\",\n EgressIgnoredIPs: \"169.254.170.2,169.254.169.254\",\n IgnoredUID: \"1337\",\n ProxyEgressPort: \"15001\",\n ProxyIngressPort: \"15000\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n proxy_configuration={\n \"type\": \"APPMESH\",\n \"container_name\": \"applicationContainerName\",\n \"properties\": {\n \"AppPorts\": \"8080\",\n \"EgressIgnoredIPs\": \"169.254.170.2,169.254.169.254\",\n \"IgnoredUID\": \"1337\",\n \"ProxyEgressPort\": \"15001\",\n \"ProxyIngressPort\": \"15000\",\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n ProxyConfiguration = new Aws.Ecs.Inputs.TaskDefinitionProxyConfigurationArgs\n {\n Type = \"APPMESH\",\n ContainerName = \"applicationContainerName\",\n Properties = \n {\n { \"AppPorts\", \"8080\" },\n { \"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\" },\n { \"IgnoredUID\", \"1337\" },\n { \"ProxyEgressPort\", \"15001\" },\n { \"ProxyIngressPort\", \"15000\" },\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-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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tProxyConfiguration: \u0026ecs.TaskDefinitionProxyConfigurationArgs{\n\t\t\t\tType: pulumi.String(\"APPMESH\"),\n\t\t\t\tContainerName: pulumi.String(\"applicationContainerName\"),\n\t\t\t\tProperties: pulumi.StringMap{\n\t\t\t\t\t\"AppPorts\": pulumi.String(\"8080\"),\n\t\t\t\t\t\"EgressIgnoredIPs\": pulumi.String(\"169.254.170.2,169.254.169.254\"),\n\t\t\t\t\t\"IgnoredUID\": pulumi.String(\"1337\"),\n\t\t\t\t\t\"ProxyEgressPort\": pulumi.String(\"15001\"),\n\t\t\t\t\t\"ProxyIngressPort\": pulumi.String(\"15000\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionProxyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .proxyConfiguration(TaskDefinitionProxyConfigurationArgs.builder()\n .type(\"APPMESH\")\n .containerName(\"applicationContainerName\")\n .properties(Map.ofEntries(\n Map.entry(\"AppPorts\", \"8080\"),\n Map.entry(\"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\"),\n Map.entry(\"IgnoredUID\", \"1337\"),\n Map.entry(\"ProxyEgressPort\", 15001),\n Map.entry(\"ProxyIngressPort\", 15000)\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n proxyConfiguration:\n type: APPMESH\n containerName: applicationContainerName\n properties:\n AppPorts: '8080'\n EgressIgnoredIPs: 169.254.170.2,169.254.169.254\n IgnoredUID: '1337'\n ProxyEgressPort: 15001\n ProxyIngressPort: 15000\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `docker_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n dockerVolumeConfiguration: {\n scope: \"shared\",\n autoprovision: true,\n driver: \"local\",\n driverOpts: {\n type: \"nfs\",\n device: `${fs.dnsName}:/`,\n o: `addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport`,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"docker_volume_configuration\": {\n \"scope\": \"shared\",\n \"autoprovision\": True,\n \"driver\": \"local\",\n \"driver_opts\": {\n \"type\": \"nfs\",\n \"device\": f\"{fs['dnsName']}:/\",\n \"o\": f\"addr={fs['dnsName']},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n DockerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs\n {\n Scope = \"shared\",\n Autoprovision = true,\n Driver = \"local\",\n DriverOpts = \n {\n { \"type\", \"nfs\" },\n { \"device\", $\"{fs.DnsName}:/\" },\n { \"o\", $\"addr={fs.DnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\" },\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tDockerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{\n\t\t\t\t\t\tScope: pulumi.String(\"shared\"),\n\t\t\t\t\t\tAutoprovision: pulumi.Bool(true),\n\t\t\t\t\t\tDriver: pulumi.String(\"local\"),\n\t\t\t\t\t\tDriverOpts: pulumi.StringMap{\n\t\t\t\t\t\t\t\"type\": pulumi.String(\"nfs\"),\n\t\t\t\t\t\t\t\"device\": pulumi.Sprintf(\"%v:/\", fs.DnsName),\n\t\t\t\t\t\t\t\"o\": pulumi.Sprintf(\"addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.DnsName),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .dockerVolumeConfiguration(TaskDefinitionVolumeDockerVolumeConfigurationArgs.builder()\n .scope(\"shared\")\n .autoprovision(true)\n .driver(\"local\")\n .driverOpts(Map.ofEntries(\n Map.entry(\"type\", \"nfs\"),\n Map.entry(\"device\", String.format(\"%s:/\", fs.dnsName())),\n Map.entry(\"o\", String.format(\"addr=%s,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.dnsName()))\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n dockerVolumeConfiguration:\n scope: shared\n autoprovision: true\n driver: local\n driverOpts:\n type: nfs\n device: ${fs.dnsName}:/\n o: addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `efs_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n efsVolumeConfiguration: {\n fileSystemId: fs.id,\n rootDirectory: \"/opt/data\",\n transitEncryption: \"ENABLED\",\n transitEncryptionPort: 2999,\n authorizationConfig: {\n accessPointId: test.id,\n iam: \"ENABLED\",\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"efs_volume_configuration\": {\n \"file_system_id\": fs[\"id\"],\n \"root_directory\": \"/opt/data\",\n \"transit_encryption\": \"ENABLED\",\n \"transit_encryption_port\": 2999,\n \"authorization_config\": {\n \"access_point_id\": test[\"id\"],\n \"iam\": \"ENABLED\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n EfsVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs\n {\n FileSystemId = fs.Id,\n RootDirectory = \"/opt/data\",\n TransitEncryption = \"ENABLED\",\n TransitEncryptionPort = 2999,\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs\n {\n AccessPointId = test.Id,\n Iam = \"ENABLED\",\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tEfsVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(fs.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"/opt/data\"),\n\t\t\t\t\t\tTransitEncryption: pulumi.String(\"ENABLED\"),\n\t\t\t\t\t\tTransitEncryptionPort: pulumi.Int(2999),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tAccessPointId: pulumi.Any(test.Id),\n\t\t\t\t\t\t\tIam: pulumi.String(\"ENABLED\"),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .efsVolumeConfiguration(TaskDefinitionVolumeEfsVolumeConfigurationArgs.builder()\n .fileSystemId(fs.id())\n .rootDirectory(\"/opt/data\")\n .transitEncryption(\"ENABLED\")\n .transitEncryptionPort(2999)\n .authorizationConfig(TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs.builder()\n .accessPointId(test.id())\n .iam(\"ENABLED\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n efsVolumeConfiguration:\n fileSystemId: ${fs.id}\n rootDirectory: /opt/data\n transitEncryption: ENABLED\n transitEncryptionPort: 2999\n authorizationConfig:\n accessPointId: ${test.id}\n iam: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `fsx_windows_file_server_volume_configuration`\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.secretsmanager.SecretVersion(\"test\", {\n secretId: testAwsSecretsmanagerSecret.id,\n secretString: JSON.stringify({\n username: \"admin\",\n password: testAwsDirectoryServiceDirectory.password,\n }),\n});\nconst service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n fsxWindowsFileServerVolumeConfiguration: {\n fileSystemId: testAwsFsxWindowsFileSystem.id,\n rootDirectory: \"\\\\data\",\n authorizationConfig: {\n credentialsParameter: test.arn,\n domain: testAwsDirectoryServiceDirectory.name,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.secretsmanager.SecretVersion(\"test\",\n secret_id=test_aws_secretsmanager_secret[\"id\"],\n secret_string=json.dumps({\n \"username\": \"admin\",\n \"password\": test_aws_directory_service_directory[\"password\"],\n }))\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"fsx_windows_file_server_volume_configuration\": {\n \"file_system_id\": test_aws_fsx_windows_file_system[\"id\"],\n \"root_directory\": \"\\\\data\",\n \"authorization_config\": {\n \"credentials_parameter\": test.arn,\n \"domain\": test_aws_directory_service_directory[\"name\"],\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 test = new Aws.SecretsManager.SecretVersion(\"test\", new()\n {\n SecretId = testAwsSecretsmanagerSecret.Id,\n SecretString = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"username\"] = \"admin\",\n [\"password\"] = testAwsDirectoryServiceDirectory.Password,\n }),\n });\n\n var service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n FsxWindowsFileServerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs\n {\n FileSystemId = testAwsFsxWindowsFileSystem.Id,\n RootDirectory = \"\\\\data\",\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs\n {\n CredentialsParameter = test.Arn,\n Domain = testAwsDirectoryServiceDirectory.Name,\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/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager\"\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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"username\": \"admin\",\n\t\t\t\"password\": testAwsDirectoryServiceDirectory.Password,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttest, err := secretsmanager.NewSecretVersion(ctx, \"test\", \u0026secretsmanager.SecretVersionArgs{\n\t\t\tSecretId: pulumi.Any(testAwsSecretsmanagerSecret.Id),\n\t\t\tSecretString: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tFsxWindowsFileServerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(testAwsFsxWindowsFileSystem.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"\\\\data\"),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tCredentialsParameter: test.Arn,\n\t\t\t\t\t\t\tDomain: pulumi.Any(testAwsDirectoryServiceDirectory.Name),\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.secretsmanager.SecretVersion;\nimport com.pulumi.aws.secretsmanager.SecretVersionArgs;\nimport com.pulumi.aws.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs;\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 SecretVersion(\"test\", SecretVersionArgs.builder()\n .secretId(testAwsSecretsmanagerSecret.id())\n .secretString(serializeJson(\n jsonObject(\n jsonProperty(\"username\", \"admin\"),\n jsonProperty(\"password\", testAwsDirectoryServiceDirectory.password())\n )))\n .build());\n\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .fsxWindowsFileServerVolumeConfiguration(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs.builder()\n .fileSystemId(testAwsFsxWindowsFileSystem.id())\n .rootDirectory(\"\\\\data\")\n .authorizationConfig(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs.builder()\n .credentialsParameter(test.arn())\n .domain(testAwsDirectoryServiceDirectory.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n fsxWindowsFileServerVolumeConfiguration:\n fileSystemId: ${testAwsFsxWindowsFileSystem.id}\n rootDirectory: \\data\n authorizationConfig:\n credentialsParameter: ${test.arn}\n domain: ${testAwsDirectoryServiceDirectory.name}\n test:\n type: aws:secretsmanager:SecretVersion\n properties:\n secretId: ${testAwsSecretsmanagerSecret.id}\n secretString:\n fn::toJSON:\n username: admin\n password: ${testAwsDirectoryServiceDirectory.password}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `container_definitions` and `inference_accelerator`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n containerDefinitions: `[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`,\n inferenceAccelerators: [{\n deviceName: \"device_1\",\n deviceType: \"eia1.medium\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n container_definitions=\"\"\"[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n\"\"\",\n inference_accelerators=[{\n \"device_name\": \"device_1\",\n \"device_type\": \"eia1.medium\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n ContainerDefinitions = @\"[\n {\n \"\"cpu\"\": 10,\n \"\"command\"\": [\"\"sleep\"\", \"\"10\"\"],\n \"\"entryPoint\"\": [\"\"/\"\"],\n \"\"environment\"\": [\n {\"\"name\"\": \"\"VARNAME\"\", \"\"value\"\": \"\"VARVAL\"\"}\n ],\n \"\"essential\"\": true,\n \"\"image\"\": \"\"jenkins\"\",\n \"\"memory\"\": 128,\n \"\"name\"\": \"\"jenkins\"\",\n \"\"portMappings\"\": [\n {\n \"\"containerPort\"\": 80,\n \"\"hostPort\"\": 8080\n }\n ],\n \"\"resourceRequirements\"\":[\n {\n \"\"type\"\":\"\"InferenceAccelerator\"\",\n \"\"value\"\":\"\"device_1\"\"\n }\n ]\n }\n]\n\",\n InferenceAccelerators = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionInferenceAcceleratorArgs\n {\n DeviceName = \"device_1\",\n DeviceType = \"eia1.medium\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`),\n\t\t\tInferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{\n\t\t\t\t\u0026ecs.TaskDefinitionInferenceAcceleratorArgs{\n\t\t\t\t\tDeviceName: pulumi.String(\"device_1\"),\n\t\t\t\t\tDeviceType: pulumi.String(\"eia1.medium\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionInferenceAcceleratorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .containerDefinitions(\"\"\"\n[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n \"\"\")\n .inferenceAccelerators(TaskDefinitionInferenceAcceleratorArgs.builder()\n .deviceName(\"device_1\")\n .deviceType(\"eia1.medium\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n containerDefinitions: |\n [\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n ]\n inferenceAccelerators:\n - deviceName: device_1\n deviceType: eia1.medium\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `runtime_platform` and `fargate`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n requiresCompatibilities: [\"FARGATE\"],\n networkMode: \"awsvpc\",\n cpu: \"1024\",\n memory: \"2048\",\n containerDefinitions: `[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`,\n runtimePlatform: {\n operatingSystemFamily: \"WINDOWS_SERVER_2019_CORE\",\n cpuArchitecture: \"X86_64\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n requires_compatibilities=[\"FARGATE\"],\n network_mode=\"awsvpc\",\n cpu=\"1024\",\n memory=\"2048\",\n container_definitions=\"\"\"[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n\"\"\",\n runtime_platform={\n \"operating_system_family\": \"WINDOWS_SERVER_2019_CORE\",\n \"cpu_architecture\": \"X86_64\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n RequiresCompatibilities = new[]\n {\n \"FARGATE\",\n },\n NetworkMode = \"awsvpc\",\n Cpu = \"1024\",\n Memory = \"2048\",\n ContainerDefinitions = @\"[\n {\n \"\"name\"\": \"\"iis\"\",\n \"\"image\"\": \"\"mcr.microsoft.com/windows/servercore/iis\"\",\n \"\"cpu\"\": 1024,\n \"\"memory\"\": 2048,\n \"\"essential\"\": true\n }\n]\n\",\n RuntimePlatform = new Aws.Ecs.Inputs.TaskDefinitionRuntimePlatformArgs\n {\n OperatingSystemFamily = \"WINDOWS_SERVER_2019_CORE\",\n CpuArchitecture = \"X86_64\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tRequiresCompatibilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"FARGATE\"),\n\t\t\t},\n\t\t\tNetworkMode: pulumi.String(\"awsvpc\"),\n\t\t\tCpu: pulumi.String(\"1024\"),\n\t\t\tMemory: pulumi.String(\"2048\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`),\n\t\t\tRuntimePlatform: \u0026ecs.TaskDefinitionRuntimePlatformArgs{\n\t\t\t\tOperatingSystemFamily: pulumi.String(\"WINDOWS_SERVER_2019_CORE\"),\n\t\t\t\tCpuArchitecture: pulumi.String(\"X86_64\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionRuntimePlatformArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .requiresCompatibilities(\"FARGATE\")\n .networkMode(\"awsvpc\")\n .cpu(1024)\n .memory(2048)\n .containerDefinitions(\"\"\"\n[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n \"\"\")\n .runtimePlatform(TaskDefinitionRuntimePlatformArgs.builder()\n .operatingSystemFamily(\"WINDOWS_SERVER_2019_CORE\")\n .cpuArchitecture(\"X86_64\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n requiresCompatibilities:\n - FARGATE\n networkMode: awsvpc\n cpu: 1024\n memory: 2048\n containerDefinitions: |\n [\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n ]\n runtimePlatform:\n operatingSystemFamily: WINDOWS_SERVER_2019_CORE\n cpuArchitecture: X86_64\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS Task Definitions using their ARNs. For example:\n\n```sh\n$ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123\n```\n", "properties": { "arn": { "type": "string", @@ -263002,7 +263002,7 @@ } }, "aws:evidently/launch:Launch": { - "description": "Provides a CloudWatch Evidently Launch 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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With description\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n description: \"example description\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n description=\"example description\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Description = \"example description\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tDescription: pulumi.String(\"example description\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .description(\"example description\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n description: example description\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple groups\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n description: \"first-group\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n description: \"second-group\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n \"description\": \"first-group\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n \"description\": \"second-group\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n \"variation2\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n Description = \"first-group\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n Description = \"second-group\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t\tDescription: pulumi.String(\"first-group\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t\tDescription: pulumi.String(\"second-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .description(\"first-group\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .description(\"second-group\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n description: first-group\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n description: second-group\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With metric_monitors\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n metricMonitors: [\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key1\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n name: \"name1\",\n unitLabel: \"unit_label1\",\n valueKey: \"value_key1\",\n },\n },\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key2\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n name: \"name2\",\n unitLabel: \"unit_label2\",\n valueKey: \"value_key2\",\n },\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n metric_monitors=[\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key1\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n \"name\": \"name1\",\n \"unit_label\": \"unit_label1\",\n \"value_key\": \"value_key1\",\n },\n },\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key2\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n \"name\": \"name2\",\n \"unit_label\": \"unit_label2\",\n \"value_key\": \"value_key2\",\n },\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n MetricMonitors = new[]\n {\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key1\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n Name = \"name1\",\n UnitLabel = \"unit_label1\",\n ValueKey = \"value_key1\",\n },\n },\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key2\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n Name = \"name2\",\n UnitLabel = \"unit_label2\",\n ValueKey = \"value_key2\",\n },\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tMetricMonitors: evidently.LaunchMetricMonitorArray{\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key1\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name1\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label1\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key2\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name2\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label2\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorMetricDefinitionArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .metricMonitors( \n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key1\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\")\n .name(\"name1\")\n .unitLabel(\"unit_label1\")\n .valueKey(\"value_key1\")\n .build())\n .build(),\n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key2\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\")\n .name(\"name2\")\n .unitLabel(\"unit_label2\")\n .valueKey(\"value_key2\")\n .build())\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n metricMonitors:\n - metricDefinition:\n entityIdKey: entity_id_key1\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",11,\"\u003c=\",22]}]}'\n name: name1\n unitLabel: unit_label1\n valueKey: value_key1\n - metricDefinition:\n entityIdKey: entity_id_key2\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",9,\"\u003c=\",19]}]}'\n name: name2\n unitLabel: unit_label2\n valueKey: value_key2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With randomization_salt\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n randomizationSalt: \"example randomization salt\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n randomization_salt=\"example randomization salt\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n RandomizationSalt = \"example randomization salt\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tRandomizationSalt: pulumi.String(\"example randomization salt\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .randomizationSalt(\"example randomization salt\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n randomizationSalt: example randomization salt\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple steps\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [\n {\n groupWeights: {\n Variation1: 15,\n Variation2: 10,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n },\n {\n groupWeights: {\n Variation1: 20,\n Variation2: 25,\n },\n startTime: \"2024-01-08 01:43:59+00:00\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [\n {\n \"group_weights\": {\n \"variation1\": 15,\n \"variation2\": 10,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\n },\n {\n \"group_weights\": {\n \"variation1\": 20,\n \"variation2\": 25,\n },\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 15 },\n { \"Variation2\", 10 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 20 },\n { \"Variation2\", 25 },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(15),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(20),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(25),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps( \n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 15),\n Map.entry(\"Variation2\", 10)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build(),\n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 20),\n Map.entry(\"Variation2\", 25)\n ))\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 15\n Variation2: 10\n startTime: 2024-01-07 01:43:59+00:00\n - groupWeights:\n Variation1: 20\n Variation2: 25\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With segment overrides\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n segmentOverrides: [\n {\n evaluationOrder: 1,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation2: 10000,\n },\n },\n {\n evaluationOrder: 2,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation1: 40000,\n Variation2: 30000,\n },\n },\n ],\n startTime: \"2024-01-08 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n \"variation2\": 0,\n },\n \"segment_overrides\": [\n {\n \"evaluation_order\": 1,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"variation2\": 10000,\n },\n },\n {\n \"evaluation_order\": 2,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"variation1\": 40000,\n \"variation2\": 30000,\n },\n },\n ],\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n SegmentOverrides = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 1,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation2\", 10000 },\n },\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 2,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation1\", 40000 },\n { \"Variation2\", 30000 },\n },\n },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSegmentOverrides: evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArray{\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(1),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10000),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(2),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(40000),\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(30000),\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\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .segmentOverrides( \n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(1)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.of(\"Variation2\", 10000))\n .build(),\n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(2)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.ofEntries(\n Map.entry(\"Variation1\", 40000),\n Map.entry(\"Variation2\", 30000)\n ))\n .build())\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n segmentOverrides:\n - evaluationOrder: 1\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation2: 10000\n - evaluationOrder: 2\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation1: 40000\n Variation2: 30000\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n__Using `pulumi import` to import__ CloudWatch Evidently Launch using the `name` of the launch and `name` of the project or `arn` of the hosting CloudWatch Evidently Project separated by a `:`. For example:\n\nImport using the `name` of the launch and `name` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:exampleProjectName\n```\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName\n```\n", + "description": "Provides a CloudWatch Evidently Launch 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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With description\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n description: \"example description\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n description=\"example description\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Description = \"example description\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tDescription: pulumi.String(\"example description\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .description(\"example description\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n description: example description\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple groups\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n description: \"first-group\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n description: \"second-group\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n \"description\": \"first-group\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n \"description\": \"second-group\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n \"Variation2\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n Description = \"first-group\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n Description = \"second-group\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t\tDescription: pulumi.String(\"first-group\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t\tDescription: pulumi.String(\"second-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .description(\"first-group\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .description(\"second-group\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n description: first-group\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n description: second-group\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With metric_monitors\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n metricMonitors: [\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key1\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n name: \"name1\",\n unitLabel: \"unit_label1\",\n valueKey: \"value_key1\",\n },\n },\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key2\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n name: \"name2\",\n unitLabel: \"unit_label2\",\n valueKey: \"value_key2\",\n },\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n metric_monitors=[\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key1\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n \"name\": \"name1\",\n \"unit_label\": \"unit_label1\",\n \"value_key\": \"value_key1\",\n },\n },\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key2\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n \"name\": \"name2\",\n \"unit_label\": \"unit_label2\",\n \"value_key\": \"value_key2\",\n },\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n MetricMonitors = new[]\n {\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key1\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n Name = \"name1\",\n UnitLabel = \"unit_label1\",\n ValueKey = \"value_key1\",\n },\n },\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key2\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n Name = \"name2\",\n UnitLabel = \"unit_label2\",\n ValueKey = \"value_key2\",\n },\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tMetricMonitors: evidently.LaunchMetricMonitorArray{\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key1\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name1\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label1\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key2\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name2\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label2\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorMetricDefinitionArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .metricMonitors( \n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key1\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\")\n .name(\"name1\")\n .unitLabel(\"unit_label1\")\n .valueKey(\"value_key1\")\n .build())\n .build(),\n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key2\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\")\n .name(\"name2\")\n .unitLabel(\"unit_label2\")\n .valueKey(\"value_key2\")\n .build())\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n metricMonitors:\n - metricDefinition:\n entityIdKey: entity_id_key1\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",11,\"\u003c=\",22]}]}'\n name: name1\n unitLabel: unit_label1\n valueKey: value_key1\n - metricDefinition:\n entityIdKey: entity_id_key2\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",9,\"\u003c=\",19]}]}'\n name: name2\n unitLabel: unit_label2\n valueKey: value_key2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With randomization_salt\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n randomizationSalt: \"example randomization salt\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n randomization_salt=\"example randomization salt\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n RandomizationSalt = \"example randomization salt\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tRandomizationSalt: pulumi.String(\"example randomization salt\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .randomizationSalt(\"example randomization salt\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n randomizationSalt: example randomization salt\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple steps\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [\n {\n groupWeights: {\n Variation1: 15,\n Variation2: 10,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n },\n {\n groupWeights: {\n Variation1: 20,\n Variation2: 25,\n },\n startTime: \"2024-01-08 01:43:59+00:00\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [\n {\n \"group_weights\": {\n \"Variation1\": 15,\n \"Variation2\": 10,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\n },\n {\n \"group_weights\": {\n \"Variation1\": 20,\n \"Variation2\": 25,\n },\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 15 },\n { \"Variation2\", 10 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 20 },\n { \"Variation2\", 25 },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(15),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(20),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(25),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps( \n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 15),\n Map.entry(\"Variation2\", 10)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build(),\n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 20),\n Map.entry(\"Variation2\", 25)\n ))\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 15\n Variation2: 10\n startTime: 2024-01-07 01:43:59+00:00\n - groupWeights:\n Variation1: 20\n Variation2: 25\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With segment overrides\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n segmentOverrides: [\n {\n evaluationOrder: 1,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation2: 10000,\n },\n },\n {\n evaluationOrder: 2,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation1: 40000,\n Variation2: 30000,\n },\n },\n ],\n startTime: \"2024-01-08 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n \"Variation2\": 0,\n },\n \"segment_overrides\": [\n {\n \"evaluation_order\": 1,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"Variation2\": 10000,\n },\n },\n {\n \"evaluation_order\": 2,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"Variation1\": 40000,\n \"Variation2\": 30000,\n },\n },\n ],\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n SegmentOverrides = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 1,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation2\", 10000 },\n },\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 2,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation1\", 40000 },\n { \"Variation2\", 30000 },\n },\n },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSegmentOverrides: evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArray{\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(1),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10000),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(2),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(40000),\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(30000),\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\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .segmentOverrides( \n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(1)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.of(\"Variation2\", 10000))\n .build(),\n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(2)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.ofEntries(\n Map.entry(\"Variation1\", 40000),\n Map.entry(\"Variation2\", 30000)\n ))\n .build())\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n segmentOverrides:\n - evaluationOrder: 1\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation2: 10000\n - evaluationOrder: 2\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation1: 40000\n Variation2: 30000\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n__Using `pulumi import` to import__ CloudWatch Evidently Launch using the `name` of the launch and `name` of the project or `arn` of the hosting CloudWatch Evidently Project separated by a `:`. For example:\n\nImport using the `name` of the launch and `name` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:exampleProjectName\n```\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName\n```\n", "properties": { "arn": { "type": "string", @@ -265238,7 +265238,7 @@ } }, "aws:fms/policy:Policy": { - "description": "Provides a resource to create an AWS Firewall Manager policy. You need to be using AWS organizations and have enabled the Firewall Manager administrator account.\n\n\u003e **NOTE:** Due to limitations with testing, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.\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 exampleRuleGroup = new aws.wafregional.RuleGroup(\"example\", {\n metricName: \"WAFRuleGroupExample\",\n name: \"WAF-Rule-Group-Example\",\n});\nconst example = new aws.fms.Policy(\"example\", {\n name: \"FMS-Policy-Example\",\n excludeResourceTags: false,\n remediationEnabled: false,\n resourceType: \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n securityServicePolicyData: {\n type: \"WAF\",\n managedServiceData: pulumi.jsonStringify({\n type: \"WAF\",\n ruleGroups: [{\n id: exampleRuleGroup.id,\n overrideAction: {\n type: \"COUNT\",\n },\n }],\n defaultAction: {\n type: \"BLOCK\",\n },\n overrideCustomerWebACLAssociation: false,\n }),\n },\n tags: {\n Name: \"example-fms-policy\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_rule_group = aws.wafregional.RuleGroup(\"example\",\n metric_name=\"WAFRuleGroupExample\",\n name=\"WAF-Rule-Group-Example\")\nexample = aws.fms.Policy(\"example\",\n name=\"FMS-Policy-Example\",\n exclude_resource_tags=False,\n remediation_enabled=False,\n resource_type=\"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n security_service_policy_data={\n \"type\": \"WAF\",\n \"managed_service_data\": pulumi.Output.json_dumps({\n \"type\": \"WAF\",\n \"rule_groups\": [{\n \"id\": example_rule_group.id,\n \"override_action\": {\n \"type\": \"COUNT\",\n },\n }],\n \"default_action\": {\n \"type\": \"BLOCK\",\n },\n \"override_customer_web_aclassociation\": False,\n }),\n },\n tags={\n \"Name\": \"example-fms-policy\",\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 exampleRuleGroup = new Aws.WafRegional.RuleGroup(\"example\", new()\n {\n MetricName = \"WAFRuleGroupExample\",\n Name = \"WAF-Rule-Group-Example\",\n });\n\n var example = new Aws.Fms.Policy(\"example\", new()\n {\n Name = \"FMS-Policy-Example\",\n ExcludeResourceTags = false,\n RemediationEnabled = false,\n ResourceType = \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n SecurityServicePolicyData = new Aws.Fms.Inputs.PolicySecurityServicePolicyDataArgs\n {\n Type = \"WAF\",\n ManagedServiceData = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"WAF\",\n [\"ruleGroups\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = exampleRuleGroup.Id,\n [\"overrideAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"COUNT\",\n },\n },\n },\n [\"defaultAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"BLOCK\",\n },\n [\"overrideCustomerWebACLAssociation\"] = false,\n })),\n },\n Tags = \n {\n { \"Name\", \"example-fms-policy\" },\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/fms\"\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\texampleRuleGroup, err := wafregional.NewRuleGroup(ctx, \"example\", \u0026wafregional.RuleGroupArgs{\n\t\t\tMetricName: pulumi.String(\"WAFRuleGroupExample\"),\n\t\t\tName: pulumi.String(\"WAF-Rule-Group-Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fms.NewPolicy(ctx, \"example\", \u0026fms.PolicyArgs{\n\t\t\tName: pulumi.String(\"FMS-Policy-Example\"),\n\t\t\tExcludeResourceTags: pulumi.Bool(false),\n\t\t\tRemediationEnabled: pulumi.Bool(false),\n\t\t\tResourceType: pulumi.String(\"AWS::ElasticLoadBalancingV2::LoadBalancer\"),\n\t\t\tSecurityServicePolicyData: \u0026fms.PolicySecurityServicePolicyDataArgs{\n\t\t\t\tType: pulumi.String(\"WAF\"),\n\t\t\t\tManagedServiceData: exampleRuleGroup.ID().ApplyT(func(id string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"WAF\",\n\t\t\t\t\t\t\"ruleGroups\": []map[string]interface{}{\n\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\"id\": id,\n\t\t\t\t\t\t\t\t\"overrideAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\": \"COUNT\",\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\t\"defaultAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"BLOCK\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"overrideCustomerWebACLAssociation\": false,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example-fms-policy\"),\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.wafregional.RuleGroup;\nimport com.pulumi.aws.wafregional.RuleGroupArgs;\nimport com.pulumi.aws.fms.Policy;\nimport com.pulumi.aws.fms.PolicyArgs;\nimport com.pulumi.aws.fms.inputs.PolicySecurityServicePolicyDataArgs;\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 exampleRuleGroup = new RuleGroup(\"exampleRuleGroup\", RuleGroupArgs.builder()\n .metricName(\"WAFRuleGroupExample\")\n .name(\"WAF-Rule-Group-Example\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"FMS-Policy-Example\")\n .excludeResourceTags(false)\n .remediationEnabled(false)\n .resourceType(\"AWS::ElasticLoadBalancingV2::LoadBalancer\")\n .securityServicePolicyData(PolicySecurityServicePolicyDataArgs.builder()\n .type(\"WAF\")\n .managedServiceData(exampleRuleGroup.id().applyValue(id -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"type\", \"WAF\"),\n jsonProperty(\"ruleGroups\", jsonArray(jsonObject(\n jsonProperty(\"id\", id),\n jsonProperty(\"overrideAction\", jsonObject(\n jsonProperty(\"type\", \"COUNT\")\n ))\n ))),\n jsonProperty(\"defaultAction\", jsonObject(\n jsonProperty(\"type\", \"BLOCK\")\n )),\n jsonProperty(\"overrideCustomerWebACLAssociation\", false)\n ))))\n .build())\n .tags(Map.of(\"Name\", \"example-fms-policy\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:fms:Policy\n properties:\n name: FMS-Policy-Example\n excludeResourceTags: false\n remediationEnabled: false\n resourceType: AWS::ElasticLoadBalancingV2::LoadBalancer\n securityServicePolicyData:\n type: WAF\n managedServiceData:\n fn::toJSON:\n type: WAF\n ruleGroups:\n - id: ${exampleRuleGroup.id}\n overrideAction:\n type: COUNT\n defaultAction:\n type: BLOCK\n overrideCustomerWebACLAssociation: false\n tags:\n Name: example-fms-policy\n exampleRuleGroup:\n type: aws:wafregional:RuleGroup\n name: example\n properties:\n metricName: WAFRuleGroupExample\n name: WAF-Rule-Group-Example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Firewall Manager policies using the policy ID. For example:\n\n```sh\n$ pulumi import aws:fms/policy:Policy example 5be49585-a7e3-4c49-dde1-a179fe4a619a\n```\n", + "description": "Provides a resource to create an AWS Firewall Manager policy. You need to be using AWS organizations and have enabled the Firewall Manager administrator account.\n\n\u003e **NOTE:** Due to limitations with testing, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.\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 exampleRuleGroup = new aws.wafregional.RuleGroup(\"example\", {\n metricName: \"WAFRuleGroupExample\",\n name: \"WAF-Rule-Group-Example\",\n});\nconst example = new aws.fms.Policy(\"example\", {\n name: \"FMS-Policy-Example\",\n excludeResourceTags: false,\n remediationEnabled: false,\n resourceType: \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n securityServicePolicyData: {\n type: \"WAF\",\n managedServiceData: pulumi.jsonStringify({\n type: \"WAF\",\n ruleGroups: [{\n id: exampleRuleGroup.id,\n overrideAction: {\n type: \"COUNT\",\n },\n }],\n defaultAction: {\n type: \"BLOCK\",\n },\n overrideCustomerWebACLAssociation: false,\n }),\n },\n tags: {\n Name: \"example-fms-policy\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_rule_group = aws.wafregional.RuleGroup(\"example\",\n metric_name=\"WAFRuleGroupExample\",\n name=\"WAF-Rule-Group-Example\")\nexample = aws.fms.Policy(\"example\",\n name=\"FMS-Policy-Example\",\n exclude_resource_tags=False,\n remediation_enabled=False,\n resource_type=\"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n security_service_policy_data={\n \"type\": \"WAF\",\n \"managed_service_data\": pulumi.Output.json_dumps({\n \"type\": \"WAF\",\n \"ruleGroups\": [{\n \"id\": example_rule_group.id,\n \"overrideAction\": {\n \"type\": \"COUNT\",\n },\n }],\n \"defaultAction\": {\n \"type\": \"BLOCK\",\n },\n \"overrideCustomerWebACLAssociation\": False,\n }),\n },\n tags={\n \"Name\": \"example-fms-policy\",\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 exampleRuleGroup = new Aws.WafRegional.RuleGroup(\"example\", new()\n {\n MetricName = \"WAFRuleGroupExample\",\n Name = \"WAF-Rule-Group-Example\",\n });\n\n var example = new Aws.Fms.Policy(\"example\", new()\n {\n Name = \"FMS-Policy-Example\",\n ExcludeResourceTags = false,\n RemediationEnabled = false,\n ResourceType = \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n SecurityServicePolicyData = new Aws.Fms.Inputs.PolicySecurityServicePolicyDataArgs\n {\n Type = \"WAF\",\n ManagedServiceData = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"WAF\",\n [\"ruleGroups\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = exampleRuleGroup.Id,\n [\"overrideAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"COUNT\",\n },\n },\n },\n [\"defaultAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"BLOCK\",\n },\n [\"overrideCustomerWebACLAssociation\"] = false,\n })),\n },\n Tags = \n {\n { \"Name\", \"example-fms-policy\" },\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/fms\"\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\texampleRuleGroup, err := wafregional.NewRuleGroup(ctx, \"example\", \u0026wafregional.RuleGroupArgs{\n\t\t\tMetricName: pulumi.String(\"WAFRuleGroupExample\"),\n\t\t\tName: pulumi.String(\"WAF-Rule-Group-Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fms.NewPolicy(ctx, \"example\", \u0026fms.PolicyArgs{\n\t\t\tName: pulumi.String(\"FMS-Policy-Example\"),\n\t\t\tExcludeResourceTags: pulumi.Bool(false),\n\t\t\tRemediationEnabled: pulumi.Bool(false),\n\t\t\tResourceType: pulumi.String(\"AWS::ElasticLoadBalancingV2::LoadBalancer\"),\n\t\t\tSecurityServicePolicyData: \u0026fms.PolicySecurityServicePolicyDataArgs{\n\t\t\t\tType: pulumi.String(\"WAF\"),\n\t\t\t\tManagedServiceData: exampleRuleGroup.ID().ApplyT(func(id string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"WAF\",\n\t\t\t\t\t\t\"ruleGroups\": []map[string]interface{}{\n\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\"id\": id,\n\t\t\t\t\t\t\t\t\"overrideAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\": \"COUNT\",\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\t\"defaultAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"BLOCK\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"overrideCustomerWebACLAssociation\": false,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example-fms-policy\"),\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.wafregional.RuleGroup;\nimport com.pulumi.aws.wafregional.RuleGroupArgs;\nimport com.pulumi.aws.fms.Policy;\nimport com.pulumi.aws.fms.PolicyArgs;\nimport com.pulumi.aws.fms.inputs.PolicySecurityServicePolicyDataArgs;\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 exampleRuleGroup = new RuleGroup(\"exampleRuleGroup\", RuleGroupArgs.builder()\n .metricName(\"WAFRuleGroupExample\")\n .name(\"WAF-Rule-Group-Example\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"FMS-Policy-Example\")\n .excludeResourceTags(false)\n .remediationEnabled(false)\n .resourceType(\"AWS::ElasticLoadBalancingV2::LoadBalancer\")\n .securityServicePolicyData(PolicySecurityServicePolicyDataArgs.builder()\n .type(\"WAF\")\n .managedServiceData(exampleRuleGroup.id().applyValue(id -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"type\", \"WAF\"),\n jsonProperty(\"ruleGroups\", jsonArray(jsonObject(\n jsonProperty(\"id\", id),\n jsonProperty(\"overrideAction\", jsonObject(\n jsonProperty(\"type\", \"COUNT\")\n ))\n ))),\n jsonProperty(\"defaultAction\", jsonObject(\n jsonProperty(\"type\", \"BLOCK\")\n )),\n jsonProperty(\"overrideCustomerWebACLAssociation\", false)\n ))))\n .build())\n .tags(Map.of(\"Name\", \"example-fms-policy\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:fms:Policy\n properties:\n name: FMS-Policy-Example\n excludeResourceTags: false\n remediationEnabled: false\n resourceType: AWS::ElasticLoadBalancingV2::LoadBalancer\n securityServicePolicyData:\n type: WAF\n managedServiceData:\n fn::toJSON:\n type: WAF\n ruleGroups:\n - id: ${exampleRuleGroup.id}\n overrideAction:\n type: COUNT\n defaultAction:\n type: BLOCK\n overrideCustomerWebACLAssociation: false\n tags:\n Name: example-fms-policy\n exampleRuleGroup:\n type: aws:wafregional:RuleGroup\n name: example\n properties:\n metricName: WAFRuleGroupExample\n name: WAF-Rule-Group-Example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Firewall Manager policies using the policy ID. For example:\n\n```sh\n$ pulumi import aws:fms/policy:Policy example 5be49585-a7e3-4c49-dde1-a179fe4a619a\n```\n", "properties": { "arn": { "type": "string" @@ -271356,7 +271356,7 @@ } }, "aws:glue/catalogTable:CatalogTable": { - "description": "Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality.\n\n## Example Usage\n\n### Basic Table\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Parquet Table for Athena\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n tableType: \"EXTERNAL_TABLE\",\n parameters: {\n EXTERNAL: \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storageDescriptor: {\n location: \"s3://my-bucket/event-streams/my-stream\",\n inputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n outputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n serDeInfo: {\n name: \"my-stream\",\n serializationLibrary: \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n parameters: {\n \"serialization.format\": \"1\",\n },\n },\n columns: [\n {\n name: \"my_string\",\n type: \"string\",\n },\n {\n name: \"my_double\",\n type: \"double\",\n },\n {\n name: \"my_date\",\n type: \"date\",\n comment: \"\",\n },\n {\n name: \"my_bigint\",\n type: \"bigint\",\n comment: \"\",\n },\n {\n name: \"my_struct\",\n type: \"struct\u003cmy_nested_string:string\u003e\",\n comment: \"\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\",\n table_type=\"EXTERNAL_TABLE\",\n parameters={\n \"EXTERNAL\": \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storage_descriptor={\n \"location\": \"s3://my-bucket/event-streams/my-stream\",\n \"input_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n \"output_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n \"ser_de_info\": {\n \"name\": \"my-stream\",\n \"serialization_library\": \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n \"parameters\": {\n \"serialization_format\": \"1\",\n },\n },\n \"columns\": [\n {\n \"name\": \"my_string\",\n \"type\": \"string\",\n },\n {\n \"name\": \"my_double\",\n \"type\": \"double\",\n },\n {\n \"name\": \"my_date\",\n \"type\": \"date\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_bigint\",\n \"type\": \"bigint\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_struct\",\n \"type\": \"struct\u003cmy_nested_string:string\u003e\",\n \"comment\": \"\",\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 awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\n TableType = \"EXTERNAL_TABLE\",\n Parameters = \n {\n { \"EXTERNAL\", \"TRUE\" },\n { \"parquet.compression\", \"SNAPPY\" },\n },\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Location = \"s3://my-bucket/event-streams/my-stream\",\n InputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n OutputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n SerDeInfo = new Aws.Glue.Inputs.CatalogTableStorageDescriptorSerDeInfoArgs\n {\n Name = \"my-stream\",\n SerializationLibrary = \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n Parameters = \n {\n { \"serialization.format\", \"1\" },\n },\n },\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_string\",\n Type = \"string\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_double\",\n Type = \"double\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_date\",\n Type = \"date\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_bigint\",\n Type = \"bigint\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_struct\",\n Type = \"struct\u003cmy_nested_string:string\u003e\",\n Comment = \"\",\n },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t\tTableType: pulumi.String(\"EXTERNAL_TABLE\"),\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"EXTERNAL\": pulumi.String(\"TRUE\"),\n\t\t\t\t\"parquet.compression\": pulumi.String(\"SNAPPY\"),\n\t\t\t},\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tLocation: pulumi.String(\"s3://my-bucket/event-streams/my-stream\"),\n\t\t\t\tInputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\"),\n\t\t\t\tOutputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\"),\n\t\t\t\tSerDeInfo: \u0026glue.CatalogTableStorageDescriptorSerDeInfoArgs{\n\t\t\t\t\tName: pulumi.String(\"my-stream\"),\n\t\t\t\t\tSerializationLibrary: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\"),\n\t\t\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"serialization.format\": pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_string\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_double\"),\n\t\t\t\t\t\tType: pulumi.String(\"double\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_date\"),\n\t\t\t\t\t\tType: pulumi.String(\"date\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_bigint\"),\n\t\t\t\t\t\tType: pulumi.String(\"bigint\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_struct\"),\n\t\t\t\t\t\tType: pulumi.String(\"struct\u003cmy_nested_string:string\u003e\"),\n\t\t\t\t\t\tComment: pulumi.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\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSerDeInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .tableType(\"EXTERNAL_TABLE\")\n .parameters(Map.ofEntries(\n Map.entry(\"EXTERNAL\", \"TRUE\"),\n Map.entry(\"parquet.compression\", \"SNAPPY\")\n ))\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .location(\"s3://my-bucket/event-streams/my-stream\")\n .inputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\")\n .outputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\")\n .serDeInfo(CatalogTableStorageDescriptorSerDeInfoArgs.builder()\n .name(\"my-stream\")\n .serializationLibrary(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\")\n .parameters(Map.of(\"serialization.format\", 1))\n .build())\n .columns( \n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_string\")\n .type(\"string\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_double\")\n .type(\"double\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_date\")\n .type(\"date\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_bigint\")\n .type(\"bigint\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_struct\")\n .type(\"struct\u003cmy_nested_string:string\u003e\")\n .comment(\"\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n tableType: EXTERNAL_TABLE\n parameters:\n EXTERNAL: TRUE\n parquet.compression: SNAPPY\n storageDescriptor:\n location: s3://my-bucket/event-streams/my-stream\n inputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\n outputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n serDeInfo:\n name: my-stream\n serializationLibrary: org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n parameters:\n serialization.format: 1\n columns:\n - name: my_string\n type: string\n - name: my_double\n type: double\n - name: my_date\n type: date\n comment:\n - name: my_bigint\n type: bigint\n comment:\n - name: my_struct\n type: struct\u003cmy_nested_string:string\u003e\n comment:\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Tables using the catalog ID (usually AWS account ID), database name, and table name. For example:\n\n```sh\n$ pulumi import aws:glue/catalogTable:CatalogTable MyTable 123456789012:MyDatabase:MyTable\n```\n", + "description": "Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality.\n\n## Example Usage\n\n### Basic Table\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Parquet Table for Athena\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n tableType: \"EXTERNAL_TABLE\",\n parameters: {\n EXTERNAL: \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storageDescriptor: {\n location: \"s3://my-bucket/event-streams/my-stream\",\n inputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n outputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n serDeInfo: {\n name: \"my-stream\",\n serializationLibrary: \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n parameters: {\n \"serialization.format\": \"1\",\n },\n },\n columns: [\n {\n name: \"my_string\",\n type: \"string\",\n },\n {\n name: \"my_double\",\n type: \"double\",\n },\n {\n name: \"my_date\",\n type: \"date\",\n comment: \"\",\n },\n {\n name: \"my_bigint\",\n type: \"bigint\",\n comment: \"\",\n },\n {\n name: \"my_struct\",\n type: \"struct\u003cmy_nested_string:string\u003e\",\n comment: \"\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\",\n table_type=\"EXTERNAL_TABLE\",\n parameters={\n \"EXTERNAL\": \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storage_descriptor={\n \"location\": \"s3://my-bucket/event-streams/my-stream\",\n \"input_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n \"output_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n \"ser_de_info\": {\n \"name\": \"my-stream\",\n \"serialization_library\": \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n \"parameters\": {\n \"serialization.format\": \"1\",\n },\n },\n \"columns\": [\n {\n \"name\": \"my_string\",\n \"type\": \"string\",\n },\n {\n \"name\": \"my_double\",\n \"type\": \"double\",\n },\n {\n \"name\": \"my_date\",\n \"type\": \"date\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_bigint\",\n \"type\": \"bigint\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_struct\",\n \"type\": \"struct\u003cmy_nested_string:string\u003e\",\n \"comment\": \"\",\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 awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\n TableType = \"EXTERNAL_TABLE\",\n Parameters = \n {\n { \"EXTERNAL\", \"TRUE\" },\n { \"parquet.compression\", \"SNAPPY\" },\n },\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Location = \"s3://my-bucket/event-streams/my-stream\",\n InputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n OutputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n SerDeInfo = new Aws.Glue.Inputs.CatalogTableStorageDescriptorSerDeInfoArgs\n {\n Name = \"my-stream\",\n SerializationLibrary = \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n Parameters = \n {\n { \"serialization.format\", \"1\" },\n },\n },\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_string\",\n Type = \"string\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_double\",\n Type = \"double\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_date\",\n Type = \"date\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_bigint\",\n Type = \"bigint\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_struct\",\n Type = \"struct\u003cmy_nested_string:string\u003e\",\n Comment = \"\",\n },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t\tTableType: pulumi.String(\"EXTERNAL_TABLE\"),\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"EXTERNAL\": pulumi.String(\"TRUE\"),\n\t\t\t\t\"parquet.compression\": pulumi.String(\"SNAPPY\"),\n\t\t\t},\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tLocation: pulumi.String(\"s3://my-bucket/event-streams/my-stream\"),\n\t\t\t\tInputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\"),\n\t\t\t\tOutputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\"),\n\t\t\t\tSerDeInfo: \u0026glue.CatalogTableStorageDescriptorSerDeInfoArgs{\n\t\t\t\t\tName: pulumi.String(\"my-stream\"),\n\t\t\t\t\tSerializationLibrary: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\"),\n\t\t\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"serialization.format\": pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_string\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_double\"),\n\t\t\t\t\t\tType: pulumi.String(\"double\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_date\"),\n\t\t\t\t\t\tType: pulumi.String(\"date\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_bigint\"),\n\t\t\t\t\t\tType: pulumi.String(\"bigint\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_struct\"),\n\t\t\t\t\t\tType: pulumi.String(\"struct\u003cmy_nested_string:string\u003e\"),\n\t\t\t\t\t\tComment: pulumi.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\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSerDeInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .tableType(\"EXTERNAL_TABLE\")\n .parameters(Map.ofEntries(\n Map.entry(\"EXTERNAL\", \"TRUE\"),\n Map.entry(\"parquet.compression\", \"SNAPPY\")\n ))\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .location(\"s3://my-bucket/event-streams/my-stream\")\n .inputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\")\n .outputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\")\n .serDeInfo(CatalogTableStorageDescriptorSerDeInfoArgs.builder()\n .name(\"my-stream\")\n .serializationLibrary(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\")\n .parameters(Map.of(\"serialization.format\", 1))\n .build())\n .columns( \n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_string\")\n .type(\"string\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_double\")\n .type(\"double\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_date\")\n .type(\"date\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_bigint\")\n .type(\"bigint\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_struct\")\n .type(\"struct\u003cmy_nested_string:string\u003e\")\n .comment(\"\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n tableType: EXTERNAL_TABLE\n parameters:\n EXTERNAL: TRUE\n parquet.compression: SNAPPY\n storageDescriptor:\n location: s3://my-bucket/event-streams/my-stream\n inputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\n outputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n serDeInfo:\n name: my-stream\n serializationLibrary: org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n parameters:\n serialization.format: 1\n columns:\n - name: my_string\n type: string\n - name: my_double\n type: double\n - name: my_date\n type: date\n comment:\n - name: my_bigint\n type: bigint\n comment:\n - name: my_struct\n type: struct\u003cmy_nested_string:string\u003e\n comment:\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Tables using the catalog ID (usually AWS account ID), database name, and table name. For example:\n\n```sh\n$ pulumi import aws:glue/catalogTable:CatalogTable MyTable 123456789012:MyDatabase:MyTable\n```\n", "properties": { "arn": { "type": "string", @@ -277920,7 +277920,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\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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", @@ -280671,7 +280671,7 @@ } }, "aws:imagebuilder/distributionConfiguration:DistributionConfiguration": { - "description": "Manages an Image Builder Distribution 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 = new aws.imagebuilder.DistributionConfiguration(\"example\", {\n name: \"example\",\n distributions: [{\n amiDistributionConfiguration: {\n amiTags: {\n CostCenter: \"IT\",\n },\n name: \"example-{{ imagebuilder:buildDate }}\",\n launchPermission: {\n userIds: [\"123456789012\"],\n },\n },\n launchTemplateConfigurations: [{\n launchTemplateId: \"lt-0aaa1bcde2ff3456\",\n }],\n region: \"us-east-1\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.imagebuilder.DistributionConfiguration(\"example\",\n name=\"example\",\n distributions=[{\n \"ami_distribution_configuration\": {\n \"ami_tags\": {\n \"cost_center\": \"IT\",\n },\n \"name\": \"example-{{ imagebuilder:buildDate }}\",\n \"launch_permission\": {\n \"user_ids\": [\"123456789012\"],\n },\n },\n \"launch_template_configurations\": [{\n \"launch_template_id\": \"lt-0aaa1bcde2ff3456\",\n }],\n \"region\": \"us-east-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.ImageBuilder.DistributionConfiguration(\"example\", new()\n {\n Name = \"example\",\n Distributions = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionArgs\n {\n AmiDistributionConfiguration = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs\n {\n AmiTags = \n {\n { \"CostCenter\", \"IT\" },\n },\n Name = \"example-{{ imagebuilder:buildDate }}\",\n LaunchPermission = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs\n {\n UserIds = new[]\n {\n \"123456789012\",\n },\n },\n },\n LaunchTemplateConfigurations = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs\n {\n LaunchTemplateId = \"lt-0aaa1bcde2ff3456\",\n },\n },\n Region = \"us-east-1\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := imagebuilder.NewDistributionConfiguration(ctx, \"example\", \u0026imagebuilder.DistributionConfigurationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDistributions: imagebuilder.DistributionConfigurationDistributionArray{\n\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionArgs{\n\t\t\t\t\tAmiDistributionConfiguration: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationArgs{\n\t\t\t\t\t\tAmiTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\"CostCenter\": pulumi.String(\"IT\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"example-{{ imagebuilder:buildDate }}\"),\n\t\t\t\t\t\tLaunchPermission: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs{\n\t\t\t\t\t\t\tUserIds: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"123456789012\"),\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\tLaunchTemplateConfigurations: imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArray{\n\t\t\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs{\n\t\t\t\t\t\t\tLaunchTemplateId: pulumi.String(\"lt-0aaa1bcde2ff3456\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tRegion: pulumi.String(\"us-east-1\"),\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.imagebuilder.DistributionConfiguration;\nimport com.pulumi.aws.imagebuilder.DistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 DistributionConfiguration(\"example\", DistributionConfigurationArgs.builder()\n .name(\"example\")\n .distributions(DistributionConfigurationDistributionArgs.builder()\n .amiDistributionConfiguration(DistributionConfigurationDistributionAmiDistributionConfigurationArgs.builder()\n .amiTags(Map.of(\"CostCenter\", \"IT\"))\n .name(\"example-{{ imagebuilder:buildDate }}\")\n .launchPermission(DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs.builder()\n .userIds(\"123456789012\")\n .build())\n .build())\n .launchTemplateConfigurations(DistributionConfigurationDistributionLaunchTemplateConfigurationArgs.builder()\n .launchTemplateId(\"lt-0aaa1bcde2ff3456\")\n .build())\n .region(\"us-east-1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:imagebuilder:DistributionConfiguration\n properties:\n name: example\n distributions:\n - amiDistributionConfiguration:\n amiTags:\n CostCenter: IT\n name: example-{{ imagebuilder:buildDate }}\n launchPermission:\n userIds:\n - '123456789012'\n launchTemplateConfigurations:\n - launchTemplateId: lt-0aaa1bcde2ff3456\n region: us-east-1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_imagebuilder_distribution_configurations` resources using the Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:imagebuilder/distributionConfiguration:DistributionConfiguration example arn:aws:imagebuilder:us-east-1:123456789012:distribution-configuration/example\n```\n", + "description": "Manages an Image Builder Distribution 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 = new aws.imagebuilder.DistributionConfiguration(\"example\", {\n name: \"example\",\n distributions: [{\n amiDistributionConfiguration: {\n amiTags: {\n CostCenter: \"IT\",\n },\n name: \"example-{{ imagebuilder:buildDate }}\",\n launchPermission: {\n userIds: [\"123456789012\"],\n },\n },\n launchTemplateConfigurations: [{\n launchTemplateId: \"lt-0aaa1bcde2ff3456\",\n }],\n region: \"us-east-1\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.imagebuilder.DistributionConfiguration(\"example\",\n name=\"example\",\n distributions=[{\n \"ami_distribution_configuration\": {\n \"ami_tags\": {\n \"CostCenter\": \"IT\",\n },\n \"name\": \"example-{{ imagebuilder:buildDate }}\",\n \"launch_permission\": {\n \"user_ids\": [\"123456789012\"],\n },\n },\n \"launch_template_configurations\": [{\n \"launch_template_id\": \"lt-0aaa1bcde2ff3456\",\n }],\n \"region\": \"us-east-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.ImageBuilder.DistributionConfiguration(\"example\", new()\n {\n Name = \"example\",\n Distributions = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionArgs\n {\n AmiDistributionConfiguration = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs\n {\n AmiTags = \n {\n { \"CostCenter\", \"IT\" },\n },\n Name = \"example-{{ imagebuilder:buildDate }}\",\n LaunchPermission = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs\n {\n UserIds = new[]\n {\n \"123456789012\",\n },\n },\n },\n LaunchTemplateConfigurations = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs\n {\n LaunchTemplateId = \"lt-0aaa1bcde2ff3456\",\n },\n },\n Region = \"us-east-1\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := imagebuilder.NewDistributionConfiguration(ctx, \"example\", \u0026imagebuilder.DistributionConfigurationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDistributions: imagebuilder.DistributionConfigurationDistributionArray{\n\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionArgs{\n\t\t\t\t\tAmiDistributionConfiguration: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationArgs{\n\t\t\t\t\t\tAmiTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\"CostCenter\": pulumi.String(\"IT\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"example-{{ imagebuilder:buildDate }}\"),\n\t\t\t\t\t\tLaunchPermission: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs{\n\t\t\t\t\t\t\tUserIds: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"123456789012\"),\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\tLaunchTemplateConfigurations: imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArray{\n\t\t\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs{\n\t\t\t\t\t\t\tLaunchTemplateId: pulumi.String(\"lt-0aaa1bcde2ff3456\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tRegion: pulumi.String(\"us-east-1\"),\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.imagebuilder.DistributionConfiguration;\nimport com.pulumi.aws.imagebuilder.DistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 DistributionConfiguration(\"example\", DistributionConfigurationArgs.builder()\n .name(\"example\")\n .distributions(DistributionConfigurationDistributionArgs.builder()\n .amiDistributionConfiguration(DistributionConfigurationDistributionAmiDistributionConfigurationArgs.builder()\n .amiTags(Map.of(\"CostCenter\", \"IT\"))\n .name(\"example-{{ imagebuilder:buildDate }}\")\n .launchPermission(DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs.builder()\n .userIds(\"123456789012\")\n .build())\n .build())\n .launchTemplateConfigurations(DistributionConfigurationDistributionLaunchTemplateConfigurationArgs.builder()\n .launchTemplateId(\"lt-0aaa1bcde2ff3456\")\n .build())\n .region(\"us-east-1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:imagebuilder:DistributionConfiguration\n properties:\n name: example\n distributions:\n - amiDistributionConfiguration:\n amiTags:\n CostCenter: IT\n name: example-{{ imagebuilder:buildDate }}\n launchPermission:\n userIds:\n - '123456789012'\n launchTemplateConfigurations:\n - launchTemplateId: lt-0aaa1bcde2ff3456\n region: us-east-1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_imagebuilder_distribution_configurations` resources using the Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:imagebuilder/distributionConfiguration:DistributionConfiguration example arn:aws:imagebuilder:us-east-1:123456789012:distribution-configuration/example\n```\n", "properties": { "arn": { "type": "string", @@ -284122,7 +284122,7 @@ } }, "aws:iot/thingGroup:ThingGroup": { - "description": "Manages an AWS IoT Thing 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 parent = new aws.iot.ThingGroup(\"parent\", {name: \"parent\"});\nconst example = new aws.iot.ThingGroup(\"example\", {\n name: \"example\",\n parentGroupName: parent.name,\n properties: {\n attributePayload: {\n attributes: {\n One: \"11111\",\n Two: \"TwoTwo\",\n },\n },\n description: \"This is my thing group\",\n },\n tags: {\n managed: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nparent = aws.iot.ThingGroup(\"parent\", name=\"parent\")\nexample = aws.iot.ThingGroup(\"example\",\n name=\"example\",\n parent_group_name=parent.name,\n properties={\n \"attribute_payload\": {\n \"attributes\": {\n \"one\": \"11111\",\n \"two\": \"TwoTwo\",\n },\n },\n \"description\": \"This is my thing group\",\n },\n tags={\n \"managed\": \"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 parent = new Aws.Iot.ThingGroup(\"parent\", new()\n {\n Name = \"parent\",\n });\n\n var example = new Aws.Iot.ThingGroup(\"example\", new()\n {\n Name = \"example\",\n ParentGroupName = parent.Name,\n Properties = new Aws.Iot.Inputs.ThingGroupPropertiesArgs\n {\n AttributePayload = new Aws.Iot.Inputs.ThingGroupPropertiesAttributePayloadArgs\n {\n Attributes = \n {\n { \"One\", \"11111\" },\n { \"Two\", \"TwoTwo\" },\n },\n },\n Description = \"This is my thing group\",\n },\n Tags = \n {\n { \"managed\", \"true\" },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tparent, err := iot.NewThingGroup(ctx, \"parent\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"parent\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewThingGroup(ctx, \"example\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tParentGroupName: parent.Name,\n\t\t\tProperties: \u0026iot.ThingGroupPropertiesArgs{\n\t\t\t\tAttributePayload: \u0026iot.ThingGroupPropertiesAttributePayloadArgs{\n\t\t\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\t\t\"One\": pulumi.String(\"11111\"),\n\t\t\t\t\t\t\"Two\": pulumi.String(\"TwoTwo\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDescription: pulumi.String(\"This is my thing group\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"managed\": 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.iot.ThingGroup;\nimport com.pulumi.aws.iot.ThingGroupArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesAttributePayloadArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var parent = new ThingGroup(\"parent\", ThingGroupArgs.builder()\n .name(\"parent\")\n .build());\n\n var example = new ThingGroup(\"example\", ThingGroupArgs.builder()\n .name(\"example\")\n .parentGroupName(parent.name())\n .properties(ThingGroupPropertiesArgs.builder()\n .attributePayload(ThingGroupPropertiesAttributePayloadArgs.builder()\n .attributes(Map.ofEntries(\n Map.entry(\"One\", \"11111\"),\n Map.entry(\"Two\", \"TwoTwo\")\n ))\n .build())\n .description(\"This is my thing group\")\n .build())\n .tags(Map.of(\"managed\", \"true\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n parent:\n type: aws:iot:ThingGroup\n properties:\n name: parent\n example:\n type: aws:iot:ThingGroup\n properties:\n name: example\n parentGroupName: ${parent.name}\n properties:\n attributePayload:\n attributes:\n One: '11111'\n Two: TwoTwo\n description: This is my thing group\n tags:\n managed: 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IoT Things Groups using the name. For example:\n\n```sh\n$ pulumi import aws:iot/thingGroup:ThingGroup example example\n```\n", + "description": "Manages an AWS IoT Thing 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 parent = new aws.iot.ThingGroup(\"parent\", {name: \"parent\"});\nconst example = new aws.iot.ThingGroup(\"example\", {\n name: \"example\",\n parentGroupName: parent.name,\n properties: {\n attributePayload: {\n attributes: {\n One: \"11111\",\n Two: \"TwoTwo\",\n },\n },\n description: \"This is my thing group\",\n },\n tags: {\n managed: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nparent = aws.iot.ThingGroup(\"parent\", name=\"parent\")\nexample = aws.iot.ThingGroup(\"example\",\n name=\"example\",\n parent_group_name=parent.name,\n properties={\n \"attribute_payload\": {\n \"attributes\": {\n \"One\": \"11111\",\n \"Two\": \"TwoTwo\",\n },\n },\n \"description\": \"This is my thing group\",\n },\n tags={\n \"managed\": \"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 parent = new Aws.Iot.ThingGroup(\"parent\", new()\n {\n Name = \"parent\",\n });\n\n var example = new Aws.Iot.ThingGroup(\"example\", new()\n {\n Name = \"example\",\n ParentGroupName = parent.Name,\n Properties = new Aws.Iot.Inputs.ThingGroupPropertiesArgs\n {\n AttributePayload = new Aws.Iot.Inputs.ThingGroupPropertiesAttributePayloadArgs\n {\n Attributes = \n {\n { \"One\", \"11111\" },\n { \"Two\", \"TwoTwo\" },\n },\n },\n Description = \"This is my thing group\",\n },\n Tags = \n {\n { \"managed\", \"true\" },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tparent, err := iot.NewThingGroup(ctx, \"parent\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"parent\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewThingGroup(ctx, \"example\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tParentGroupName: parent.Name,\n\t\t\tProperties: \u0026iot.ThingGroupPropertiesArgs{\n\t\t\t\tAttributePayload: \u0026iot.ThingGroupPropertiesAttributePayloadArgs{\n\t\t\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\t\t\"One\": pulumi.String(\"11111\"),\n\t\t\t\t\t\t\"Two\": pulumi.String(\"TwoTwo\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDescription: pulumi.String(\"This is my thing group\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"managed\": 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.iot.ThingGroup;\nimport com.pulumi.aws.iot.ThingGroupArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesAttributePayloadArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var parent = new ThingGroup(\"parent\", ThingGroupArgs.builder()\n .name(\"parent\")\n .build());\n\n var example = new ThingGroup(\"example\", ThingGroupArgs.builder()\n .name(\"example\")\n .parentGroupName(parent.name())\n .properties(ThingGroupPropertiesArgs.builder()\n .attributePayload(ThingGroupPropertiesAttributePayloadArgs.builder()\n .attributes(Map.ofEntries(\n Map.entry(\"One\", \"11111\"),\n Map.entry(\"Two\", \"TwoTwo\")\n ))\n .build())\n .description(\"This is my thing group\")\n .build())\n .tags(Map.of(\"managed\", \"true\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n parent:\n type: aws:iot:ThingGroup\n properties:\n name: parent\n example:\n type: aws:iot:ThingGroup\n properties:\n name: example\n parentGroupName: ${parent.name}\n properties:\n attributePayload:\n attributes:\n One: '11111'\n Two: TwoTwo\n description: This is my thing group\n tags:\n managed: 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IoT Things Groups using the name. For example:\n\n```sh\n$ pulumi import aws:iot/thingGroup:ThingGroup example example\n```\n", "properties": { "arn": { "type": "string", @@ -287915,7 +287915,7 @@ } }, "aws:kinesisanalyticsv2/application:Application": { - "description": "Manages a Kinesis Analytics v2 Application.\nThis resource can be used to manage both Kinesis Data Analytics for SQL applications and Kinesis Data Analytics for Apache Flink applications.\n\n\u003e **Note:** Kinesis Data Analytics for SQL applications created using this resource cannot currently be viewed in the AWS Console. To manage Kinesis Data Analytics for SQL applications that can also be viewed in the AWS Console, use the `aws.kinesis.AnalyticsApplication` resource.\n\n## Example Usage\n\n### Apache Flink Application\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: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n environmentProperties: {\n propertyGroups: [\n {\n propertyGroupId: \"PROPERTY-GROUP-1\",\n propertyMap: {\n Key1: \"Value1\",\n },\n },\n {\n propertyGroupId: \"PROPERTY-GROUP-2\",\n propertyMap: {\n KeyA: \"ValueA\",\n KeyB: \"ValueB\",\n },\n },\n ],\n },\n flinkApplicationConfiguration: {\n checkpointConfiguration: {\n configurationType: \"DEFAULT\",\n },\n monitoringConfiguration: {\n configurationType: \"CUSTOM\",\n logLevel: \"DEBUG\",\n metricsLevel: \"TASK\",\n },\n parallelismConfiguration: {\n autoScalingEnabled: true,\n configurationType: \"CUSTOM\",\n parallelism: 10,\n parallelismPerKpu: 4,\n },\n },\n },\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"environment_properties\": {\n \"property_groups\": [\n {\n \"property_group_id\": \"PROPERTY-GROUP-1\",\n \"property_map\": {\n \"key1\": \"Value1\",\n },\n },\n {\n \"property_group_id\": \"PROPERTY-GROUP-2\",\n \"property_map\": {\n \"key_a\": \"ValueA\",\n \"key_b\": \"ValueB\",\n },\n },\n ],\n },\n \"flink_application_configuration\": {\n \"checkpoint_configuration\": {\n \"configuration_type\": \"DEFAULT\",\n },\n \"monitoring_configuration\": {\n \"configuration_type\": \"CUSTOM\",\n \"log_level\": \"DEBUG\",\n \"metrics_level\": \"TASK\",\n },\n \"parallelism_configuration\": {\n \"auto_scaling_enabled\": True,\n \"configuration_type\": \"CUSTOM\",\n \"parallelism\": 10,\n \"parallelism_per_kpu\": 4,\n },\n },\n },\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n EnvironmentProperties = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs\n {\n PropertyGroups = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-1\",\n PropertyMap = \n {\n { \"Key1\", \"Value1\" },\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-2\",\n PropertyMap = \n {\n { \"KeyA\", \"ValueA\" },\n { \"KeyB\", \"ValueB\" },\n },\n },\n },\n },\n FlinkApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs\n {\n CheckpointConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs\n {\n ConfigurationType = \"DEFAULT\",\n },\n MonitoringConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs\n {\n ConfigurationType = \"CUSTOM\",\n LogLevel = \"DEBUG\",\n MetricsLevel = \"TASK\",\n },\n ParallelismConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs\n {\n AutoScalingEnabled = true,\n ConfigurationType = \"CUSTOM\",\n Parallelism = 10,\n ParallelismPerKpu = 4,\n },\n },\n },\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/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tEnvironmentProperties: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesArgs{\n\t\t\t\t\tPropertyGroups: kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-1\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-2\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"KeyA\": pulumi.String(\"ValueA\"),\n\t\t\t\t\t\t\t\t\"KeyB\": pulumi.String(\"ValueB\"),\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\tFlinkApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs{\n\t\t\t\t\tCheckpointConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"DEFAULT\"),\n\t\t\t\t\t},\n\t\t\t\t\tMonitoringConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tLogLevel: pulumi.String(\"DEBUG\"),\n\t\t\t\t\t\tMetricsLevel: pulumi.String(\"TASK\"),\n\t\t\t\t\t},\n\t\t\t\t\tParallelismConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs{\n\t\t\t\t\t\tAutoScalingEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tParallelism: pulumi.Int(10),\n\t\t\t\t\t\tParallelismPerKpu: pulumi.Int(4),\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\"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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .environmentProperties(ApplicationApplicationConfigurationEnvironmentPropertiesArgs.builder()\n .propertyGroups( \n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-1\")\n .propertyMap(Map.of(\"Key1\", \"Value1\"))\n .build(),\n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-2\")\n .propertyMap(Map.ofEntries(\n Map.entry(\"KeyA\", \"ValueA\"),\n Map.entry(\"KeyB\", \"ValueB\")\n ))\n .build())\n .build())\n .flinkApplicationConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs.builder()\n .checkpointConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs.builder()\n .configurationType(\"DEFAULT\")\n .build())\n .monitoringConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs.builder()\n .configurationType(\"CUSTOM\")\n .logLevel(\"DEBUG\")\n .metricsLevel(\"TASK\")\n .build())\n .parallelismConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs.builder()\n .autoScalingEnabled(true)\n .configurationType(\"CUSTOM\")\n .parallelism(10)\n .parallelismPerKpu(4)\n .build())\n .build())\n .build())\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n environmentProperties:\n propertyGroups:\n - propertyGroupId: PROPERTY-GROUP-1\n propertyMap:\n Key1: Value1\n - propertyGroupId: PROPERTY-GROUP-2\n propertyMap:\n KeyA: ValueA\n KeyB: ValueB\n flinkApplicationConfiguration:\n checkpointConfiguration:\n configurationType: DEFAULT\n monitoringConfiguration:\n configurationType: CUSTOM\n logLevel: DEBUG\n metricsLevel: TASK\n parallelismConfiguration:\n autoScalingEnabled: true\n configurationType: CUSTOM\n parallelism: 10\n parallelismPerKpu: 4\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQL Application\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-sql-application\"});\nconst exampleLogStream = new aws.cloudwatch.LogStream(\"example\", {\n name: \"example-sql-application\",\n logGroupName: example.name,\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-sql-application\",\n runtimeEnvironment: \"SQL-1_0\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n textContent: \"SELECT 1;\\n\",\n },\n codeContentType: \"PLAINTEXT\",\n },\n sqlApplicationConfiguration: {\n input: {\n namePrefix: \"PREFIX_1\",\n inputParallelism: {\n count: 3,\n },\n inputSchema: {\n recordColumns: [\n {\n name: \"COLUMN_1\",\n sqlType: \"VARCHAR(8)\",\n mapping: \"MAPPING-1\",\n },\n {\n name: \"COLUMN_2\",\n sqlType: \"DOUBLE\",\n },\n ],\n recordEncoding: \"UTF-8\",\n recordFormat: {\n recordFormatType: \"CSV\",\n mappingParameters: {\n csvMappingParameters: {\n recordColumnDelimiter: \",\",\n recordRowDelimiter: \"\\n\",\n },\n },\n },\n },\n kinesisStreamsInput: {\n resourceArn: exampleAwsKinesisStream.arn,\n },\n },\n outputs: [\n {\n name: \"OUTPUT_1\",\n destinationSchema: {\n recordFormatType: \"JSON\",\n },\n lambdaOutput: {\n resourceArn: exampleAwsLambdaFunction.arn,\n },\n },\n {\n name: \"OUTPUT_2\",\n destinationSchema: {\n recordFormatType: \"CSV\",\n },\n kinesisFirehoseOutput: {\n resourceArn: exampleAwsKinesisFirehoseDeliveryStream.arn,\n },\n },\n ],\n referenceDataSource: {\n tableName: \"TABLE-1\",\n referenceSchema: {\n recordColumns: [{\n name: \"COLUMN_1\",\n sqlType: \"INTEGER\",\n }],\n recordFormat: {\n recordFormatType: \"JSON\",\n mappingParameters: {\n jsonMappingParameters: {\n recordRowPath: \"$\",\n },\n },\n },\n },\n s3ReferenceDataSource: {\n bucketArn: exampleAwsS3Bucket.arn,\n fileKey: \"KEY-1\",\n },\n },\n },\n },\n cloudwatchLoggingOptions: {\n logStreamArn: exampleLogStream.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-sql-application\")\nexample_log_stream = aws.cloudwatch.LogStream(\"example\",\n name=\"example-sql-application\",\n log_group_name=example.name)\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-sql-application\",\n runtime_environment=\"SQL-1_0\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"text_content\": \"SELECT 1;\\n\",\n },\n \"code_content_type\": \"PLAINTEXT\",\n },\n \"sql_application_configuration\": {\n \"input\": {\n \"name_prefix\": \"PREFIX_1\",\n \"input_parallelism\": {\n \"count\": 3,\n },\n \"input_schema\": {\n \"record_columns\": [\n {\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"VARCHAR(8)\",\n \"mapping\": \"MAPPING-1\",\n },\n {\n \"name\": \"COLUMN_2\",\n \"sql_type\": \"DOUBLE\",\n },\n ],\n \"record_encoding\": \"UTF-8\",\n \"record_format\": {\n \"record_format_type\": \"CSV\",\n \"mapping_parameters\": {\n \"csv_mapping_parameters\": {\n \"record_column_delimiter\": \",\",\n \"record_row_delimiter\": \"\\n\",\n },\n },\n },\n },\n \"kinesis_streams_input\": {\n \"resource_arn\": example_aws_kinesis_stream[\"arn\"],\n },\n },\n \"outputs\": [\n {\n \"name\": \"OUTPUT_1\",\n \"destination_schema\": {\n \"record_format_type\": \"JSON\",\n },\n \"lambda_output\": {\n \"resource_arn\": example_aws_lambda_function[\"arn\"],\n },\n },\n {\n \"name\": \"OUTPUT_2\",\n \"destination_schema\": {\n \"record_format_type\": \"CSV\",\n },\n \"kinesis_firehose_output\": {\n \"resource_arn\": example_aws_kinesis_firehose_delivery_stream[\"arn\"],\n },\n },\n ],\n \"reference_data_source\": {\n \"table_name\": \"TABLE-1\",\n \"reference_schema\": {\n \"record_columns\": [{\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"INTEGER\",\n }],\n \"record_format\": {\n \"record_format_type\": \"JSON\",\n \"mapping_parameters\": {\n \"json_mapping_parameters\": {\n \"record_row_path\": \"$\",\n },\n },\n },\n },\n \"s3_reference_data_source\": {\n \"bucket_arn\": example_aws_s3_bucket[\"arn\"],\n \"file_key\": \"KEY-1\",\n },\n },\n },\n },\n cloudwatch_logging_options={\n \"log_stream_arn\": example_log_stream.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.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-sql-application\",\n });\n\n var exampleLogStream = new Aws.CloudWatch.LogStream(\"example\", new()\n {\n Name = \"example-sql-application\",\n LogGroupName = example.Name,\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-sql-application\",\n RuntimeEnvironment = \"SQL-1_0\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n TextContent = @\"SELECT 1;\n\",\n },\n CodeContentType = \"PLAINTEXT\",\n },\n SqlApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs\n {\n Input = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs\n {\n NamePrefix = \"PREFIX_1\",\n InputParallelism = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs\n {\n Count = 3,\n },\n InputSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"VARCHAR(8)\",\n Mapping = \"MAPPING-1\",\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_2\",\n SqlType = \"DOUBLE\",\n },\n },\n RecordEncoding = \"UTF-8\",\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs\n {\n RecordFormatType = \"CSV\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs\n {\n CsvMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs\n {\n RecordColumnDelimiter = \",\",\n RecordRowDelimiter = @\"\n\",\n },\n },\n },\n },\n KinesisStreamsInput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs\n {\n ResourceArn = exampleAwsKinesisStream.Arn,\n },\n },\n Outputs = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_1\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"JSON\",\n },\n LambdaOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs\n {\n ResourceArn = exampleAwsLambdaFunction.Arn,\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_2\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"CSV\",\n },\n KinesisFirehoseOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs\n {\n ResourceArn = exampleAwsKinesisFirehoseDeliveryStream.Arn,\n },\n },\n },\n ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs\n {\n TableName = \"TABLE-1\",\n ReferenceSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"INTEGER\",\n },\n },\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs\n {\n RecordFormatType = \"JSON\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs\n {\n JsonMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs\n {\n RecordRowPath = \"$\",\n },\n },\n },\n },\n S3ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs\n {\n BucketArn = exampleAwsS3Bucket.Arn,\n FileKey = \"KEY-1\",\n },\n },\n },\n },\n CloudwatchLoggingOptions = new Aws.KinesisAnalyticsV2.Inputs.ApplicationCloudwatchLoggingOptionsArgs\n {\n LogStreamArn = exampleLogStream.Arn,\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/kinesisanalyticsv2\"\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-sql-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogStream, err := cloudwatch.NewLogStream(ctx, \"example\", \u0026cloudwatch.LogStreamArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tLogGroupName: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"SQL-1_0\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tTextContent: pulumi.String(\"SELECT 1;\\n\"),\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"PLAINTEXT\"),\n\t\t\t\t},\n\t\t\t\tSqlApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs{\n\t\t\t\t\tInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputTypeArgs{\n\t\t\t\t\t\tNamePrefix: pulumi.String(\"PREFIX_1\"),\n\t\t\t\t\t\tInputParallelism: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(3),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInputSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"VARCHAR(8)\"),\n\t\t\t\t\t\t\t\t\tMapping: pulumi.String(\"MAPPING-1\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_2\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"DOUBLE\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordEncoding: pulumi.String(\"UTF-8\"),\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tCsvMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordColumnDelimiter: pulumi.String(\",\"),\n\t\t\t\t\t\t\t\t\t\tRecordRowDelimiter: pulumi.String(\"\\n\"),\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\tKinesisStreamsInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs{\n\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tOutputs: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_1\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLambdaOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_2\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tKinesisFirehoseOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.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\tReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs{\n\t\t\t\t\t\tTableName: pulumi.String(\"TABLE-1\"),\n\t\t\t\t\t\tReferenceSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"INTEGER\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tJsonMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordRowPath: pulumi.String(\"$\"),\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\tS3ReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs{\n\t\t\t\t\t\t\tBucketArn: pulumi.Any(exampleAwsS3Bucket.Arn),\n\t\t\t\t\t\t\tFileKey: pulumi.String(\"KEY-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\tCloudwatchLoggingOptions: \u0026kinesisanalyticsv2.ApplicationCloudwatchLoggingOptionsArgs{\n\t\t\t\tLogStreamArn: exampleLogStream.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.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.LogStream;\nimport com.pulumi.aws.cloudwatch.LogStreamArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationCloudwatchLoggingOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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-sql-application\")\n .build());\n\n var exampleLogStream = new LogStream(\"exampleLogStream\", LogStreamArgs.builder()\n .name(\"example-sql-application\")\n .logGroupName(example.name())\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-sql-application\")\n .runtimeEnvironment(\"SQL-1_0\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .textContent(\"\"\"\nSELECT 1;\n \"\"\")\n .build())\n .codeContentType(\"PLAINTEXT\")\n .build())\n .sqlApplicationConfiguration(ApplicationApplicationConfigurationSqlApplicationConfigurationArgs.builder()\n .input(ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs.builder()\n .namePrefix(\"PREFIX_1\")\n .inputParallelism(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs.builder()\n .count(3)\n .build())\n .inputSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs.builder()\n .recordColumns( \n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"VARCHAR(8)\")\n .mapping(\"MAPPING-1\")\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_2\")\n .sqlType(\"DOUBLE\")\n .build())\n .recordEncoding(\"UTF-8\")\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs.builder()\n .recordFormatType(\"CSV\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs.builder()\n .csvMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs.builder()\n .recordColumnDelimiter(\",\")\n .recordRowDelimiter(\"\"\"\n\n \"\"\")\n .build())\n .build())\n .build())\n .build())\n .kinesisStreamsInput(ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs.builder()\n .resourceArn(exampleAwsKinesisStream.arn())\n .build())\n .build())\n .outputs( \n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_1\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"JSON\")\n .build())\n .lambdaOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs.builder()\n .resourceArn(exampleAwsLambdaFunction.arn())\n .build())\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_2\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"CSV\")\n .build())\n .kinesisFirehoseOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs.builder()\n .resourceArn(exampleAwsKinesisFirehoseDeliveryStream.arn())\n .build())\n .build())\n .referenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs.builder()\n .tableName(\"TABLE-1\")\n .referenceSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs.builder()\n .recordColumns(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"INTEGER\")\n .build())\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs.builder()\n .recordFormatType(\"JSON\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs.builder()\n .jsonMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs.builder()\n .recordRowPath(\"$\")\n .build())\n .build())\n .build())\n .build())\n .s3ReferenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs.builder()\n .bucketArn(exampleAwsS3Bucket.arn())\n .fileKey(\"KEY-1\")\n .build())\n .build())\n .build())\n .build())\n .cloudwatchLoggingOptions(ApplicationCloudwatchLoggingOptionsArgs.builder()\n .logStreamArn(exampleLogStream.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-sql-application\n exampleLogStream:\n type: aws:cloudwatch:LogStream\n name: example\n properties:\n name: example-sql-application\n logGroupName: ${example.name}\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-sql-application\n runtimeEnvironment: SQL-1_0\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n textContent: |\n SELECT 1;\n codeContentType: PLAINTEXT\n sqlApplicationConfiguration:\n input:\n namePrefix: PREFIX_1\n inputParallelism:\n count: 3\n inputSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: VARCHAR(8)\n mapping: MAPPING-1\n - name: COLUMN_2\n sqlType: DOUBLE\n recordEncoding: UTF-8\n recordFormat:\n recordFormatType: CSV\n mappingParameters:\n csvMappingParameters:\n recordColumnDelimiter: ','\n recordRowDelimiter: |2+\n kinesisStreamsInput:\n resourceArn: ${exampleAwsKinesisStream.arn}\n outputs:\n - name: OUTPUT_1\n destinationSchema:\n recordFormatType: JSON\n lambdaOutput:\n resourceArn: ${exampleAwsLambdaFunction.arn}\n - name: OUTPUT_2\n destinationSchema:\n recordFormatType: CSV\n kinesisFirehoseOutput:\n resourceArn: ${exampleAwsKinesisFirehoseDeliveryStream.arn}\n referenceDataSource:\n tableName: TABLE-1\n referenceSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: INTEGER\n recordFormat:\n recordFormatType: JSON\n mappingParameters:\n jsonMappingParameters:\n recordRowPath: $\n s3ReferenceDataSource:\n bucketArn: ${exampleAwsS3Bucket.arn}\n fileKey: KEY-1\n cloudwatchLoggingOptions:\n logStreamArn: ${exampleLogStream.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC 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.s3.BucketV2(\"example\", {bucket: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n vpcConfiguration: {\n securityGroupIds: [\n exampleAwsSecurityGroup[0].id,\n exampleAwsSecurityGroup[1].id,\n ],\n subnetIds: [exampleAwsSubnet.id],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"vpc_configuration\": {\n \"security_group_ids\": [\n example_aws_security_group[0][\"id\"],\n example_aws_security_group[1][\"id\"],\n ],\n \"subnet_ids\": [example_aws_subnet[\"id\"]],\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.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n VpcConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationVpcConfigurationArgs\n {\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup[0].Id,\n exampleAwsSecurityGroup[1].Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tVpcConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationVpcConfigurationArgs{\n\t\t\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSecurityGroup[0].Id,\n\t\t\t\t\t\texampleAwsSecurityGroup[1].Id,\n\t\t\t\t\t},\n\t\t\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSubnet.Id,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationVpcConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .vpcConfiguration(ApplicationApplicationConfigurationVpcConfigurationArgs.builder()\n .securityGroupIds( \n exampleAwsSecurityGroup[0].id(),\n exampleAwsSecurityGroup[1].id())\n .subnetIds(exampleAwsSubnet.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n vpcConfiguration:\n securityGroupIds:\n - ${exampleAwsSecurityGroup[0].id}\n - ${exampleAwsSecurityGroup[1].id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_kinesisanalyticsv2_application` using the application ARN. For example:\n\n```sh\n$ pulumi import aws:kinesisanalyticsv2/application:Application example arn:aws:kinesisanalytics:us-west-2:123456789012:application/example-sql-application\n```\n", + "description": "Manages a Kinesis Analytics v2 Application.\nThis resource can be used to manage both Kinesis Data Analytics for SQL applications and Kinesis Data Analytics for Apache Flink applications.\n\n\u003e **Note:** Kinesis Data Analytics for SQL applications created using this resource cannot currently be viewed in the AWS Console. To manage Kinesis Data Analytics for SQL applications that can also be viewed in the AWS Console, use the `aws.kinesis.AnalyticsApplication` resource.\n\n## Example Usage\n\n### Apache Flink Application\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: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n environmentProperties: {\n propertyGroups: [\n {\n propertyGroupId: \"PROPERTY-GROUP-1\",\n propertyMap: {\n Key1: \"Value1\",\n },\n },\n {\n propertyGroupId: \"PROPERTY-GROUP-2\",\n propertyMap: {\n KeyA: \"ValueA\",\n KeyB: \"ValueB\",\n },\n },\n ],\n },\n flinkApplicationConfiguration: {\n checkpointConfiguration: {\n configurationType: \"DEFAULT\",\n },\n monitoringConfiguration: {\n configurationType: \"CUSTOM\",\n logLevel: \"DEBUG\",\n metricsLevel: \"TASK\",\n },\n parallelismConfiguration: {\n autoScalingEnabled: true,\n configurationType: \"CUSTOM\",\n parallelism: 10,\n parallelismPerKpu: 4,\n },\n },\n },\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"environment_properties\": {\n \"property_groups\": [\n {\n \"property_group_id\": \"PROPERTY-GROUP-1\",\n \"property_map\": {\n \"Key1\": \"Value1\",\n },\n },\n {\n \"property_group_id\": \"PROPERTY-GROUP-2\",\n \"property_map\": {\n \"KeyA\": \"ValueA\",\n \"KeyB\": \"ValueB\",\n },\n },\n ],\n },\n \"flink_application_configuration\": {\n \"checkpoint_configuration\": {\n \"configuration_type\": \"DEFAULT\",\n },\n \"monitoring_configuration\": {\n \"configuration_type\": \"CUSTOM\",\n \"log_level\": \"DEBUG\",\n \"metrics_level\": \"TASK\",\n },\n \"parallelism_configuration\": {\n \"auto_scaling_enabled\": True,\n \"configuration_type\": \"CUSTOM\",\n \"parallelism\": 10,\n \"parallelism_per_kpu\": 4,\n },\n },\n },\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n EnvironmentProperties = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs\n {\n PropertyGroups = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-1\",\n PropertyMap = \n {\n { \"Key1\", \"Value1\" },\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-2\",\n PropertyMap = \n {\n { \"KeyA\", \"ValueA\" },\n { \"KeyB\", \"ValueB\" },\n },\n },\n },\n },\n FlinkApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs\n {\n CheckpointConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs\n {\n ConfigurationType = \"DEFAULT\",\n },\n MonitoringConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs\n {\n ConfigurationType = \"CUSTOM\",\n LogLevel = \"DEBUG\",\n MetricsLevel = \"TASK\",\n },\n ParallelismConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs\n {\n AutoScalingEnabled = true,\n ConfigurationType = \"CUSTOM\",\n Parallelism = 10,\n ParallelismPerKpu = 4,\n },\n },\n },\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/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tEnvironmentProperties: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesArgs{\n\t\t\t\t\tPropertyGroups: kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-1\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-2\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"KeyA\": pulumi.String(\"ValueA\"),\n\t\t\t\t\t\t\t\t\"KeyB\": pulumi.String(\"ValueB\"),\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\tFlinkApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs{\n\t\t\t\t\tCheckpointConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"DEFAULT\"),\n\t\t\t\t\t},\n\t\t\t\t\tMonitoringConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tLogLevel: pulumi.String(\"DEBUG\"),\n\t\t\t\t\t\tMetricsLevel: pulumi.String(\"TASK\"),\n\t\t\t\t\t},\n\t\t\t\t\tParallelismConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs{\n\t\t\t\t\t\tAutoScalingEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tParallelism: pulumi.Int(10),\n\t\t\t\t\t\tParallelismPerKpu: pulumi.Int(4),\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\"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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .environmentProperties(ApplicationApplicationConfigurationEnvironmentPropertiesArgs.builder()\n .propertyGroups( \n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-1\")\n .propertyMap(Map.of(\"Key1\", \"Value1\"))\n .build(),\n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-2\")\n .propertyMap(Map.ofEntries(\n Map.entry(\"KeyA\", \"ValueA\"),\n Map.entry(\"KeyB\", \"ValueB\")\n ))\n .build())\n .build())\n .flinkApplicationConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs.builder()\n .checkpointConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs.builder()\n .configurationType(\"DEFAULT\")\n .build())\n .monitoringConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs.builder()\n .configurationType(\"CUSTOM\")\n .logLevel(\"DEBUG\")\n .metricsLevel(\"TASK\")\n .build())\n .parallelismConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs.builder()\n .autoScalingEnabled(true)\n .configurationType(\"CUSTOM\")\n .parallelism(10)\n .parallelismPerKpu(4)\n .build())\n .build())\n .build())\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n environmentProperties:\n propertyGroups:\n - propertyGroupId: PROPERTY-GROUP-1\n propertyMap:\n Key1: Value1\n - propertyGroupId: PROPERTY-GROUP-2\n propertyMap:\n KeyA: ValueA\n KeyB: ValueB\n flinkApplicationConfiguration:\n checkpointConfiguration:\n configurationType: DEFAULT\n monitoringConfiguration:\n configurationType: CUSTOM\n logLevel: DEBUG\n metricsLevel: TASK\n parallelismConfiguration:\n autoScalingEnabled: true\n configurationType: CUSTOM\n parallelism: 10\n parallelismPerKpu: 4\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQL Application\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-sql-application\"});\nconst exampleLogStream = new aws.cloudwatch.LogStream(\"example\", {\n name: \"example-sql-application\",\n logGroupName: example.name,\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-sql-application\",\n runtimeEnvironment: \"SQL-1_0\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n textContent: \"SELECT 1;\\n\",\n },\n codeContentType: \"PLAINTEXT\",\n },\n sqlApplicationConfiguration: {\n input: {\n namePrefix: \"PREFIX_1\",\n inputParallelism: {\n count: 3,\n },\n inputSchema: {\n recordColumns: [\n {\n name: \"COLUMN_1\",\n sqlType: \"VARCHAR(8)\",\n mapping: \"MAPPING-1\",\n },\n {\n name: \"COLUMN_2\",\n sqlType: \"DOUBLE\",\n },\n ],\n recordEncoding: \"UTF-8\",\n recordFormat: {\n recordFormatType: \"CSV\",\n mappingParameters: {\n csvMappingParameters: {\n recordColumnDelimiter: \",\",\n recordRowDelimiter: \"\\n\",\n },\n },\n },\n },\n kinesisStreamsInput: {\n resourceArn: exampleAwsKinesisStream.arn,\n },\n },\n outputs: [\n {\n name: \"OUTPUT_1\",\n destinationSchema: {\n recordFormatType: \"JSON\",\n },\n lambdaOutput: {\n resourceArn: exampleAwsLambdaFunction.arn,\n },\n },\n {\n name: \"OUTPUT_2\",\n destinationSchema: {\n recordFormatType: \"CSV\",\n },\n kinesisFirehoseOutput: {\n resourceArn: exampleAwsKinesisFirehoseDeliveryStream.arn,\n },\n },\n ],\n referenceDataSource: {\n tableName: \"TABLE-1\",\n referenceSchema: {\n recordColumns: [{\n name: \"COLUMN_1\",\n sqlType: \"INTEGER\",\n }],\n recordFormat: {\n recordFormatType: \"JSON\",\n mappingParameters: {\n jsonMappingParameters: {\n recordRowPath: \"$\",\n },\n },\n },\n },\n s3ReferenceDataSource: {\n bucketArn: exampleAwsS3Bucket.arn,\n fileKey: \"KEY-1\",\n },\n },\n },\n },\n cloudwatchLoggingOptions: {\n logStreamArn: exampleLogStream.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-sql-application\")\nexample_log_stream = aws.cloudwatch.LogStream(\"example\",\n name=\"example-sql-application\",\n log_group_name=example.name)\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-sql-application\",\n runtime_environment=\"SQL-1_0\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"text_content\": \"SELECT 1;\\n\",\n },\n \"code_content_type\": \"PLAINTEXT\",\n },\n \"sql_application_configuration\": {\n \"input\": {\n \"name_prefix\": \"PREFIX_1\",\n \"input_parallelism\": {\n \"count\": 3,\n },\n \"input_schema\": {\n \"record_columns\": [\n {\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"VARCHAR(8)\",\n \"mapping\": \"MAPPING-1\",\n },\n {\n \"name\": \"COLUMN_2\",\n \"sql_type\": \"DOUBLE\",\n },\n ],\n \"record_encoding\": \"UTF-8\",\n \"record_format\": {\n \"record_format_type\": \"CSV\",\n \"mapping_parameters\": {\n \"csv_mapping_parameters\": {\n \"record_column_delimiter\": \",\",\n \"record_row_delimiter\": \"\\n\",\n },\n },\n },\n },\n \"kinesis_streams_input\": {\n \"resource_arn\": example_aws_kinesis_stream[\"arn\"],\n },\n },\n \"outputs\": [\n {\n \"name\": \"OUTPUT_1\",\n \"destination_schema\": {\n \"record_format_type\": \"JSON\",\n },\n \"lambda_output\": {\n \"resource_arn\": example_aws_lambda_function[\"arn\"],\n },\n },\n {\n \"name\": \"OUTPUT_2\",\n \"destination_schema\": {\n \"record_format_type\": \"CSV\",\n },\n \"kinesis_firehose_output\": {\n \"resource_arn\": example_aws_kinesis_firehose_delivery_stream[\"arn\"],\n },\n },\n ],\n \"reference_data_source\": {\n \"table_name\": \"TABLE-1\",\n \"reference_schema\": {\n \"record_columns\": [{\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"INTEGER\",\n }],\n \"record_format\": {\n \"record_format_type\": \"JSON\",\n \"mapping_parameters\": {\n \"json_mapping_parameters\": {\n \"record_row_path\": \"$\",\n },\n },\n },\n },\n \"s3_reference_data_source\": {\n \"bucket_arn\": example_aws_s3_bucket[\"arn\"],\n \"file_key\": \"KEY-1\",\n },\n },\n },\n },\n cloudwatch_logging_options={\n \"log_stream_arn\": example_log_stream.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.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-sql-application\",\n });\n\n var exampleLogStream = new Aws.CloudWatch.LogStream(\"example\", new()\n {\n Name = \"example-sql-application\",\n LogGroupName = example.Name,\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-sql-application\",\n RuntimeEnvironment = \"SQL-1_0\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n TextContent = @\"SELECT 1;\n\",\n },\n CodeContentType = \"PLAINTEXT\",\n },\n SqlApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs\n {\n Input = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs\n {\n NamePrefix = \"PREFIX_1\",\n InputParallelism = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs\n {\n Count = 3,\n },\n InputSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"VARCHAR(8)\",\n Mapping = \"MAPPING-1\",\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_2\",\n SqlType = \"DOUBLE\",\n },\n },\n RecordEncoding = \"UTF-8\",\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs\n {\n RecordFormatType = \"CSV\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs\n {\n CsvMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs\n {\n RecordColumnDelimiter = \",\",\n RecordRowDelimiter = @\"\n\",\n },\n },\n },\n },\n KinesisStreamsInput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs\n {\n ResourceArn = exampleAwsKinesisStream.Arn,\n },\n },\n Outputs = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_1\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"JSON\",\n },\n LambdaOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs\n {\n ResourceArn = exampleAwsLambdaFunction.Arn,\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_2\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"CSV\",\n },\n KinesisFirehoseOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs\n {\n ResourceArn = exampleAwsKinesisFirehoseDeliveryStream.Arn,\n },\n },\n },\n ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs\n {\n TableName = \"TABLE-1\",\n ReferenceSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"INTEGER\",\n },\n },\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs\n {\n RecordFormatType = \"JSON\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs\n {\n JsonMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs\n {\n RecordRowPath = \"$\",\n },\n },\n },\n },\n S3ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs\n {\n BucketArn = exampleAwsS3Bucket.Arn,\n FileKey = \"KEY-1\",\n },\n },\n },\n },\n CloudwatchLoggingOptions = new Aws.KinesisAnalyticsV2.Inputs.ApplicationCloudwatchLoggingOptionsArgs\n {\n LogStreamArn = exampleLogStream.Arn,\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/kinesisanalyticsv2\"\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-sql-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogStream, err := cloudwatch.NewLogStream(ctx, \"example\", \u0026cloudwatch.LogStreamArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tLogGroupName: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"SQL-1_0\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tTextContent: pulumi.String(\"SELECT 1;\\n\"),\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"PLAINTEXT\"),\n\t\t\t\t},\n\t\t\t\tSqlApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs{\n\t\t\t\t\tInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputTypeArgs{\n\t\t\t\t\t\tNamePrefix: pulumi.String(\"PREFIX_1\"),\n\t\t\t\t\t\tInputParallelism: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(3),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInputSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"VARCHAR(8)\"),\n\t\t\t\t\t\t\t\t\tMapping: pulumi.String(\"MAPPING-1\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_2\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"DOUBLE\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordEncoding: pulumi.String(\"UTF-8\"),\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tCsvMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordColumnDelimiter: pulumi.String(\",\"),\n\t\t\t\t\t\t\t\t\t\tRecordRowDelimiter: pulumi.String(\"\\n\"),\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\tKinesisStreamsInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs{\n\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tOutputs: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_1\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLambdaOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_2\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tKinesisFirehoseOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.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\tReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs{\n\t\t\t\t\t\tTableName: pulumi.String(\"TABLE-1\"),\n\t\t\t\t\t\tReferenceSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"INTEGER\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tJsonMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordRowPath: pulumi.String(\"$\"),\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\tS3ReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs{\n\t\t\t\t\t\t\tBucketArn: pulumi.Any(exampleAwsS3Bucket.Arn),\n\t\t\t\t\t\t\tFileKey: pulumi.String(\"KEY-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\tCloudwatchLoggingOptions: \u0026kinesisanalyticsv2.ApplicationCloudwatchLoggingOptionsArgs{\n\t\t\t\tLogStreamArn: exampleLogStream.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.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.LogStream;\nimport com.pulumi.aws.cloudwatch.LogStreamArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationCloudwatchLoggingOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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-sql-application\")\n .build());\n\n var exampleLogStream = new LogStream(\"exampleLogStream\", LogStreamArgs.builder()\n .name(\"example-sql-application\")\n .logGroupName(example.name())\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-sql-application\")\n .runtimeEnvironment(\"SQL-1_0\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .textContent(\"\"\"\nSELECT 1;\n \"\"\")\n .build())\n .codeContentType(\"PLAINTEXT\")\n .build())\n .sqlApplicationConfiguration(ApplicationApplicationConfigurationSqlApplicationConfigurationArgs.builder()\n .input(ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs.builder()\n .namePrefix(\"PREFIX_1\")\n .inputParallelism(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs.builder()\n .count(3)\n .build())\n .inputSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs.builder()\n .recordColumns( \n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"VARCHAR(8)\")\n .mapping(\"MAPPING-1\")\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_2\")\n .sqlType(\"DOUBLE\")\n .build())\n .recordEncoding(\"UTF-8\")\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs.builder()\n .recordFormatType(\"CSV\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs.builder()\n .csvMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs.builder()\n .recordColumnDelimiter(\",\")\n .recordRowDelimiter(\"\"\"\n\n \"\"\")\n .build())\n .build())\n .build())\n .build())\n .kinesisStreamsInput(ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs.builder()\n .resourceArn(exampleAwsKinesisStream.arn())\n .build())\n .build())\n .outputs( \n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_1\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"JSON\")\n .build())\n .lambdaOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs.builder()\n .resourceArn(exampleAwsLambdaFunction.arn())\n .build())\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_2\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"CSV\")\n .build())\n .kinesisFirehoseOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs.builder()\n .resourceArn(exampleAwsKinesisFirehoseDeliveryStream.arn())\n .build())\n .build())\n .referenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs.builder()\n .tableName(\"TABLE-1\")\n .referenceSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs.builder()\n .recordColumns(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"INTEGER\")\n .build())\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs.builder()\n .recordFormatType(\"JSON\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs.builder()\n .jsonMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs.builder()\n .recordRowPath(\"$\")\n .build())\n .build())\n .build())\n .build())\n .s3ReferenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs.builder()\n .bucketArn(exampleAwsS3Bucket.arn())\n .fileKey(\"KEY-1\")\n .build())\n .build())\n .build())\n .build())\n .cloudwatchLoggingOptions(ApplicationCloudwatchLoggingOptionsArgs.builder()\n .logStreamArn(exampleLogStream.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-sql-application\n exampleLogStream:\n type: aws:cloudwatch:LogStream\n name: example\n properties:\n name: example-sql-application\n logGroupName: ${example.name}\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-sql-application\n runtimeEnvironment: SQL-1_0\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n textContent: |\n SELECT 1;\n codeContentType: PLAINTEXT\n sqlApplicationConfiguration:\n input:\n namePrefix: PREFIX_1\n inputParallelism:\n count: 3\n inputSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: VARCHAR(8)\n mapping: MAPPING-1\n - name: COLUMN_2\n sqlType: DOUBLE\n recordEncoding: UTF-8\n recordFormat:\n recordFormatType: CSV\n mappingParameters:\n csvMappingParameters:\n recordColumnDelimiter: ','\n recordRowDelimiter: |2+\n kinesisStreamsInput:\n resourceArn: ${exampleAwsKinesisStream.arn}\n outputs:\n - name: OUTPUT_1\n destinationSchema:\n recordFormatType: JSON\n lambdaOutput:\n resourceArn: ${exampleAwsLambdaFunction.arn}\n - name: OUTPUT_2\n destinationSchema:\n recordFormatType: CSV\n kinesisFirehoseOutput:\n resourceArn: ${exampleAwsKinesisFirehoseDeliveryStream.arn}\n referenceDataSource:\n tableName: TABLE-1\n referenceSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: INTEGER\n recordFormat:\n recordFormatType: JSON\n mappingParameters:\n jsonMappingParameters:\n recordRowPath: $\n s3ReferenceDataSource:\n bucketArn: ${exampleAwsS3Bucket.arn}\n fileKey: KEY-1\n cloudwatchLoggingOptions:\n logStreamArn: ${exampleLogStream.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC 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.s3.BucketV2(\"example\", {bucket: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n vpcConfiguration: {\n securityGroupIds: [\n exampleAwsSecurityGroup[0].id,\n exampleAwsSecurityGroup[1].id,\n ],\n subnetIds: [exampleAwsSubnet.id],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"vpc_configuration\": {\n \"security_group_ids\": [\n example_aws_security_group[0][\"id\"],\n example_aws_security_group[1][\"id\"],\n ],\n \"subnet_ids\": [example_aws_subnet[\"id\"]],\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.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n VpcConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationVpcConfigurationArgs\n {\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup[0].Id,\n exampleAwsSecurityGroup[1].Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tVpcConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationVpcConfigurationArgs{\n\t\t\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSecurityGroup[0].Id,\n\t\t\t\t\t\texampleAwsSecurityGroup[1].Id,\n\t\t\t\t\t},\n\t\t\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSubnet.Id,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationVpcConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .vpcConfiguration(ApplicationApplicationConfigurationVpcConfigurationArgs.builder()\n .securityGroupIds( \n exampleAwsSecurityGroup[0].id(),\n exampleAwsSecurityGroup[1].id())\n .subnetIds(exampleAwsSubnet.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n vpcConfiguration:\n securityGroupIds:\n - ${exampleAwsSecurityGroup[0].id}\n - ${exampleAwsSecurityGroup[1].id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_kinesisanalyticsv2_application` using the application ARN. For example:\n\n```sh\n$ pulumi import aws:kinesisanalyticsv2/application:Application example arn:aws:kinesisanalytics:us-west-2:123456789012:application/example-sql-application\n```\n", "properties": { "applicationConfiguration": { "$ref": "#/types/aws:kinesisanalyticsv2/ApplicationApplicationConfiguration:ApplicationApplicationConfiguration", @@ -290338,7 +290338,7 @@ } }, "aws:lambda/alias:Alias": { - "description": "Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\nFor information about function aliases, see [CreateAlias](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateAlias.html) and [AliasRoutingConfiguration](https://docs.aws.amazon.com/lambda/latest/dg/API_AliasRoutingConfiguration.html) in the API docs.\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 testLambdaAlias = new aws.lambda.Alias(\"test_lambda_alias\", {\n name: \"my_alias\",\n description: \"a sample description\",\n functionName: lambdaFunctionTest.arn,\n functionVersion: \"1\",\n routingConfig: {\n additionalVersionWeights: {\n \"2\": 0.5,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_lambda_alias = aws.lambda_.Alias(\"test_lambda_alias\",\n name=\"my_alias\",\n description=\"a sample description\",\n function_name=lambda_function_test[\"arn\"],\n function_version=\"1\",\n routing_config={\n \"additional_version_weights\": {\n \"_2\": 0.5,\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 testLambdaAlias = new Aws.Lambda.Alias(\"test_lambda_alias\", new()\n {\n Name = \"my_alias\",\n Description = \"a sample description\",\n FunctionName = lambdaFunctionTest.Arn,\n FunctionVersion = \"1\",\n RoutingConfig = new Aws.Lambda.Inputs.AliasRoutingConfigArgs\n {\n AdditionalVersionWeights = \n {\n { \"2\", 0.5 },\n },\n },\n });\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.NewAlias(ctx, \"test_lambda_alias\", \u0026lambda.AliasArgs{\n\t\t\tName: pulumi.String(\"my_alias\"),\n\t\t\tDescription: pulumi.String(\"a sample description\"),\n\t\t\tFunctionName: pulumi.Any(lambdaFunctionTest.Arn),\n\t\t\tFunctionVersion: pulumi.String(\"1\"),\n\t\t\tRoutingConfig: \u0026lambda.AliasRoutingConfigArgs{\n\t\t\t\tAdditionalVersionWeights: pulumi.Float64Map{\n\t\t\t\t\t\"2\": pulumi.Float64(0.5),\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.lambda.Alias;\nimport com.pulumi.aws.lambda.AliasArgs;\nimport com.pulumi.aws.lambda.inputs.AliasRoutingConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testLambdaAlias = new Alias(\"testLambdaAlias\", AliasArgs.builder()\n .name(\"my_alias\")\n .description(\"a sample description\")\n .functionName(lambdaFunctionTest.arn())\n .functionVersion(\"1\")\n .routingConfig(AliasRoutingConfigArgs.builder()\n .additionalVersionWeights(Map.of(\"2\", 0.5))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testLambdaAlias:\n type: aws:lambda:Alias\n name: test_lambda_alias\n properties:\n name: my_alias\n description: a sample description\n functionName: ${lambdaFunctionTest.arn}\n functionVersion: '1'\n routingConfig:\n additionalVersionWeights:\n '2': 0.5\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda Function Aliases using the `function_name/alias`. For example:\n\n```sh\n$ pulumi import aws:lambda/alias:Alias test_lambda_alias my_test_lambda_function/my_alias\n```\n", + "description": "Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\nFor information about function aliases, see [CreateAlias](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateAlias.html) and [AliasRoutingConfiguration](https://docs.aws.amazon.com/lambda/latest/dg/API_AliasRoutingConfiguration.html) in the API docs.\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 testLambdaAlias = new aws.lambda.Alias(\"test_lambda_alias\", {\n name: \"my_alias\",\n description: \"a sample description\",\n functionName: lambdaFunctionTest.arn,\n functionVersion: \"1\",\n routingConfig: {\n additionalVersionWeights: {\n \"2\": 0.5,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_lambda_alias = aws.lambda_.Alias(\"test_lambda_alias\",\n name=\"my_alias\",\n description=\"a sample description\",\n function_name=lambda_function_test[\"arn\"],\n function_version=\"1\",\n routing_config={\n \"additional_version_weights\": {\n \"2\": 0.5,\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 testLambdaAlias = new Aws.Lambda.Alias(\"test_lambda_alias\", new()\n {\n Name = \"my_alias\",\n Description = \"a sample description\",\n FunctionName = lambdaFunctionTest.Arn,\n FunctionVersion = \"1\",\n RoutingConfig = new Aws.Lambda.Inputs.AliasRoutingConfigArgs\n {\n AdditionalVersionWeights = \n {\n { \"2\", 0.5 },\n },\n },\n });\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.NewAlias(ctx, \"test_lambda_alias\", \u0026lambda.AliasArgs{\n\t\t\tName: pulumi.String(\"my_alias\"),\n\t\t\tDescription: pulumi.String(\"a sample description\"),\n\t\t\tFunctionName: pulumi.Any(lambdaFunctionTest.Arn),\n\t\t\tFunctionVersion: pulumi.String(\"1\"),\n\t\t\tRoutingConfig: \u0026lambda.AliasRoutingConfigArgs{\n\t\t\t\tAdditionalVersionWeights: pulumi.Float64Map{\n\t\t\t\t\t\"2\": pulumi.Float64(0.5),\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.lambda.Alias;\nimport com.pulumi.aws.lambda.AliasArgs;\nimport com.pulumi.aws.lambda.inputs.AliasRoutingConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testLambdaAlias = new Alias(\"testLambdaAlias\", AliasArgs.builder()\n .name(\"my_alias\")\n .description(\"a sample description\")\n .functionName(lambdaFunctionTest.arn())\n .functionVersion(\"1\")\n .routingConfig(AliasRoutingConfigArgs.builder()\n .additionalVersionWeights(Map.of(\"2\", 0.5))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testLambdaAlias:\n type: aws:lambda:Alias\n name: test_lambda_alias\n properties:\n name: my_alias\n description: a sample description\n functionName: ${lambdaFunctionTest.arn}\n functionVersion: '1'\n routingConfig:\n additionalVersionWeights:\n '2': 0.5\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda Function Aliases using the `function_name/alias`. For example:\n\n```sh\n$ pulumi import aws:lambda/alias:Alias test_lambda_alias my_test_lambda_function/my_alias\n```\n", "properties": { "arn": { "type": "string", @@ -290938,7 +290938,7 @@ } }, "aws:lambda/eventSourceMapping:EventSourceMapping": { - "description": "Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB, SQS, Amazon MQ and Managed Streaming for Apache Kafka (MSK).\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html).\nFor information about event source mappings, see [CreateEventSourceMapping](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html) in the API docs.\n\n## Example Usage\n\n### DynamoDB\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsDynamodbTable.streamArn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n tags: {\n Name: \"dynamodb\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_dynamodb_table[\"streamArn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\",\n tags={\n \"Name\": \"dynamodb\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsDynamodbTable.StreamArn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n Tags = \n {\n { \"Name\", \"dynamodb\" },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsDynamodbTable.StreamArn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsDynamodbTable.streamArn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .tags(Map.of(\"Name\", \"dynamodb\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsDynamodbTable.streamArn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n tags:\n Name: dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Kinesis\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsKinesisStream.arn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_kinesis_stream[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsKinesisStream.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsKinesisStream.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsKinesisStream.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managed Streaming for Apache Kafka (MSK)\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsMskCluster.arn,\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_msk_cluster[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsMskCluster.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsMskCluster.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsMskCluster.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Self Managed Apache Kafka\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.lambda.EventSourceMapping(\"example\", {\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n selfManagedEventSource: {\n endpoints: {\n KAFKA_BOOTSTRAP_SERVERS: \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n sourceAccessConfigurations: [\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example1\",\n },\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example2\",\n },\n {\n type: \"VPC_SECURITY_GROUP\",\n uri: \"security_group:sg-example\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\",\n self_managed_event_source={\n \"endpoints\": {\n \"kafk_a__bootstra_p__servers\": \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n source_access_configurations=[\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example1\",\n },\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example2\",\n },\n {\n \"type\": \"VPC_SECURITY_GROUP\",\n \"uri\": \"security_group:sg-example\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs\n {\n Endpoints = \n {\n { \"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\" },\n },\n },\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example1\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example2\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SECURITY_GROUP\",\n Uri = \"security_group:sg-example\",\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t\tSelfManagedEventSource: \u0026lambda.EventSourceMappingSelfManagedEventSourceArgs{\n\t\t\t\tEndpoints: pulumi.StringMap{\n\t\t\t\t\t\"KAFKA_BOOTSTRAP_SERVERS\": pulumi.String(\"kafka1.example.com:9092,kafka2.example.com:9092\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example1\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example2\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SECURITY_GROUP\"),\n\t\t\t\t\tUri: pulumi.String(\"security_group:sg-example\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()\n .endpoints(Map.of(\"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\"))\n .build())\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example1\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example2\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SECURITY_GROUP\")\n .uri(\"security_group:sg-example\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n selfManagedEventSource:\n endpoints:\n KAFKA_BOOTSTRAP_SERVERS: kafka1.example.com:9092,kafka2.example.com:9092\n sourceAccessConfigurations:\n - type: VPC_SUBNET\n uri: subnet:subnet-example1\n - type: VPC_SUBNET\n uri: subnet:subnet-example2\n - type: VPC_SECURITY_GROUP\n uri: security_group:sg-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS with event filter\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n body: {\n Temperature: [{\n numeric: [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n Location: [\"New York\"],\n },\n }),\n }],\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n filter_criteria={\n \"filters\": [{\n \"pattern\": json.dumps({\n \"body\": {\n \"temperature\": [{\n \"numeric\": [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n \"location\": [\"New York\"],\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"body\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Temperature\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"numeric\"] = new object?[]\n {\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n },\n },\n },\n [\"Location\"] = new[]\n {\n \"New York\",\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/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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"body\": map[string]interface{}{\n\t\t\t\t\"Temperature\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"numeric\": []interface{}{\n\t\t\t\t\t\t\t\"\u003e\",\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\"\u003c=\",\n\t\t\t\t\t\t\t100,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Location\": []string{\n\t\t\t\t\t\"New York\",\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 = lambda.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tFilterCriteria: \u0026lambda.EventSourceMappingFilterCriteriaArgs{\n\t\t\t\tFilters: lambda.EventSourceMappingFilterCriteriaFilterArray{\n\t\t\t\t\t\u0026lambda.EventSourceMappingFilterCriteriaFilterArgs{\n\t\t\t\t\t\tPattern: pulumi.String(json0),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;\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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()\n .filters(EventSourceMappingFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"body\", jsonObject(\n jsonProperty(\"Temperature\", jsonArray(jsonObject(\n jsonProperty(\"numeric\", jsonArray(\n \"\u003e\", \n 0, \n \"\u003c=\", \n 100\n ))\n ))),\n jsonProperty(\"Location\", jsonArray(\"New York\"))\n ))\n )))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n body:\n Temperature:\n - numeric:\n - '\u003e'\n - 0\n - \u003c=\n - 100\n Location:\n - New York\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (ActiveMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 10,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [{\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=10,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[{\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 10,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(10),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(10)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 10\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (RabbitMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 1,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [\n {\n type: \"VIRTUAL_HOST\",\n uri: \"/example\",\n },\n {\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=1,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[\n {\n \"type\": \"VIRTUAL_HOST\",\n \"uri\": \"/example\",\n },\n {\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 1,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VIRTUAL_HOST\",\n Uri = \"/example\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(1),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VIRTUAL_HOST\"),\n\t\t\t\t\tUri: pulumi.String(\"/example\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(1)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VIRTUAL_HOST\")\n .uri(\"/example\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 1\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: VIRTUAL_HOST\n uri: /example\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda event source mappings using the `UUID` (event source mapping identifier). For example:\n\n```sh\n$ pulumi import aws:lambda/eventSourceMapping:EventSourceMapping event_source_mapping 12345kxodurf3443\n```\n", + "description": "Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB, SQS, Amazon MQ and Managed Streaming for Apache Kafka (MSK).\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html).\nFor information about event source mappings, see [CreateEventSourceMapping](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html) in the API docs.\n\n## Example Usage\n\n### DynamoDB\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsDynamodbTable.streamArn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n tags: {\n Name: \"dynamodb\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_dynamodb_table[\"streamArn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\",\n tags={\n \"Name\": \"dynamodb\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsDynamodbTable.StreamArn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n Tags = \n {\n { \"Name\", \"dynamodb\" },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsDynamodbTable.StreamArn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsDynamodbTable.streamArn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .tags(Map.of(\"Name\", \"dynamodb\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsDynamodbTable.streamArn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n tags:\n Name: dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Kinesis\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsKinesisStream.arn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_kinesis_stream[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsKinesisStream.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsKinesisStream.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsKinesisStream.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managed Streaming for Apache Kafka (MSK)\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsMskCluster.arn,\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_msk_cluster[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsMskCluster.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsMskCluster.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsMskCluster.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Self Managed Apache Kafka\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.lambda.EventSourceMapping(\"example\", {\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n selfManagedEventSource: {\n endpoints: {\n KAFKA_BOOTSTRAP_SERVERS: \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n sourceAccessConfigurations: [\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example1\",\n },\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example2\",\n },\n {\n type: \"VPC_SECURITY_GROUP\",\n uri: \"security_group:sg-example\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\",\n self_managed_event_source={\n \"endpoints\": {\n \"KAFKA_BOOTSTRAP_SERVERS\": \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n source_access_configurations=[\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example1\",\n },\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example2\",\n },\n {\n \"type\": \"VPC_SECURITY_GROUP\",\n \"uri\": \"security_group:sg-example\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs\n {\n Endpoints = \n {\n { \"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\" },\n },\n },\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example1\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example2\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SECURITY_GROUP\",\n Uri = \"security_group:sg-example\",\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t\tSelfManagedEventSource: \u0026lambda.EventSourceMappingSelfManagedEventSourceArgs{\n\t\t\t\tEndpoints: pulumi.StringMap{\n\t\t\t\t\t\"KAFKA_BOOTSTRAP_SERVERS\": pulumi.String(\"kafka1.example.com:9092,kafka2.example.com:9092\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example1\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example2\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SECURITY_GROUP\"),\n\t\t\t\t\tUri: pulumi.String(\"security_group:sg-example\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()\n .endpoints(Map.of(\"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\"))\n .build())\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example1\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example2\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SECURITY_GROUP\")\n .uri(\"security_group:sg-example\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n selfManagedEventSource:\n endpoints:\n KAFKA_BOOTSTRAP_SERVERS: kafka1.example.com:9092,kafka2.example.com:9092\n sourceAccessConfigurations:\n - type: VPC_SUBNET\n uri: subnet:subnet-example1\n - type: VPC_SUBNET\n uri: subnet:subnet-example2\n - type: VPC_SECURITY_GROUP\n uri: security_group:sg-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS with event filter\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n body: {\n Temperature: [{\n numeric: [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n Location: [\"New York\"],\n },\n }),\n }],\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n filter_criteria={\n \"filters\": [{\n \"pattern\": json.dumps({\n \"body\": {\n \"Temperature\": [{\n \"numeric\": [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n \"Location\": [\"New York\"],\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"body\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Temperature\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"numeric\"] = new object?[]\n {\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n },\n },\n },\n [\"Location\"] = new[]\n {\n \"New York\",\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/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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"body\": map[string]interface{}{\n\t\t\t\t\"Temperature\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"numeric\": []interface{}{\n\t\t\t\t\t\t\t\"\u003e\",\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\"\u003c=\",\n\t\t\t\t\t\t\t100,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Location\": []string{\n\t\t\t\t\t\"New York\",\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 = lambda.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tFilterCriteria: \u0026lambda.EventSourceMappingFilterCriteriaArgs{\n\t\t\t\tFilters: lambda.EventSourceMappingFilterCriteriaFilterArray{\n\t\t\t\t\t\u0026lambda.EventSourceMappingFilterCriteriaFilterArgs{\n\t\t\t\t\t\tPattern: pulumi.String(json0),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;\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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()\n .filters(EventSourceMappingFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"body\", jsonObject(\n jsonProperty(\"Temperature\", jsonArray(jsonObject(\n jsonProperty(\"numeric\", jsonArray(\n \"\u003e\", \n 0, \n \"\u003c=\", \n 100\n ))\n ))),\n jsonProperty(\"Location\", jsonArray(\"New York\"))\n ))\n )))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n body:\n Temperature:\n - numeric:\n - '\u003e'\n - 0\n - \u003c=\n - 100\n Location:\n - New York\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (ActiveMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 10,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [{\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=10,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[{\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 10,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(10),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(10)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 10\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (RabbitMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 1,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [\n {\n type: \"VIRTUAL_HOST\",\n uri: \"/example\",\n },\n {\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=1,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[\n {\n \"type\": \"VIRTUAL_HOST\",\n \"uri\": \"/example\",\n },\n {\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 1,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VIRTUAL_HOST\",\n Uri = \"/example\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(1),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VIRTUAL_HOST\"),\n\t\t\t\t\tUri: pulumi.String(\"/example\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(1)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VIRTUAL_HOST\")\n .uri(\"/example\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 1\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: VIRTUAL_HOST\n uri: /example\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda event source mappings using the `UUID` (event source mapping identifier). For example:\n\n```sh\n$ pulumi import aws:lambda/eventSourceMapping:EventSourceMapping event_source_mapping 12345kxodurf3443\n```\n", "properties": { "amazonManagedKafkaEventSourceConfig": { "$ref": "#/types/aws:lambda/EventSourceMappingAmazonManagedKafkaEventSourceConfig:EventSourceMappingAmazonManagedKafkaEventSourceConfig", @@ -297517,7 +297517,7 @@ } }, "aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion": { - "description": "Provides a resource to manage a deployment version for your Amazon Lightsail container service.\n\n\u003e **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment.\n\n\u003e **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile.\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.lightsail.ContainerServiceDeploymentVersion(\"example\", {\n containers: [{\n containerName: \"hello-world\",\n image: \"amazon/amazon-lightsail:hello-world\",\n commands: [],\n environment: {\n MY_ENVIRONMENT_VARIABLE: \"my_value\",\n },\n ports: {\n \"80\": \"HTTP\",\n },\n }],\n publicEndpoint: {\n containerName: \"hello-world\",\n containerPort: 80,\n healthCheck: {\n healthyThreshold: 2,\n unhealthyThreshold: 2,\n timeoutSeconds: 2,\n intervalSeconds: 5,\n path: \"/\",\n successCodes: \"200-499\",\n },\n },\n serviceName: exampleAwsLightsailContainerService.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lightsail.ContainerServiceDeploymentVersion(\"example\",\n containers=[{\n \"container_name\": \"hello-world\",\n \"image\": \"amazon/amazon-lightsail:hello-world\",\n \"commands\": [],\n \"environment\": {\n \"m_y__environmen_t__variable\": \"my_value\",\n },\n \"ports\": {\n \"_80\": \"HTTP\",\n },\n }],\n public_endpoint={\n \"container_name\": \"hello-world\",\n \"container_port\": 80,\n \"health_check\": {\n \"healthy_threshold\": 2,\n \"unhealthy_threshold\": 2,\n \"timeout_seconds\": 2,\n \"interval_seconds\": 5,\n \"path\": \"/\",\n \"success_codes\": \"200-499\",\n },\n },\n service_name=example_aws_lightsail_container_service[\"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 = new Aws.LightSail.ContainerServiceDeploymentVersion(\"example\", new()\n {\n Containers = new[]\n {\n new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionContainerArgs\n {\n ContainerName = \"hello-world\",\n Image = \"amazon/amazon-lightsail:hello-world\",\n Commands = new() { },\n Environment = \n {\n { \"MY_ENVIRONMENT_VARIABLE\", \"my_value\" },\n },\n Ports = \n {\n { \"80\", \"HTTP\" },\n },\n },\n },\n PublicEndpoint = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointArgs\n {\n ContainerName = \"hello-world\",\n ContainerPort = 80,\n HealthCheck = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs\n {\n HealthyThreshold = 2,\n UnhealthyThreshold = 2,\n TimeoutSeconds = 2,\n IntervalSeconds = 5,\n Path = \"/\",\n SuccessCodes = \"200-499\",\n },\n },\n ServiceName = exampleAwsLightsailContainerService.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lightsail.NewContainerServiceDeploymentVersion(ctx, \"example\", \u0026lightsail.ContainerServiceDeploymentVersionArgs{\n\t\t\tContainers: lightsail.ContainerServiceDeploymentVersionContainerArray{\n\t\t\t\t\u0026lightsail.ContainerServiceDeploymentVersionContainerArgs{\n\t\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\t\tImage: pulumi.String(\"amazon/amazon-lightsail:hello-world\"),\n\t\t\t\t\tCommands: pulumi.StringArray{},\n\t\t\t\t\tEnvironment: pulumi.StringMap{\n\t\t\t\t\t\t\"MY_ENVIRONMENT_VARIABLE\": pulumi.String(\"my_value\"),\n\t\t\t\t\t},\n\t\t\t\t\tPorts: pulumi.StringMap{\n\t\t\t\t\t\t\"80\": pulumi.String(\"HTTP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPublicEndpoint: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointArgs{\n\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\tContainerPort: pulumi.Int(80),\n\t\t\t\tHealthCheck: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs{\n\t\t\t\t\tHealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tUnhealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tTimeoutSeconds: pulumi.Int(2),\n\t\t\t\t\tIntervalSeconds: pulumi.Int(5),\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t\tSuccessCodes: pulumi.String(\"200-499\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tServiceName: pulumi.Any(exampleAwsLightsailContainerService.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.lightsail.ContainerServiceDeploymentVersion;\nimport com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 ContainerServiceDeploymentVersion(\"example\", ContainerServiceDeploymentVersionArgs.builder()\n .containers(ContainerServiceDeploymentVersionContainerArgs.builder()\n .containerName(\"hello-world\")\n .image(\"amazon/amazon-lightsail:hello-world\")\n .commands()\n .environment(Map.of(\"MY_ENVIRONMENT_VARIABLE\", \"my_value\"))\n .ports(Map.of(\"80\", \"HTTP\"))\n .build())\n .publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()\n .containerName(\"hello-world\")\n .containerPort(80)\n .healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()\n .healthyThreshold(2)\n .unhealthyThreshold(2)\n .timeoutSeconds(2)\n .intervalSeconds(5)\n .path(\"/\")\n .successCodes(\"200-499\")\n .build())\n .build())\n .serviceName(exampleAwsLightsailContainerService.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lightsail:ContainerServiceDeploymentVersion\n properties:\n containers:\n - containerName: hello-world\n image: amazon/amazon-lightsail:hello-world\n commands: []\n environment:\n MY_ENVIRONMENT_VARIABLE: my_value\n ports:\n '80': HTTP\n publicEndpoint:\n containerName: hello-world\n containerPort: 80\n healthCheck:\n healthyThreshold: 2\n unhealthyThreshold: 2\n timeoutSeconds: 2\n intervalSeconds: 5\n path: /\n successCodes: 200-499\n serviceName: ${exampleAwsLightsailContainerService.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lightsail Container Service Deployment Version using the `service_name` and `version` separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1\n```\n", + "description": "Provides a resource to manage a deployment version for your Amazon Lightsail container service.\n\n\u003e **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment.\n\n\u003e **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile.\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.lightsail.ContainerServiceDeploymentVersion(\"example\", {\n containers: [{\n containerName: \"hello-world\",\n image: \"amazon/amazon-lightsail:hello-world\",\n commands: [],\n environment: {\n MY_ENVIRONMENT_VARIABLE: \"my_value\",\n },\n ports: {\n \"80\": \"HTTP\",\n },\n }],\n publicEndpoint: {\n containerName: \"hello-world\",\n containerPort: 80,\n healthCheck: {\n healthyThreshold: 2,\n unhealthyThreshold: 2,\n timeoutSeconds: 2,\n intervalSeconds: 5,\n path: \"/\",\n successCodes: \"200-499\",\n },\n },\n serviceName: exampleAwsLightsailContainerService.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lightsail.ContainerServiceDeploymentVersion(\"example\",\n containers=[{\n \"container_name\": \"hello-world\",\n \"image\": \"amazon/amazon-lightsail:hello-world\",\n \"commands\": [],\n \"environment\": {\n \"MY_ENVIRONMENT_VARIABLE\": \"my_value\",\n },\n \"ports\": {\n \"80\": \"HTTP\",\n },\n }],\n public_endpoint={\n \"container_name\": \"hello-world\",\n \"container_port\": 80,\n \"health_check\": {\n \"healthy_threshold\": 2,\n \"unhealthy_threshold\": 2,\n \"timeout_seconds\": 2,\n \"interval_seconds\": 5,\n \"path\": \"/\",\n \"success_codes\": \"200-499\",\n },\n },\n service_name=example_aws_lightsail_container_service[\"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 = new Aws.LightSail.ContainerServiceDeploymentVersion(\"example\", new()\n {\n Containers = new[]\n {\n new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionContainerArgs\n {\n ContainerName = \"hello-world\",\n Image = \"amazon/amazon-lightsail:hello-world\",\n Commands = new() { },\n Environment = \n {\n { \"MY_ENVIRONMENT_VARIABLE\", \"my_value\" },\n },\n Ports = \n {\n { \"80\", \"HTTP\" },\n },\n },\n },\n PublicEndpoint = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointArgs\n {\n ContainerName = \"hello-world\",\n ContainerPort = 80,\n HealthCheck = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs\n {\n HealthyThreshold = 2,\n UnhealthyThreshold = 2,\n TimeoutSeconds = 2,\n IntervalSeconds = 5,\n Path = \"/\",\n SuccessCodes = \"200-499\",\n },\n },\n ServiceName = exampleAwsLightsailContainerService.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lightsail.NewContainerServiceDeploymentVersion(ctx, \"example\", \u0026lightsail.ContainerServiceDeploymentVersionArgs{\n\t\t\tContainers: lightsail.ContainerServiceDeploymentVersionContainerArray{\n\t\t\t\t\u0026lightsail.ContainerServiceDeploymentVersionContainerArgs{\n\t\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\t\tImage: pulumi.String(\"amazon/amazon-lightsail:hello-world\"),\n\t\t\t\t\tCommands: pulumi.StringArray{},\n\t\t\t\t\tEnvironment: pulumi.StringMap{\n\t\t\t\t\t\t\"MY_ENVIRONMENT_VARIABLE\": pulumi.String(\"my_value\"),\n\t\t\t\t\t},\n\t\t\t\t\tPorts: pulumi.StringMap{\n\t\t\t\t\t\t\"80\": pulumi.String(\"HTTP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPublicEndpoint: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointArgs{\n\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\tContainerPort: pulumi.Int(80),\n\t\t\t\tHealthCheck: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs{\n\t\t\t\t\tHealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tUnhealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tTimeoutSeconds: pulumi.Int(2),\n\t\t\t\t\tIntervalSeconds: pulumi.Int(5),\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t\tSuccessCodes: pulumi.String(\"200-499\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tServiceName: pulumi.Any(exampleAwsLightsailContainerService.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.lightsail.ContainerServiceDeploymentVersion;\nimport com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 ContainerServiceDeploymentVersion(\"example\", ContainerServiceDeploymentVersionArgs.builder()\n .containers(ContainerServiceDeploymentVersionContainerArgs.builder()\n .containerName(\"hello-world\")\n .image(\"amazon/amazon-lightsail:hello-world\")\n .commands()\n .environment(Map.of(\"MY_ENVIRONMENT_VARIABLE\", \"my_value\"))\n .ports(Map.of(\"80\", \"HTTP\"))\n .build())\n .publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()\n .containerName(\"hello-world\")\n .containerPort(80)\n .healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()\n .healthyThreshold(2)\n .unhealthyThreshold(2)\n .timeoutSeconds(2)\n .intervalSeconds(5)\n .path(\"/\")\n .successCodes(\"200-499\")\n .build())\n .build())\n .serviceName(exampleAwsLightsailContainerService.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lightsail:ContainerServiceDeploymentVersion\n properties:\n containers:\n - containerName: hello-world\n image: amazon/amazon-lightsail:hello-world\n commands: []\n environment:\n MY_ENVIRONMENT_VARIABLE: my_value\n ports:\n '80': HTTP\n publicEndpoint:\n containerName: hello-world\n containerPort: 80\n healthCheck:\n healthyThreshold: 2\n unhealthyThreshold: 2\n timeoutSeconds: 2\n intervalSeconds: 5\n path: /\n successCodes: 200-499\n serviceName: ${exampleAwsLightsailContainerService.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lightsail Container Service Deployment Version using the `service_name` and `version` separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1\n```\n", "properties": { "containers": { "type": "array", @@ -308957,7 +308957,7 @@ } }, "aws:networkfirewall/loggingConfiguration:LoggingConfiguration": { - "description": "Provides an AWS Network Firewall Logging Configuration Resource\n\n## Example Usage\n\n### Logging to S3\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n bucketName: exampleAwsS3Bucket.bucket,\n prefix: \"/example\",\n },\n logDestinationType: \"S3\",\n logType: \"FLOW\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"bucket_name\": example_aws_s3_bucket[\"bucket\"],\n \"prefix\": \"/example\",\n },\n \"log_destination_type\": \"S3\",\n \"log_type\": \"FLOW\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"bucketName\", exampleAwsS3Bucket.Bucket },\n { \"prefix\", \"/example\" },\n },\n LogDestinationType = \"S3\",\n LogType = \"FLOW\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"bucketName\": pulumi.Any(exampleAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\"prefix\": pulumi.String(\"/example\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"S3\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"FLOW\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.ofEntries(\n Map.entry(\"bucketName\", exampleAwsS3Bucket.bucket()),\n Map.entry(\"prefix\", \"/example\")\n ))\n .logDestinationType(\"S3\")\n .logType(\"FLOW\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n bucketName: ${exampleAwsS3Bucket.bucket}\n prefix: /example\n logDestinationType: S3\n logType: FLOW\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to CloudWatch\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n logGroup: exampleAwsCloudwatchLogGroup.name,\n },\n logDestinationType: \"CloudWatchLogs\",\n logType: \"ALERT\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"log_group\": example_aws_cloudwatch_log_group[\"name\"],\n },\n \"log_destination_type\": \"CloudWatchLogs\",\n \"log_type\": \"ALERT\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"logGroup\", exampleAwsCloudwatchLogGroup.Name },\n },\n LogDestinationType = \"CloudWatchLogs\",\n LogType = \"ALERT\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"logGroup\": pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"CloudWatchLogs\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"ALERT\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"logGroup\", exampleAwsCloudwatchLogGroup.name()))\n .logDestinationType(\"CloudWatchLogs\")\n .logType(\"ALERT\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n logGroup: ${exampleAwsCloudwatchLogGroup.name}\n logDestinationType: CloudWatchLogs\n logType: ALERT\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to Kinesis Data Firehose\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name,\n },\n logDestinationType: \"KinesisDataFirehose\",\n logType: \"TLS\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"delivery_stream\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"log_destination_type\": \"KinesisDataFirehose\",\n \"log_type\": \"TLS\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.Name },\n },\n LogDestinationType = \"KinesisDataFirehose\",\n LogType = \"TLS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"deliveryStream\": pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"KinesisDataFirehose\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"TLS\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.name()))\n .logDestinationType(\"KinesisDataFirehose\")\n .logType(\"TLS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n deliveryStream: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n logDestinationType: KinesisDataFirehose\n logType: TLS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Network Firewall Logging Configurations using the `firewall_arn`. For example:\n\n```sh\n$ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example\n```\n", + "description": "Provides an AWS Network Firewall Logging Configuration Resource\n\n## Example Usage\n\n### Logging to S3\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n bucketName: exampleAwsS3Bucket.bucket,\n prefix: \"/example\",\n },\n logDestinationType: \"S3\",\n logType: \"FLOW\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"bucketName\": example_aws_s3_bucket[\"bucket\"],\n \"prefix\": \"/example\",\n },\n \"log_destination_type\": \"S3\",\n \"log_type\": \"FLOW\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"bucketName\", exampleAwsS3Bucket.Bucket },\n { \"prefix\", \"/example\" },\n },\n LogDestinationType = \"S3\",\n LogType = \"FLOW\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"bucketName\": pulumi.Any(exampleAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\"prefix\": pulumi.String(\"/example\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"S3\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"FLOW\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.ofEntries(\n Map.entry(\"bucketName\", exampleAwsS3Bucket.bucket()),\n Map.entry(\"prefix\", \"/example\")\n ))\n .logDestinationType(\"S3\")\n .logType(\"FLOW\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n bucketName: ${exampleAwsS3Bucket.bucket}\n prefix: /example\n logDestinationType: S3\n logType: FLOW\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to CloudWatch\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n logGroup: exampleAwsCloudwatchLogGroup.name,\n },\n logDestinationType: \"CloudWatchLogs\",\n logType: \"ALERT\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"logGroup\": example_aws_cloudwatch_log_group[\"name\"],\n },\n \"log_destination_type\": \"CloudWatchLogs\",\n \"log_type\": \"ALERT\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"logGroup\", exampleAwsCloudwatchLogGroup.Name },\n },\n LogDestinationType = \"CloudWatchLogs\",\n LogType = \"ALERT\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"logGroup\": pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"CloudWatchLogs\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"ALERT\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"logGroup\", exampleAwsCloudwatchLogGroup.name()))\n .logDestinationType(\"CloudWatchLogs\")\n .logType(\"ALERT\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n logGroup: ${exampleAwsCloudwatchLogGroup.name}\n logDestinationType: CloudWatchLogs\n logType: ALERT\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to Kinesis Data Firehose\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name,\n },\n logDestinationType: \"KinesisDataFirehose\",\n logType: \"TLS\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"deliveryStream\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"log_destination_type\": \"KinesisDataFirehose\",\n \"log_type\": \"TLS\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.Name },\n },\n LogDestinationType = \"KinesisDataFirehose\",\n LogType = \"TLS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"deliveryStream\": pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"KinesisDataFirehose\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"TLS\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.name()))\n .logDestinationType(\"KinesisDataFirehose\")\n .logType(\"TLS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n deliveryStream: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n logDestinationType: KinesisDataFirehose\n logType: TLS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Network Firewall Logging Configurations using the `firewall_arn`. For example:\n\n```sh\n$ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example\n```\n", "properties": { "firewallArn": { "type": "string", @@ -322851,7 +322851,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, \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", + "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", @@ -326074,7 +326074,7 @@ } }, "aws:quicksight/vpcConnection:VpcConnection": { - "description": "Resource for managing an AWS QuickSight VPC 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 vpcConnectionRole = new aws.iam.Role(\"vpc_connection_role\", {\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inlinePolicies: [{\n name: \"QuickSightVPCConnectionRolePolicy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n Resource: [\"*\"],\n }],\n }),\n }],\n});\nconst example = new aws.quicksight.VpcConnection(\"example\", {\n vpcConnectionId: \"example-connection-id\",\n name: \"Example Connection\",\n roleArn: vpcConnectionRole.arn,\n securityGroupIds: [\"sg-00000000000000000\"],\n subnetIds: [\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nvpc_connection_role = aws.iam.Role(\"vpc_connection_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inline_policies=[{\n \"name\": \"QuickSightVPCConnectionRolePolicy\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"effect\": \"Allow\",\n \"action\": [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n \"resource\": [\"*\"],\n }],\n }),\n }])\nexample = aws.quicksight.VpcConnection(\"example\",\n vpc_connection_id=\"example-connection-id\",\n name=\"Example Connection\",\n role_arn=vpc_connection_role.arn,\n security_group_ids=[\"sg-00000000000000000\"],\n subnet_ids=[\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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 vpcConnectionRole = new Aws.Iam.Role(\"vpc_connection_role\", 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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"quicksight.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"QuickSightVPCConnectionRolePolicy\",\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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n },\n [\"Resource\"] = new[]\n {\n \"*\",\n },\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.Quicksight.VpcConnection(\"example\", new()\n {\n VpcConnectionId = \"example-connection-id\",\n Name = \"Example Connection\",\n RoleArn = vpcConnectionRole.Arn,\n SecurityGroupIds = new[]\n {\n \"sg-00000000000000000\",\n },\n SubnetIds = new[]\n {\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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/quicksight\"\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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"quicksight.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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:CreateNetworkInterface\",\n\t\t\t\t\t\t\"ec2:ModifyNetworkInterfaceAttribute\",\n\t\t\t\t\t\t\"ec2:DeleteNetworkInterface\",\n\t\t\t\t\t\t\"ec2:DescribeSubnets\",\n\t\t\t\t\t\t\"ec2:DescribeSecurityGroups\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []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})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tvpcConnectionRole, err := iam.NewRole(ctx, \"vpc_connection_role\", \u0026iam.RoleArgs{\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(\"QuickSightVPCConnectionRolePolicy\"),\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\t_, err = quicksight.NewVpcConnection(ctx, \"example\", \u0026quicksight.VpcConnectionArgs{\n\t\t\tVpcConnectionId: pulumi.String(\"example-connection-id\"),\n\t\t\tName: pulumi.String(\"Example Connection\"),\n\t\t\tRoleArn: vpcConnectionRole.Arn,\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"sg-00000000000000000\"),\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-00000000000000000\"),\n\t\t\t\tpulumi.String(\"subnet-00000000000000001\"),\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.quicksight.VpcConnection;\nimport com.pulumi.aws.quicksight.VpcConnectionArgs;\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 vpcConnectionRole = new Role(\"vpcConnectionRole\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"quicksight.amazonaws.com\")\n ))\n )))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"QuickSightVPCConnectionRolePolicy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"ec2:CreateNetworkInterface\", \n \"ec2:ModifyNetworkInterfaceAttribute\", \n \"ec2:DeleteNetworkInterface\", \n \"ec2:DescribeSubnets\", \n \"ec2:DescribeSecurityGroups\"\n )),\n jsonProperty(\"Resource\", jsonArray(\"*\"))\n )))\n )))\n .build())\n .build());\n\n var example = new VpcConnection(\"example\", VpcConnectionArgs.builder()\n .vpcConnectionId(\"example-connection-id\")\n .name(\"Example Connection\")\n .roleArn(vpcConnectionRole.arn())\n .securityGroupIds(\"sg-00000000000000000\")\n .subnetIds( \n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpcConnectionRole:\n type: aws:iam:Role\n name: vpc_connection_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: quicksight.amazonaws.com\n inlinePolicies:\n - name: QuickSightVPCConnectionRolePolicy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - ec2:CreateNetworkInterface\n - ec2:ModifyNetworkInterfaceAttribute\n - ec2:DeleteNetworkInterface\n - ec2:DescribeSubnets\n - ec2:DescribeSecurityGroups\n Resource:\n - '*'\n example:\n type: aws:quicksight:VpcConnection\n properties:\n vpcConnectionId: example-connection-id\n name: Example Connection\n roleArn: ${vpcConnectionRole.arn}\n securityGroupIds:\n - sg-00000000000000000\n subnetIds:\n - subnet-00000000000000000\n - subnet-00000000000000001\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import QuickSight VPC connection using the AWS account ID and VPC connection ID separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:quicksight/vpcConnection:VpcConnection example 123456789012,example\n```\n", + "description": "Resource for managing an AWS QuickSight VPC 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 vpcConnectionRole = new aws.iam.Role(\"vpc_connection_role\", {\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inlinePolicies: [{\n name: \"QuickSightVPCConnectionRolePolicy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n Resource: [\"*\"],\n }],\n }),\n }],\n});\nconst example = new aws.quicksight.VpcConnection(\"example\", {\n vpcConnectionId: \"example-connection-id\",\n name: \"Example Connection\",\n roleArn: vpcConnectionRole.arn,\n securityGroupIds: [\"sg-00000000000000000\"],\n subnetIds: [\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nvpc_connection_role = aws.iam.Role(\"vpc_connection_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inline_policies=[{\n \"name\": \"QuickSightVPCConnectionRolePolicy\",\n \"policy\": json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n \"Resource\": [\"*\"],\n }],\n }),\n }])\nexample = aws.quicksight.VpcConnection(\"example\",\n vpc_connection_id=\"example-connection-id\",\n name=\"Example Connection\",\n role_arn=vpc_connection_role.arn,\n security_group_ids=[\"sg-00000000000000000\"],\n subnet_ids=[\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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 vpcConnectionRole = new Aws.Iam.Role(\"vpc_connection_role\", 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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"quicksight.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"QuickSightVPCConnectionRolePolicy\",\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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n },\n [\"Resource\"] = new[]\n {\n \"*\",\n },\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.Quicksight.VpcConnection(\"example\", new()\n {\n VpcConnectionId = \"example-connection-id\",\n Name = \"Example Connection\",\n RoleArn = vpcConnectionRole.Arn,\n SecurityGroupIds = new[]\n {\n \"sg-00000000000000000\",\n },\n SubnetIds = new[]\n {\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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/quicksight\"\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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"quicksight.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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:CreateNetworkInterface\",\n\t\t\t\t\t\t\"ec2:ModifyNetworkInterfaceAttribute\",\n\t\t\t\t\t\t\"ec2:DeleteNetworkInterface\",\n\t\t\t\t\t\t\"ec2:DescribeSubnets\",\n\t\t\t\t\t\t\"ec2:DescribeSecurityGroups\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []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})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tvpcConnectionRole, err := iam.NewRole(ctx, \"vpc_connection_role\", \u0026iam.RoleArgs{\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(\"QuickSightVPCConnectionRolePolicy\"),\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\t_, err = quicksight.NewVpcConnection(ctx, \"example\", \u0026quicksight.VpcConnectionArgs{\n\t\t\tVpcConnectionId: pulumi.String(\"example-connection-id\"),\n\t\t\tName: pulumi.String(\"Example Connection\"),\n\t\t\tRoleArn: vpcConnectionRole.Arn,\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"sg-00000000000000000\"),\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-00000000000000000\"),\n\t\t\t\tpulumi.String(\"subnet-00000000000000001\"),\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.quicksight.VpcConnection;\nimport com.pulumi.aws.quicksight.VpcConnectionArgs;\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 vpcConnectionRole = new Role(\"vpcConnectionRole\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"quicksight.amazonaws.com\")\n ))\n )))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"QuickSightVPCConnectionRolePolicy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"ec2:CreateNetworkInterface\", \n \"ec2:ModifyNetworkInterfaceAttribute\", \n \"ec2:DeleteNetworkInterface\", \n \"ec2:DescribeSubnets\", \n \"ec2:DescribeSecurityGroups\"\n )),\n jsonProperty(\"Resource\", jsonArray(\"*\"))\n )))\n )))\n .build())\n .build());\n\n var example = new VpcConnection(\"example\", VpcConnectionArgs.builder()\n .vpcConnectionId(\"example-connection-id\")\n .name(\"Example Connection\")\n .roleArn(vpcConnectionRole.arn())\n .securityGroupIds(\"sg-00000000000000000\")\n .subnetIds( \n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpcConnectionRole:\n type: aws:iam:Role\n name: vpc_connection_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: quicksight.amazonaws.com\n inlinePolicies:\n - name: QuickSightVPCConnectionRolePolicy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - ec2:CreateNetworkInterface\n - ec2:ModifyNetworkInterfaceAttribute\n - ec2:DeleteNetworkInterface\n - ec2:DescribeSubnets\n - ec2:DescribeSecurityGroups\n Resource:\n - '*'\n example:\n type: aws:quicksight:VpcConnection\n properties:\n vpcConnectionId: example-connection-id\n name: Example Connection\n roleArn: ${vpcConnectionRole.arn}\n securityGroupIds:\n - sg-00000000000000000\n subnetIds:\n - subnet-00000000000000000\n - subnet-00000000000000001\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import QuickSight VPC connection using the AWS account ID and VPC connection ID separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:quicksight/vpcConnection:VpcConnection example 123456789012,example\n```\n", "properties": { "arn": { "type": "string", @@ -337223,7 +337223,7 @@ } }, "aws:rekognition/streamProcessor:StreamProcessor": { - "description": "Resource for managing an AWS Rekognition Stream Processor.\n\n\u003e This resource must be configured specifically for your use case, and not all options are compatible with one another. See [Stream Processor API documentation](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html#rekognition-CreateStreamProcessor-request-Input) for configuration information.\n\n\u003e Stream Processors configured for Face Recognition cannot have _any_ properties updated after the fact, and it will result in an AWS API error.\n\n## Example Usage\n\n### Label Detection\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: \"example-bucket\"});\nconst exampleTopic = new aws.sns.Topic(\"example\", {name: \"example-topic\"});\nconst exampleVideoStream = new aws.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\"s3:PutObject\"],\n Effect: \"Allow\",\n Resource: [pulumi.interpolate`${example.arn}/*`],\n },\n {\n Action: [\"sns:Publish\"],\n Effect: \"Allow\",\n Resource: [exampleTopic.arn],\n },\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [exampleVideoStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n output: {\n s3Destination: {\n bucket: example.bucket,\n },\n },\n settings: {\n connectedHome: {\n labels: [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input: {\n kinesisVideoStream: {\n arn: exampleVideoStream.arn,\n },\n },\n notificationChannel: {\n snsTopicArn: exampleTopic.arn,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-bucket\")\nexample_topic = aws.sns.Topic(\"example\", name=\"example-topic\")\nexample_video_stream = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [\n {\n \"action\": [\"s3:PutObject\"],\n \"effect\": \"Allow\",\n \"resource\": [example.arn.apply(lambda arn: f\"{arn}/*\")],\n },\n {\n \"Action\": [\"sns:Publish\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_topic.arn],\n },\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example_video_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n output={\n \"s3_destination\": {\n \"bucket\": example.bucket,\n },\n },\n settings={\n \"connected_home\": {\n \"labels\": [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input={\n \"kinesis_video_stream\": {\n \"arn\": example_video_stream.arn,\n },\n },\n notification_channel={\n \"sns_topic_arn\": example_topic.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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-bucket\",\n });\n\n var exampleTopic = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example-topic\",\n });\n\n var exampleVideoStream = new Aws.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"s3:PutObject\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sns:Publish\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleTopic.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleVideoStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n S3Destination = new Aws.Rekognition.Inputs.StreamProcessorOutputS3DestinationArgs\n {\n Bucket = example.Bucket,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n ConnectedHome = new Aws.Rekognition.Inputs.StreamProcessorSettingsConnectedHomeArgs\n {\n Labels = new[]\n {\n \"PERSON\",\n \"PET\",\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = exampleVideoStream.Arn,\n },\n },\n NotificationChannel = new Aws.Rekognition.Inputs.StreamProcessorNotificationChannelArgs\n {\n SnsTopicArn = exampleTopic.Arn,\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/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\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 := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTopic, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example-topic\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVideoStream, err := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\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\": \"sts:AssumeRole\",\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\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleTopic.Arn, exampleVideoStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleTopicArn := _args[1].(string)\n\t\t\t\t\t\texampleVideoStreamArn := _args[2].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleArn),\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"sns:Publish\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleTopicArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleVideoStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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 = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tS3Destination: \u0026rekognition.StreamProcessorOutputS3DestinationArgs{\n\t\t\t\t\tBucket: example.Bucket,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tConnectedHome: \u0026rekognition.StreamProcessorSettingsConnectedHomeArgs{\n\t\t\t\t\tLabels: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"PERSON\"),\n\t\t\t\t\t\tpulumi.String(\"PET\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: exampleVideoStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNotificationChannel: \u0026rekognition.StreamProcessorNotificationChannelArgs{\n\t\t\t\tSnsTopicArn: exampleTopic.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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputS3DestinationArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsConnectedHomeArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorNotificationChannelArgs;\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 BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-bucket\")\n .build());\n\n var exampleTopic = new Topic(\"exampleTopic\", TopicArgs.builder()\n .name(\"example-topic\")\n .build());\n\n var exampleVideoStream = new VideoStream(\"exampleVideoStream\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleTopic.arn(), exampleVideoStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleTopicArn = values.t2;\n var exampleVideoStreamArn = values.t3;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"s3:PutObject\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(String.format(\"%s/*\", exampleArn)))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"sns:Publish\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleTopicArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleVideoStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .s3Destination(StreamProcessorOutputS3DestinationArgs.builder()\n .bucket(example.bucket())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .connectedHome(StreamProcessorSettingsConnectedHomeArgs.builder()\n .labels( \n \"PERSON\",\n \"PET\")\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(exampleVideoStream.arn())\n .build())\n .build())\n .notificationChannel(StreamProcessorNotificationChannelArgs.builder()\n .snsTopicArn(exampleTopic.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-bucket\n exampleTopic:\n type: aws:sns:Topic\n name: example\n properties:\n name: example-topic\n exampleVideoStream:\n type: aws:kinesis:VideoStream\n name: example\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:PutObject\n Effect: Allow\n Resource:\n - ${example.arn}/*\n - Action:\n - sns:Publish\n Effect: Allow\n Resource:\n - ${exampleTopic.arn}\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${exampleVideoStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n output:\n s3Destination:\n bucket: ${example.bucket}\n settings:\n connectedHome:\n labels:\n - PERSON\n - PET\n input:\n kinesisVideoStream:\n arn: ${exampleVideoStream.arn}\n notificationChannel:\n snsTopicArn: ${exampleTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Face Detection 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.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleStream = new aws.kinesis.Stream(\"example\", {\n name: \"pulumi-kinesis-example\",\n shardCount: 1,\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [example.arn],\n },\n {\n Action: [\"kinesis:PutRecord\"],\n Effect: \"Allow\",\n Resource: [exampleStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleCollection = new aws.rekognition.Collection(\"example\", {collectionId: \"example-collection\"});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n regionsOfInterests: [{\n polygons: [\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n ],\n }],\n input: {\n kinesisVideoStream: {\n arn: example.arn,\n },\n },\n output: {\n kinesisDataStream: {\n arn: exampleStream.arn,\n },\n },\n settings: {\n faceSearch: {\n collectionId: exampleCollection.id,\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_stream = aws.kinesis.Stream(\"example\",\n name=\"pulumi-kinesis-example\",\n shard_count=1)\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [\n {\n \"action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"effect\": \"Allow\",\n \"resource\": [example.arn],\n },\n {\n \"Action\": [\"kinesis:PutRecord\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_collection = aws.rekognition.Collection(\"example\", collection_id=\"example-collection\")\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n regions_of_interests=[{\n \"polygons\": [\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n ],\n }],\n input={\n \"kinesis_video_stream\": {\n \"arn\": example.arn,\n },\n },\n output={\n \"kinesis_data_stream\": {\n \"arn\": example_stream.arn,\n },\n },\n settings={\n \"face_search\": {\n \"collection_id\": example_collection.id,\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.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleStream = new Aws.Kinesis.Stream(\"example\", new()\n {\n Name = \"pulumi-kinesis-example\",\n ShardCount = 1,\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:PutRecord\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleCollection = new Aws.Rekognition.Collection(\"example\", new()\n {\n CollectionId = \"example-collection\",\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n RegionsOfInterests = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestArgs\n {\n Polygons = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = example.Arn,\n },\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n KinesisDataStream = new Aws.Rekognition.Inputs.StreamProcessorOutputKinesisDataStreamArgs\n {\n Arn = exampleStream.Arn,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n FaceSearch = new Aws.Rekognition.Inputs.StreamProcessorSettingsFaceSearchArgs\n {\n CollectionId = exampleCollection.Id,\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/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\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 := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStream, err := kinesis.NewStream(ctx, \"example\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"pulumi-kinesis-example\"),\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\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\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleStreamArn := _args[1].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:PutRecord\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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\texampleCollection, err := rekognition.NewCollection(ctx, \"example\", \u0026rekognition.CollectionArgs{\n\t\t\tCollectionId: pulumi.String(\"example-collection\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tRegionsOfInterests: rekognition.StreamProcessorRegionsOfInterestArray{\n\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestArgs{\n\t\t\t\t\tPolygons: rekognition.StreamProcessorRegionsOfInterestPolygonArray{\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\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\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: example.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tKinesisDataStream: \u0026rekognition.StreamProcessorOutputKinesisDataStreamArgs{\n\t\t\t\t\tArn: exampleStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tFaceSearch: \u0026rekognition.StreamProcessorSettingsFaceSearchArgs{\n\t\t\t\t\tCollectionId: exampleCollection.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\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.Collection;\nimport com.pulumi.aws.rekognition.CollectionArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorRegionsOfInterestArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputKinesisDataStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsFaceSearchArgs;\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 VideoStream(\"example\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleStream = new Stream(\"exampleStream\", StreamArgs.builder()\n .name(\"pulumi-kinesis-example\")\n .shardCount(1)\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleStreamArn = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"kinesis:PutRecord\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleCollection = new Collection(\"exampleCollection\", CollectionArgs.builder()\n .collectionId(\"example-collection\")\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .regionsOfInterests(StreamProcessorRegionsOfInterestArgs.builder()\n .polygons( \n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(example.arn())\n .build())\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .kinesisDataStream(StreamProcessorOutputKinesisDataStreamArgs.builder()\n .arn(exampleStream.arn())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .faceSearch(StreamProcessorSettingsFaceSearchArgs.builder()\n .collectionId(exampleCollection.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kinesis:VideoStream\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleStream:\n type: aws:kinesis:Stream\n name: example\n properties:\n name: pulumi-kinesis-example\n shardCount: 1\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${example.arn}\n - Action:\n - kinesis:PutRecord\n Effect: Allow\n Resource:\n - ${exampleStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleCollection:\n type: aws:rekognition:Collection\n name: example\n properties:\n collectionId: example-collection\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n regionsOfInterests:\n - polygons:\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n input:\n kinesisVideoStream:\n arn: ${example.arn}\n output:\n kinesisDataStream:\n arn: ${exampleStream.arn}\n settings:\n faceSearch:\n collectionId: ${exampleCollection.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Rekognition Stream Processor using the `name`. For example:\n\n```sh\n$ pulumi import aws:rekognition/streamProcessor:StreamProcessor example my-stream\n```\n", + "description": "Resource for managing an AWS Rekognition Stream Processor.\n\n\u003e This resource must be configured specifically for your use case, and not all options are compatible with one another. See [Stream Processor API documentation](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html#rekognition-CreateStreamProcessor-request-Input) for configuration information.\n\n\u003e Stream Processors configured for Face Recognition cannot have _any_ properties updated after the fact, and it will result in an AWS API error.\n\n## Example Usage\n\n### Label Detection\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: \"example-bucket\"});\nconst exampleTopic = new aws.sns.Topic(\"example\", {name: \"example-topic\"});\nconst exampleVideoStream = new aws.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\"s3:PutObject\"],\n Effect: \"Allow\",\n Resource: [pulumi.interpolate`${example.arn}/*`],\n },\n {\n Action: [\"sns:Publish\"],\n Effect: \"Allow\",\n Resource: [exampleTopic.arn],\n },\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [exampleVideoStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n output: {\n s3Destination: {\n bucket: example.bucket,\n },\n },\n settings: {\n connectedHome: {\n labels: [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input: {\n kinesisVideoStream: {\n arn: exampleVideoStream.arn,\n },\n },\n notificationChannel: {\n snsTopicArn: exampleTopic.arn,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-bucket\")\nexample_topic = aws.sns.Topic(\"example\", name=\"example-topic\")\nexample_video_stream = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\"s3:PutObject\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example.arn.apply(lambda arn: f\"{arn}/*\")],\n },\n {\n \"Action\": [\"sns:Publish\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_topic.arn],\n },\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example_video_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n output={\n \"s3_destination\": {\n \"bucket\": example.bucket,\n },\n },\n settings={\n \"connected_home\": {\n \"labels\": [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input={\n \"kinesis_video_stream\": {\n \"arn\": example_video_stream.arn,\n },\n },\n notification_channel={\n \"sns_topic_arn\": example_topic.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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-bucket\",\n });\n\n var exampleTopic = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example-topic\",\n });\n\n var exampleVideoStream = new Aws.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"s3:PutObject\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sns:Publish\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleTopic.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleVideoStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n S3Destination = new Aws.Rekognition.Inputs.StreamProcessorOutputS3DestinationArgs\n {\n Bucket = example.Bucket,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n ConnectedHome = new Aws.Rekognition.Inputs.StreamProcessorSettingsConnectedHomeArgs\n {\n Labels = new[]\n {\n \"PERSON\",\n \"PET\",\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = exampleVideoStream.Arn,\n },\n },\n NotificationChannel = new Aws.Rekognition.Inputs.StreamProcessorNotificationChannelArgs\n {\n SnsTopicArn = exampleTopic.Arn,\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/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\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 := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTopic, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example-topic\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVideoStream, err := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\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\": \"sts:AssumeRole\",\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\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleTopic.Arn, exampleVideoStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleTopicArn := _args[1].(string)\n\t\t\t\t\t\texampleVideoStreamArn := _args[2].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleArn),\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"sns:Publish\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleTopicArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleVideoStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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 = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tS3Destination: \u0026rekognition.StreamProcessorOutputS3DestinationArgs{\n\t\t\t\t\tBucket: example.Bucket,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tConnectedHome: \u0026rekognition.StreamProcessorSettingsConnectedHomeArgs{\n\t\t\t\t\tLabels: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"PERSON\"),\n\t\t\t\t\t\tpulumi.String(\"PET\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: exampleVideoStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNotificationChannel: \u0026rekognition.StreamProcessorNotificationChannelArgs{\n\t\t\t\tSnsTopicArn: exampleTopic.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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputS3DestinationArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsConnectedHomeArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorNotificationChannelArgs;\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 BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-bucket\")\n .build());\n\n var exampleTopic = new Topic(\"exampleTopic\", TopicArgs.builder()\n .name(\"example-topic\")\n .build());\n\n var exampleVideoStream = new VideoStream(\"exampleVideoStream\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleTopic.arn(), exampleVideoStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleTopicArn = values.t2;\n var exampleVideoStreamArn = values.t3;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"s3:PutObject\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(String.format(\"%s/*\", exampleArn)))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"sns:Publish\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleTopicArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleVideoStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .s3Destination(StreamProcessorOutputS3DestinationArgs.builder()\n .bucket(example.bucket())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .connectedHome(StreamProcessorSettingsConnectedHomeArgs.builder()\n .labels( \n \"PERSON\",\n \"PET\")\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(exampleVideoStream.arn())\n .build())\n .build())\n .notificationChannel(StreamProcessorNotificationChannelArgs.builder()\n .snsTopicArn(exampleTopic.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-bucket\n exampleTopic:\n type: aws:sns:Topic\n name: example\n properties:\n name: example-topic\n exampleVideoStream:\n type: aws:kinesis:VideoStream\n name: example\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:PutObject\n Effect: Allow\n Resource:\n - ${example.arn}/*\n - Action:\n - sns:Publish\n Effect: Allow\n Resource:\n - ${exampleTopic.arn}\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${exampleVideoStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n output:\n s3Destination:\n bucket: ${example.bucket}\n settings:\n connectedHome:\n labels:\n - PERSON\n - PET\n input:\n kinesisVideoStream:\n arn: ${exampleVideoStream.arn}\n notificationChannel:\n snsTopicArn: ${exampleTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Face Detection 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.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleStream = new aws.kinesis.Stream(\"example\", {\n name: \"pulumi-kinesis-example\",\n shardCount: 1,\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [example.arn],\n },\n {\n Action: [\"kinesis:PutRecord\"],\n Effect: \"Allow\",\n Resource: [exampleStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleCollection = new aws.rekognition.Collection(\"example\", {collectionId: \"example-collection\"});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n regionsOfInterests: [{\n polygons: [\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n ],\n }],\n input: {\n kinesisVideoStream: {\n arn: example.arn,\n },\n },\n output: {\n kinesisDataStream: {\n arn: exampleStream.arn,\n },\n },\n settings: {\n faceSearch: {\n collectionId: exampleCollection.id,\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_stream = aws.kinesis.Stream(\"example\",\n name=\"pulumi-kinesis-example\",\n shard_count=1)\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example.arn],\n },\n {\n \"Action\": [\"kinesis:PutRecord\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_collection = aws.rekognition.Collection(\"example\", collection_id=\"example-collection\")\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n regions_of_interests=[{\n \"polygons\": [\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n ],\n }],\n input={\n \"kinesis_video_stream\": {\n \"arn\": example.arn,\n },\n },\n output={\n \"kinesis_data_stream\": {\n \"arn\": example_stream.arn,\n },\n },\n settings={\n \"face_search\": {\n \"collection_id\": example_collection.id,\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.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleStream = new Aws.Kinesis.Stream(\"example\", new()\n {\n Name = \"pulumi-kinesis-example\",\n ShardCount = 1,\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:PutRecord\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleCollection = new Aws.Rekognition.Collection(\"example\", new()\n {\n CollectionId = \"example-collection\",\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n RegionsOfInterests = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestArgs\n {\n Polygons = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = example.Arn,\n },\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n KinesisDataStream = new Aws.Rekognition.Inputs.StreamProcessorOutputKinesisDataStreamArgs\n {\n Arn = exampleStream.Arn,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n FaceSearch = new Aws.Rekognition.Inputs.StreamProcessorSettingsFaceSearchArgs\n {\n CollectionId = exampleCollection.Id,\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/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\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 := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStream, err := kinesis.NewStream(ctx, \"example\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"pulumi-kinesis-example\"),\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\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\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleStreamArn := _args[1].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:PutRecord\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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\texampleCollection, err := rekognition.NewCollection(ctx, \"example\", \u0026rekognition.CollectionArgs{\n\t\t\tCollectionId: pulumi.String(\"example-collection\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tRegionsOfInterests: rekognition.StreamProcessorRegionsOfInterestArray{\n\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestArgs{\n\t\t\t\t\tPolygons: rekognition.StreamProcessorRegionsOfInterestPolygonArray{\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\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\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: example.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tKinesisDataStream: \u0026rekognition.StreamProcessorOutputKinesisDataStreamArgs{\n\t\t\t\t\tArn: exampleStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tFaceSearch: \u0026rekognition.StreamProcessorSettingsFaceSearchArgs{\n\t\t\t\t\tCollectionId: exampleCollection.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\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.Collection;\nimport com.pulumi.aws.rekognition.CollectionArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorRegionsOfInterestArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputKinesisDataStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsFaceSearchArgs;\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 VideoStream(\"example\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleStream = new Stream(\"exampleStream\", StreamArgs.builder()\n .name(\"pulumi-kinesis-example\")\n .shardCount(1)\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleStreamArn = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"kinesis:PutRecord\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleCollection = new Collection(\"exampleCollection\", CollectionArgs.builder()\n .collectionId(\"example-collection\")\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .regionsOfInterests(StreamProcessorRegionsOfInterestArgs.builder()\n .polygons( \n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(example.arn())\n .build())\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .kinesisDataStream(StreamProcessorOutputKinesisDataStreamArgs.builder()\n .arn(exampleStream.arn())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .faceSearch(StreamProcessorSettingsFaceSearchArgs.builder()\n .collectionId(exampleCollection.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kinesis:VideoStream\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleStream:\n type: aws:kinesis:Stream\n name: example\n properties:\n name: pulumi-kinesis-example\n shardCount: 1\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${example.arn}\n - Action:\n - kinesis:PutRecord\n Effect: Allow\n Resource:\n - ${exampleStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleCollection:\n type: aws:rekognition:Collection\n name: example\n properties:\n collectionId: example-collection\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n regionsOfInterests:\n - polygons:\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n input:\n kinesisVideoStream:\n arn: ${example.arn}\n output:\n kinesisDataStream:\n arn: ${exampleStream.arn}\n settings:\n faceSearch:\n collectionId: ${exampleCollection.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Rekognition Stream Processor using the `name`. For example:\n\n```sh\n$ pulumi import aws:rekognition/streamProcessor:StreamProcessor example my-stream\n```\n", "properties": { "dataSharingPreference": { "$ref": "#/types/aws:rekognition/StreamProcessorDataSharingPreference:StreamProcessorDataSharingPreference", @@ -343057,7 +343057,7 @@ } }, "aws:s3/analyticsConfiguration:AnalyticsConfiguration": { - "description": "Provides a S3 bucket [analytics configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add analytics configuration for entire S3 bucket and export results to a second S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst analytics = new aws.s3.BucketV2(\"analytics\", {bucket: \"analytics-destination\"});\nconst example_entire_bucket = new aws.s3.AnalyticsConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n storageClassAnalysis: {\n dataExport: {\n destination: {\n s3BucketDestination: {\n bucketArn: analytics.arn,\n },\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nanalytics = aws.s3.BucketV2(\"analytics\", bucket=\"analytics-destination\")\nexample_entire_bucket = aws.s3.AnalyticsConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n storage_class_analysis={\n \"data_export\": {\n \"destination\": {\n \"s3_bucket_destination\": {\n \"bucket_arn\": analytics.arn,\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var analytics = new Aws.S3.BucketV2(\"analytics\", new()\n {\n Bucket = \"analytics-destination\",\n });\n\n var example_entire_bucket = new Aws.S3.AnalyticsConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n StorageClassAnalysis = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisArgs\n {\n DataExport = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs\n {\n Destination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs\n {\n S3BucketDestination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs\n {\n BucketArn = analytics.Arn,\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\texample, 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\tanalytics, err := s3.NewBucketV2(ctx, \"analytics\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"analytics-destination\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewAnalyticsConfiguration(ctx, \"example-entire-bucket\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tStorageClassAnalysis: \u0026s3.AnalyticsConfigurationStorageClassAnalysisArgs{\n\t\t\t\tDataExport: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportArgs{\n\t\t\t\t\tDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs{\n\t\t\t\t\t\tS3BucketDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs{\n\t\t\t\t\t\t\tBucketArn: analytics.Arn,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var analytics = new BucketV2(\"analytics\", BucketV2Args.builder()\n .bucket(\"analytics-destination\")\n .build());\n\n var example_entire_bucket = new AnalyticsConfiguration(\"example-entire-bucket\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .storageClassAnalysis(AnalyticsConfigurationStorageClassAnalysisArgs.builder()\n .dataExport(AnalyticsConfigurationStorageClassAnalysisDataExportArgs.builder()\n .destination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs.builder()\n .s3BucketDestination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs.builder()\n .bucketArn(analytics.arn())\n .build())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n storageClassAnalysis:\n dataExport:\n destination:\n s3BucketDestination:\n bucketArn: ${analytics.arn}\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n analytics:\n type: aws:s3:BucketV2\n properties:\n bucket: analytics-destination\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add analytics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.AnalyticsConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.AnalyticsConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.AnalyticsConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.AnalyticsConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAnalyticsConfiguration(ctx, \"example-filtered\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.AnalyticsConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new AnalyticsConfiguration(\"example-filtered\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(AnalyticsConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket analytics configurations using `bucket:analytics`. For example:\n\n```sh\n$ pulumi import aws:s3/analyticsConfiguration:AnalyticsConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides a S3 bucket [analytics configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add analytics configuration for entire S3 bucket and export results to a second S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst analytics = new aws.s3.BucketV2(\"analytics\", {bucket: \"analytics-destination\"});\nconst example_entire_bucket = new aws.s3.AnalyticsConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n storageClassAnalysis: {\n dataExport: {\n destination: {\n s3BucketDestination: {\n bucketArn: analytics.arn,\n },\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nanalytics = aws.s3.BucketV2(\"analytics\", bucket=\"analytics-destination\")\nexample_entire_bucket = aws.s3.AnalyticsConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n storage_class_analysis={\n \"data_export\": {\n \"destination\": {\n \"s3_bucket_destination\": {\n \"bucket_arn\": analytics.arn,\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var analytics = new Aws.S3.BucketV2(\"analytics\", new()\n {\n Bucket = \"analytics-destination\",\n });\n\n var example_entire_bucket = new Aws.S3.AnalyticsConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n StorageClassAnalysis = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisArgs\n {\n DataExport = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs\n {\n Destination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs\n {\n S3BucketDestination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs\n {\n BucketArn = analytics.Arn,\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\texample, 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\tanalytics, err := s3.NewBucketV2(ctx, \"analytics\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"analytics-destination\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewAnalyticsConfiguration(ctx, \"example-entire-bucket\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tStorageClassAnalysis: \u0026s3.AnalyticsConfigurationStorageClassAnalysisArgs{\n\t\t\t\tDataExport: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportArgs{\n\t\t\t\t\tDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs{\n\t\t\t\t\t\tS3BucketDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs{\n\t\t\t\t\t\t\tBucketArn: analytics.Arn,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var analytics = new BucketV2(\"analytics\", BucketV2Args.builder()\n .bucket(\"analytics-destination\")\n .build());\n\n var example_entire_bucket = new AnalyticsConfiguration(\"example-entire-bucket\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .storageClassAnalysis(AnalyticsConfigurationStorageClassAnalysisArgs.builder()\n .dataExport(AnalyticsConfigurationStorageClassAnalysisDataExportArgs.builder()\n .destination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs.builder()\n .s3BucketDestination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs.builder()\n .bucketArn(analytics.arn())\n .build())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n storageClassAnalysis:\n dataExport:\n destination:\n s3BucketDestination:\n bucketArn: ${analytics.arn}\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n analytics:\n type: aws:s3:BucketV2\n properties:\n bucket: analytics-destination\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add analytics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.AnalyticsConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.AnalyticsConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.AnalyticsConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.AnalyticsConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAnalyticsConfiguration(ctx, \"example-filtered\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.AnalyticsConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new AnalyticsConfiguration(\"example-filtered\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(AnalyticsConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket analytics configurations using `bucket:analytics`. For example:\n\n```sh\n$ pulumi import aws:s3/analyticsConfiguration:AnalyticsConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -343734,7 +343734,7 @@ } }, "aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration": { - "description": "Provides an [S3 Intelligent-Tiering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) configuration resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add intelligent tiering configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n tierings: [\n {\n accessTier: \"DEEP_ARCHIVE_ACCESS\",\n days: 180,\n },\n {\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n tierings=[\n {\n \"access_tier\": \"DEEP_ARCHIVE_ACCESS\",\n \"days\": 180,\n },\n {\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"DEEP_ARCHIVE_ACCESS\",\n Days = 180,\n },\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-entire-bucket\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"DEEP_ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(180),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketIntelligentTieringConfiguration(\"example-entire-bucket\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .tierings( \n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"DEEP_ARCHIVE_ACCESS\")\n .days(180)\n .build(),\n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n tierings:\n - accessTier: DEEP_ARCHIVE_ACCESS\n days: 180\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add intelligent tiering configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n status: \"Disabled\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n tierings: [{\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n status=\"Disabled\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\n },\n },\n tierings=[{\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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 = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Status = \"Disabled\",\n Filter = new Aws.S3.Inputs.BucketIntelligentTieringConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\n },\n },\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-filtered\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tStatus: pulumi.String(\"Disabled\"),\n\t\t\tFilter: \u0026s3.BucketIntelligentTieringConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketIntelligentTieringConfiguration(\"example-filtered\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .status(\"Disabled\")\n .filter(BucketIntelligentTieringConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .tierings(BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n status: Disabled\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n tierings:\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket intelligent tiering configurations using `bucket:name`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides an [S3 Intelligent-Tiering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) configuration resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add intelligent tiering configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n tierings: [\n {\n accessTier: \"DEEP_ARCHIVE_ACCESS\",\n days: 180,\n },\n {\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n tierings=[\n {\n \"access_tier\": \"DEEP_ARCHIVE_ACCESS\",\n \"days\": 180,\n },\n {\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"DEEP_ARCHIVE_ACCESS\",\n Days = 180,\n },\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-entire-bucket\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"DEEP_ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(180),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketIntelligentTieringConfiguration(\"example-entire-bucket\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .tierings( \n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"DEEP_ARCHIVE_ACCESS\")\n .days(180)\n .build(),\n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n tierings:\n - accessTier: DEEP_ARCHIVE_ACCESS\n days: 180\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add intelligent tiering configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n status: \"Disabled\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n tierings: [{\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n status=\"Disabled\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\n },\n },\n tierings=[{\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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 = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Status = \"Disabled\",\n Filter = new Aws.S3.Inputs.BucketIntelligentTieringConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\n },\n },\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-filtered\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tStatus: pulumi.String(\"Disabled\"),\n\t\t\tFilter: \u0026s3.BucketIntelligentTieringConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketIntelligentTieringConfiguration(\"example-filtered\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .status(\"Disabled\")\n .filter(BucketIntelligentTieringConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .tierings(BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n status: Disabled\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n tierings:\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket intelligent tiering configurations using `bucket:name`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -343829,7 +343829,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: \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", + "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", @@ -344020,7 +344020,7 @@ } }, "aws:s3/bucketMetric:BucketMetric": { - "description": "Provides a S3 bucket [metrics configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/metrics-configurations.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add metrics configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketMetric(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketMetric(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\")\n```\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 = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketMetric(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\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(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-entire-bucket\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketMetric(\"example-entire-bucket\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-entire-bucket:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: EntireBucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter for S3 Access Point\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: \"example\"});\nconst example_access_point = new aws.s3.AccessPoint(\"example-access-point\", {\n bucket: example.id,\n name: \"example-access-point\",\n});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n accessPoint: example_access_point.arn,\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_access_point = aws.s3.AccessPoint(\"example-access-point\",\n bucket=example.id,\n name=\"example-access-point\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"access_point\": example_access_point.arn,\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_access_point = new Aws.S3.AccessPoint(\"example-access-point\", new()\n {\n Bucket = example.Id,\n Name = \"example-access-point\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n AccessPoint = example_access_point.Arn,\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAccessPoint(ctx, \"example-access-point\", \u0026s3.AccessPointArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"example-access-point\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tAccessPoint: example_access_point.Arn,\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AccessPoint;\nimport com.pulumi.aws.s3.AccessPointArgs;\nimport com.pulumi.aws.s3.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_access_point = new AccessPoint(\"example-access-point\", AccessPointArgs.builder()\n .bucket(example.id())\n .name(\"example-access-point\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .accessPoint(example_access_point.arn())\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-access-point:\n type: aws:s3:AccessPoint\n properties:\n bucket: ${example.id}\n name: example-access-point\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n accessPoint: ${[\"example-access-point\"].arn}\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket metric configurations using `bucket:metric`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketMetric:BucketMetric my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides a S3 bucket [metrics configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/metrics-configurations.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add metrics configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketMetric(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketMetric(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\")\n```\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 = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketMetric(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\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(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-entire-bucket\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketMetric(\"example-entire-bucket\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-entire-bucket:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: EntireBucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter for S3 Access Point\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: \"example\"});\nconst example_access_point = new aws.s3.AccessPoint(\"example-access-point\", {\n bucket: example.id,\n name: \"example-access-point\",\n});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n accessPoint: example_access_point.arn,\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_access_point = aws.s3.AccessPoint(\"example-access-point\",\n bucket=example.id,\n name=\"example-access-point\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"access_point\": example_access_point.arn,\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_access_point = new Aws.S3.AccessPoint(\"example-access-point\", new()\n {\n Bucket = example.Id,\n Name = \"example-access-point\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n AccessPoint = example_access_point.Arn,\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAccessPoint(ctx, \"example-access-point\", \u0026s3.AccessPointArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"example-access-point\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tAccessPoint: example_access_point.Arn,\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AccessPoint;\nimport com.pulumi.aws.s3.AccessPointArgs;\nimport com.pulumi.aws.s3.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_access_point = new AccessPoint(\"example-access-point\", AccessPointArgs.builder()\n .bucket(example.id())\n .name(\"example-access-point\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .accessPoint(example_access_point.arn())\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-access-point:\n type: aws:s3:AccessPoint\n properties:\n bucket: ${example.id}\n name: example-access-point\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n accessPoint: ${[\"example-access-point\"].arn}\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket metric configurations using `bucket:metric`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketMetric:BucketMetric my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -352376,7 +352376,7 @@ } }, "aws:scheduler/schedule:Schedule": { - "description": "Provides an EventBridge Scheduler Schedule resource.\n\nYou can find out more about EventBridge Scheduler in the [User Guide](https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.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 example = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n groupName: \"default\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: exampleAwsSqsQueue.arn,\n roleArn: exampleAwsIamRole.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n group_name=\"default\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": example_aws_sqs_queue[\"arn\"],\n \"role_arn\": example_aws_iam_role[\"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.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n GroupName = \"default\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = exampleAwsSqsQueue.Arn,\n RoleArn = exampleAwsIamRole.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/scheduler\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tGroupName: pulumi.String(\"default\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsSqsQueue.Arn),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.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.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Schedule(\"example\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .groupName(\"default\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(exampleAwsSqsQueue.arn())\n .roleArn(exampleAwsIamRole.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:scheduler:Schedule\n properties:\n name: my-schedule\n groupName: default\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: ${exampleAwsSqsQueue.arn}\n roleArn: ${exampleAwsIamRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Universal Target\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.sqs.Queue(\"example\", {});\nconst exampleSchedule = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n roleArn: exampleAwsIamRole.arn,\n input: pulumi.jsonStringify({\n MessageBody: \"Greetings, programs!\",\n QueueUrl: example.url,\n }),\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sqs.Queue(\"example\")\nexample_schedule = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n \"role_arn\": example_aws_iam_role[\"arn\"],\n \"input\": pulumi.Output.json_dumps({\n \"message_body\": \"Greetings, programs!\",\n \"queue_url\": example.url,\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.Sqs.Queue(\"example\");\n\n var exampleSchedule = new Aws.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n RoleArn = exampleAwsIamRole.Arn,\n Input = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"MessageBody\"] = \"Greetings, programs!\",\n [\"QueueUrl\"] = example.Url,\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/scheduler\"\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\texample, err := sqs.NewQueue(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.String(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\"),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\t\tInput: example.Url.ApplyT(func(url string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"MessageBody\": \"Greetings, programs!\",\n\t\t\t\t\t\t\"QueueUrl\": url,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\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.sqs.Queue;\nimport com.pulumi.aws.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\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 Queue(\"example\");\n\n var exampleSchedule = new Schedule(\"exampleSchedule\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\")\n .roleArn(exampleAwsIamRole.arn())\n .input(example.url().applyValue(url -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"MessageBody\", \"Greetings, programs!\"),\n jsonProperty(\"QueueUrl\", url)\n ))))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sqs:Queue\n exampleSchedule:\n type: aws:scheduler:Schedule\n name: example\n properties:\n name: my-schedule\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: arn:aws:scheduler:::aws-sdk:sqs:sendMessage\n roleArn: ${exampleAwsIamRole.arn}\n input:\n fn::toJSON:\n MessageBody: Greetings, programs!\n QueueUrl: ${example.url}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import schedules using the combination `group_name/name`. For example:\n\n```sh\n$ pulumi import aws:scheduler/schedule:Schedule example my-schedule-group/my-schedule\n```\n", + "description": "Provides an EventBridge Scheduler Schedule resource.\n\nYou can find out more about EventBridge Scheduler in the [User Guide](https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.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 example = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n groupName: \"default\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: exampleAwsSqsQueue.arn,\n roleArn: exampleAwsIamRole.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n group_name=\"default\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": example_aws_sqs_queue[\"arn\"],\n \"role_arn\": example_aws_iam_role[\"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.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n GroupName = \"default\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = exampleAwsSqsQueue.Arn,\n RoleArn = exampleAwsIamRole.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/scheduler\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tGroupName: pulumi.String(\"default\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsSqsQueue.Arn),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.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.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Schedule(\"example\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .groupName(\"default\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(exampleAwsSqsQueue.arn())\n .roleArn(exampleAwsIamRole.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:scheduler:Schedule\n properties:\n name: my-schedule\n groupName: default\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: ${exampleAwsSqsQueue.arn}\n roleArn: ${exampleAwsIamRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Universal Target\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.sqs.Queue(\"example\", {});\nconst exampleSchedule = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n roleArn: exampleAwsIamRole.arn,\n input: pulumi.jsonStringify({\n MessageBody: \"Greetings, programs!\",\n QueueUrl: example.url,\n }),\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sqs.Queue(\"example\")\nexample_schedule = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n \"role_arn\": example_aws_iam_role[\"arn\"],\n \"input\": pulumi.Output.json_dumps({\n \"MessageBody\": \"Greetings, programs!\",\n \"QueueUrl\": example.url,\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.Sqs.Queue(\"example\");\n\n var exampleSchedule = new Aws.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n RoleArn = exampleAwsIamRole.Arn,\n Input = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"MessageBody\"] = \"Greetings, programs!\",\n [\"QueueUrl\"] = example.Url,\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/scheduler\"\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\texample, err := sqs.NewQueue(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.String(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\"),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\t\tInput: example.Url.ApplyT(func(url string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"MessageBody\": \"Greetings, programs!\",\n\t\t\t\t\t\t\"QueueUrl\": url,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\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.sqs.Queue;\nimport com.pulumi.aws.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\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 Queue(\"example\");\n\n var exampleSchedule = new Schedule(\"exampleSchedule\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\")\n .roleArn(exampleAwsIamRole.arn())\n .input(example.url().applyValue(url -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"MessageBody\", \"Greetings, programs!\"),\n jsonProperty(\"QueueUrl\", url)\n ))))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sqs:Queue\n exampleSchedule:\n type: aws:scheduler:Schedule\n name: example\n properties:\n name: my-schedule\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: arn:aws:scheduler:::aws-sdk:sqs:sendMessage\n roleArn: ${exampleAwsIamRole.arn}\n input:\n fn::toJSON:\n MessageBody: Greetings, programs!\n QueueUrl: ${example.url}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import schedules using the combination `group_name/name`. For example:\n\n```sh\n$ pulumi import aws:scheduler/schedule:Schedule example my-schedule-group/my-schedule\n```\n", "properties": { "arn": { "type": "string", @@ -364557,7 +364557,7 @@ } }, "aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager": { - "description": "Resource for managing an AWS SSM Quick Setup Configuration Manager.\n\n## Example Usage\n\n### Patch Policy Configuration 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 currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.ssm.getPatchBaselines({\n defaultBaselines: true,\n});\n// transform the output of the aws_ssm_patch_baselines data source\n// into the format expected by the SelectedPatchBaselines parameter\nconst selectedPatchBaselines = JSON.stringify(example.then(example =\u003e .reduce((__obj, baseline) =\u003e ({ ...__obj, [baseline.operatingSystem]: {\n value: baseline.baselineId,\n label: baseline.baselineName,\n description: baseline.baselineDescription,\n disabled: !baseline.defaultBaseline,\n} }))));\nconst exampleQuicksetupConfigurationManager = new aws.ssm.QuicksetupConfigurationManager(\"example\", {\n name: \"example\",\n configurationDefinition: {\n localDeploymentAdministrationRoleArn: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole`),\n localDeploymentExecutionRoleName: \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n type: \"AWSQuickSetupType-PatchPolicy\",\n parameters: {\n ConfigurationOptionsPatchOperation: \"Scan\",\n ConfigurationOptionsScanValue: \"cron(0 1 * * ? *)\",\n ConfigurationOptionsScanNextInterval: \"false\",\n PatchBaselineRegion: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n PatchBaselineUseDefault: \"default\",\n PatchPolicyName: \"example\",\n SelectedPatchBaselines: selectedPatchBaselines,\n OutputLogEnableS3: \"false\",\n RateControlConcurrency: \"10%\",\n RateControlErrorThreshold: \"2%\",\n IsPolicyAttachAllowed: \"false\",\n TargetAccounts: current.then(current =\u003e current.accountId),\n TargetRegions: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n TargetType: \"*\",\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()\ncurrent_get_region = aws.get_region()\nexample = aws.ssm.get_patch_baselines(default_baselines=True)\n# transform the output of the aws_ssm_patch_baselines data source\n# into the format expected by the SelectedPatchBaselines parameter\nselected_patch_baselines = json.dumps({baseline.operating_system: {\n \"value\": baseline.baseline_id,\n \"label\": baseline.baseline_name,\n \"description\": baseline.baseline_description,\n \"disabled\": not baseline.default_baseline,\n} for baseline in example.baseline_identities})\nexample_quicksetup_configuration_manager = aws.ssm.QuicksetupConfigurationManager(\"example\",\n name=\"example\",\n configuration_definition={\n \"local_deployment_administration_role_arn\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\",\n \"local_deployment_execution_role_name\": \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n \"type\": \"AWSQuickSetupType-PatchPolicy\",\n \"parameters\": {\n \"configuration_options_patch_operation\": \"Scan\",\n \"configuration_options_scan_value\": \"cron(0 1 * * ? *)\",\n \"configuration_options_scan_next_interval\": \"false\",\n \"patch_baseline_region\": current_get_region.name,\n \"patch_baseline_use_default\": \"default\",\n \"patch_policy_name\": \"example\",\n \"selected_patch_baselines\": selected_patch_baselines,\n \"output_log_enable_s3\": \"false\",\n \"rate_control_concurrency\": \"10%\",\n \"rate_control_error_threshold\": \"2%\",\n \"is_policy_attach_allowed\": \"false\",\n \"target_accounts\": current.account_id,\n \"target_regions\": current_get_region.name,\n \"target_type\": \"*\",\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 currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Ssm.GetPatchBaselines.Invoke(new()\n {\n DefaultBaselines = true,\n });\n\n // transform the output of the aws_ssm_patch_baselines data source\n // into the format expected by the SelectedPatchBaselines parameter\n var selectedPatchBaselines = JsonSerializer.Serialize(.ToDictionary(item =\u003e {\n var baseline = item.Value;\n return baseline.OperatingSystem;\n }, item =\u003e {\n var baseline = item.Value;\n return \n {\n { \"value\", baseline.BaselineId },\n { \"label\", baseline.BaselineName },\n { \"description\", baseline.BaselineDescription },\n { \"disabled\", !baseline.DefaultBaseline },\n };\n }));\n\n var exampleQuicksetupConfigurationManager = new Aws.Ssm.QuicksetupConfigurationManager(\"example\", new()\n {\n Name = \"example\",\n ConfigurationDefinition = new Aws.Ssm.Inputs.QuicksetupConfigurationManagerConfigurationDefinitionArgs\n {\n LocalDeploymentAdministrationRoleArn = 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)}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\";\n }),\n LocalDeploymentExecutionRoleName = \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n Type = \"AWSQuickSetupType-PatchPolicy\",\n Parameters = \n {\n { \"ConfigurationOptionsPatchOperation\", \"Scan\" },\n { \"ConfigurationOptionsScanValue\", \"cron(0 1 * * ? *)\" },\n { \"ConfigurationOptionsScanNextInterval\", \"false\" },\n { \"PatchBaselineRegion\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"PatchBaselineUseDefault\", \"default\" },\n { \"PatchPolicyName\", \"example\" },\n { \"SelectedPatchBaselines\", selectedPatchBaselines },\n { \"OutputLogEnableS3\", \"false\" },\n { \"RateControlConcurrency\", \"10%\" },\n { \"RateControlErrorThreshold\", \"2%\" },\n { \"IsPolicyAttachAllowed\", \"false\" },\n { \"TargetAccounts\", current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId) },\n { \"TargetRegions\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"TargetType\", \"*\" },\n },\n },\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Quick Setup Configuration Manager using the `manager_arn`. For example:\n\n```sh\n$ pulumi import aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager example arn:aws:ssm-quicksetup:us-east-1:012345678901:configuration-manager/abcd-1234\n```\n", + "description": "Resource for managing an AWS SSM Quick Setup Configuration Manager.\n\n## Example Usage\n\n### Patch Policy Configuration 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 currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.ssm.getPatchBaselines({\n defaultBaselines: true,\n});\n// transform the output of the aws_ssm_patch_baselines data source\n// into the format expected by the SelectedPatchBaselines parameter\nconst selectedPatchBaselines = JSON.stringify(example.then(example =\u003e .reduce((__obj, baseline) =\u003e ({ ...__obj, [baseline.operatingSystem]: {\n value: baseline.baselineId,\n label: baseline.baselineName,\n description: baseline.baselineDescription,\n disabled: !baseline.defaultBaseline,\n} }))));\nconst exampleQuicksetupConfigurationManager = new aws.ssm.QuicksetupConfigurationManager(\"example\", {\n name: \"example\",\n configurationDefinition: {\n localDeploymentAdministrationRoleArn: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole`),\n localDeploymentExecutionRoleName: \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n type: \"AWSQuickSetupType-PatchPolicy\",\n parameters: {\n ConfigurationOptionsPatchOperation: \"Scan\",\n ConfigurationOptionsScanValue: \"cron(0 1 * * ? *)\",\n ConfigurationOptionsScanNextInterval: \"false\",\n PatchBaselineRegion: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n PatchBaselineUseDefault: \"default\",\n PatchPolicyName: \"example\",\n SelectedPatchBaselines: selectedPatchBaselines,\n OutputLogEnableS3: \"false\",\n RateControlConcurrency: \"10%\",\n RateControlErrorThreshold: \"2%\",\n IsPolicyAttachAllowed: \"false\",\n TargetAccounts: current.then(current =\u003e current.accountId),\n TargetRegions: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n TargetType: \"*\",\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()\ncurrent_get_region = aws.get_region()\nexample = aws.ssm.get_patch_baselines(default_baselines=True)\n# transform the output of the aws_ssm_patch_baselines data source\n# into the format expected by the SelectedPatchBaselines parameter\nselected_patch_baselines = json.dumps({baseline.operating_system: {\n \"value\": baseline.baseline_id,\n \"label\": baseline.baseline_name,\n \"description\": baseline.baseline_description,\n \"disabled\": not baseline.default_baseline,\n} for baseline in example.baseline_identities})\nexample_quicksetup_configuration_manager = aws.ssm.QuicksetupConfigurationManager(\"example\",\n name=\"example\",\n configuration_definition={\n \"local_deployment_administration_role_arn\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\",\n \"local_deployment_execution_role_name\": \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n \"type\": \"AWSQuickSetupType-PatchPolicy\",\n \"parameters\": {\n \"ConfigurationOptionsPatchOperation\": \"Scan\",\n \"ConfigurationOptionsScanValue\": \"cron(0 1 * * ? *)\",\n \"ConfigurationOptionsScanNextInterval\": \"false\",\n \"PatchBaselineRegion\": current_get_region.name,\n \"PatchBaselineUseDefault\": \"default\",\n \"PatchPolicyName\": \"example\",\n \"SelectedPatchBaselines\": selected_patch_baselines,\n \"OutputLogEnableS3\": \"false\",\n \"RateControlConcurrency\": \"10%\",\n \"RateControlErrorThreshold\": \"2%\",\n \"IsPolicyAttachAllowed\": \"false\",\n \"TargetAccounts\": current.account_id,\n \"TargetRegions\": current_get_region.name,\n \"TargetType\": \"*\",\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 currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Ssm.GetPatchBaselines.Invoke(new()\n {\n DefaultBaselines = true,\n });\n\n // transform the output of the aws_ssm_patch_baselines data source\n // into the format expected by the SelectedPatchBaselines parameter\n var selectedPatchBaselines = JsonSerializer.Serialize(.ToDictionary(item =\u003e {\n var baseline = item.Value;\n return baseline.OperatingSystem;\n }, item =\u003e {\n var baseline = item.Value;\n return \n {\n { \"value\", baseline.BaselineId },\n { \"label\", baseline.BaselineName },\n { \"description\", baseline.BaselineDescription },\n { \"disabled\", !baseline.DefaultBaseline },\n };\n }));\n\n var exampleQuicksetupConfigurationManager = new Aws.Ssm.QuicksetupConfigurationManager(\"example\", new()\n {\n Name = \"example\",\n ConfigurationDefinition = new Aws.Ssm.Inputs.QuicksetupConfigurationManagerConfigurationDefinitionArgs\n {\n LocalDeploymentAdministrationRoleArn = 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)}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\";\n }),\n LocalDeploymentExecutionRoleName = \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n Type = \"AWSQuickSetupType-PatchPolicy\",\n Parameters = \n {\n { \"ConfigurationOptionsPatchOperation\", \"Scan\" },\n { \"ConfigurationOptionsScanValue\", \"cron(0 1 * * ? *)\" },\n { \"ConfigurationOptionsScanNextInterval\", \"false\" },\n { \"PatchBaselineRegion\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"PatchBaselineUseDefault\", \"default\" },\n { \"PatchPolicyName\", \"example\" },\n { \"SelectedPatchBaselines\", selectedPatchBaselines },\n { \"OutputLogEnableS3\", \"false\" },\n { \"RateControlConcurrency\", \"10%\" },\n { \"RateControlErrorThreshold\", \"2%\" },\n { \"IsPolicyAttachAllowed\", \"false\" },\n { \"TargetAccounts\", current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId) },\n { \"TargetRegions\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"TargetType\", \"*\" },\n },\n },\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Quick Setup Configuration Manager using the `manager_arn`. For example:\n\n```sh\n$ pulumi import aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager example arn:aws:ssm-quicksetup:us-east-1:012345678901:configuration-manager/abcd-1234\n```\n", "properties": { "configurationDefinition": { "$ref": "#/types/aws:ssm/QuicksetupConfigurationManagerConfigurationDefinition:QuicksetupConfigurationManagerConfigurationDefinition", @@ -365167,7 +365167,7 @@ } }, "aws:ssmincidents/responsePlan:ResponsePlan": { - "description": "Provides a resource to manage response plans 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 = new aws.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With All Fields\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.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n dedupeString: \"dedupe\",\n incidentTags: {\n key: \"value\",\n },\n notificationTargets: [\n {\n snsTopicArn: example1.arn,\n },\n {\n snsTopicArn: example2.arn,\n },\n ],\n summary: \"summary\",\n },\n displayName: \"display name\",\n chatChannels: [topic.arn],\n engagements: [\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action: {\n ssmAutomations: [{\n documentName: document1.name,\n roleArn: role1.arn,\n documentVersion: \"version1\",\n targetAccount: \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n parameters: [\n {\n name: \"key\",\n values: [\n \"value1\",\n \"value2\",\n ],\n },\n {\n name: \"foo\",\n values: [\"bar\"],\n },\n ],\n dynamicParameters: {\n someKey: \"INVOLVED_RESOURCES\",\n anotherKey: \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration: {\n pagerduties: [{\n name: \"pagerdutyIntergration\",\n serviceId: \"example\",\n secretId: \"example\",\n }],\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n \"dedupe_string\": \"dedupe\",\n \"incident_tags\": {\n \"key\": \"value\",\n },\n \"notification_targets\": [\n {\n \"sns_topic_arn\": example1[\"arn\"],\n },\n {\n \"sns_topic_arn\": example2[\"arn\"],\n },\n ],\n \"summary\": \"summary\",\n },\n display_name=\"display name\",\n chat_channels=[topic[\"arn\"]],\n engagements=[\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action={\n \"ssm_automations\": [{\n \"document_name\": document1[\"name\"],\n \"role_arn\": role1[\"arn\"],\n \"document_version\": \"version1\",\n \"target_account\": \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n \"parameters\": [\n {\n \"name\": \"key\",\n \"values\": [\n \"value1\",\n \"value2\",\n ],\n },\n {\n \"name\": \"foo\",\n \"values\": [\"bar\"],\n },\n ],\n \"dynamic_parameters\": {\n \"some_key\": \"INVOLVED_RESOURCES\",\n \"another_key\": \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration={\n \"pagerduties\": [{\n \"name\": \"pagerdutyIntergration\",\n \"service_id\": \"example\",\n \"secret_id\": \"example\",\n }],\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n DedupeString = \"dedupe\",\n IncidentTags = \n {\n { \"key\", \"value\" },\n },\n NotificationTargets = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example1.Arn,\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example2.Arn,\n },\n },\n Summary = \"summary\",\n },\n DisplayName = \"display name\",\n ChatChannels = new[]\n {\n topic.Arn,\n },\n Engagements = new[]\n {\n \"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\",\n },\n Action = new Aws.SsmIncidents.Inputs.ResponsePlanActionArgs\n {\n SsmAutomations = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationArgs\n {\n DocumentName = document1.Name,\n RoleArn = role1.Arn,\n DocumentVersion = \"version1\",\n TargetAccount = \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n Parameters = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"key\",\n Values = new[]\n {\n \"value1\",\n \"value2\",\n },\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"foo\",\n Values = new[]\n {\n \"bar\",\n },\n },\n },\n DynamicParameters = \n {\n { \"someKey\", \"INVOLVED_RESOURCES\" },\n { \"anotherKey\", \"INCIDENT_RECORD_ARN\" },\n },\n },\n },\n },\n Integration = new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationArgs\n {\n Pagerduties = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationPagerdutyArgs\n {\n Name = \"pagerdutyIntergration\",\n ServiceId = \"example\",\n SecretId = \"example\",\n },\n },\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t\tDedupeString: pulumi.String(\"dedupe\"),\n\t\t\t\tIncidentTags: pulumi.StringMap{\n\t\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t\tNotificationTargets: ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example1.Arn),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example2.Arn),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tSummary: pulumi.String(\"summary\"),\n\t\t\t},\n\t\t\tDisplayName: pulumi.String(\"display name\"),\n\t\t\tChatChannels: pulumi.StringArray{\n\t\t\t\ttopic.Arn,\n\t\t\t},\n\t\t\tEngagements: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"),\n\t\t\t},\n\t\t\tAction: \u0026ssmincidents.ResponsePlanActionArgs{\n\t\t\t\tSsmAutomations: ssmincidents.ResponsePlanActionSsmAutomationArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationArgs{\n\t\t\t\t\t\tDocumentName: pulumi.Any(document1.Name),\n\t\t\t\t\t\tRoleArn: pulumi.Any(role1.Arn),\n\t\t\t\t\t\tDocumentVersion: pulumi.String(\"version1\"),\n\t\t\t\t\t\tTargetAccount: pulumi.String(\"RESPONSE_PLAN_OWNER_ACCOUNT\"),\n\t\t\t\t\t\tParameters: ssmincidents.ResponsePlanActionSsmAutomationParameterArray{\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"key\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value1\"),\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value2\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"bar\"),\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\tDynamicParameters: pulumi.StringMap{\n\t\t\t\t\t\t\t\"someKey\": pulumi.String(\"INVOLVED_RESOURCES\"),\n\t\t\t\t\t\t\t\"anotherKey\": pulumi.String(\"INCIDENT_RECORD_ARN\"),\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\tIntegration: \u0026ssmincidents.ResponsePlanIntegrationArgs{\n\t\t\t\tPagerduties: ssmincidents.ResponsePlanIntegrationPagerdutyArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIntegrationPagerdutyArgs{\n\t\t\t\t\t\tName: pulumi.String(\"pagerdutyIntergration\"),\n\t\t\t\t\t\tServiceId: pulumi.String(\"example\"),\n\t\t\t\t\t\tSecretId: pulumi.String(\"example\"),\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\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanActionArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIntegrationArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .dedupeString(\"dedupe\")\n .incidentTags(Map.of(\"key\", \"value\"))\n .notificationTargets( \n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example1.arn())\n .build(),\n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example2.arn())\n .build())\n .summary(\"summary\")\n .build())\n .displayName(\"display name\")\n .chatChannels(topic.arn())\n .engagements(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\")\n .action(ResponsePlanActionArgs.builder()\n .ssmAutomations(ResponsePlanActionSsmAutomationArgs.builder()\n .documentName(document1.name())\n .roleArn(role1.arn())\n .documentVersion(\"version1\")\n .targetAccount(\"RESPONSE_PLAN_OWNER_ACCOUNT\")\n .parameters( \n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"key\")\n .values( \n \"value1\",\n \"value2\")\n .build(),\n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"foo\")\n .values(\"bar\")\n .build())\n .dynamicParameters(Map.ofEntries(\n Map.entry(\"someKey\", \"INVOLVED_RESOURCES\"),\n Map.entry(\"anotherKey\", \"INCIDENT_RECORD_ARN\")\n ))\n .build())\n .build())\n .integration(ResponsePlanIntegrationArgs.builder()\n .pagerduties(ResponsePlanIntegrationPagerdutyArgs.builder()\n .name(\"pagerdutyIntergration\")\n .serviceId(\"example\")\n .secretId(\"example\")\n .build())\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n dedupeString: dedupe\n incidentTags:\n key: value\n notificationTargets:\n - snsTopicArn: ${example1.arn}\n - snsTopicArn: ${example2.arn}\n summary: summary\n displayName: display name\n chatChannels:\n - ${topic.arn}\n engagements:\n - arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\n action:\n ssmAutomations:\n - documentName: ${document1.name}\n roleArn: ${role1.arn}\n documentVersion: version1\n targetAccount: RESPONSE_PLAN_OWNER_ACCOUNT\n parameters:\n - name: key\n values:\n - value1\n - value2\n - name: foo\n values:\n - bar\n dynamicParameters:\n someKey: INVOLVED_RESOURCES\n anotherKey: INCIDENT_RECORD_ARN\n integration:\n pagerduties:\n - name: pagerdutyIntergration\n serviceId: example\n secretId: example\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an Incident Manager response plan using the response plan ARN. You can find the response plan ARN in the AWS Management Console. For example:\n\n```sh\n$ pulumi import aws:ssmincidents/responsePlan:ResponsePlan responsePlanName ARNValue\n```\n", + "description": "Provides a resource to manage response plans 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 = new aws.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With All Fields\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.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n dedupeString: \"dedupe\",\n incidentTags: {\n key: \"value\",\n },\n notificationTargets: [\n {\n snsTopicArn: example1.arn,\n },\n {\n snsTopicArn: example2.arn,\n },\n ],\n summary: \"summary\",\n },\n displayName: \"display name\",\n chatChannels: [topic.arn],\n engagements: [\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action: {\n ssmAutomations: [{\n documentName: document1.name,\n roleArn: role1.arn,\n documentVersion: \"version1\",\n targetAccount: \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n parameters: [\n {\n name: \"key\",\n values: [\n \"value1\",\n \"value2\",\n ],\n },\n {\n name: \"foo\",\n values: [\"bar\"],\n },\n ],\n dynamicParameters: {\n someKey: \"INVOLVED_RESOURCES\",\n anotherKey: \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration: {\n pagerduties: [{\n name: \"pagerdutyIntergration\",\n serviceId: \"example\",\n secretId: \"example\",\n }],\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n \"dedupe_string\": \"dedupe\",\n \"incident_tags\": {\n \"key\": \"value\",\n },\n \"notification_targets\": [\n {\n \"sns_topic_arn\": example1[\"arn\"],\n },\n {\n \"sns_topic_arn\": example2[\"arn\"],\n },\n ],\n \"summary\": \"summary\",\n },\n display_name=\"display name\",\n chat_channels=[topic[\"arn\"]],\n engagements=[\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action={\n \"ssm_automations\": [{\n \"document_name\": document1[\"name\"],\n \"role_arn\": role1[\"arn\"],\n \"document_version\": \"version1\",\n \"target_account\": \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n \"parameters\": [\n {\n \"name\": \"key\",\n \"values\": [\n \"value1\",\n \"value2\",\n ],\n },\n {\n \"name\": \"foo\",\n \"values\": [\"bar\"],\n },\n ],\n \"dynamic_parameters\": {\n \"someKey\": \"INVOLVED_RESOURCES\",\n \"anotherKey\": \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration={\n \"pagerduties\": [{\n \"name\": \"pagerdutyIntergration\",\n \"service_id\": \"example\",\n \"secret_id\": \"example\",\n }],\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n DedupeString = \"dedupe\",\n IncidentTags = \n {\n { \"key\", \"value\" },\n },\n NotificationTargets = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example1.Arn,\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example2.Arn,\n },\n },\n Summary = \"summary\",\n },\n DisplayName = \"display name\",\n ChatChannels = new[]\n {\n topic.Arn,\n },\n Engagements = new[]\n {\n \"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\",\n },\n Action = new Aws.SsmIncidents.Inputs.ResponsePlanActionArgs\n {\n SsmAutomations = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationArgs\n {\n DocumentName = document1.Name,\n RoleArn = role1.Arn,\n DocumentVersion = \"version1\",\n TargetAccount = \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n Parameters = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"key\",\n Values = new[]\n {\n \"value1\",\n \"value2\",\n },\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"foo\",\n Values = new[]\n {\n \"bar\",\n },\n },\n },\n DynamicParameters = \n {\n { \"someKey\", \"INVOLVED_RESOURCES\" },\n { \"anotherKey\", \"INCIDENT_RECORD_ARN\" },\n },\n },\n },\n },\n Integration = new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationArgs\n {\n Pagerduties = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationPagerdutyArgs\n {\n Name = \"pagerdutyIntergration\",\n ServiceId = \"example\",\n SecretId = \"example\",\n },\n },\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t\tDedupeString: pulumi.String(\"dedupe\"),\n\t\t\t\tIncidentTags: pulumi.StringMap{\n\t\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t\tNotificationTargets: ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example1.Arn),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example2.Arn),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tSummary: pulumi.String(\"summary\"),\n\t\t\t},\n\t\t\tDisplayName: pulumi.String(\"display name\"),\n\t\t\tChatChannels: pulumi.StringArray{\n\t\t\t\ttopic.Arn,\n\t\t\t},\n\t\t\tEngagements: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"),\n\t\t\t},\n\t\t\tAction: \u0026ssmincidents.ResponsePlanActionArgs{\n\t\t\t\tSsmAutomations: ssmincidents.ResponsePlanActionSsmAutomationArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationArgs{\n\t\t\t\t\t\tDocumentName: pulumi.Any(document1.Name),\n\t\t\t\t\t\tRoleArn: pulumi.Any(role1.Arn),\n\t\t\t\t\t\tDocumentVersion: pulumi.String(\"version1\"),\n\t\t\t\t\t\tTargetAccount: pulumi.String(\"RESPONSE_PLAN_OWNER_ACCOUNT\"),\n\t\t\t\t\t\tParameters: ssmincidents.ResponsePlanActionSsmAutomationParameterArray{\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"key\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value1\"),\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value2\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"bar\"),\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\tDynamicParameters: pulumi.StringMap{\n\t\t\t\t\t\t\t\"someKey\": pulumi.String(\"INVOLVED_RESOURCES\"),\n\t\t\t\t\t\t\t\"anotherKey\": pulumi.String(\"INCIDENT_RECORD_ARN\"),\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\tIntegration: \u0026ssmincidents.ResponsePlanIntegrationArgs{\n\t\t\t\tPagerduties: ssmincidents.ResponsePlanIntegrationPagerdutyArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIntegrationPagerdutyArgs{\n\t\t\t\t\t\tName: pulumi.String(\"pagerdutyIntergration\"),\n\t\t\t\t\t\tServiceId: pulumi.String(\"example\"),\n\t\t\t\t\t\tSecretId: pulumi.String(\"example\"),\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\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanActionArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIntegrationArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .dedupeString(\"dedupe\")\n .incidentTags(Map.of(\"key\", \"value\"))\n .notificationTargets( \n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example1.arn())\n .build(),\n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example2.arn())\n .build())\n .summary(\"summary\")\n .build())\n .displayName(\"display name\")\n .chatChannels(topic.arn())\n .engagements(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\")\n .action(ResponsePlanActionArgs.builder()\n .ssmAutomations(ResponsePlanActionSsmAutomationArgs.builder()\n .documentName(document1.name())\n .roleArn(role1.arn())\n .documentVersion(\"version1\")\n .targetAccount(\"RESPONSE_PLAN_OWNER_ACCOUNT\")\n .parameters( \n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"key\")\n .values( \n \"value1\",\n \"value2\")\n .build(),\n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"foo\")\n .values(\"bar\")\n .build())\n .dynamicParameters(Map.ofEntries(\n Map.entry(\"someKey\", \"INVOLVED_RESOURCES\"),\n Map.entry(\"anotherKey\", \"INCIDENT_RECORD_ARN\")\n ))\n .build())\n .build())\n .integration(ResponsePlanIntegrationArgs.builder()\n .pagerduties(ResponsePlanIntegrationPagerdutyArgs.builder()\n .name(\"pagerdutyIntergration\")\n .serviceId(\"example\")\n .secretId(\"example\")\n .build())\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n dedupeString: dedupe\n incidentTags:\n key: value\n notificationTargets:\n - snsTopicArn: ${example1.arn}\n - snsTopicArn: ${example2.arn}\n summary: summary\n displayName: display name\n chatChannels:\n - ${topic.arn}\n engagements:\n - arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\n action:\n ssmAutomations:\n - documentName: ${document1.name}\n roleArn: ${role1.arn}\n documentVersion: version1\n targetAccount: RESPONSE_PLAN_OWNER_ACCOUNT\n parameters:\n - name: key\n values:\n - value1\n - value2\n - name: foo\n values:\n - bar\n dynamicParameters:\n someKey: INVOLVED_RESOURCES\n anotherKey: INCIDENT_RECORD_ARN\n integration:\n pagerduties:\n - name: pagerdutyIntergration\n serviceId: example\n secretId: example\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an Incident Manager response plan using the response plan ARN. You can find the response plan ARN in the AWS Management Console. For example:\n\n```sh\n$ pulumi import aws:ssmincidents/responsePlan:ResponsePlan responsePlanName ARNValue\n```\n", "properties": { "action": { "$ref": "#/types/aws:ssmincidents/ResponsePlanAction:ResponsePlanAction" diff --git a/provider/cmd/pulumi-resource-aws/schema.json b/provider/cmd/pulumi-resource-aws/schema.json index f2c1872f50b..b4282b7b821 100644 --- a/provider/cmd/pulumi-resource-aws/schema.json +++ b/provider/cmd/pulumi-resource-aws/schema.json @@ -174068,7 +174068,7 @@ } }, "aws:amplify/branch:Branch": { - "description": "Provides an Amplify Branch 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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n framework: \"React\",\n stage: \"PRODUCTION\",\n environmentVariables: {\n REACT_APP_API_SERVER: \"https://api.example.com\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n framework=\"React\",\n stage=\"PRODUCTION\",\n environment_variables={\n \"REACT_APP_API_SERVER\": \"https://api.example.com\",\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n Framework = \"React\",\n Stage = \"PRODUCTION\",\n EnvironmentVariables = \n {\n { \"REACT_APP_API_SERVER\", \"https://api.example.com\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify\"\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 := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tFramework: pulumi.String(\"React\"),\n\t\t\tStage: pulumi.String(\"PRODUCTION\"),\n\t\t\tEnvironmentVariables: pulumi.StringMap{\n\t\t\t\t\"REACT_APP_API_SERVER\": pulumi.String(\"https://api.example.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .framework(\"React\")\n .stage(\"PRODUCTION\")\n .environmentVariables(Map.of(\"REACT_APP_API_SERVER\", \"https://api.example.com\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n framework: React\n stage: PRODUCTION\n environmentVariables:\n REACT_APP_API_SERVER: https://api.example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic Authentication\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableBasicAuth: true,\n basicAuthCredentials: std.base64encode({\n input: \"username:password\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_basic_auth=True,\n basic_auth_credentials=std.base64encode(input=\"username:password\").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 example = new Aws.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableBasicAuth = true,\n BasicAuthCredentials = Std.Base64encode.Invoke(new()\n {\n Input = \"username:password\",\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/amplify\"\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\texample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeBase64encode, err := std.Base64encode(ctx, \u0026std.Base64encodeArgs{\n\t\t\tInput: \"username:password\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tEnableBasicAuth: pulumi.Bool(true),\n\t\t\tBasicAuthCredentials: pulumi.String(invokeBase64encode.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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableBasicAuth(true)\n .basicAuthCredentials(StdFunctions.base64encode(Base64encodeArgs.builder()\n .input(\"username:password\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableBasicAuth: true\n basicAuthCredentials:\n fn::invoke:\n Function: std:base64encode\n Arguments:\n input: username:password\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Notifications\n\nAmplify Console uses EventBridge (formerly known as CloudWatch Events) and SNS for email notifications. To implement the same functionality, you need to set `enable_notification` in a `aws.amplify.Branch` resource, as well as creating an EventBridge Rule, an SNS topic, and SNS subscriptions.\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableNotification: true,\n});\n// EventBridge Rule for Amplify notifications\nconst amplifyAppMasterEventRule = new aws.cloudwatch.EventRule(\"amplify_app_master\", {\n name: pulumi.interpolate`amplify-${app.id}-${master.branchName}-branch-notification`,\n description: pulumi.interpolate`AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}`,\n eventPattern: pulumi.jsonStringify({\n detail: {\n appId: [example.id],\n branchName: [master.branchName],\n jobStatus: [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n source: [\"aws.amplify\"],\n }),\n});\n// SNS Topic for Amplify notifications\nconst amplifyAppMasterTopic = new aws.sns.Topic(\"amplify_app_master\", {name: pulumi.interpolate`amplify-${app.id}_${master.branchName}`});\nconst amplifyAppMasterEventTarget = new aws.cloudwatch.EventTarget(\"amplify_app_master\", {\n rule: amplifyAppMasterEventRule.name,\n targetId: master.branchName,\n arn: amplifyAppMasterTopic.arn,\n inputTransformer: {\n inputPaths: {\n jobId: \"$.detail.jobId\",\n appId: \"$.detail.appId\",\n region: \"$.region\",\n branch: \"$.detail.branchName\",\n status: \"$.detail.jobStatus\",\n },\n inputTemplate: \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n});\nconst amplifyAppMaster = pulumi.all([master.arn, amplifyAppMasterTopic.arn]).apply(([masterArn, amplifyAppMasterTopicArn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: `Allow_Publish_Events ${masterArn}`,\n effect: \"Allow\",\n actions: [\"SNS:Publish\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n resources: [amplifyAppMasterTopicArn],\n }],\n}));\nconst amplifyAppMasterTopicPolicy = new aws.sns.TopicPolicy(\"amplify_app_master\", {\n arn: amplifyAppMasterTopic.arn,\n policy: amplifyAppMaster.apply(amplifyAppMaster =\u003e amplifyAppMaster.json),\n});\nconst _this = new aws.sns.TopicSubscription(\"this\", {\n topic: amplifyAppMasterTopic.arn,\n protocol: \"email\",\n endpoint: \"user@acme.com\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_notification=True)\n# EventBridge Rule for Amplify notifications\namplify_app_master_event_rule = aws.cloudwatch.EventRule(\"amplify_app_master\",\n name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}-{branch_name}-branch-notification\"),\n description=master.branch_name.apply(lambda branch_name: f\"AWS Amplify build notifications for : App: {app['id']} Branch: {branch_name}\"),\n event_pattern=pulumi.Output.json_dumps({\n \"detail\": {\n \"appId\": [example.id],\n \"branchName\": [master.branch_name],\n \"jobStatus\": [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n \"source\": [\"aws.amplify\"],\n }))\n# SNS Topic for Amplify notifications\namplify_app_master_topic = aws.sns.Topic(\"amplify_app_master\", name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}_{branch_name}\"))\namplify_app_master_event_target = aws.cloudwatch.EventTarget(\"amplify_app_master\",\n rule=amplify_app_master_event_rule.name,\n target_id=master.branch_name,\n arn=amplify_app_master_topic.arn,\n input_transformer={\n \"input_paths\": {\n \"job_id\": \"$.detail.jobId\",\n \"app_id\": \"$.detail.appId\",\n \"region\": \"$.region\",\n \"branch\": \"$.detail.branchName\",\n \"status\": \"$.detail.jobStatus\",\n },\n \"input_template\": \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n })\namplify_app_master = pulumi.Output.all(\n masterArn=master.arn,\n amplifyAppMasterTopicArn=amplify_app_master_topic.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[{\n \"sid\": f\"Allow_Publish_Events {resolved_outputs['masterArn']}\",\n \"effect\": \"Allow\",\n \"actions\": [\"SNS:Publish\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"resources\": [%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)],\n}]))\n\namplify_app_master_topic_policy = aws.sns.TopicPolicy(\"amplify_app_master\",\n arn=amplify_app_master_topic.arn,\n policy=amplify_app_master.json)\nthis = aws.sns.TopicSubscription(\"this\",\n topic=amplify_app_master_topic.arn,\n protocol=\"email\",\n endpoint=\"user@acme.com\")\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableNotification = true,\n });\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new Aws.CloudWatch.EventRule(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}-{branchName}-branch-notification\"),\n Description = master.BranchName.Apply(branchName =\u003e $\"AWS Amplify build notifications for : App: {app.Id} Branch: {branchName}\"),\n EventPattern = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"detail\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"appId\"] = new[]\n {\n example.Id,\n },\n [\"branchName\"] = new[]\n {\n master.BranchName,\n },\n [\"jobStatus\"] = new[]\n {\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n },\n },\n [\"detail-type\"] = new[]\n {\n \"Amplify Deployment Status Change\",\n },\n [\"source\"] = new[]\n {\n \"aws.amplify\",\n },\n })),\n });\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Aws.Sns.Topic(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}_{branchName}\"),\n });\n\n var amplifyAppMasterEventTarget = new Aws.CloudWatch.EventTarget(\"amplify_app_master\", new()\n {\n Rule = amplifyAppMasterEventRule.Name,\n TargetId = master.BranchName,\n Arn = amplifyAppMasterTopic.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"jobId\", \"$.detail.jobId\" },\n { \"appId\", \"$.detail.appId\" },\n { \"region\", \"$.region\" },\n { \"branch\", \"$.detail.branchName\" },\n { \"status\", \"$.detail.jobStatus\" },\n },\n InputTemplate = \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n });\n\n var amplifyAppMaster = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = $\"Allow_Publish_Events {master.Arn}\",\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Publish\",\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 Resources = new[]\n {\n amplifyAppMasterTopic.Arn,\n },\n },\n },\n });\n\n var amplifyAppMasterTopicPolicy = new Aws.Sns.TopicPolicy(\"amplify_app_master\", new()\n {\n Arn = amplifyAppMasterTopic.Arn,\n Policy = amplifyAppMaster.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var @this = new Aws.Sns.TopicSubscription(\"this\", new()\n {\n Topic = amplifyAppMasterTopic.Arn,\n Protocol = \"email\",\n Endpoint = \"user@acme.com\",\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/amplify\"\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/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\nName: pulumi.String(\"app\"),\n})\nif err != nil {\nreturn err\n}\nmaster, err := amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\nAppId: example.ID(),\nBranchName: pulumi.String(\"master\"),\nEnableNotification: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\n// EventBridge Rule for Amplify notifications\namplifyAppMasterEventRule, err := cloudwatch.NewEventRule(ctx, \"amplify_app_master\", \u0026cloudwatch.EventRuleArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v-%v-branch-notification\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nDescription: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"AWS Amplify build notifications for : App: %v Branch: %v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nEventPattern: pulumi.All(example.ID(),master.BranchName).ApplyT(func(_args []interface{}) (string, error) {\nid := _args[0].(string)\nbranchName := _args[1].(string)\nvar _zero string\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"detail\": map[string]interface{}{\n\"appId\": []string{\nid,\n},\n\"branchName\": []string{\nbranchName,\n},\n\"jobStatus\": []string{\n\"SUCCEED\",\n\"FAILED\",\n\"STARTED\",\n},\n},\n\"detail-type\": []string{\n\"Amplify Deployment Status Change\",\n},\n\"source\": []string{\n\"aws.amplify\",\n},\n})\nif err != nil {\nreturn _zero, err\n}\njson0 := string(tmpJSON0)\nreturn json0, nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n// SNS Topic for Amplify notifications\namplifyAppMasterTopic, err := sns.NewTopic(ctx, \"amplify_app_master\", \u0026sns.TopicArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v_%v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n_, err = cloudwatch.NewEventTarget(ctx, \"amplify_app_master\", \u0026cloudwatch.EventTargetArgs{\nRule: amplifyAppMasterEventRule.Name,\nTargetId: master.BranchName,\nArn: amplifyAppMasterTopic.Arn,\nInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\nInputPaths: pulumi.StringMap{\n\"jobId\": pulumi.String(\"$.detail.jobId\"),\n\"appId\": pulumi.String(\"$.detail.appId\"),\n\"region\": pulumi.String(\"$.region\"),\n\"branch\": pulumi.String(\"$.detail.branchName\"),\n\"status\": pulumi.String(\"$.detail.jobStatus\"),\n},\nInputTemplate: pulumi.String(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\"),\n},\n})\nif err != nil {\nreturn err\n}\namplifyAppMaster := pulumi.All(master.Arn,amplifyAppMasterTopic.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nmasterArn := _args[0].(string)\namplifyAppMasterTopicArn := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: fmt.Sprintf(\"Allow_Publish_Events %v\", masterArn),\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Publish\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nResources: interface{}{\namplifyAppMasterTopicArn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"amplify_app_master\", \u0026sns.TopicPolicyArgs{\nArn: amplifyAppMasterTopic.Arn,\nPolicy: pulumi.String(amplifyAppMaster.ApplyT(func(amplifyAppMaster iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026amplifyAppMaster.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = sns.NewTopicSubscription(ctx, \"this\", \u0026sns.TopicSubscriptionArgs{\nTopic: amplifyAppMasterTopic.Arn,\nProtocol: pulumi.String(\"email\"),\nEndpoint: pulumi.String(\"user@acme.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\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 com.pulumi.aws.sns.TopicSubscription;\nimport com.pulumi.aws.sns.TopicSubscriptionArgs;\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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableNotification(true)\n .build());\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new EventRule(\"amplifyAppMasterEventRule\", EventRuleArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s-%s-branch-notification\", app.id(),branchName)))\n .description(master.branchName().applyValue(branchName -\u003e String.format(\"AWS Amplify build notifications for : App: %s Branch: %s\", app.id(),branchName)))\n .eventPattern(Output.tuple(example.id(), master.branchName()).applyValue(values -\u003e {\n var id = values.t1;\n var branchName = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"detail\", jsonObject(\n jsonProperty(\"appId\", jsonArray(id)),\n jsonProperty(\"branchName\", jsonArray(branchName)),\n jsonProperty(\"jobStatus\", jsonArray(\n \"SUCCEED\", \n \"FAILED\", \n \"STARTED\"\n ))\n )),\n jsonProperty(\"detail-type\", jsonArray(\"Amplify Deployment Status Change\")),\n jsonProperty(\"source\", jsonArray(\"aws.amplify\"))\n ));\n }))\n .build());\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Topic(\"amplifyAppMasterTopic\", TopicArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s_%s\", app.id(),branchName)))\n .build());\n\n var amplifyAppMasterEventTarget = new EventTarget(\"amplifyAppMasterEventTarget\", EventTargetArgs.builder()\n .rule(amplifyAppMasterEventRule.name())\n .targetId(master.branchName())\n .arn(amplifyAppMasterTopic.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"jobId\", \"$.detail.jobId\"),\n Map.entry(\"appId\", \"$.detail.appId\"),\n Map.entry(\"region\", \"$.region\"),\n Map.entry(\"branch\", \"$.detail.branchName\"),\n Map.entry(\"status\", \"$.detail.jobStatus\")\n ))\n .inputTemplate(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\")\n .build())\n .build());\n\n final var amplifyAppMaster = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(master.arn().applyValue(arn -\u003e String.format(\"Allow_Publish_Events %s\", arn)))\n .effect(\"Allow\")\n .actions(\"SNS:Publish\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .resources(amplifyAppMasterTopic.arn())\n .build())\n .build());\n\n var amplifyAppMasterTopicPolicy = new TopicPolicy(\"amplifyAppMasterTopicPolicy\", TopicPolicyArgs.builder()\n .arn(amplifyAppMasterTopic.arn())\n .policy(amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(amplifyAppMaster -\u003e amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var this_ = new TopicSubscription(\"this\", TopicSubscriptionArgs.builder()\n .topic(amplifyAppMasterTopic.arn())\n .protocol(\"email\")\n .endpoint(\"user@acme.com\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableNotification: true\n # EventBridge Rule for Amplify notifications\n amplifyAppMasterEventRule:\n type: aws:cloudwatch:EventRule\n name: amplify_app_master\n properties:\n name: amplify-${app.id}-${master.branchName}-branch-notification\n description: 'AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}'\n eventPattern:\n fn::toJSON:\n detail:\n appId:\n - ${example.id}\n branchName:\n - ${master.branchName}\n jobStatus:\n - SUCCEED\n - FAILED\n - STARTED\n detail-type:\n - Amplify Deployment Status Change\n source:\n - aws.amplify\n amplifyAppMasterEventTarget:\n type: aws:cloudwatch:EventTarget\n name: amplify_app_master\n properties:\n rule: ${amplifyAppMasterEventRule.name}\n targetId: ${master.branchName}\n arn: ${amplifyAppMasterTopic.arn}\n inputTransformer:\n inputPaths:\n jobId: $.detail.jobId\n appId: $.detail.appId\n region: $.region\n branch: $.detail.branchName\n status: $.detail.jobStatus\n inputTemplate: '\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \"'\n # SNS Topic for Amplify notifications\n amplifyAppMasterTopic:\n type: aws:sns:Topic\n name: amplify_app_master\n properties:\n name: amplify-${app.id}_${master.branchName}\n amplifyAppMasterTopicPolicy:\n type: aws:sns:TopicPolicy\n name: amplify_app_master\n properties:\n arn: ${amplifyAppMasterTopic.arn}\n policy: ${amplifyAppMaster.json}\n this:\n type: aws:sns:TopicSubscription\n properties:\n topic: ${amplifyAppMasterTopic.arn}\n protocol: email\n endpoint: user@acme.com\nvariables:\n amplifyAppMaster:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow_Publish_Events ${master.arn}\n effect: Allow\n actions:\n - SNS:Publish\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n resources:\n - ${amplifyAppMasterTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amplify branch using `app_id` and `branch_name`. For example:\n\n```sh\n$ pulumi import aws:amplify/branch:Branch master d2ypk4k47z8u6/master\n```\n", + "description": "Provides an Amplify Branch 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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n framework: \"React\",\n stage: \"PRODUCTION\",\n environmentVariables: {\n REACT_APP_API_SERVER: \"https://api.example.com\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n framework=\"React\",\n stage=\"PRODUCTION\",\n environment_variables={\n \"REACT_APP_API_SERVER\": \"https://api.example.com\",\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n Framework = \"React\",\n Stage = \"PRODUCTION\",\n EnvironmentVariables = \n {\n { \"REACT_APP_API_SERVER\", \"https://api.example.com\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify\"\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 := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tFramework: pulumi.String(\"React\"),\n\t\t\tStage: pulumi.String(\"PRODUCTION\"),\n\t\t\tEnvironmentVariables: pulumi.StringMap{\n\t\t\t\t\"REACT_APP_API_SERVER\": pulumi.String(\"https://api.example.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .framework(\"React\")\n .stage(\"PRODUCTION\")\n .environmentVariables(Map.of(\"REACT_APP_API_SERVER\", \"https://api.example.com\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n framework: React\n stage: PRODUCTION\n environmentVariables:\n REACT_APP_API_SERVER: https://api.example.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic Authentication\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableBasicAuth: true,\n basicAuthCredentials: std.base64encode({\n input: \"username:password\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_basic_auth=True,\n basic_auth_credentials=std.base64encode(input=\"username:password\").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 example = new Aws.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableBasicAuth = true,\n BasicAuthCredentials = Std.Base64encode.Invoke(new()\n {\n Input = \"username:password\",\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/amplify\"\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\texample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\n\t\t\tName: pulumi.String(\"app\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeBase64encode, err := std.Base64encode(ctx, \u0026std.Base64encodeArgs{\n\t\t\tInput: \"username:password\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\n\t\t\tAppId: example.ID(),\n\t\t\tBranchName: pulumi.String(\"master\"),\n\t\t\tEnableBasicAuth: pulumi.Bool(true),\n\t\t\tBasicAuthCredentials: pulumi.String(invokeBase64encode.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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableBasicAuth(true)\n .basicAuthCredentials(StdFunctions.base64encode(Base64encodeArgs.builder()\n .input(\"username:password\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableBasicAuth: true\n basicAuthCredentials:\n fn::invoke:\n Function: std:base64encode\n Arguments:\n input: username:password\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Notifications\n\nAmplify Console uses EventBridge (formerly known as CloudWatch Events) and SNS for email notifications. To implement the same functionality, you need to set `enable_notification` in a `aws.amplify.Branch` resource, as well as creating an EventBridge Rule, an SNS topic, and SNS subscriptions.\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.amplify.App(\"example\", {name: \"app\"});\nconst master = new aws.amplify.Branch(\"master\", {\n appId: example.id,\n branchName: \"master\",\n enableNotification: true,\n});\n// EventBridge Rule for Amplify notifications\nconst amplifyAppMasterEventRule = new aws.cloudwatch.EventRule(\"amplify_app_master\", {\n name: pulumi.interpolate`amplify-${app.id}-${master.branchName}-branch-notification`,\n description: pulumi.interpolate`AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}`,\n eventPattern: pulumi.jsonStringify({\n detail: {\n appId: [example.id],\n branchName: [master.branchName],\n jobStatus: [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n source: [\"aws.amplify\"],\n }),\n});\n// SNS Topic for Amplify notifications\nconst amplifyAppMasterTopic = new aws.sns.Topic(\"amplify_app_master\", {name: pulumi.interpolate`amplify-${app.id}_${master.branchName}`});\nconst amplifyAppMasterEventTarget = new aws.cloudwatch.EventTarget(\"amplify_app_master\", {\n rule: amplifyAppMasterEventRule.name,\n targetId: master.branchName,\n arn: amplifyAppMasterTopic.arn,\n inputTransformer: {\n inputPaths: {\n jobId: \"$.detail.jobId\",\n appId: \"$.detail.appId\",\n region: \"$.region\",\n branch: \"$.detail.branchName\",\n status: \"$.detail.jobStatus\",\n },\n inputTemplate: \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n});\nconst amplifyAppMaster = pulumi.all([master.arn, amplifyAppMasterTopic.arn]).apply(([masterArn, amplifyAppMasterTopicArn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: `Allow_Publish_Events ${masterArn}`,\n effect: \"Allow\",\n actions: [\"SNS:Publish\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n resources: [amplifyAppMasterTopicArn],\n }],\n}));\nconst amplifyAppMasterTopicPolicy = new aws.sns.TopicPolicy(\"amplify_app_master\", {\n arn: amplifyAppMasterTopic.arn,\n policy: amplifyAppMaster.apply(amplifyAppMaster =\u003e amplifyAppMaster.json),\n});\nconst _this = new aws.sns.TopicSubscription(\"this\", {\n topic: amplifyAppMasterTopic.arn,\n protocol: \"email\",\n endpoint: \"user@acme.com\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.amplify.App(\"example\", name=\"app\")\nmaster = aws.amplify.Branch(\"master\",\n app_id=example.id,\n branch_name=\"master\",\n enable_notification=True)\n# EventBridge Rule for Amplify notifications\namplify_app_master_event_rule = aws.cloudwatch.EventRule(\"amplify_app_master\",\n name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}-{branch_name}-branch-notification\"),\n description=master.branch_name.apply(lambda branch_name: f\"AWS Amplify build notifications for : App: {app['id']} Branch: {branch_name}\"),\n event_pattern=pulumi.Output.json_dumps({\n \"detail\": {\n \"appId\": [example.id],\n \"branchName\": [master.branch_name],\n \"jobStatus\": [\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n ],\n },\n \"detail-type\": [\"Amplify Deployment Status Change\"],\n \"source\": [\"aws.amplify\"],\n }))\n# SNS Topic for Amplify notifications\namplify_app_master_topic = aws.sns.Topic(\"amplify_app_master\", name=master.branch_name.apply(lambda branch_name: f\"amplify-{app['id']}_{branch_name}\"))\namplify_app_master_event_target = aws.cloudwatch.EventTarget(\"amplify_app_master\",\n rule=amplify_app_master_event_rule.name,\n target_id=master.branch_name,\n arn=amplify_app_master_topic.arn,\n input_transformer={\n \"input_paths\": {\n \"jobId\": \"$.detail.jobId\",\n \"appId\": \"$.detail.appId\",\n \"region\": \"$.region\",\n \"branch\": \"$.detail.branchName\",\n \"status\": \"$.detail.jobStatus\",\n },\n \"input_template\": \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n })\namplify_app_master = pulumi.Output.all(\n masterArn=master.arn,\n amplifyAppMasterTopicArn=amplify_app_master_topic.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[{\n \"sid\": f\"Allow_Publish_Events {resolved_outputs['masterArn']}\",\n \"effect\": \"Allow\",\n \"actions\": [\"SNS:Publish\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"resources\": [%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)],\n}]))\n\namplify_app_master_topic_policy = aws.sns.TopicPolicy(\"amplify_app_master\",\n arn=amplify_app_master_topic.arn,\n policy=amplify_app_master.json)\nthis = aws.sns.TopicSubscription(\"this\",\n topic=amplify_app_master_topic.arn,\n protocol=\"email\",\n endpoint=\"user@acme.com\")\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.Amplify.App(\"example\", new()\n {\n Name = \"app\",\n });\n\n var master = new Aws.Amplify.Branch(\"master\", new()\n {\n AppId = example.Id,\n BranchName = \"master\",\n EnableNotification = true,\n });\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new Aws.CloudWatch.EventRule(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}-{branchName}-branch-notification\"),\n Description = master.BranchName.Apply(branchName =\u003e $\"AWS Amplify build notifications for : App: {app.Id} Branch: {branchName}\"),\n EventPattern = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"detail\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"appId\"] = new[]\n {\n example.Id,\n },\n [\"branchName\"] = new[]\n {\n master.BranchName,\n },\n [\"jobStatus\"] = new[]\n {\n \"SUCCEED\",\n \"FAILED\",\n \"STARTED\",\n },\n },\n [\"detail-type\"] = new[]\n {\n \"Amplify Deployment Status Change\",\n },\n [\"source\"] = new[]\n {\n \"aws.amplify\",\n },\n })),\n });\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Aws.Sns.Topic(\"amplify_app_master\", new()\n {\n Name = master.BranchName.Apply(branchName =\u003e $\"amplify-{app.Id}_{branchName}\"),\n });\n\n var amplifyAppMasterEventTarget = new Aws.CloudWatch.EventTarget(\"amplify_app_master\", new()\n {\n Rule = amplifyAppMasterEventRule.Name,\n TargetId = master.BranchName,\n Arn = amplifyAppMasterTopic.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"jobId\", \"$.detail.jobId\" },\n { \"appId\", \"$.detail.appId\" },\n { \"region\", \"$.region\" },\n { \"branch\", \"$.detail.branchName\" },\n { \"status\", \"$.detail.jobStatus\" },\n },\n InputTemplate = \"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\",\n },\n });\n\n var amplifyAppMaster = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = $\"Allow_Publish_Events {master.Arn}\",\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Publish\",\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 Resources = new[]\n {\n amplifyAppMasterTopic.Arn,\n },\n },\n },\n });\n\n var amplifyAppMasterTopicPolicy = new Aws.Sns.TopicPolicy(\"amplify_app_master\", new()\n {\n Arn = amplifyAppMasterTopic.Arn,\n Policy = amplifyAppMaster.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var @this = new Aws.Sns.TopicSubscription(\"this\", new()\n {\n Topic = amplifyAppMasterTopic.Arn,\n Protocol = \"email\",\n Endpoint = \"user@acme.com\",\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/amplify\"\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/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := amplify.NewApp(ctx, \"example\", \u0026amplify.AppArgs{\nName: pulumi.String(\"app\"),\n})\nif err != nil {\nreturn err\n}\nmaster, err := amplify.NewBranch(ctx, \"master\", \u0026amplify.BranchArgs{\nAppId: example.ID(),\nBranchName: pulumi.String(\"master\"),\nEnableNotification: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\n// EventBridge Rule for Amplify notifications\namplifyAppMasterEventRule, err := cloudwatch.NewEventRule(ctx, \"amplify_app_master\", \u0026cloudwatch.EventRuleArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v-%v-branch-notification\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nDescription: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"AWS Amplify build notifications for : App: %v Branch: %v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\nEventPattern: pulumi.All(example.ID(),master.BranchName).ApplyT(func(_args []interface{}) (string, error) {\nid := _args[0].(string)\nbranchName := _args[1].(string)\nvar _zero string\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"detail\": map[string]interface{}{\n\"appId\": []string{\nid,\n},\n\"branchName\": []string{\nbranchName,\n},\n\"jobStatus\": []string{\n\"SUCCEED\",\n\"FAILED\",\n\"STARTED\",\n},\n},\n\"detail-type\": []string{\n\"Amplify Deployment Status Change\",\n},\n\"source\": []string{\n\"aws.amplify\",\n},\n})\nif err != nil {\nreturn _zero, err\n}\njson0 := string(tmpJSON0)\nreturn json0, nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n// SNS Topic for Amplify notifications\namplifyAppMasterTopic, err := sns.NewTopic(ctx, \"amplify_app_master\", \u0026sns.TopicArgs{\nName: master.BranchName.ApplyT(func(branchName string) (string, error) {\nreturn fmt.Sprintf(\"amplify-%v_%v\", app.Id, branchName), nil\n}).(pulumi.StringOutput),\n})\nif err != nil {\nreturn err\n}\n_, err = cloudwatch.NewEventTarget(ctx, \"amplify_app_master\", \u0026cloudwatch.EventTargetArgs{\nRule: amplifyAppMasterEventRule.Name,\nTargetId: master.BranchName,\nArn: amplifyAppMasterTopic.Arn,\nInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\nInputPaths: pulumi.StringMap{\n\"jobId\": pulumi.String(\"$.detail.jobId\"),\n\"appId\": pulumi.String(\"$.detail.appId\"),\n\"region\": pulumi.String(\"$.region\"),\n\"branch\": pulumi.String(\"$.detail.branchName\"),\n\"status\": pulumi.String(\"$.detail.jobStatus\"),\n},\nInputTemplate: pulumi.String(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\"),\n},\n})\nif err != nil {\nreturn err\n}\namplifyAppMaster := pulumi.All(master.Arn,amplifyAppMasterTopic.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nmasterArn := _args[0].(string)\namplifyAppMasterTopicArn := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: fmt.Sprintf(\"Allow_Publish_Events %v\", masterArn),\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Publish\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nResources: interface{}{\namplifyAppMasterTopicArn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"amplify_app_master\", \u0026sns.TopicPolicyArgs{\nArn: amplifyAppMasterTopic.Arn,\nPolicy: pulumi.String(amplifyAppMaster.ApplyT(func(amplifyAppMaster iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026amplifyAppMaster.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = sns.NewTopicSubscription(ctx, \"this\", \u0026sns.TopicSubscriptionArgs{\nTopic: amplifyAppMasterTopic.Arn,\nProtocol: pulumi.String(\"email\"),\nEndpoint: pulumi.String(\"user@acme.com\"),\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.amplify.App;\nimport com.pulumi.aws.amplify.AppArgs;\nimport com.pulumi.aws.amplify.Branch;\nimport com.pulumi.aws.amplify.BranchArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\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 com.pulumi.aws.sns.TopicSubscription;\nimport com.pulumi.aws.sns.TopicSubscriptionArgs;\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 App(\"example\", AppArgs.builder()\n .name(\"app\")\n .build());\n\n var master = new Branch(\"master\", BranchArgs.builder()\n .appId(example.id())\n .branchName(\"master\")\n .enableNotification(true)\n .build());\n\n // EventBridge Rule for Amplify notifications\n var amplifyAppMasterEventRule = new EventRule(\"amplifyAppMasterEventRule\", EventRuleArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s-%s-branch-notification\", app.id(),branchName)))\n .description(master.branchName().applyValue(branchName -\u003e String.format(\"AWS Amplify build notifications for : App: %s Branch: %s\", app.id(),branchName)))\n .eventPattern(Output.tuple(example.id(), master.branchName()).applyValue(values -\u003e {\n var id = values.t1;\n var branchName = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"detail\", jsonObject(\n jsonProperty(\"appId\", jsonArray(id)),\n jsonProperty(\"branchName\", jsonArray(branchName)),\n jsonProperty(\"jobStatus\", jsonArray(\n \"SUCCEED\", \n \"FAILED\", \n \"STARTED\"\n ))\n )),\n jsonProperty(\"detail-type\", jsonArray(\"Amplify Deployment Status Change\")),\n jsonProperty(\"source\", jsonArray(\"aws.amplify\"))\n ));\n }))\n .build());\n\n // SNS Topic for Amplify notifications\n var amplifyAppMasterTopic = new Topic(\"amplifyAppMasterTopic\", TopicArgs.builder()\n .name(master.branchName().applyValue(branchName -\u003e String.format(\"amplify-%s_%s\", app.id(),branchName)))\n .build());\n\n var amplifyAppMasterEventTarget = new EventTarget(\"amplifyAppMasterEventTarget\", EventTargetArgs.builder()\n .rule(amplifyAppMasterEventRule.name())\n .targetId(master.branchName())\n .arn(amplifyAppMasterTopic.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"jobId\", \"$.detail.jobId\"),\n Map.entry(\"appId\", \"$.detail.appId\"),\n Map.entry(\"region\", \"$.region\"),\n Map.entry(\"branch\", \"$.detail.branchName\"),\n Map.entry(\"status\", \"$.detail.jobStatus\")\n ))\n .inputTemplate(\"\\\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \\\"\")\n .build())\n .build());\n\n final var amplifyAppMaster = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(master.arn().applyValue(arn -\u003e String.format(\"Allow_Publish_Events %s\", arn)))\n .effect(\"Allow\")\n .actions(\"SNS:Publish\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .resources(amplifyAppMasterTopic.arn())\n .build())\n .build());\n\n var amplifyAppMasterTopicPolicy = new TopicPolicy(\"amplifyAppMasterTopicPolicy\", TopicPolicyArgs.builder()\n .arn(amplifyAppMasterTopic.arn())\n .policy(amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(amplifyAppMaster -\u003e amplifyAppMaster.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var this_ = new TopicSubscription(\"this\", TopicSubscriptionArgs.builder()\n .topic(amplifyAppMasterTopic.arn())\n .protocol(\"email\")\n .endpoint(\"user@acme.com\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:amplify:App\n properties:\n name: app\n master:\n type: aws:amplify:Branch\n properties:\n appId: ${example.id}\n branchName: master\n enableNotification: true\n # EventBridge Rule for Amplify notifications\n amplifyAppMasterEventRule:\n type: aws:cloudwatch:EventRule\n name: amplify_app_master\n properties:\n name: amplify-${app.id}-${master.branchName}-branch-notification\n description: 'AWS Amplify build notifications for : App: ${app.id} Branch: ${master.branchName}'\n eventPattern:\n fn::toJSON:\n detail:\n appId:\n - ${example.id}\n branchName:\n - ${master.branchName}\n jobStatus:\n - SUCCEED\n - FAILED\n - STARTED\n detail-type:\n - Amplify Deployment Status Change\n source:\n - aws.amplify\n amplifyAppMasterEventTarget:\n type: aws:cloudwatch:EventTarget\n name: amplify_app_master\n properties:\n rule: ${amplifyAppMasterEventRule.name}\n targetId: ${master.branchName}\n arn: ${amplifyAppMasterTopic.arn}\n inputTransformer:\n inputPaths:\n jobId: $.detail.jobId\n appId: $.detail.appId\n region: $.region\n branch: $.detail.branchName\n status: $.detail.jobStatus\n inputTemplate: '\"Build notification from the AWS Amplify Console for app: https://\u003cbranch\u003e.\u003cappId\u003e.amplifyapp.com/. Your build status is \u003cstatus\u003e. Go to https://console.aws.amazon.com/amplify/home?region=\u003cregion\u003e#\u003cappId\u003e/\u003cbranch\u003e/\u003cjobId\u003e to view details on your build. \"'\n # SNS Topic for Amplify notifications\n amplifyAppMasterTopic:\n type: aws:sns:Topic\n name: amplify_app_master\n properties:\n name: amplify-${app.id}_${master.branchName}\n amplifyAppMasterTopicPolicy:\n type: aws:sns:TopicPolicy\n name: amplify_app_master\n properties:\n arn: ${amplifyAppMasterTopic.arn}\n policy: ${amplifyAppMaster.json}\n this:\n type: aws:sns:TopicSubscription\n properties:\n topic: ${amplifyAppMasterTopic.arn}\n protocol: email\n endpoint: user@acme.com\nvariables:\n amplifyAppMaster:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow_Publish_Events ${master.arn}\n effect: Allow\n actions:\n - SNS:Publish\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n resources:\n - ${amplifyAppMasterTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amplify branch using `app_id` and `branch_name`. For example:\n\n```sh\n$ pulumi import aws:amplify/branch:Branch master d2ypk4k47z8u6/master\n```\n", "properties": { "appId": { "type": "string", @@ -178652,7 +178652,7 @@ } }, "aws:apigatewayv2/integration:Integration": { - "description": "Manages an Amazon API Gateway Version 2 integration.\nMore information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html).\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"MOCK\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"MOCK\")\n```\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"MOCK\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"MOCK\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"MOCK\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: MOCK\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Lambda Integration\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.lambda.Function(\"example\", {\n code: new pulumi.asset.FileArchive(\"example.zip\"),\n name: \"Example\",\n role: exampleAwsIamRole.arn,\n handler: \"index.handler\",\n runtime: aws.lambda.Runtime.NodeJS20dX,\n});\nconst exampleIntegration = new aws.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"AWS_PROXY\",\n connectionType: \"INTERNET\",\n contentHandlingStrategy: \"CONVERT_TO_TEXT\",\n description: \"Lambda example\",\n integrationMethod: \"POST\",\n integrationUri: example.invokeArn,\n passthroughBehavior: \"WHEN_NO_MATCH\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.Function(\"example\",\n code=pulumi.FileArchive(\"example.zip\"),\n name=\"Example\",\n role=example_aws_iam_role[\"arn\"],\n handler=\"index.handler\",\n runtime=aws.lambda_.Runtime.NODE_JS20D_X)\nexample_integration = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"AWS_PROXY\",\n connection_type=\"INTERNET\",\n content_handling_strategy=\"CONVERT_TO_TEXT\",\n description=\"Lambda example\",\n integration_method=\"POST\",\n integration_uri=example.invoke_arn,\n passthrough_behavior=\"WHEN_NO_MATCH\")\n```\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.Lambda.Function(\"example\", new()\n {\n Code = new FileArchive(\"example.zip\"),\n Name = \"Example\",\n Role = exampleAwsIamRole.Arn,\n Handler = \"index.handler\",\n Runtime = Aws.Lambda.Runtime.NodeJS20dX,\n });\n\n var exampleIntegration = new Aws.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"AWS_PROXY\",\n ConnectionType = \"INTERNET\",\n ContentHandlingStrategy = \"CONVERT_TO_TEXT\",\n Description = \"Lambda example\",\n IntegrationMethod = \"POST\",\n IntegrationUri = example.InvokeArn,\n PassthroughBehavior = \"WHEN_NO_MATCH\",\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/apigatewayv2\"\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\texample, err := lambda.NewFunction(ctx, \"example\", \u0026lambda.FunctionArgs{\n\t\t\tCode: pulumi.NewFileArchive(\"example.zip\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tHandler: pulumi.String(\"index.handler\"),\n\t\t\tRuntime: pulumi.String(lambda.RuntimeNodeJS20dX),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tConnectionType: pulumi.String(\"INTERNET\"),\n\t\t\tContentHandlingStrategy: pulumi.String(\"CONVERT_TO_TEXT\"),\n\t\t\tDescription: pulumi.String(\"Lambda example\"),\n\t\t\tIntegrationMethod: pulumi.String(\"POST\"),\n\t\t\tIntegrationUri: example.InvokeArn,\n\t\t\tPassthroughBehavior: pulumi.String(\"WHEN_NO_MATCH\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.Function;\nimport com.pulumi.aws.lambda.FunctionArgs;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.asset.FileArchive;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Function(\"example\", FunctionArgs.builder()\n .code(new FileArchive(\"example.zip\"))\n .name(\"Example\")\n .role(exampleAwsIamRole.arn())\n .handler(\"index.handler\")\n .runtime(\"nodejs20.x\")\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"AWS_PROXY\")\n .connectionType(\"INTERNET\")\n .contentHandlingStrategy(\"CONVERT_TO_TEXT\")\n .description(\"Lambda example\")\n .integrationMethod(\"POST\")\n .integrationUri(example.invokeArn())\n .passthroughBehavior(\"WHEN_NO_MATCH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:Function\n properties:\n code:\n fn::FileArchive: example.zip\n name: Example\n role: ${exampleAwsIamRole.arn}\n handler: index.handler\n runtime: nodejs20.x\n exampleIntegration:\n type: aws:apigatewayv2:Integration\n name: example\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: AWS_PROXY\n connectionType: INTERNET\n contentHandlingStrategy: CONVERT_TO_TEXT\n description: Lambda example\n integrationMethod: POST\n integrationUri: ${example.invokeArn}\n passthroughBehavior: WHEN_NO_MATCH\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### AWS Service Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"SQS example\",\n integrationType: \"AWS_PROXY\",\n integrationSubtype: \"SQS-SendMessage\",\n requestParameters: {\n QueueUrl: \"$request.header.queueUrl\",\n MessageBody: \"$request.body.message\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"SQS example\",\n integration_type=\"AWS_PROXY\",\n integration_subtype=\"SQS-SendMessage\",\n request_parameters={\n \"QueueUrl\": \"$request.header.queueUrl\",\n \"MessageBody\": \"$request.body.message\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"SQS example\",\n IntegrationType = \"AWS_PROXY\",\n IntegrationSubtype = \"SQS-SendMessage\",\n RequestParameters = \n {\n { \"QueueUrl\", \"$request.header.queueUrl\" },\n { \"MessageBody\", \"$request.body.message\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"SQS example\"),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tIntegrationSubtype: pulumi.String(\"SQS-SendMessage\"),\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"QueueUrl\": pulumi.String(\"$request.header.queueUrl\"),\n\t\t\t\t\"MessageBody\": pulumi.String(\"$request.body.message\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"SQS example\")\n .integrationType(\"AWS_PROXY\")\n .integrationSubtype(\"SQS-SendMessage\")\n .requestParameters(Map.ofEntries(\n Map.entry(\"QueueUrl\", \"$request.header.queueUrl\"),\n Map.entry(\"MessageBody\", \"$request.body.message\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: SQS example\n integrationType: AWS_PROXY\n integrationSubtype: SQS-SendMessage\n requestParameters:\n QueueUrl: $request.header.queueUrl\n MessageBody: $request.body.message\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Private Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"Example with a load balancer\",\n integrationType: \"HTTP_PROXY\",\n integrationUri: exampleAwsLbListener.arn,\n integrationMethod: \"ANY\",\n connectionType: \"VPC_LINK\",\n connectionId: exampleAwsApigatewayv2VpcLink.id,\n tlsConfig: {\n serverNameToVerify: \"example.com\",\n },\n requestParameters: {\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n responseParameters: [\n {\n statusCode: \"403\",\n mappings: {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n statusCode: \"200\",\n mappings: {\n \"overwrite:statuscode\": \"204\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"Example with a load balancer\",\n integration_type=\"HTTP_PROXY\",\n integration_uri=example_aws_lb_listener[\"arn\"],\n integration_method=\"ANY\",\n connection_type=\"VPC_LINK\",\n connection_id=example_aws_apigatewayv2_vpc_link[\"id\"],\n tls_config={\n \"server_name_to_verify\": \"example.com\",\n },\n request_parameters={\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n response_parameters=[\n {\n \"status_code\": \"403\",\n \"mappings\": {\n \"append_header_auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n \"status_code\": \"200\",\n \"mappings\": {\n \"overwrite_statuscode\": \"204\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"Example with a load balancer\",\n IntegrationType = \"HTTP_PROXY\",\n IntegrationUri = exampleAwsLbListener.Arn,\n IntegrationMethod = \"ANY\",\n ConnectionType = \"VPC_LINK\",\n ConnectionId = exampleAwsApigatewayv2VpcLink.Id,\n TlsConfig = new Aws.ApiGatewayV2.Inputs.IntegrationTlsConfigArgs\n {\n ServerNameToVerify = \"example.com\",\n },\n RequestParameters = \n {\n { \"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\" },\n { \"overwrite:path\", \"staticValueForIntegration\" },\n },\n ResponseParameters = new[]\n {\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"403\",\n Mappings = \n {\n { \"append:header.auth\", \"$context.authorizer.authorizerResponse\" },\n },\n },\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"200\",\n Mappings = \n {\n { \"overwrite:statuscode\", \"204\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"Example with a load balancer\"),\n\t\t\tIntegrationType: pulumi.String(\"HTTP_PROXY\"),\n\t\t\tIntegrationUri: pulumi.Any(exampleAwsLbListener.Arn),\n\t\t\tIntegrationMethod: pulumi.String(\"ANY\"),\n\t\t\tConnectionType: pulumi.String(\"VPC_LINK\"),\n\t\t\tConnectionId: pulumi.Any(exampleAwsApigatewayv2VpcLink.Id),\n\t\t\tTlsConfig: \u0026apigatewayv2.IntegrationTlsConfigArgs{\n\t\t\t\tServerNameToVerify: pulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"append:header.authforintegration\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\"overwrite:path\": pulumi.String(\"staticValueForIntegration\"),\n\t\t\t},\n\t\t\tResponseParameters: apigatewayv2.IntegrationResponseParameterArray{\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"403\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"append:header.auth\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"200\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"overwrite:statuscode\": pulumi.String(\"204\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationTlsConfigArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationResponseParameterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"Example with a load balancer\")\n .integrationType(\"HTTP_PROXY\")\n .integrationUri(exampleAwsLbListener.arn())\n .integrationMethod(\"ANY\")\n .connectionType(\"VPC_LINK\")\n .connectionId(exampleAwsApigatewayv2VpcLink.id())\n .tlsConfig(IntegrationTlsConfigArgs.builder()\n .serverNameToVerify(\"example.com\")\n .build())\n .requestParameters(Map.ofEntries(\n Map.entry(\"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\"),\n Map.entry(\"overwrite:path\", \"staticValueForIntegration\")\n ))\n .responseParameters( \n IntegrationResponseParameterArgs.builder()\n .statusCode(403)\n .mappings(Map.of(\"append:header.auth\", \"$context.authorizer.authorizerResponse\"))\n .build(),\n IntegrationResponseParameterArgs.builder()\n .statusCode(200)\n .mappings(Map.of(\"overwrite:statuscode\", \"204\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: Example with a load balancer\n integrationType: HTTP_PROXY\n integrationUri: ${exampleAwsLbListener.arn}\n integrationMethod: ANY\n connectionType: VPC_LINK\n connectionId: ${exampleAwsApigatewayv2VpcLink.id}\n tlsConfig:\n serverNameToVerify: example.com\n requestParameters:\n append:header.authforintegration: $context.authorizer.authorizerResponse\n overwrite:path: staticValueForIntegration\n responseParameters:\n - statusCode: 403\n mappings:\n append:header.auth: $context.authorizer.authorizerResponse\n - statusCode: 200\n mappings:\n overwrite:statuscode: '204'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_apigatewayv2_integration` using the API identifier and integration identifier. For example:\n\n```sh\n$ pulumi import aws:apigatewayv2/integration:Integration example aabbccddee/1122334\n```\n-\u003e __Note:__ The API Gateway managed integration created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported.\n\n", + "description": "Manages an Amazon API Gateway Version 2 integration.\nMore information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html).\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"MOCK\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"MOCK\")\n```\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"MOCK\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"MOCK\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"MOCK\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: MOCK\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Lambda Integration\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.lambda.Function(\"example\", {\n code: new pulumi.asset.FileArchive(\"example.zip\"),\n name: \"Example\",\n role: exampleAwsIamRole.arn,\n handler: \"index.handler\",\n runtime: aws.lambda.Runtime.NodeJS20dX,\n});\nconst exampleIntegration = new aws.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n integrationType: \"AWS_PROXY\",\n connectionType: \"INTERNET\",\n contentHandlingStrategy: \"CONVERT_TO_TEXT\",\n description: \"Lambda example\",\n integrationMethod: \"POST\",\n integrationUri: example.invokeArn,\n passthroughBehavior: \"WHEN_NO_MATCH\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.Function(\"example\",\n code=pulumi.FileArchive(\"example.zip\"),\n name=\"Example\",\n role=example_aws_iam_role[\"arn\"],\n handler=\"index.handler\",\n runtime=aws.lambda_.Runtime.NODE_JS20D_X)\nexample_integration = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n integration_type=\"AWS_PROXY\",\n connection_type=\"INTERNET\",\n content_handling_strategy=\"CONVERT_TO_TEXT\",\n description=\"Lambda example\",\n integration_method=\"POST\",\n integration_uri=example.invoke_arn,\n passthrough_behavior=\"WHEN_NO_MATCH\")\n```\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.Lambda.Function(\"example\", new()\n {\n Code = new FileArchive(\"example.zip\"),\n Name = \"Example\",\n Role = exampleAwsIamRole.Arn,\n Handler = \"index.handler\",\n Runtime = Aws.Lambda.Runtime.NodeJS20dX,\n });\n\n var exampleIntegration = new Aws.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n IntegrationType = \"AWS_PROXY\",\n ConnectionType = \"INTERNET\",\n ContentHandlingStrategy = \"CONVERT_TO_TEXT\",\n Description = \"Lambda example\",\n IntegrationMethod = \"POST\",\n IntegrationUri = example.InvokeArn,\n PassthroughBehavior = \"WHEN_NO_MATCH\",\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/apigatewayv2\"\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\texample, err := lambda.NewFunction(ctx, \"example\", \u0026lambda.FunctionArgs{\n\t\t\tCode: pulumi.NewFileArchive(\"example.zip\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tHandler: pulumi.String(\"index.handler\"),\n\t\t\tRuntime: pulumi.String(lambda.RuntimeNodeJS20dX),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tConnectionType: pulumi.String(\"INTERNET\"),\n\t\t\tContentHandlingStrategy: pulumi.String(\"CONVERT_TO_TEXT\"),\n\t\t\tDescription: pulumi.String(\"Lambda example\"),\n\t\t\tIntegrationMethod: pulumi.String(\"POST\"),\n\t\t\tIntegrationUri: example.InvokeArn,\n\t\t\tPassthroughBehavior: pulumi.String(\"WHEN_NO_MATCH\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.Function;\nimport com.pulumi.aws.lambda.FunctionArgs;\nimport com.pulumi.aws.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.asset.FileArchive;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Function(\"example\", FunctionArgs.builder()\n .code(new FileArchive(\"example.zip\"))\n .name(\"Example\")\n .role(exampleAwsIamRole.arn())\n .handler(\"index.handler\")\n .runtime(\"nodejs20.x\")\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .integrationType(\"AWS_PROXY\")\n .connectionType(\"INTERNET\")\n .contentHandlingStrategy(\"CONVERT_TO_TEXT\")\n .description(\"Lambda example\")\n .integrationMethod(\"POST\")\n .integrationUri(example.invokeArn())\n .passthroughBehavior(\"WHEN_NO_MATCH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:Function\n properties:\n code:\n fn::FileArchive: example.zip\n name: Example\n role: ${exampleAwsIamRole.arn}\n handler: index.handler\n runtime: nodejs20.x\n exampleIntegration:\n type: aws:apigatewayv2:Integration\n name: example\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n integrationType: AWS_PROXY\n connectionType: INTERNET\n contentHandlingStrategy: CONVERT_TO_TEXT\n description: Lambda example\n integrationMethod: POST\n integrationUri: ${example.invokeArn}\n passthroughBehavior: WHEN_NO_MATCH\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### AWS Service Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"SQS example\",\n integrationType: \"AWS_PROXY\",\n integrationSubtype: \"SQS-SendMessage\",\n requestParameters: {\n QueueUrl: \"$request.header.queueUrl\",\n MessageBody: \"$request.body.message\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"SQS example\",\n integration_type=\"AWS_PROXY\",\n integration_subtype=\"SQS-SendMessage\",\n request_parameters={\n \"QueueUrl\": \"$request.header.queueUrl\",\n \"MessageBody\": \"$request.body.message\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"SQS example\",\n IntegrationType = \"AWS_PROXY\",\n IntegrationSubtype = \"SQS-SendMessage\",\n RequestParameters = \n {\n { \"QueueUrl\", \"$request.header.queueUrl\" },\n { \"MessageBody\", \"$request.body.message\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"SQS example\"),\n\t\t\tIntegrationType: pulumi.String(\"AWS_PROXY\"),\n\t\t\tIntegrationSubtype: pulumi.String(\"SQS-SendMessage\"),\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"QueueUrl\": pulumi.String(\"$request.header.queueUrl\"),\n\t\t\t\t\"MessageBody\": pulumi.String(\"$request.body.message\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"SQS example\")\n .integrationType(\"AWS_PROXY\")\n .integrationSubtype(\"SQS-SendMessage\")\n .requestParameters(Map.ofEntries(\n Map.entry(\"QueueUrl\", \"$request.header.queueUrl\"),\n Map.entry(\"MessageBody\", \"$request.body.message\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: SQS example\n integrationType: AWS_PROXY\n integrationSubtype: SQS-SendMessage\n requestParameters:\n QueueUrl: $request.header.queueUrl\n MessageBody: $request.body.message\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Private Integration\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.apigatewayv2.Integration(\"example\", {\n apiId: exampleAwsApigatewayv2Api.id,\n credentialsArn: exampleAwsIamRole.arn,\n description: \"Example with a load balancer\",\n integrationType: \"HTTP_PROXY\",\n integrationUri: exampleAwsLbListener.arn,\n integrationMethod: \"ANY\",\n connectionType: \"VPC_LINK\",\n connectionId: exampleAwsApigatewayv2VpcLink.id,\n tlsConfig: {\n serverNameToVerify: \"example.com\",\n },\n requestParameters: {\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n responseParameters: [\n {\n statusCode: \"403\",\n mappings: {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n statusCode: \"200\",\n mappings: {\n \"overwrite:statuscode\": \"204\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.apigatewayv2.Integration(\"example\",\n api_id=example_aws_apigatewayv2_api[\"id\"],\n credentials_arn=example_aws_iam_role[\"arn\"],\n description=\"Example with a load balancer\",\n integration_type=\"HTTP_PROXY\",\n integration_uri=example_aws_lb_listener[\"arn\"],\n integration_method=\"ANY\",\n connection_type=\"VPC_LINK\",\n connection_id=example_aws_apigatewayv2_vpc_link[\"id\"],\n tls_config={\n \"server_name_to_verify\": \"example.com\",\n },\n request_parameters={\n \"append:header.authforintegration\": \"$context.authorizer.authorizerResponse\",\n \"overwrite:path\": \"staticValueForIntegration\",\n },\n response_parameters=[\n {\n \"status_code\": \"403\",\n \"mappings\": {\n \"append:header.auth\": \"$context.authorizer.authorizerResponse\",\n },\n },\n {\n \"status_code\": \"200\",\n \"mappings\": {\n \"overwrite:statuscode\": \"204\",\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.ApiGatewayV2.Integration(\"example\", new()\n {\n ApiId = exampleAwsApigatewayv2Api.Id,\n CredentialsArn = exampleAwsIamRole.Arn,\n Description = \"Example with a load balancer\",\n IntegrationType = \"HTTP_PROXY\",\n IntegrationUri = exampleAwsLbListener.Arn,\n IntegrationMethod = \"ANY\",\n ConnectionType = \"VPC_LINK\",\n ConnectionId = exampleAwsApigatewayv2VpcLink.Id,\n TlsConfig = new Aws.ApiGatewayV2.Inputs.IntegrationTlsConfigArgs\n {\n ServerNameToVerify = \"example.com\",\n },\n RequestParameters = \n {\n { \"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\" },\n { \"overwrite:path\", \"staticValueForIntegration\" },\n },\n ResponseParameters = new[]\n {\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"403\",\n Mappings = \n {\n { \"append:header.auth\", \"$context.authorizer.authorizerResponse\" },\n },\n },\n new Aws.ApiGatewayV2.Inputs.IntegrationResponseParameterArgs\n {\n StatusCode = \"200\",\n Mappings = \n {\n { \"overwrite:statuscode\", \"204\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := apigatewayv2.NewIntegration(ctx, \"example\", \u0026apigatewayv2.IntegrationArgs{\n\t\t\tApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),\n\t\t\tCredentialsArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tDescription: pulumi.String(\"Example with a load balancer\"),\n\t\t\tIntegrationType: pulumi.String(\"HTTP_PROXY\"),\n\t\t\tIntegrationUri: pulumi.Any(exampleAwsLbListener.Arn),\n\t\t\tIntegrationMethod: pulumi.String(\"ANY\"),\n\t\t\tConnectionType: pulumi.String(\"VPC_LINK\"),\n\t\t\tConnectionId: pulumi.Any(exampleAwsApigatewayv2VpcLink.Id),\n\t\t\tTlsConfig: \u0026apigatewayv2.IntegrationTlsConfigArgs{\n\t\t\t\tServerNameToVerify: pulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tRequestParameters: pulumi.StringMap{\n\t\t\t\t\"append:header.authforintegration\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\"overwrite:path\": pulumi.String(\"staticValueForIntegration\"),\n\t\t\t},\n\t\t\tResponseParameters: apigatewayv2.IntegrationResponseParameterArray{\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"403\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"append:header.auth\": pulumi.String(\"$context.authorizer.authorizerResponse\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026apigatewayv2.IntegrationResponseParameterArgs{\n\t\t\t\t\tStatusCode: pulumi.String(\"200\"),\n\t\t\t\t\tMappings: pulumi.StringMap{\n\t\t\t\t\t\t\"overwrite:statuscode\": pulumi.String(\"204\"),\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.apigatewayv2.Integration;\nimport com.pulumi.aws.apigatewayv2.IntegrationArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationTlsConfigArgs;\nimport com.pulumi.aws.apigatewayv2.inputs.IntegrationResponseParameterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Integration(\"example\", IntegrationArgs.builder()\n .apiId(exampleAwsApigatewayv2Api.id())\n .credentialsArn(exampleAwsIamRole.arn())\n .description(\"Example with a load balancer\")\n .integrationType(\"HTTP_PROXY\")\n .integrationUri(exampleAwsLbListener.arn())\n .integrationMethod(\"ANY\")\n .connectionType(\"VPC_LINK\")\n .connectionId(exampleAwsApigatewayv2VpcLink.id())\n .tlsConfig(IntegrationTlsConfigArgs.builder()\n .serverNameToVerify(\"example.com\")\n .build())\n .requestParameters(Map.ofEntries(\n Map.entry(\"append:header.authforintegration\", \"$context.authorizer.authorizerResponse\"),\n Map.entry(\"overwrite:path\", \"staticValueForIntegration\")\n ))\n .responseParameters( \n IntegrationResponseParameterArgs.builder()\n .statusCode(403)\n .mappings(Map.of(\"append:header.auth\", \"$context.authorizer.authorizerResponse\"))\n .build(),\n IntegrationResponseParameterArgs.builder()\n .statusCode(200)\n .mappings(Map.of(\"overwrite:statuscode\", \"204\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:apigatewayv2:Integration\n properties:\n apiId: ${exampleAwsApigatewayv2Api.id}\n credentialsArn: ${exampleAwsIamRole.arn}\n description: Example with a load balancer\n integrationType: HTTP_PROXY\n integrationUri: ${exampleAwsLbListener.arn}\n integrationMethod: ANY\n connectionType: VPC_LINK\n connectionId: ${exampleAwsApigatewayv2VpcLink.id}\n tlsConfig:\n serverNameToVerify: example.com\n requestParameters:\n append:header.authforintegration: $context.authorizer.authorizerResponse\n overwrite:path: staticValueForIntegration\n responseParameters:\n - statusCode: 403\n mappings:\n append:header.auth: $context.authorizer.authorizerResponse\n - statusCode: 200\n mappings:\n overwrite:statuscode: '204'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_apigatewayv2_integration` using the API identifier and integration identifier. For example:\n\n```sh\n$ pulumi import aws:apigatewayv2/integration:Integration example aabbccddee/1122334\n```\n-\u003e __Note:__ The API Gateway managed integration created as part of [_quick_create_](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-quick-create) cannot be imported.\n\n", "properties": { "apiId": { "type": "string", @@ -182521,7 +182521,7 @@ } }, "aws:applicationinsights/application:Application": { - "description": "Provides a ApplicationInsights Application 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 exampleGroup = new aws.resourcegroups.Group(\"example\", {\n name: \"example\",\n resourceQuery: {\n query: JSON.stringify({\n ResourceTypeFilters: [\"AWS::EC2::Instance\"],\n TagFilters: [{\n Key: \"Stage\",\n Values: [\"Test\"],\n }],\n }),\n },\n});\nconst example = new aws.applicationinsights.Application(\"example\", {resourceGroupName: exampleGroup.name});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_group = aws.resourcegroups.Group(\"example\",\n name=\"example\",\n resource_query={\n \"query\": json.dumps({\n \"resource_type_filters\": [\"AWS::EC2::Instance\"],\n \"tag_filters\": [{\n \"key\": \"Stage\",\n \"values\": [\"Test\"],\n }],\n }),\n })\nexample = aws.applicationinsights.Application(\"example\", resource_group_name=example_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 exampleGroup = new Aws.ResourceGroups.Group(\"example\", new()\n {\n Name = \"example\",\n ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs\n {\n Query = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceTypeFilters\"] = new[]\n {\n \"AWS::EC2::Instance\",\n },\n [\"TagFilters\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Key\"] = \"Stage\",\n [\"Values\"] = new[]\n {\n \"Test\",\n },\n },\n },\n }),\n },\n });\n\n var example = new Aws.ApplicationInsights.Application(\"example\", new()\n {\n ResourceGroupName = exampleGroup.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/applicationinsights\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups\"\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\"ResourceTypeFilters\": []string{\n\t\t\t\t\"AWS::EC2::Instance\",\n\t\t\t},\n\t\t\t\"TagFilters\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Key\": \"Stage\",\n\t\t\t\t\t\"Values\": []string{\n\t\t\t\t\t\t\"Test\",\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\texampleGroup, err := resourcegroups.NewGroup(ctx, \"example\", \u0026resourcegroups.GroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceQuery: \u0026resourcegroups.GroupResourceQueryArgs{\n\t\t\t\tQuery: pulumi.String(json0),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = applicationinsights.NewApplication(ctx, \"example\", \u0026applicationinsights.ApplicationArgs{\n\t\t\tResourceGroupName: exampleGroup.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.resourcegroups.Group;\nimport com.pulumi.aws.resourcegroups.GroupArgs;\nimport com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;\nimport com.pulumi.aws.applicationinsights.Application;\nimport com.pulumi.aws.applicationinsights.ApplicationArgs;\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 exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .name(\"example\")\n .resourceQuery(GroupResourceQueryArgs.builder()\n .query(serializeJson(\n jsonObject(\n jsonProperty(\"ResourceTypeFilters\", jsonArray(\"AWS::EC2::Instance\")),\n jsonProperty(\"TagFilters\", jsonArray(jsonObject(\n jsonProperty(\"Key\", \"Stage\"),\n jsonProperty(\"Values\", jsonArray(\"Test\"))\n )))\n )))\n .build())\n .build());\n\n var example = new Application(\"example\", ApplicationArgs.builder()\n .resourceGroupName(exampleGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:applicationinsights:Application\n properties:\n resourceGroupName: ${exampleGroup.name}\n exampleGroup:\n type: aws:resourcegroups:Group\n name: example\n properties:\n name: example\n resourceQuery:\n query:\n fn::toJSON:\n ResourceTypeFilters:\n - AWS::EC2::Instance\n TagFilters:\n - Key: Stage\n Values:\n - Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ApplicationInsights Applications using the `resource_group_name`. For example:\n\n```sh\n$ pulumi import aws:applicationinsights/application:Application some some-application\n```\n", + "description": "Provides a ApplicationInsights Application 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 exampleGroup = new aws.resourcegroups.Group(\"example\", {\n name: \"example\",\n resourceQuery: {\n query: JSON.stringify({\n ResourceTypeFilters: [\"AWS::EC2::Instance\"],\n TagFilters: [{\n Key: \"Stage\",\n Values: [\"Test\"],\n }],\n }),\n },\n});\nconst example = new aws.applicationinsights.Application(\"example\", {resourceGroupName: exampleGroup.name});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_group = aws.resourcegroups.Group(\"example\",\n name=\"example\",\n resource_query={\n \"query\": json.dumps({\n \"ResourceTypeFilters\": [\"AWS::EC2::Instance\"],\n \"TagFilters\": [{\n \"Key\": \"Stage\",\n \"Values\": [\"Test\"],\n }],\n }),\n })\nexample = aws.applicationinsights.Application(\"example\", resource_group_name=example_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 exampleGroup = new Aws.ResourceGroups.Group(\"example\", new()\n {\n Name = \"example\",\n ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs\n {\n Query = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceTypeFilters\"] = new[]\n {\n \"AWS::EC2::Instance\",\n },\n [\"TagFilters\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Key\"] = \"Stage\",\n [\"Values\"] = new[]\n {\n \"Test\",\n },\n },\n },\n }),\n },\n });\n\n var example = new Aws.ApplicationInsights.Application(\"example\", new()\n {\n ResourceGroupName = exampleGroup.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/applicationinsights\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups\"\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\"ResourceTypeFilters\": []string{\n\t\t\t\t\"AWS::EC2::Instance\",\n\t\t\t},\n\t\t\t\"TagFilters\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Key\": \"Stage\",\n\t\t\t\t\t\"Values\": []string{\n\t\t\t\t\t\t\"Test\",\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\texampleGroup, err := resourcegroups.NewGroup(ctx, \"example\", \u0026resourcegroups.GroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceQuery: \u0026resourcegroups.GroupResourceQueryArgs{\n\t\t\t\tQuery: pulumi.String(json0),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = applicationinsights.NewApplication(ctx, \"example\", \u0026applicationinsights.ApplicationArgs{\n\t\t\tResourceGroupName: exampleGroup.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.resourcegroups.Group;\nimport com.pulumi.aws.resourcegroups.GroupArgs;\nimport com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;\nimport com.pulumi.aws.applicationinsights.Application;\nimport com.pulumi.aws.applicationinsights.ApplicationArgs;\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 exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .name(\"example\")\n .resourceQuery(GroupResourceQueryArgs.builder()\n .query(serializeJson(\n jsonObject(\n jsonProperty(\"ResourceTypeFilters\", jsonArray(\"AWS::EC2::Instance\")),\n jsonProperty(\"TagFilters\", jsonArray(jsonObject(\n jsonProperty(\"Key\", \"Stage\"),\n jsonProperty(\"Values\", jsonArray(\"Test\"))\n )))\n )))\n .build())\n .build());\n\n var example = new Application(\"example\", ApplicationArgs.builder()\n .resourceGroupName(exampleGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:applicationinsights:Application\n properties:\n resourceGroupName: ${exampleGroup.name}\n exampleGroup:\n type: aws:resourcegroups:Group\n name: example\n properties:\n name: example\n resourceQuery:\n query:\n fn::toJSON:\n ResourceTypeFilters:\n - AWS::EC2::Instance\n TagFilters:\n - Key: Stage\n Values:\n - Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ApplicationInsights Applications using the `resource_group_name`. For example:\n\n```sh\n$ pulumi import aws:applicationinsights/application:Application some some-application\n```\n", "properties": { "arn": { "type": "string", @@ -190444,7 +190444,7 @@ } }, "aws:backup/plan:Plan": { - "description": "Provides an AWS Backup plan 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.backup.Plan(\"example\", {\n name: \"my_example_backup_plan\",\n rules: [{\n ruleName: \"my_example_backup_rule\",\n targetVaultName: test.name,\n schedule: \"cron(0 12 * * ? *)\",\n lifecycle: {\n deleteAfter: 14,\n },\n }],\n advancedBackupSettings: [{\n backupOptions: {\n WindowsVSS: \"enabled\",\n },\n resourceType: \"EC2\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.backup.Plan(\"example\",\n name=\"my_example_backup_plan\",\n rules=[{\n \"rule_name\": \"my_example_backup_rule\",\n \"target_vault_name\": test[\"name\"],\n \"schedule\": \"cron(0 12 * * ? *)\",\n \"lifecycle\": {\n \"delete_after\": 14,\n },\n }],\n advanced_backup_settings=[{\n \"backup_options\": {\n \"windows_vss\": \"enabled\",\n },\n \"resource_type\": \"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 example = new Aws.Backup.Plan(\"example\", new()\n {\n Name = \"my_example_backup_plan\",\n Rules = new[]\n {\n new Aws.Backup.Inputs.PlanRuleArgs\n {\n RuleName = \"my_example_backup_rule\",\n TargetVaultName = test.Name,\n Schedule = \"cron(0 12 * * ? *)\",\n Lifecycle = new Aws.Backup.Inputs.PlanRuleLifecycleArgs\n {\n DeleteAfter = 14,\n },\n },\n },\n AdvancedBackupSettings = new[]\n {\n new Aws.Backup.Inputs.PlanAdvancedBackupSettingArgs\n {\n BackupOptions = \n {\n { \"WindowsVSS\", \"enabled\" },\n },\n ResourceType = \"EC2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := backup.NewPlan(ctx, \"example\", \u0026backup.PlanArgs{\n\t\t\tName: pulumi.String(\"my_example_backup_plan\"),\n\t\t\tRules: backup.PlanRuleArray{\n\t\t\t\t\u0026backup.PlanRuleArgs{\n\t\t\t\t\tRuleName: pulumi.String(\"my_example_backup_rule\"),\n\t\t\t\t\tTargetVaultName: pulumi.Any(test.Name),\n\t\t\t\t\tSchedule: pulumi.String(\"cron(0 12 * * ? *)\"),\n\t\t\t\t\tLifecycle: \u0026backup.PlanRuleLifecycleArgs{\n\t\t\t\t\t\tDeleteAfter: pulumi.Int(14),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAdvancedBackupSettings: backup.PlanAdvancedBackupSettingArray{\n\t\t\t\t\u0026backup.PlanAdvancedBackupSettingArgs{\n\t\t\t\t\tBackupOptions: pulumi.StringMap{\n\t\t\t\t\t\t\"WindowsVSS\": pulumi.String(\"enabled\"),\n\t\t\t\t\t},\n\t\t\t\t\tResourceType: pulumi.String(\"EC2\"),\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.backup.Plan;\nimport com.pulumi.aws.backup.PlanArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleLifecycleArgs;\nimport com.pulumi.aws.backup.inputs.PlanAdvancedBackupSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Plan(\"example\", PlanArgs.builder()\n .name(\"my_example_backup_plan\")\n .rules(PlanRuleArgs.builder()\n .ruleName(\"my_example_backup_rule\")\n .targetVaultName(test.name())\n .schedule(\"cron(0 12 * * ? *)\")\n .lifecycle(PlanRuleLifecycleArgs.builder()\n .deleteAfter(14)\n .build())\n .build())\n .advancedBackupSettings(PlanAdvancedBackupSettingArgs.builder()\n .backupOptions(Map.of(\"WindowsVSS\", \"enabled\"))\n .resourceType(\"EC2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:backup:Plan\n properties:\n name: my_example_backup_plan\n rules:\n - ruleName: my_example_backup_rule\n targetVaultName: ${test.name}\n schedule: cron(0 12 * * ? *)\n lifecycle:\n deleteAfter: 14\n advancedBackupSettings:\n - backupOptions:\n WindowsVSS: enabled\n resourceType: EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup Plan using the `id`. For example:\n\n```sh\n$ pulumi import aws:backup/plan:Plan test \u003cid\u003e\n```\n", + "description": "Provides an AWS Backup plan 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.backup.Plan(\"example\", {\n name: \"my_example_backup_plan\",\n rules: [{\n ruleName: \"my_example_backup_rule\",\n targetVaultName: test.name,\n schedule: \"cron(0 12 * * ? *)\",\n lifecycle: {\n deleteAfter: 14,\n },\n }],\n advancedBackupSettings: [{\n backupOptions: {\n WindowsVSS: \"enabled\",\n },\n resourceType: \"EC2\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.backup.Plan(\"example\",\n name=\"my_example_backup_plan\",\n rules=[{\n \"rule_name\": \"my_example_backup_rule\",\n \"target_vault_name\": test[\"name\"],\n \"schedule\": \"cron(0 12 * * ? *)\",\n \"lifecycle\": {\n \"delete_after\": 14,\n },\n }],\n advanced_backup_settings=[{\n \"backup_options\": {\n \"WindowsVSS\": \"enabled\",\n },\n \"resource_type\": \"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 example = new Aws.Backup.Plan(\"example\", new()\n {\n Name = \"my_example_backup_plan\",\n Rules = new[]\n {\n new Aws.Backup.Inputs.PlanRuleArgs\n {\n RuleName = \"my_example_backup_rule\",\n TargetVaultName = test.Name,\n Schedule = \"cron(0 12 * * ? *)\",\n Lifecycle = new Aws.Backup.Inputs.PlanRuleLifecycleArgs\n {\n DeleteAfter = 14,\n },\n },\n },\n AdvancedBackupSettings = new[]\n {\n new Aws.Backup.Inputs.PlanAdvancedBackupSettingArgs\n {\n BackupOptions = \n {\n { \"WindowsVSS\", \"enabled\" },\n },\n ResourceType = \"EC2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := backup.NewPlan(ctx, \"example\", \u0026backup.PlanArgs{\n\t\t\tName: pulumi.String(\"my_example_backup_plan\"),\n\t\t\tRules: backup.PlanRuleArray{\n\t\t\t\t\u0026backup.PlanRuleArgs{\n\t\t\t\t\tRuleName: pulumi.String(\"my_example_backup_rule\"),\n\t\t\t\t\tTargetVaultName: pulumi.Any(test.Name),\n\t\t\t\t\tSchedule: pulumi.String(\"cron(0 12 * * ? *)\"),\n\t\t\t\t\tLifecycle: \u0026backup.PlanRuleLifecycleArgs{\n\t\t\t\t\t\tDeleteAfter: pulumi.Int(14),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tAdvancedBackupSettings: backup.PlanAdvancedBackupSettingArray{\n\t\t\t\t\u0026backup.PlanAdvancedBackupSettingArgs{\n\t\t\t\t\tBackupOptions: pulumi.StringMap{\n\t\t\t\t\t\t\"WindowsVSS\": pulumi.String(\"enabled\"),\n\t\t\t\t\t},\n\t\t\t\t\tResourceType: pulumi.String(\"EC2\"),\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.backup.Plan;\nimport com.pulumi.aws.backup.PlanArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleArgs;\nimport com.pulumi.aws.backup.inputs.PlanRuleLifecycleArgs;\nimport com.pulumi.aws.backup.inputs.PlanAdvancedBackupSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Plan(\"example\", PlanArgs.builder()\n .name(\"my_example_backup_plan\")\n .rules(PlanRuleArgs.builder()\n .ruleName(\"my_example_backup_rule\")\n .targetVaultName(test.name())\n .schedule(\"cron(0 12 * * ? *)\")\n .lifecycle(PlanRuleLifecycleArgs.builder()\n .deleteAfter(14)\n .build())\n .build())\n .advancedBackupSettings(PlanAdvancedBackupSettingArgs.builder()\n .backupOptions(Map.of(\"WindowsVSS\", \"enabled\"))\n .resourceType(\"EC2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:backup:Plan\n properties:\n name: my_example_backup_plan\n rules:\n - ruleName: my_example_backup_rule\n targetVaultName: ${test.name}\n schedule: cron(0 12 * * ? *)\n lifecycle:\n deleteAfter: 14\n advancedBackupSettings:\n - backupOptions:\n WindowsVSS: enabled\n resourceType: EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup Plan using the `id`. For example:\n\n```sh\n$ pulumi import aws:backup/plan:Plan test \u003cid\u003e\n```\n", "properties": { "advancedBackupSettings": { "type": "array", @@ -192274,7 +192274,7 @@ } }, "aws:bcmdata/export:Export": { - "description": "Resource for managing an AWS BCM Data Exports Export.\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 = new aws.bcmdata.Export(\"test\", {\"export\": {\n name: \"testexample\",\n dataQueries: [{\n queryStatement: \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n tableConfigurations: {\n COST_AND_USAGE_REPORT: {\n TIME_GRANULARITY: \"HOURLY\",\n INCLUDE_RESOURCES: \"FALSE\",\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: \"FALSE\",\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: \"FALSE\",\n },\n },\n }],\n destinationConfigurations: [{\n s3Destinations: [{\n s3Bucket: testAwsS3Bucket.bucket,\n s3Prefix: testAwsS3Bucket.bucketPrefix,\n s3Region: testAwsS3Bucket.region,\n s3OutputConfigurations: [{\n overwrite: \"OVERWRITE_REPORT\",\n format: \"TEXT_OR_CSV\",\n compression: \"GZIP\",\n outputType: \"CUSTOM\",\n }],\n }],\n }],\n refreshCadences: [{\n frequency: \"SYNCHRONOUS\",\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bcmdata.Export(\"test\", export={\n \"name\": \"testexample\",\n \"data_queries\": [{\n \"query_statement\": \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n \"table_configurations\": {\n \"cos_t__an_d__usag_e__report\": {\n \"tim_e__granularity\": \"HOURLY\",\n \"includ_e__resources\": \"FALSE\",\n \"includ_e__manua_l__discoun_t__compatibility\": \"FALSE\",\n \"includ_e__spli_t__cos_t__allocatio_n__data\": \"FALSE\",\n },\n },\n }],\n \"destination_configurations\": [{\n \"s3_destinations\": [{\n \"s3_bucket\": test_aws_s3_bucket[\"bucket\"],\n \"s3_prefix\": test_aws_s3_bucket[\"bucketPrefix\"],\n \"s3_region\": test_aws_s3_bucket[\"region\"],\n \"s3_output_configurations\": [{\n \"overwrite\": \"OVERWRITE_REPORT\",\n \"format\": \"TEXT_OR_CSV\",\n \"compression\": \"GZIP\",\n \"output_type\": \"CUSTOM\",\n }],\n }],\n }],\n \"refresh_cadences\": [{\n \"frequency\": \"SYNCHRONOUS\",\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.BcmData.Export(\"test\", new()\n {\n ExportDetails = new Aws.BcmData.Inputs.ExportExportArgs\n {\n Name = \"testexample\",\n DataQueries = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDataQueryArgs\n {\n QueryStatement = \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n TableConfigurations = \n {\n { \"COST_AND_USAGE_REPORT\", \n {\n { \"TIME_GRANULARITY\", \"HOURLY\" },\n { \"INCLUDE_RESOURCES\", \"FALSE\" },\n { \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\" },\n { \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\" },\n } },\n },\n },\n },\n DestinationConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationArgs\n {\n S3Destinations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationArgs\n {\n S3Bucket = testAwsS3Bucket.Bucket,\n S3Prefix = testAwsS3Bucket.BucketPrefix,\n S3Region = testAwsS3Bucket.Region,\n S3OutputConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs\n {\n Overwrite = \"OVERWRITE_REPORT\",\n Format = \"TEXT_OR_CSV\",\n Compression = \"GZIP\",\n OutputType = \"CUSTOM\",\n },\n },\n },\n },\n },\n },\n RefreshCadences = new[]\n {\n new Aws.BcmData.Inputs.ExportExportRefreshCadenceArgs\n {\n Frequency = \"SYNCHRONOUS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bcmdata\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bcmdata.NewExport(ctx, \"test\", \u0026bcmdata.ExportArgs{\n\t\t\tExport: \u0026bcmdata.ExportExportArgs{\n\t\t\t\tName: pulumi.String(\"testexample\"),\n\t\t\t\tDataQueries: bcmdata.ExportExportDataQueryArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDataQueryArgs{\n\t\t\t\t\t\tQueryStatement: pulumi.String(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\"),\n\t\t\t\t\t\tTableConfigurations: pulumi.StringMapMap{\n\t\t\t\t\t\t\t\"COST_AND_USAGE_REPORT\": pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"TIME_GRANULARITY\": pulumi.String(\"HOURLY\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_RESOURCES\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": pulumi.String(\"FALSE\"),\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\tDestinationConfigurations: bcmdata.ExportExportDestinationConfigurationArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationArgs{\n\t\t\t\t\t\tS3Destinations: bcmdata.ExportExportDestinationConfigurationS3DestinationArray{\n\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationArgs{\n\t\t\t\t\t\t\t\tS3Bucket: pulumi.Any(testAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\tS3Prefix: pulumi.Any(testAwsS3Bucket.BucketPrefix),\n\t\t\t\t\t\t\t\tS3Region: pulumi.Any(testAwsS3Bucket.Region),\n\t\t\t\t\t\t\t\tS3OutputConfigurations: bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArray{\n\t\t\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs{\n\t\t\t\t\t\t\t\t\t\tOverwrite: pulumi.String(\"OVERWRITE_REPORT\"),\n\t\t\t\t\t\t\t\t\t\tFormat: pulumi.String(\"TEXT_OR_CSV\"),\n\t\t\t\t\t\t\t\t\t\tCompression: pulumi.String(\"GZIP\"),\n\t\t\t\t\t\t\t\t\t\tOutputType: pulumi.String(\"CUSTOM\"),\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},\n\t\t\t\t},\n\t\t\t\tRefreshCadences: bcmdata.ExportExportRefreshCadenceArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportRefreshCadenceArgs{\n\t\t\t\t\t\tFrequency: pulumi.String(\"SYNCHRONOUS\"),\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.bcmdata.Export;\nimport com.pulumi.aws.bcmdata.ExportArgs;\nimport com.pulumi.aws.bcmdata.inputs.ExportExportArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Export(\"test\", ExportArgs.builder()\n .export(ExportExportArgs.builder()\n .name(\"testexample\")\n .dataQueries(ExportExportDataQueryArgs.builder()\n .queryStatement(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\")\n .tableConfigurations(Map.of(\"COST_AND_USAGE_REPORT\", Map.ofEntries(\n Map.entry(\"TIME_GRANULARITY\", \"HOURLY\"),\n Map.entry(\"INCLUDE_RESOURCES\", \"FALSE\"),\n Map.entry(\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\"),\n Map.entry(\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\")\n )))\n .build())\n .destinationConfigurations(ExportExportDestinationConfigurationArgs.builder()\n .s3Destinations(ExportExportDestinationConfigurationS3DestinationArgs.builder()\n .s3Bucket(testAwsS3Bucket.bucket())\n .s3Prefix(testAwsS3Bucket.bucketPrefix())\n .s3Region(testAwsS3Bucket.region())\n .s3OutputConfigurations(ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs.builder()\n .overwrite(\"OVERWRITE_REPORT\")\n .format(\"TEXT_OR_CSV\")\n .compression(\"GZIP\")\n .outputType(\"CUSTOM\")\n .build())\n .build())\n .build())\n .refreshCadences(ExportExportRefreshCadenceArgs.builder()\n .frequency(\"SYNCHRONOUS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:bcmdata:Export\n properties:\n export:\n name: testexample\n dataQueries:\n - queryStatement: SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\n tableConfigurations:\n COST_AND_USAGE_REPORT:\n TIME_GRANULARITY: HOURLY\n INCLUDE_RESOURCES: FALSE\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: FALSE\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: FALSE\n destinationConfigurations:\n - s3Destinations:\n - s3Bucket: ${testAwsS3Bucket.bucket}\n s3Prefix: ${testAwsS3Bucket.bucketPrefix}\n s3Region: ${testAwsS3Bucket.region}\n s3OutputConfigurations:\n - overwrite: OVERWRITE_REPORT\n format: TEXT_OR_CSV\n compression: GZIP\n outputType: CUSTOM\n refreshCadences:\n - frequency: SYNCHRONOUS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import BCM Data Exports Export using the export ARN. For example:\n\n```sh\n$ pulumi import aws:bcmdata/export:Export example arn:aws:bcm-data-exports:us-east-1:123456789012:export/CostUsageReport-9f1c75f3-f982-4d9a-b936-1e7ecab814b7\n```\n", + "description": "Resource for managing an AWS BCM Data Exports Export.\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 = new aws.bcmdata.Export(\"test\", {\"export\": {\n name: \"testexample\",\n dataQueries: [{\n queryStatement: \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n tableConfigurations: {\n COST_AND_USAGE_REPORT: {\n TIME_GRANULARITY: \"HOURLY\",\n INCLUDE_RESOURCES: \"FALSE\",\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: \"FALSE\",\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: \"FALSE\",\n },\n },\n }],\n destinationConfigurations: [{\n s3Destinations: [{\n s3Bucket: testAwsS3Bucket.bucket,\n s3Prefix: testAwsS3Bucket.bucketPrefix,\n s3Region: testAwsS3Bucket.region,\n s3OutputConfigurations: [{\n overwrite: \"OVERWRITE_REPORT\",\n format: \"TEXT_OR_CSV\",\n compression: \"GZIP\",\n outputType: \"CUSTOM\",\n }],\n }],\n }],\n refreshCadences: [{\n frequency: \"SYNCHRONOUS\",\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bcmdata.Export(\"test\", export={\n \"name\": \"testexample\",\n \"data_queries\": [{\n \"query_statement\": \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n \"table_configurations\": {\n \"COST_AND_USAGE_REPORT\": {\n \"TIME_GRANULARITY\": \"HOURLY\",\n \"INCLUDE_RESOURCES\": \"FALSE\",\n \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": \"FALSE\",\n \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": \"FALSE\",\n },\n },\n }],\n \"destination_configurations\": [{\n \"s3_destinations\": [{\n \"s3_bucket\": test_aws_s3_bucket[\"bucket\"],\n \"s3_prefix\": test_aws_s3_bucket[\"bucketPrefix\"],\n \"s3_region\": test_aws_s3_bucket[\"region\"],\n \"s3_output_configurations\": [{\n \"overwrite\": \"OVERWRITE_REPORT\",\n \"format\": \"TEXT_OR_CSV\",\n \"compression\": \"GZIP\",\n \"output_type\": \"CUSTOM\",\n }],\n }],\n }],\n \"refresh_cadences\": [{\n \"frequency\": \"SYNCHRONOUS\",\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.BcmData.Export(\"test\", new()\n {\n ExportDetails = new Aws.BcmData.Inputs.ExportExportArgs\n {\n Name = \"testexample\",\n DataQueries = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDataQueryArgs\n {\n QueryStatement = \"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\",\n TableConfigurations = \n {\n { \"COST_AND_USAGE_REPORT\", \n {\n { \"TIME_GRANULARITY\", \"HOURLY\" },\n { \"INCLUDE_RESOURCES\", \"FALSE\" },\n { \"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\" },\n { \"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\" },\n } },\n },\n },\n },\n DestinationConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationArgs\n {\n S3Destinations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationArgs\n {\n S3Bucket = testAwsS3Bucket.Bucket,\n S3Prefix = testAwsS3Bucket.BucketPrefix,\n S3Region = testAwsS3Bucket.Region,\n S3OutputConfigurations = new[]\n {\n new Aws.BcmData.Inputs.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs\n {\n Overwrite = \"OVERWRITE_REPORT\",\n Format = \"TEXT_OR_CSV\",\n Compression = \"GZIP\",\n OutputType = \"CUSTOM\",\n },\n },\n },\n },\n },\n },\n RefreshCadences = new[]\n {\n new Aws.BcmData.Inputs.ExportExportRefreshCadenceArgs\n {\n Frequency = \"SYNCHRONOUS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bcmdata\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bcmdata.NewExport(ctx, \"test\", \u0026bcmdata.ExportArgs{\n\t\t\tExport: \u0026bcmdata.ExportExportArgs{\n\t\t\t\tName: pulumi.String(\"testexample\"),\n\t\t\t\tDataQueries: bcmdata.ExportExportDataQueryArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDataQueryArgs{\n\t\t\t\t\t\tQueryStatement: pulumi.String(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\"),\n\t\t\t\t\t\tTableConfigurations: pulumi.StringMapMap{\n\t\t\t\t\t\t\t\"COST_AND_USAGE_REPORT\": pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"TIME_GRANULARITY\": pulumi.String(\"HOURLY\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_RESOURCES\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\": pulumi.String(\"FALSE\"),\n\t\t\t\t\t\t\t\t\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\": pulumi.String(\"FALSE\"),\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\tDestinationConfigurations: bcmdata.ExportExportDestinationConfigurationArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationArgs{\n\t\t\t\t\t\tS3Destinations: bcmdata.ExportExportDestinationConfigurationS3DestinationArray{\n\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationArgs{\n\t\t\t\t\t\t\t\tS3Bucket: pulumi.Any(testAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\tS3Prefix: pulumi.Any(testAwsS3Bucket.BucketPrefix),\n\t\t\t\t\t\t\t\tS3Region: pulumi.Any(testAwsS3Bucket.Region),\n\t\t\t\t\t\t\t\tS3OutputConfigurations: bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArray{\n\t\t\t\t\t\t\t\t\t\u0026bcmdata.ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs{\n\t\t\t\t\t\t\t\t\t\tOverwrite: pulumi.String(\"OVERWRITE_REPORT\"),\n\t\t\t\t\t\t\t\t\t\tFormat: pulumi.String(\"TEXT_OR_CSV\"),\n\t\t\t\t\t\t\t\t\t\tCompression: pulumi.String(\"GZIP\"),\n\t\t\t\t\t\t\t\t\t\tOutputType: pulumi.String(\"CUSTOM\"),\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},\n\t\t\t\t},\n\t\t\t\tRefreshCadences: bcmdata.ExportExportRefreshCadenceArray{\n\t\t\t\t\t\u0026bcmdata.ExportExportRefreshCadenceArgs{\n\t\t\t\t\t\tFrequency: pulumi.String(\"SYNCHRONOUS\"),\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.bcmdata.Export;\nimport com.pulumi.aws.bcmdata.ExportArgs;\nimport com.pulumi.aws.bcmdata.inputs.ExportExportArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Export(\"test\", ExportArgs.builder()\n .export(ExportExportArgs.builder()\n .name(\"testexample\")\n .dataQueries(ExportExportDataQueryArgs.builder()\n .queryStatement(\"SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\")\n .tableConfigurations(Map.of(\"COST_AND_USAGE_REPORT\", Map.ofEntries(\n Map.entry(\"TIME_GRANULARITY\", \"HOURLY\"),\n Map.entry(\"INCLUDE_RESOURCES\", \"FALSE\"),\n Map.entry(\"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY\", \"FALSE\"),\n Map.entry(\"INCLUDE_SPLIT_COST_ALLOCATION_DATA\", \"FALSE\")\n )))\n .build())\n .destinationConfigurations(ExportExportDestinationConfigurationArgs.builder()\n .s3Destinations(ExportExportDestinationConfigurationS3DestinationArgs.builder()\n .s3Bucket(testAwsS3Bucket.bucket())\n .s3Prefix(testAwsS3Bucket.bucketPrefix())\n .s3Region(testAwsS3Bucket.region())\n .s3OutputConfigurations(ExportExportDestinationConfigurationS3DestinationS3OutputConfigurationArgs.builder()\n .overwrite(\"OVERWRITE_REPORT\")\n .format(\"TEXT_OR_CSV\")\n .compression(\"GZIP\")\n .outputType(\"CUSTOM\")\n .build())\n .build())\n .build())\n .refreshCadences(ExportExportRefreshCadenceArgs.builder()\n .frequency(\"SYNCHRONOUS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:bcmdata:Export\n properties:\n export:\n name: testexample\n dataQueries:\n - queryStatement: SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT\n tableConfigurations:\n COST_AND_USAGE_REPORT:\n TIME_GRANULARITY: HOURLY\n INCLUDE_RESOURCES: FALSE\n INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY: FALSE\n INCLUDE_SPLIT_COST_ALLOCATION_DATA: FALSE\n destinationConfigurations:\n - s3Destinations:\n - s3Bucket: ${testAwsS3Bucket.bucket}\n s3Prefix: ${testAwsS3Bucket.bucketPrefix}\n s3Region: ${testAwsS3Bucket.region}\n s3OutputConfigurations:\n - overwrite: OVERWRITE_REPORT\n format: TEXT_OR_CSV\n compression: GZIP\n outputType: CUSTOM\n refreshCadences:\n - frequency: SYNCHRONOUS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import BCM Data Exports Export using the export ARN. For example:\n\n```sh\n$ pulumi import aws:bcmdata/export:Export example arn:aws:bcm-data-exports:us-east-1:123456789012:export/CostUsageReport-9f1c75f3-f982-4d9a-b936-1e7ecab814b7\n```\n", "properties": { "export": { "$ref": "#/types/aws:bcmdata/ExportExport:ExportExport", @@ -203144,7 +203144,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\": 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### AppSync 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 invokeAppsyncMutation = new aws.cloudwatch.EventRule(\"invoke_appsync_mutation\", {\n name: \"invoke-appsync-mutation\",\n description: \"schedule_batch_test\",\n scheduleExpression: \"rate(5 minutes)\",\n});\nconst appsyncMutationRoleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst appsyncMutationRole = new aws.iam.Role(\"appsync_mutation_role\", {\n name: \"appsync-mutation-role\",\n assumeRolePolicy: appsyncMutationRoleTrust.then(appsyncMutationRoleTrust =\u003e appsyncMutationRoleTrust.json),\n});\nconst graphql_api = new aws.appsync.GraphQLApi(\"graphql-api\", {\n name: \"api\",\n authenticationType: \"AWS_IAM\",\n schema: ` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`,\n});\nconst invokeAppsyncMutationEventTarget = new aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\", {\n arn: std.replaceOutput({\n text: graphql_api.arn,\n search: \"apis\",\n replace: \"endpoints/graphql-api\",\n }).apply(invoke =\u003e invoke.result),\n rule: invokeAppsyncMutation.id,\n roleArn: appsyncMutationRole.arn,\n inputTransformer: {\n inputPaths: {\n input: \"$.detail.input\",\n },\n inputTemplate: ` {\n \"input\": \u003cinput\u003e\n }\n`,\n },\n appsyncTarget: {\n graphqlOperation: \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n});\nconst appsyncMutationRolePolicyDocument = aws.iam.getPolicyDocumentOutput({\n statements: [{\n actions: [\"appsync:GraphQL\"],\n effect: \"Allow\",\n resources: [graphql_api.arn],\n }],\n});\nconst appsyncMutationRolePolicy = new aws.iam.Policy(\"appsync_mutation_role_policy\", {\n name: \"appsync-mutation-role-policy\",\n policy: appsyncMutationRolePolicyDocument.apply(appsyncMutationRolePolicyDocument =\u003e appsyncMutationRolePolicyDocument.json),\n});\nconst appsyncMutationRoleAttachment = new aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", {\n policyArn: appsyncMutationRolePolicy.arn,\n role: appsyncMutationRole.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ninvoke_appsync_mutation = aws.cloudwatch.EventRule(\"invoke_appsync_mutation\",\n name=\"invoke-appsync-mutation\",\n description=\"schedule_batch_test\",\n schedule_expression=\"rate(5 minutes)\")\nappsync_mutation_role_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nappsync_mutation_role = aws.iam.Role(\"appsync_mutation_role\",\n name=\"appsync-mutation-role\",\n assume_role_policy=appsync_mutation_role_trust.json)\ngraphql_api = aws.appsync.GraphQLApi(\"graphql-api\",\n name=\"api\",\n authentication_type=\"AWS_IAM\",\n schema=\"\"\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\"\"\")\ninvoke_appsync_mutation_event_target = aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\",\n arn=std.replace_output(text=graphql_api.arn,\n search=\"apis\",\n replace=\"endpoints/graphql-api\").apply(lambda invoke: invoke.result),\n rule=invoke_appsync_mutation.id,\n role_arn=appsync_mutation_role.arn,\n input_transformer={\n \"input_paths\": {\n \"input\": \"$.detail.input\",\n },\n \"input_template\": \"\"\" {\n \"input\": \u003cinput\u003e\n }\n\"\"\",\n },\n appsync_target={\n \"graphql_operation\": \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n })\nappsync_mutation_role_policy_document = aws.iam.get_policy_document_output(statements=[{\n \"actions\": [\"appsync:GraphQL\"],\n \"effect\": \"Allow\",\n \"resources\": [graphql_api.arn],\n}])\nappsync_mutation_role_policy = aws.iam.Policy(\"appsync_mutation_role_policy\",\n name=\"appsync-mutation-role-policy\",\n policy=appsync_mutation_role_policy_document.json)\nappsync_mutation_role_attachment = aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\",\n policy_arn=appsync_mutation_role_policy.arn,\n role=appsync_mutation_role.name)\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 invokeAppsyncMutation = new Aws.CloudWatch.EventRule(\"invoke_appsync_mutation\", new()\n {\n Name = \"invoke-appsync-mutation\",\n Description = \"schedule_batch_test\",\n ScheduleExpression = \"rate(5 minutes)\",\n });\n\n var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Aws.Iam.Role(\"appsync_mutation_role\", new()\n {\n Name = \"appsync-mutation-role\",\n AssumeRolePolicy = appsyncMutationRoleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var graphql_api = new Aws.AppSync.GraphQLApi(\"graphql-api\", new()\n {\n Name = \"api\",\n AuthenticationType = \"AWS_IAM\",\n Schema = @\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\",\n });\n\n var invokeAppsyncMutationEventTarget = new Aws.CloudWatch.EventTarget(\"invoke_appsync_mutation\", new()\n {\n Arn = Std.Replace.Invoke(new()\n {\n Text = graphql_api.Arn,\n Search = \"apis\",\n Replace = \"endpoints/graphql-api\",\n }).Apply(invoke =\u003e invoke.Result),\n Rule = invokeAppsyncMutation.Id,\n RoleArn = appsyncMutationRole.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"input\", \"$.detail.input\" },\n },\n InputTemplate = @\" {\n \"\"input\"\": \u003cinput\u003e\n }\n\",\n },\n AppsyncTarget = new Aws.CloudWatch.Inputs.EventTargetAppsyncTargetArgs\n {\n GraphqlOperation = \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n });\n\n var appsyncMutationRolePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"appsync:GraphQL\",\n },\n Effect = \"Allow\",\n Resources = new[]\n {\n graphql_api.Arn,\n },\n },\n },\n });\n\n var appsyncMutationRolePolicy = new Aws.Iam.Policy(\"appsync_mutation_role_policy\", new()\n {\n Name = \"appsync-mutation-role-policy\",\n PolicyDocument = appsyncMutationRolePolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var appsyncMutationRoleAttachment = new Aws.Iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", new()\n {\n PolicyArn = appsyncMutationRolePolicy.Arn,\n Role = appsyncMutationRole.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync\"\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)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeAppsyncMutation, err := cloudwatch.NewEventRule(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"invoke-appsync-mutation\"),\n\t\t\tDescription: pulumi.String(\"schedule_batch_test\"),\n\t\t\tScheduleExpression: pulumi.String(\"rate(5 minutes)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRoleTrust, 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\tappsyncMutationRole, err := iam.NewRole(ctx, \"appsync_mutation_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(appsyncMutationRoleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appsync.NewGraphQLApi(ctx, \"graphql-api\", \u0026appsync.GraphQLApiArgs{\n\t\t\tName: pulumi.String(\"api\"),\n\t\t\tAuthenticationType: pulumi.String(\"AWS_IAM\"),\n\t\t\tSchema: pulumi.String(` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.String(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\tText: graphql_api.Arn,\n\t\t\t\tSearch: pulumi.String(\"apis\"),\n\t\t\t\tReplace: pulumi.String(\"endpoints/graphql-api\"),\n\t\t\t}, nil).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tRule: invokeAppsyncMutation.ID(),\n\t\t\tRoleArn: appsyncMutationRole.Arn,\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"input\": pulumi.String(\"$.detail.input\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\" {\\n \\\"input\\\": \u003cinput\u003e\\n }\\n\"),\n\t\t\t},\n\t\t\tAppsyncTarget: \u0026cloudwatch.EventTargetAppsyncTargetArgs{\n\t\t\t\tGraphqlOperation: pulumi.String(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRolePolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"appsync:GraphQL\"),\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgraphql_api.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tappsyncMutationRolePolicy, err := iam.NewPolicy(ctx, \"appsync_mutation_role_policy\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role-policy\"),\n\t\t\tPolicy: pulumi.String(appsyncMutationRolePolicyDocument.ApplyT(func(appsyncMutationRolePolicyDocument iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026appsyncMutationRolePolicyDocument.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, \"appsync_mutation_role_attachment\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: appsyncMutationRolePolicy.Arn,\n\t\t\tRole: appsyncMutationRole.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.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\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.appsync.GraphQLApi;\nimport com.pulumi.aws.appsync.GraphQLApiArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetAppsyncTargetArgs;\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 java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var invokeAppsyncMutation = new EventRule(\"invokeAppsyncMutation\", EventRuleArgs.builder()\n .name(\"invoke-appsync-mutation\")\n .description(\"schedule_batch_test\")\n .scheduleExpression(\"rate(5 minutes)\")\n .build());\n\n final var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Role(\"appsyncMutationRole\", RoleArgs.builder()\n .name(\"appsync-mutation-role\")\n .assumeRolePolicy(appsyncMutationRoleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var graphql_api = new GraphQLApi(\"graphql-api\", GraphQLApiArgs.builder()\n .name(\"api\")\n .authenticationType(\"AWS_IAM\")\n .schema(\"\"\"\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n \"\"\")\n .build());\n\n var invokeAppsyncMutationEventTarget = new EventTarget(\"invokeAppsyncMutationEventTarget\", EventTargetArgs.builder()\n .arn(StdFunctions.replace().applyValue(invoke -\u003e invoke.result()))\n .rule(invokeAppsyncMutation.id())\n .roleArn(appsyncMutationRole.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.of(\"input\", \"$.detail.input\"))\n .inputTemplate(\"\"\"\n {\n \"input\": \u003cinput\u003e\n }\n \"\"\")\n .build())\n .appsyncTarget(EventTargetAppsyncTargetArgs.builder()\n .graphqlOperation(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\")\n .build())\n .build());\n\n final var appsyncMutationRolePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"appsync:GraphQL\")\n .effect(\"Allow\")\n .resources(graphql_api.arn())\n .build())\n .build());\n\n var appsyncMutationRolePolicy = new Policy(\"appsyncMutationRolePolicy\", PolicyArgs.builder()\n .name(\"appsync-mutation-role-policy\")\n .policy(appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(appsyncMutationRolePolicyDocument -\u003e appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var appsyncMutationRoleAttachment = new RolePolicyAttachment(\"appsyncMutationRoleAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(appsyncMutationRolePolicy.arn())\n .role(appsyncMutationRole.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n invokeAppsyncMutation:\n type: aws:cloudwatch:EventRule\n name: invoke_appsync_mutation\n properties:\n name: invoke-appsync-mutation\n description: schedule_batch_test\n scheduleExpression: rate(5 minutes)\n invokeAppsyncMutationEventTarget:\n type: aws:cloudwatch:EventTarget\n name: invoke_appsync_mutation\n properties:\n arn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${[\"graphql-api\"].arn}\n search: apis\n replace: endpoints/graphql-api\n Return: result\n rule: ${invokeAppsyncMutation.id}\n roleArn: ${appsyncMutationRole.arn}\n inputTransformer:\n inputPaths:\n input: $.detail.input\n inputTemplate: |2\n {\n \"input\": \u003cinput\u003e\n }\n appsyncTarget:\n graphqlOperation: 'mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}'\n appsyncMutationRole:\n type: aws:iam:Role\n name: appsync_mutation_role\n properties:\n name: appsync-mutation-role\n assumeRolePolicy: ${appsyncMutationRoleTrust.json}\n appsyncMutationRolePolicy:\n type: aws:iam:Policy\n name: appsync_mutation_role_policy\n properties:\n name: appsync-mutation-role-policy\n policy: ${appsyncMutationRolePolicyDocument.json}\n appsyncMutationRoleAttachment:\n type: aws:iam:RolePolicyAttachment\n name: appsync_mutation_role_attachment\n properties:\n policyArn: ${appsyncMutationRolePolicy.arn}\n role: ${appsyncMutationRole.name}\n graphql-api:\n type: aws:appsync:GraphQLApi\n properties:\n name: api\n authenticationType: AWS_IAM\n schema: |2\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\nvariables:\n appsyncMutationRoleTrust:\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 appsyncMutationRolePolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - appsync:GraphQL\n effect: Allow\n resources:\n - ${[\"graphql-api\"].arn}\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### AppSync 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 invokeAppsyncMutation = new aws.cloudwatch.EventRule(\"invoke_appsync_mutation\", {\n name: \"invoke-appsync-mutation\",\n description: \"schedule_batch_test\",\n scheduleExpression: \"rate(5 minutes)\",\n});\nconst appsyncMutationRoleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst appsyncMutationRole = new aws.iam.Role(\"appsync_mutation_role\", {\n name: \"appsync-mutation-role\",\n assumeRolePolicy: appsyncMutationRoleTrust.then(appsyncMutationRoleTrust =\u003e appsyncMutationRoleTrust.json),\n});\nconst graphql_api = new aws.appsync.GraphQLApi(\"graphql-api\", {\n name: \"api\",\n authenticationType: \"AWS_IAM\",\n schema: ` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`,\n});\nconst invokeAppsyncMutationEventTarget = new aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\", {\n arn: std.replaceOutput({\n text: graphql_api.arn,\n search: \"apis\",\n replace: \"endpoints/graphql-api\",\n }).apply(invoke =\u003e invoke.result),\n rule: invokeAppsyncMutation.id,\n roleArn: appsyncMutationRole.arn,\n inputTransformer: {\n inputPaths: {\n input: \"$.detail.input\",\n },\n inputTemplate: ` {\n \"input\": \u003cinput\u003e\n }\n`,\n },\n appsyncTarget: {\n graphqlOperation: \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n});\nconst appsyncMutationRolePolicyDocument = aws.iam.getPolicyDocumentOutput({\n statements: [{\n actions: [\"appsync:GraphQL\"],\n effect: \"Allow\",\n resources: [graphql_api.arn],\n }],\n});\nconst appsyncMutationRolePolicy = new aws.iam.Policy(\"appsync_mutation_role_policy\", {\n name: \"appsync-mutation-role-policy\",\n policy: appsyncMutationRolePolicyDocument.apply(appsyncMutationRolePolicyDocument =\u003e appsyncMutationRolePolicyDocument.json),\n});\nconst appsyncMutationRoleAttachment = new aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", {\n policyArn: appsyncMutationRolePolicy.arn,\n role: appsyncMutationRole.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ninvoke_appsync_mutation = aws.cloudwatch.EventRule(\"invoke_appsync_mutation\",\n name=\"invoke-appsync-mutation\",\n description=\"schedule_batch_test\",\n schedule_expression=\"rate(5 minutes)\")\nappsync_mutation_role_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nappsync_mutation_role = aws.iam.Role(\"appsync_mutation_role\",\n name=\"appsync-mutation-role\",\n assume_role_policy=appsync_mutation_role_trust.json)\ngraphql_api = aws.appsync.GraphQLApi(\"graphql-api\",\n name=\"api\",\n authentication_type=\"AWS_IAM\",\n schema=\"\"\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\"\"\")\ninvoke_appsync_mutation_event_target = aws.cloudwatch.EventTarget(\"invoke_appsync_mutation\",\n arn=std.replace_output(text=graphql_api.arn,\n search=\"apis\",\n replace=\"endpoints/graphql-api\").apply(lambda invoke: invoke.result),\n rule=invoke_appsync_mutation.id,\n role_arn=appsync_mutation_role.arn,\n input_transformer={\n \"input_paths\": {\n \"input\": \"$.detail.input\",\n },\n \"input_template\": \"\"\" {\n \"input\": \u003cinput\u003e\n }\n\"\"\",\n },\n appsync_target={\n \"graphql_operation\": \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n })\nappsync_mutation_role_policy_document = aws.iam.get_policy_document_output(statements=[{\n \"actions\": [\"appsync:GraphQL\"],\n \"effect\": \"Allow\",\n \"resources\": [graphql_api.arn],\n}])\nappsync_mutation_role_policy = aws.iam.Policy(\"appsync_mutation_role_policy\",\n name=\"appsync-mutation-role-policy\",\n policy=appsync_mutation_role_policy_document.json)\nappsync_mutation_role_attachment = aws.iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\",\n policy_arn=appsync_mutation_role_policy.arn,\n role=appsync_mutation_role.name)\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 invokeAppsyncMutation = new Aws.CloudWatch.EventRule(\"invoke_appsync_mutation\", new()\n {\n Name = \"invoke-appsync-mutation\",\n Description = \"schedule_batch_test\",\n ScheduleExpression = \"rate(5 minutes)\",\n });\n\n var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Aws.Iam.Role(\"appsync_mutation_role\", new()\n {\n Name = \"appsync-mutation-role\",\n AssumeRolePolicy = appsyncMutationRoleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var graphql_api = new Aws.AppSync.GraphQLApi(\"graphql-api\", new()\n {\n Name = \"api\",\n AuthenticationType = \"AWS_IAM\",\n Schema = @\" schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n\",\n });\n\n var invokeAppsyncMutationEventTarget = new Aws.CloudWatch.EventTarget(\"invoke_appsync_mutation\", new()\n {\n Arn = Std.Replace.Invoke(new()\n {\n Text = graphql_api.Arn,\n Search = \"apis\",\n Replace = \"endpoints/graphql-api\",\n }).Apply(invoke =\u003e invoke.Result),\n Rule = invokeAppsyncMutation.Id,\n RoleArn = appsyncMutationRole.Arn,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"input\", \"$.detail.input\" },\n },\n InputTemplate = @\" {\n \"\"input\"\": \u003cinput\u003e\n }\n\",\n },\n AppsyncTarget = new Aws.CloudWatch.Inputs.EventTargetAppsyncTargetArgs\n {\n GraphqlOperation = \"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\",\n },\n });\n\n var appsyncMutationRolePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"appsync:GraphQL\",\n },\n Effect = \"Allow\",\n Resources = new[]\n {\n graphql_api.Arn,\n },\n },\n },\n });\n\n var appsyncMutationRolePolicy = new Aws.Iam.Policy(\"appsync_mutation_role_policy\", new()\n {\n Name = \"appsync-mutation-role-policy\",\n PolicyDocument = appsyncMutationRolePolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var appsyncMutationRoleAttachment = new Aws.Iam.RolePolicyAttachment(\"appsync_mutation_role_attachment\", new()\n {\n PolicyArn = appsyncMutationRolePolicy.Arn,\n Role = appsyncMutationRole.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appsync\"\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)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeAppsyncMutation, err := cloudwatch.NewEventRule(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"invoke-appsync-mutation\"),\n\t\t\tDescription: pulumi.String(\"schedule_batch_test\"),\n\t\t\tScheduleExpression: pulumi.String(\"rate(5 minutes)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRoleTrust, 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\tappsyncMutationRole, err := iam.NewRole(ctx, \"appsync_mutation_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(appsyncMutationRoleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appsync.NewGraphQLApi(ctx, \"graphql-api\", \u0026appsync.GraphQLApiArgs{\n\t\t\tName: pulumi.String(\"api\"),\n\t\t\tAuthenticationType: pulumi.String(\"AWS_IAM\"),\n\t\t\tSchema: pulumi.String(` schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"invoke_appsync_mutation\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.String(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\tText: graphql_api.Arn,\n\t\t\t\tSearch: pulumi.String(\"apis\"),\n\t\t\t\tReplace: pulumi.String(\"endpoints/graphql-api\"),\n\t\t\t}, nil).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tRule: invokeAppsyncMutation.ID(),\n\t\t\tRoleArn: appsyncMutationRole.Arn,\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"input\": pulumi.String(\"$.detail.input\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\" {\\n \\\"input\\\": \u003cinput\u003e\\n }\\n\"),\n\t\t\t},\n\t\t\tAppsyncTarget: \u0026cloudwatch.EventTargetAppsyncTargetArgs{\n\t\t\t\tGraphqlOperation: pulumi.String(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tappsyncMutationRolePolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"appsync:GraphQL\"),\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgraphql_api.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tappsyncMutationRolePolicy, err := iam.NewPolicy(ctx, \"appsync_mutation_role_policy\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"appsync-mutation-role-policy\"),\n\t\t\tPolicy: pulumi.String(appsyncMutationRolePolicyDocument.ApplyT(func(appsyncMutationRolePolicyDocument iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026appsyncMutationRolePolicyDocument.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, \"appsync_mutation_role_attachment\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: appsyncMutationRolePolicy.Arn,\n\t\t\tRole: appsyncMutationRole.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.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\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.appsync.GraphQLApi;\nimport com.pulumi.aws.appsync.GraphQLApiArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetAppsyncTargetArgs;\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 java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var invokeAppsyncMutation = new EventRule(\"invokeAppsyncMutation\", EventRuleArgs.builder()\n .name(\"invoke-appsync-mutation\")\n .description(\"schedule_batch_test\")\n .scheduleExpression(\"rate(5 minutes)\")\n .build());\n\n final var appsyncMutationRoleTrust = 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 appsyncMutationRole = new Role(\"appsyncMutationRole\", RoleArgs.builder()\n .name(\"appsync-mutation-role\")\n .assumeRolePolicy(appsyncMutationRoleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var graphql_api = new GraphQLApi(\"graphql-api\", GraphQLApiArgs.builder()\n .name(\"api\")\n .authenticationType(\"AWS_IAM\")\n .schema(\"\"\"\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\n \"\"\")\n .build());\n\n var invokeAppsyncMutationEventTarget = new EventTarget(\"invokeAppsyncMutationEventTarget\", EventTargetArgs.builder()\n .arn(StdFunctions.replace().applyValue(invoke -\u003e invoke.result()))\n .rule(invokeAppsyncMutation.id())\n .roleArn(appsyncMutationRole.arn())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.of(\"input\", \"$.detail.input\"))\n .inputTemplate(\"\"\"\n {\n \"input\": \u003cinput\u003e\n }\n \"\"\")\n .build())\n .appsyncTarget(EventTargetAppsyncTargetArgs.builder()\n .graphqlOperation(\"mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}\")\n .build())\n .build());\n\n final var appsyncMutationRolePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"appsync:GraphQL\")\n .effect(\"Allow\")\n .resources(graphql_api.arn())\n .build())\n .build());\n\n var appsyncMutationRolePolicy = new Policy(\"appsyncMutationRolePolicy\", PolicyArgs.builder()\n .name(\"appsync-mutation-role-policy\")\n .policy(appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(appsyncMutationRolePolicyDocument -\u003e appsyncMutationRolePolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var appsyncMutationRoleAttachment = new RolePolicyAttachment(\"appsyncMutationRoleAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(appsyncMutationRolePolicy.arn())\n .role(appsyncMutationRole.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n invokeAppsyncMutation:\n type: aws:cloudwatch:EventRule\n name: invoke_appsync_mutation\n properties:\n name: invoke-appsync-mutation\n description: schedule_batch_test\n scheduleExpression: rate(5 minutes)\n invokeAppsyncMutationEventTarget:\n type: aws:cloudwatch:EventTarget\n name: invoke_appsync_mutation\n properties:\n arn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${[\"graphql-api\"].arn}\n search: apis\n replace: endpoints/graphql-api\n Return: result\n rule: ${invokeAppsyncMutation.id}\n roleArn: ${appsyncMutationRole.arn}\n inputTransformer:\n inputPaths:\n input: $.detail.input\n inputTemplate: |2\n {\n \"input\": \u003cinput\u003e\n }\n appsyncTarget:\n graphqlOperation: 'mutation TestMutation($input:MutationInput!){testMutation(input: $input) {test}}'\n appsyncMutationRole:\n type: aws:iam:Role\n name: appsync_mutation_role\n properties:\n name: appsync-mutation-role\n assumeRolePolicy: ${appsyncMutationRoleTrust.json}\n appsyncMutationRolePolicy:\n type: aws:iam:Policy\n name: appsync_mutation_role_policy\n properties:\n name: appsync-mutation-role-policy\n policy: ${appsyncMutationRolePolicyDocument.json}\n appsyncMutationRoleAttachment:\n type: aws:iam:RolePolicyAttachment\n name: appsync_mutation_role_attachment\n properties:\n policyArn: ${appsyncMutationRolePolicy.arn}\n role: ${appsyncMutationRole.name}\n graphql-api:\n type: aws:appsync:GraphQLApi\n properties:\n name: api\n authenticationType: AWS_IAM\n schema: |2\n schema {\n mutation: Mutation\n query: Query\n }\n\n type Query {\n testQuery: String\n }\n\n type Mutation {\n testMutation(input: MutationInput!): TestMutationResult\n }\n\n type TestMutationResult {\n test: String\n }\n\n input MutationInput {\n testInput: String\n }\nvariables:\n appsyncMutationRoleTrust:\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 appsyncMutationRolePolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - appsync:GraphQL\n effect: Allow\n resources:\n - ${[\"graphql-api\"].arn}\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": { "appsyncTarget": { "$ref": "#/types/aws:cloudwatch/EventTargetAppsyncTarget:EventTargetAppsyncTarget", @@ -204346,7 +204346,7 @@ } }, "aws:cloudwatch/metricAlarm:MetricAlarm": { - "description": "Provides a CloudWatch Metric Alarm 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 foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example in Conjunction with Scaling Policies\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bat = new aws.autoscaling.Policy(\"bat\", {\n name: \"foobar3-test\",\n scalingAdjustment: 4,\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 300,\n autoscalingGroupName: bar.name,\n});\nconst batMetricAlarm = new aws.cloudwatch.MetricAlarm(\"bat\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n dimensions: {\n AutoScalingGroupName: bar.name,\n },\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n alarmActions: [bat.arn],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbat = aws.autoscaling.Policy(\"bat\",\n name=\"foobar3-test\",\n scaling_adjustment=4,\n adjustment_type=\"ChangeInCapacity\",\n cooldown=300,\n autoscaling_group_name=bar[\"name\"])\nbat_metric_alarm = aws.cloudwatch.MetricAlarm(\"bat\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n dimensions={\n \"AutoScalingGroupName\": bar[\"name\"],\n },\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n alarm_actions=[bat.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 bat = new Aws.AutoScaling.Policy(\"bat\", new()\n {\n Name = \"foobar3-test\",\n ScalingAdjustment = 4,\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 300,\n AutoscalingGroupName = bar.Name,\n });\n\n var batMetricAlarm = new Aws.CloudWatch.MetricAlarm(\"bat\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n Dimensions = \n {\n { \"AutoScalingGroupName\", bar.Name },\n },\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n AlarmActions = new[]\n {\n bat.Arn,\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-aws/sdk/v6/go/aws/cloudwatch\"\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\tbat, err := autoscaling.NewPolicy(ctx, \"bat\", \u0026autoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foobar3-test\"),\n\t\t\tScalingAdjustment: pulumi.Int(4),\n\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\tCooldown: pulumi.Int(300),\n\t\t\tAutoscalingGroupName: pulumi.Any(bar.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewMetricAlarm(ctx, \"bat\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"AutoScalingGroupName\": pulumi.Any(bar.Name),\n\t\t\t},\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tbat.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.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bat = new Policy(\"bat\", PolicyArgs.builder()\n .name(\"foobar3-test\")\n .scalingAdjustment(4)\n .adjustmentType(\"ChangeInCapacity\")\n .cooldown(300)\n .autoscalingGroupName(bar.name())\n .build());\n\n var batMetricAlarm = new MetricAlarm(\"batMetricAlarm\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .dimensions(Map.of(\"AutoScalingGroupName\", bar.name()))\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .alarmActions(bat.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bat:\n type: aws:autoscaling:Policy\n properties:\n name: foobar3-test\n scalingAdjustment: 4\n adjustmentType: ChangeInCapacity\n cooldown: 300\n autoscalingGroupName: ${bar.name}\n batMetricAlarm:\n type: aws:cloudwatch:MetricAlarm\n name: bat\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n dimensions:\n AutoScalingGroupName: ${bar.name}\n alarmDescription: This metric monitors ec2 cpu utilization\n alarmActions:\n - ${bat.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example with an Expression\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n threshold: 10,\n alarmDescription: \"Request error rate has exceeded 10%\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"m2/m1*100\",\n label: \"Error Rate\",\n returnData: true,\n },\n {\n id: \"m1\",\n metric: {\n metricName: \"RequestCount\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n {\n id: \"m2\",\n metric: {\n metricName: \"HTTPCode_ELB_5XX_Count\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n threshold=10,\n alarm_description=\"Request error rate has exceeded 10%\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"m2/m1*100\",\n \"label\": \"Error Rate\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"metric\": {\n \"metric_name\": \"RequestCount\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"load_balancer\": \"app/web\",\n },\n },\n },\n {\n \"id\": \"m2\",\n \"metric\": {\n \"metric_name\": \"HTTPCode_ELB_5XX_Count\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"load_balancer\": \"app/web\",\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 foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n Threshold = 10,\n AlarmDescription = \"Request error rate has exceeded 10%\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"m2/m1*100\",\n Label = \"Error Rate\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"RequestCount\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\n },\n },\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m2\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"HTTPCode_ELB_5XX_Count\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThreshold: pulumi.Float64(10),\n\t\t\tAlarmDescription: pulumi.String(\"Request error rate has exceeded 10%\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"m2/m1*100\"),\n\t\t\t\t\tLabel: pulumi.String(\"Error Rate\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"RequestCount\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"HTTPCode_ELB_5XX_Count\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .threshold(10)\n .alarmDescription(\"Request error rate has exceeded 10%\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"m2/m1*100\")\n .label(\"Error Rate\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"RequestCount\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m2\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"HTTPCode_ELB_5XX_Count\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n threshold: 10\n alarmDescription: Request error rate has exceeded 10%\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: m2/m1*100\n label: Error Rate\n returnData: 'true'\n - id: m1\n metric:\n metricName: RequestCount\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\n - id: m2\n metric:\n metricName: HTTPCode_ELB_5XX_Count\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\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 xxAnomalyDetection = new aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanUpperThreshold\",\n evaluationPeriods: 2,\n thresholdMetricId: \"e1\",\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"ANOMALY_DETECTION_BAND(m1)\",\n label: \"CPUUtilization (Expected)\",\n returnData: true,\n },\n {\n id: \"m1\",\n returnData: true,\n metric: {\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n stat: \"Average\",\n unit: \"Count\",\n dimensions: {\n InstanceId: \"i-abc123\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nxx_anomaly_detection = aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanUpperThreshold\",\n evaluation_periods=2,\n threshold_metric_id=\"e1\",\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"ANOMALY_DETECTION_BAND(m1)\",\n \"label\": \"CPUUtilization (Expected)\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"return_data\": True,\n \"metric\": {\n \"metric_name\": \"CPUUtilization\",\n \"namespace\": \"AWS/EC2\",\n \"period\": 120,\n \"stat\": \"Average\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"instance_id\": \"i-abc123\",\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 xxAnomalyDetection = new Aws.CloudWatch.MetricAlarm(\"xx_anomaly_detection\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanUpperThreshold\",\n EvaluationPeriods = 2,\n ThresholdMetricId = \"e1\",\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"ANOMALY_DETECTION_BAND(m1)\",\n Label = \"CPUUtilization (Expected)\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n ReturnData = true,\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Stat = \"Average\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"InstanceId\", \"i-abc123\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"xx_anomaly_detection\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanUpperThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThresholdMetricId: pulumi.String(\"e1\"),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"ANOMALY_DETECTION_BAND(m1)\"),\n\t\t\t\t\tLabel: pulumi.String(\"CPUUtilization (Expected)\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"InstanceId\": pulumi.String(\"i-abc123\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var xxAnomalyDetection = new MetricAlarm(\"xxAnomalyDetection\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanUpperThreshold\")\n .evaluationPeriods(2)\n .thresholdMetricId(\"e1\")\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"ANOMALY_DETECTION_BAND(m1)\")\n .label(\"CPUUtilization (Expected)\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .returnData(\"true\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .stat(\"Average\")\n .unit(\"Count\")\n .dimensions(Map.of(\"InstanceId\", \"i-abc123\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n xxAnomalyDetection:\n type: aws:cloudwatch:MetricAlarm\n name: xx_anomaly_detection\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanUpperThreshold\n evaluationPeriods: 2\n thresholdMetricId: e1\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: ANOMALY_DETECTION_BAND(m1)\n label: CPUUtilization (Expected)\n returnData: 'true'\n - id: m1\n returnData: 'true'\n metric:\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n stat: Average\n unit: Count\n dimensions:\n InstanceId: i-abc123\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example of monitoring Healthy Hosts on NLB using Target Group and NLB\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst nlbHealthyhosts = new aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\", {\n name: \"alarmname\",\n comparisonOperator: \"LessThanThreshold\",\n evaluationPeriods: 1,\n metricName: \"HealthyHostCount\",\n namespace: \"AWS/NetworkELB\",\n period: 60,\n statistic: \"Average\",\n threshold: logstashServersCount,\n alarmDescription: \"Number of healthy nodes in Target Group\",\n actionsEnabled: true,\n alarmActions: [sns.arn],\n okActions: [sns.arn],\n dimensions: {\n TargetGroup: lb_tg.arnSuffix,\n LoadBalancer: lb.arnSuffix,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnlb_healthyhosts = aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\",\n name=\"alarmname\",\n comparison_operator=\"LessThanThreshold\",\n evaluation_periods=1,\n metric_name=\"HealthyHostCount\",\n namespace=\"AWS/NetworkELB\",\n period=60,\n statistic=\"Average\",\n threshold=logstash_servers_count,\n alarm_description=\"Number of healthy nodes in Target Group\",\n actions_enabled=True,\n alarm_actions=[sns[\"arn\"]],\n ok_actions=[sns[\"arn\"]],\n dimensions={\n \"TargetGroup\": lb_tg[\"arnSuffix\"],\n \"LoadBalancer\": lb[\"arnSuffix\"],\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 nlbHealthyhosts = new Aws.CloudWatch.MetricAlarm(\"nlb_healthyhosts\", new()\n {\n Name = \"alarmname\",\n ComparisonOperator = \"LessThanThreshold\",\n EvaluationPeriods = 1,\n MetricName = \"HealthyHostCount\",\n Namespace = \"AWS/NetworkELB\",\n Period = 60,\n Statistic = \"Average\",\n Threshold = logstashServersCount,\n AlarmDescription = \"Number of healthy nodes in Target Group\",\n ActionsEnabled = true,\n AlarmActions = new[]\n {\n sns.Arn,\n },\n OkActions = new[]\n {\n sns.Arn,\n },\n Dimensions = \n {\n { \"TargetGroup\", lb_tg.ArnSuffix },\n { \"LoadBalancer\", lb.ArnSuffix },\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"nlb_healthyhosts\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"alarmname\"),\n\t\t\tComparisonOperator: pulumi.String(\"LessThanThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(1),\n\t\t\tMetricName: pulumi.String(\"HealthyHostCount\"),\n\t\t\tNamespace: pulumi.String(\"AWS/NetworkELB\"),\n\t\t\tPeriod: pulumi.Int(60),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Any(logstashServersCount),\n\t\t\tAlarmDescription: pulumi.String(\"Number of healthy nodes in Target Group\"),\n\t\t\tActionsEnabled: pulumi.Bool(true),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tOkActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"TargetGroup\": pulumi.Any(lb_tg.ArnSuffix),\n\t\t\t\t\"LoadBalancer\": pulumi.Any(lb.ArnSuffix),\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var nlbHealthyhosts = new MetricAlarm(\"nlbHealthyhosts\", MetricAlarmArgs.builder()\n .name(\"alarmname\")\n .comparisonOperator(\"LessThanThreshold\")\n .evaluationPeriods(1)\n .metricName(\"HealthyHostCount\")\n .namespace(\"AWS/NetworkELB\")\n .period(60)\n .statistic(\"Average\")\n .threshold(logstashServersCount)\n .alarmDescription(\"Number of healthy nodes in Target Group\")\n .actionsEnabled(\"true\")\n .alarmActions(sns.arn())\n .okActions(sns.arn())\n .dimensions(Map.ofEntries(\n Map.entry(\"TargetGroup\", lb_tg.arnSuffix()),\n Map.entry(\"LoadBalancer\", lb.arnSuffix())\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n nlbHealthyhosts:\n type: aws:cloudwatch:MetricAlarm\n name: nlb_healthyhosts\n properties:\n name: alarmname\n comparisonOperator: LessThanThreshold\n evaluationPeriods: 1\n metricName: HealthyHostCount\n namespace: AWS/NetworkELB\n period: 60\n statistic: Average\n threshold: ${logstashServersCount}\n alarmDescription: Number of healthy nodes in Target Group\n actionsEnabled: 'true'\n alarmActions:\n - ${sns.arn}\n okActions:\n - ${sns.arn}\n dimensions:\n TargetGroup: ${[\"lb-tg\"].arnSuffix}\n LoadBalancer: ${lb.arnSuffix}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** You cannot create a metric alarm consisting of both `statistic` and `extended_statistic` parameters.\nYou must choose one or the other\n\n## Import\n\nUsing `pulumi import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/metricAlarm:MetricAlarm test alarm-12345\n```\n", + "description": "Provides a CloudWatch Metric Alarm 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 foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example in Conjunction with Scaling Policies\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bat = new aws.autoscaling.Policy(\"bat\", {\n name: \"foobar3-test\",\n scalingAdjustment: 4,\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 300,\n autoscalingGroupName: bar.name,\n});\nconst batMetricAlarm = new aws.cloudwatch.MetricAlarm(\"bat\", {\n name: \"test-foobar5\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n statistic: \"Average\",\n threshold: 80,\n dimensions: {\n AutoScalingGroupName: bar.name,\n },\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n alarmActions: [bat.arn],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbat = aws.autoscaling.Policy(\"bat\",\n name=\"foobar3-test\",\n scaling_adjustment=4,\n adjustment_type=\"ChangeInCapacity\",\n cooldown=300,\n autoscaling_group_name=bar[\"name\"])\nbat_metric_alarm = aws.cloudwatch.MetricAlarm(\"bat\",\n name=\"test-foobar5\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n metric_name=\"CPUUtilization\",\n namespace=\"AWS/EC2\",\n period=120,\n statistic=\"Average\",\n threshold=80,\n dimensions={\n \"AutoScalingGroupName\": bar[\"name\"],\n },\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n alarm_actions=[bat.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 bat = new Aws.AutoScaling.Policy(\"bat\", new()\n {\n Name = \"foobar3-test\",\n ScalingAdjustment = 4,\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 300,\n AutoscalingGroupName = bar.Name,\n });\n\n var batMetricAlarm = new Aws.CloudWatch.MetricAlarm(\"bat\", new()\n {\n Name = \"test-foobar5\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Statistic = \"Average\",\n Threshold = 80,\n Dimensions = \n {\n { \"AutoScalingGroupName\", bar.Name },\n },\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n AlarmActions = new[]\n {\n bat.Arn,\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-aws/sdk/v6/go/aws/cloudwatch\"\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\tbat, err := autoscaling.NewPolicy(ctx, \"bat\", \u0026autoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foobar3-test\"),\n\t\t\tScalingAdjustment: pulumi.Int(4),\n\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\tCooldown: pulumi.Int(300),\n\t\t\tAutoscalingGroupName: pulumi.Any(bar.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewMetricAlarm(ctx, \"bat\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar5\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\tPeriod: pulumi.Int(120),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Float64(80),\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"AutoScalingGroupName\": pulumi.Any(bar.Name),\n\t\t\t},\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tbat.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.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bat = new Policy(\"bat\", PolicyArgs.builder()\n .name(\"foobar3-test\")\n .scalingAdjustment(4)\n .adjustmentType(\"ChangeInCapacity\")\n .cooldown(300)\n .autoscalingGroupName(bar.name())\n .build());\n\n var batMetricAlarm = new MetricAlarm(\"batMetricAlarm\", MetricAlarmArgs.builder()\n .name(\"test-foobar5\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .statistic(\"Average\")\n .threshold(80)\n .dimensions(Map.of(\"AutoScalingGroupName\", bar.name()))\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .alarmActions(bat.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bat:\n type: aws:autoscaling:Policy\n properties:\n name: foobar3-test\n scalingAdjustment: 4\n adjustmentType: ChangeInCapacity\n cooldown: 300\n autoscalingGroupName: ${bar.name}\n batMetricAlarm:\n type: aws:cloudwatch:MetricAlarm\n name: bat\n properties:\n name: test-foobar5\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n statistic: Average\n threshold: 80\n dimensions:\n AutoScalingGroupName: ${bar.name}\n alarmDescription: This metric monitors ec2 cpu utilization\n alarmActions:\n - ${bat.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example with an Expression\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foobar = new aws.cloudwatch.MetricAlarm(\"foobar\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanOrEqualToThreshold\",\n evaluationPeriods: 2,\n threshold: 10,\n alarmDescription: \"Request error rate has exceeded 10%\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"m2/m1*100\",\n label: \"Error Rate\",\n returnData: true,\n },\n {\n id: \"m1\",\n metric: {\n metricName: \"RequestCount\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n {\n id: \"m2\",\n metric: {\n metricName: \"HTTPCode_ELB_5XX_Count\",\n namespace: \"AWS/ApplicationELB\",\n period: 120,\n stat: \"Sum\",\n unit: \"Count\",\n dimensions: {\n LoadBalancer: \"app/web\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoobar = aws.cloudwatch.MetricAlarm(\"foobar\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanOrEqualToThreshold\",\n evaluation_periods=2,\n threshold=10,\n alarm_description=\"Request error rate has exceeded 10%\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"m2/m1*100\",\n \"label\": \"Error Rate\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"metric\": {\n \"metric_name\": \"RequestCount\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"LoadBalancer\": \"app/web\",\n },\n },\n },\n {\n \"id\": \"m2\",\n \"metric\": {\n \"metric_name\": \"HTTPCode_ELB_5XX_Count\",\n \"namespace\": \"AWS/ApplicationELB\",\n \"period\": 120,\n \"stat\": \"Sum\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"LoadBalancer\": \"app/web\",\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 foobar = new Aws.CloudWatch.MetricAlarm(\"foobar\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanOrEqualToThreshold\",\n EvaluationPeriods = 2,\n Threshold = 10,\n AlarmDescription = \"Request error rate has exceeded 10%\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"m2/m1*100\",\n Label = \"Error Rate\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"RequestCount\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\n },\n },\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m2\",\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"HTTPCode_ELB_5XX_Count\",\n Namespace = \"AWS/ApplicationELB\",\n Period = 120,\n Stat = \"Sum\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"LoadBalancer\", \"app/web\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"foobar\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanOrEqualToThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThreshold: pulumi.Float64(10),\n\t\t\tAlarmDescription: pulumi.String(\"Request error rate has exceeded 10%\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"m2/m1*100\"),\n\t\t\t\t\tLabel: pulumi.String(\"Error Rate\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"RequestCount\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"HTTPCode_ELB_5XX_Count\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/ApplicationELB\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"LoadBalancer\": pulumi.String(\"app/web\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foobar = new MetricAlarm(\"foobar\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanOrEqualToThreshold\")\n .evaluationPeriods(2)\n .threshold(10)\n .alarmDescription(\"Request error rate has exceeded 10%\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"m2/m1*100\")\n .label(\"Error Rate\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"RequestCount\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m2\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"HTTPCode_ELB_5XX_Count\")\n .namespace(\"AWS/ApplicationELB\")\n .period(120)\n .stat(\"Sum\")\n .unit(\"Count\")\n .dimensions(Map.of(\"LoadBalancer\", \"app/web\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foobar:\n type: aws:cloudwatch:MetricAlarm\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanOrEqualToThreshold\n evaluationPeriods: 2\n threshold: 10\n alarmDescription: Request error rate has exceeded 10%\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: m2/m1*100\n label: Error Rate\n returnData: 'true'\n - id: m1\n metric:\n metricName: RequestCount\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\n - id: m2\n metric:\n metricName: HTTPCode_ELB_5XX_Count\n namespace: AWS/ApplicationELB\n period: 120\n stat: Sum\n unit: Count\n dimensions:\n LoadBalancer: app/web\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 xxAnomalyDetection = new aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\", {\n name: \"test-foobar\",\n comparisonOperator: \"GreaterThanUpperThreshold\",\n evaluationPeriods: 2,\n thresholdMetricId: \"e1\",\n alarmDescription: \"This metric monitors ec2 cpu utilization\",\n insufficientDataActions: [],\n metricQueries: [\n {\n id: \"e1\",\n expression: \"ANOMALY_DETECTION_BAND(m1)\",\n label: \"CPUUtilization (Expected)\",\n returnData: true,\n },\n {\n id: \"m1\",\n returnData: true,\n metric: {\n metricName: \"CPUUtilization\",\n namespace: \"AWS/EC2\",\n period: 120,\n stat: \"Average\",\n unit: \"Count\",\n dimensions: {\n InstanceId: \"i-abc123\",\n },\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nxx_anomaly_detection = aws.cloudwatch.MetricAlarm(\"xx_anomaly_detection\",\n name=\"test-foobar\",\n comparison_operator=\"GreaterThanUpperThreshold\",\n evaluation_periods=2,\n threshold_metric_id=\"e1\",\n alarm_description=\"This metric monitors ec2 cpu utilization\",\n insufficient_data_actions=[],\n metric_queries=[\n {\n \"id\": \"e1\",\n \"expression\": \"ANOMALY_DETECTION_BAND(m1)\",\n \"label\": \"CPUUtilization (Expected)\",\n \"return_data\": True,\n },\n {\n \"id\": \"m1\",\n \"return_data\": True,\n \"metric\": {\n \"metric_name\": \"CPUUtilization\",\n \"namespace\": \"AWS/EC2\",\n \"period\": 120,\n \"stat\": \"Average\",\n \"unit\": \"Count\",\n \"dimensions\": {\n \"InstanceId\": \"i-abc123\",\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 xxAnomalyDetection = new Aws.CloudWatch.MetricAlarm(\"xx_anomaly_detection\", new()\n {\n Name = \"test-foobar\",\n ComparisonOperator = \"GreaterThanUpperThreshold\",\n EvaluationPeriods = 2,\n ThresholdMetricId = \"e1\",\n AlarmDescription = \"This metric monitors ec2 cpu utilization\",\n InsufficientDataActions = new[] {},\n MetricQueries = new[]\n {\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"e1\",\n Expression = \"ANOMALY_DETECTION_BAND(m1)\",\n Label = \"CPUUtilization (Expected)\",\n ReturnData = true,\n },\n new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryArgs\n {\n Id = \"m1\",\n ReturnData = true,\n Metric = new Aws.CloudWatch.Inputs.MetricAlarmMetricQueryMetricArgs\n {\n MetricName = \"CPUUtilization\",\n Namespace = \"AWS/EC2\",\n Period = 120,\n Stat = \"Average\",\n Unit = \"Count\",\n Dimensions = \n {\n { \"InstanceId\", \"i-abc123\" },\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/cloudwatch\"\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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"xx_anomaly_detection\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"test-foobar\"),\n\t\t\tComparisonOperator: pulumi.String(\"GreaterThanUpperThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(2),\n\t\t\tThresholdMetricId: pulumi.String(\"e1\"),\n\t\t\tAlarmDescription: pulumi.String(\"This metric monitors ec2 cpu utilization\"),\n\t\t\tInsufficientDataActions: pulumi.Array{},\n\t\t\tMetricQueries: cloudwatch.MetricAlarmMetricQueryArray{\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\tExpression: pulumi.String(\"ANOMALY_DETECTION_BAND(m1)\"),\n\t\t\t\t\tLabel: pulumi.String(\"CPUUtilization (Expected)\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.MetricAlarmMetricQueryArgs{\n\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\tMetric: \u0026cloudwatch.MetricAlarmMetricQueryMetricArgs{\n\t\t\t\t\t\tMetricName: pulumi.String(\"CPUUtilization\"),\n\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/EC2\"),\n\t\t\t\t\t\tPeriod: pulumi.Int(120),\n\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\tUnit: pulumi.String(\"Count\"),\n\t\t\t\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\t\t\t\"InstanceId\": pulumi.String(\"i-abc123\"),\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.cloudwatch.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryArgs;\nimport com.pulumi.aws.cloudwatch.inputs.MetricAlarmMetricQueryMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var xxAnomalyDetection = new MetricAlarm(\"xxAnomalyDetection\", MetricAlarmArgs.builder()\n .name(\"test-foobar\")\n .comparisonOperator(\"GreaterThanUpperThreshold\")\n .evaluationPeriods(2)\n .thresholdMetricId(\"e1\")\n .alarmDescription(\"This metric monitors ec2 cpu utilization\")\n .insufficientDataActions()\n .metricQueries( \n MetricAlarmMetricQueryArgs.builder()\n .id(\"e1\")\n .expression(\"ANOMALY_DETECTION_BAND(m1)\")\n .label(\"CPUUtilization (Expected)\")\n .returnData(\"true\")\n .build(),\n MetricAlarmMetricQueryArgs.builder()\n .id(\"m1\")\n .returnData(\"true\")\n .metric(MetricAlarmMetricQueryMetricArgs.builder()\n .metricName(\"CPUUtilization\")\n .namespace(\"AWS/EC2\")\n .period(120)\n .stat(\"Average\")\n .unit(\"Count\")\n .dimensions(Map.of(\"InstanceId\", \"i-abc123\"))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n xxAnomalyDetection:\n type: aws:cloudwatch:MetricAlarm\n name: xx_anomaly_detection\n properties:\n name: test-foobar\n comparisonOperator: GreaterThanUpperThreshold\n evaluationPeriods: 2\n thresholdMetricId: e1\n alarmDescription: This metric monitors ec2 cpu utilization\n insufficientDataActions: []\n metricQueries:\n - id: e1\n expression: ANOMALY_DETECTION_BAND(m1)\n label: CPUUtilization (Expected)\n returnData: 'true'\n - id: m1\n returnData: 'true'\n metric:\n metricName: CPUUtilization\n namespace: AWS/EC2\n period: 120\n stat: Average\n unit: Count\n dimensions:\n InstanceId: i-abc123\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Example of monitoring Healthy Hosts on NLB using Target Group and NLB\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst nlbHealthyhosts = new aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\", {\n name: \"alarmname\",\n comparisonOperator: \"LessThanThreshold\",\n evaluationPeriods: 1,\n metricName: \"HealthyHostCount\",\n namespace: \"AWS/NetworkELB\",\n period: 60,\n statistic: \"Average\",\n threshold: logstashServersCount,\n alarmDescription: \"Number of healthy nodes in Target Group\",\n actionsEnabled: true,\n alarmActions: [sns.arn],\n okActions: [sns.arn],\n dimensions: {\n TargetGroup: lb_tg.arnSuffix,\n LoadBalancer: lb.arnSuffix,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnlb_healthyhosts = aws.cloudwatch.MetricAlarm(\"nlb_healthyhosts\",\n name=\"alarmname\",\n comparison_operator=\"LessThanThreshold\",\n evaluation_periods=1,\n metric_name=\"HealthyHostCount\",\n namespace=\"AWS/NetworkELB\",\n period=60,\n statistic=\"Average\",\n threshold=logstash_servers_count,\n alarm_description=\"Number of healthy nodes in Target Group\",\n actions_enabled=True,\n alarm_actions=[sns[\"arn\"]],\n ok_actions=[sns[\"arn\"]],\n dimensions={\n \"TargetGroup\": lb_tg[\"arnSuffix\"],\n \"LoadBalancer\": lb[\"arnSuffix\"],\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 nlbHealthyhosts = new Aws.CloudWatch.MetricAlarm(\"nlb_healthyhosts\", new()\n {\n Name = \"alarmname\",\n ComparisonOperator = \"LessThanThreshold\",\n EvaluationPeriods = 1,\n MetricName = \"HealthyHostCount\",\n Namespace = \"AWS/NetworkELB\",\n Period = 60,\n Statistic = \"Average\",\n Threshold = logstashServersCount,\n AlarmDescription = \"Number of healthy nodes in Target Group\",\n ActionsEnabled = true,\n AlarmActions = new[]\n {\n sns.Arn,\n },\n OkActions = new[]\n {\n sns.Arn,\n },\n Dimensions = \n {\n { \"TargetGroup\", lb_tg.ArnSuffix },\n { \"LoadBalancer\", lb.ArnSuffix },\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/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\t_, err := cloudwatch.NewMetricAlarm(ctx, \"nlb_healthyhosts\", \u0026cloudwatch.MetricAlarmArgs{\n\t\t\tName: pulumi.String(\"alarmname\"),\n\t\t\tComparisonOperator: pulumi.String(\"LessThanThreshold\"),\n\t\t\tEvaluationPeriods: pulumi.Int(1),\n\t\t\tMetricName: pulumi.String(\"HealthyHostCount\"),\n\t\t\tNamespace: pulumi.String(\"AWS/NetworkELB\"),\n\t\t\tPeriod: pulumi.Int(60),\n\t\t\tStatistic: pulumi.String(\"Average\"),\n\t\t\tThreshold: pulumi.Any(logstashServersCount),\n\t\t\tAlarmDescription: pulumi.String(\"Number of healthy nodes in Target Group\"),\n\t\t\tActionsEnabled: pulumi.Bool(true),\n\t\t\tAlarmActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tOkActions: pulumi.Array{\n\t\t\t\tsns.Arn,\n\t\t\t},\n\t\t\tDimensions: pulumi.StringMap{\n\t\t\t\t\"TargetGroup\": pulumi.Any(lb_tg.ArnSuffix),\n\t\t\t\t\"LoadBalancer\": pulumi.Any(lb.ArnSuffix),\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.MetricAlarm;\nimport com.pulumi.aws.cloudwatch.MetricAlarmArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var nlbHealthyhosts = new MetricAlarm(\"nlbHealthyhosts\", MetricAlarmArgs.builder()\n .name(\"alarmname\")\n .comparisonOperator(\"LessThanThreshold\")\n .evaluationPeriods(1)\n .metricName(\"HealthyHostCount\")\n .namespace(\"AWS/NetworkELB\")\n .period(60)\n .statistic(\"Average\")\n .threshold(logstashServersCount)\n .alarmDescription(\"Number of healthy nodes in Target Group\")\n .actionsEnabled(\"true\")\n .alarmActions(sns.arn())\n .okActions(sns.arn())\n .dimensions(Map.ofEntries(\n Map.entry(\"TargetGroup\", lb_tg.arnSuffix()),\n Map.entry(\"LoadBalancer\", lb.arnSuffix())\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n nlbHealthyhosts:\n type: aws:cloudwatch:MetricAlarm\n name: nlb_healthyhosts\n properties:\n name: alarmname\n comparisonOperator: LessThanThreshold\n evaluationPeriods: 1\n metricName: HealthyHostCount\n namespace: AWS/NetworkELB\n period: 60\n statistic: Average\n threshold: ${logstashServersCount}\n alarmDescription: Number of healthy nodes in Target Group\n actionsEnabled: 'true'\n alarmActions:\n - ${sns.arn}\n okActions:\n - ${sns.arn}\n dimensions:\n TargetGroup: ${[\"lb-tg\"].arnSuffix}\n LoadBalancer: ${lb.arnSuffix}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** You cannot create a metric alarm consisting of both `statistic` and `extended_statistic` parameters.\nYou must choose one or the other\n\n## Import\n\nUsing `pulumi import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/metricAlarm:MetricAlarm test alarm-12345\n```\n", "properties": { "actionsEnabled": { "type": "boolean", @@ -208223,7 +208223,7 @@ } }, "aws:codepipeline/pipeline:Pipeline": { - "description": "Provides a CodePipeline.\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: \"GitHub\",\n});\nconst codepipelineBucket = new aws.s3.BucketV2(\"codepipeline_bucket\", {bucket: \"test-bucket\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"codepipeline.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst codepipelineRole = new aws.iam.Role(\"codepipeline_role\", {\n name: \"test-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst s3kmskey = aws.kms.getAlias({\n name: \"alias/myKmsKey\",\n});\nconst codepipeline = new aws.codepipeline.Pipeline(\"codepipeline\", {\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n artifactStores: [{\n location: codepipelineBucket.bucket,\n type: \"S3\",\n encryptionKey: {\n id: s3kmskey.then(s3kmskey =\u003e s3kmskey.arn),\n type: \"KMS\",\n },\n }],\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/example\",\n BranchName: \"main\",\n },\n }],\n },\n {\n name: \"Build\",\n actions: [{\n name: \"Build\",\n category: \"Build\",\n owner: \"AWS\",\n provider: \"CodeBuild\",\n inputArtifacts: [\"source_output\"],\n outputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ProjectName: \"test\",\n },\n }],\n },\n {\n name: \"Deploy\",\n actions: [{\n name: \"Deploy\",\n category: \"Deploy\",\n owner: \"AWS\",\n provider: \"CloudFormation\",\n inputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ActionMode: \"REPLACE_ON_FAILURE\",\n Capabilities: \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n OutputFileName: \"CreateStackOutput.json\",\n StackName: \"MyStack\",\n TemplatePath: \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ],\n});\nconst codepipelineBucketPab = new aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", {\n bucket: codepipelineBucket.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true,\n});\nconst codepipelinePolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n resources: [\n codepipelineBucket.arn,\n pulumi.interpolate`${codepipelineBucket.arn}/*`,\n ],\n },\n {\n effect: \"Allow\",\n actions: [\"codestar-connections:UseConnection\"],\n resources: [example.arn],\n },\n {\n effect: \"Allow\",\n actions: [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n resources: [\"*\"],\n },\n ],\n});\nconst codepipelinePolicyRolePolicy = new aws.iam.RolePolicy(\"codepipeline_policy\", {\n name: \"codepipeline_policy\",\n role: codepipelineRole.id,\n policy: codepipelinePolicy.apply(codepipelinePolicy =\u003e codepipelinePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"GitHub\")\ncodepipeline_bucket = aws.s3.BucketV2(\"codepipeline_bucket\", bucket=\"test-bucket\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"codepipeline.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ncodepipeline_role = aws.iam.Role(\"codepipeline_role\",\n name=\"test-role\",\n assume_role_policy=assume_role.json)\ns3kmskey = aws.kms.get_alias(name=\"alias/myKmsKey\")\ncodepipeline = aws.codepipeline.Pipeline(\"codepipeline\",\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role.arn,\n artifact_stores=[{\n \"location\": codepipeline_bucket.bucket,\n \"type\": \"S3\",\n \"encryption_key\": {\n \"id\": s3kmskey.arn,\n \"type\": \"KMS\",\n },\n }],\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/example\",\n \"branch_name\": \"main\",\n },\n }],\n },\n {\n \"name\": \"Build\",\n \"actions\": [{\n \"name\": \"Build\",\n \"category\": \"Build\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeBuild\",\n \"input_artifacts\": [\"source_output\"],\n \"output_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"project_name\": \"test\",\n },\n }],\n },\n {\n \"name\": \"Deploy\",\n \"actions\": [{\n \"name\": \"Deploy\",\n \"category\": \"Deploy\",\n \"owner\": \"AWS\",\n \"provider\": \"CloudFormation\",\n \"input_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"action_mode\": \"REPLACE_ON_FAILURE\",\n \"capabilities\": \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n \"output_file_name\": \"CreateStackOutput.json\",\n \"stack_name\": \"MyStack\",\n \"template_path\": \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ])\ncodepipeline_bucket_pab = aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\",\n bucket=codepipeline_bucket.id,\n block_public_acls=True,\n block_public_policy=True,\n ignore_public_acls=True,\n restrict_public_buckets=True)\ncodepipeline_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n \"resources\": [\n codepipeline_bucket.arn,\n codepipeline_bucket.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"codestar-connections:UseConnection\"],\n \"resources\": [example.arn],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n \"resources\": [\"*\"],\n },\n])\ncodepipeline_policy_role_policy = aws.iam.RolePolicy(\"codepipeline_policy\",\n name=\"codepipeline_policy\",\n role=codepipeline_role.id,\n policy=codepipeline_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.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"GitHub\",\n });\n\n var codepipelineBucket = new Aws.S3.BucketV2(\"codepipeline_bucket\", new()\n {\n Bucket = \"test-bucket\",\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 \"codepipeline.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var codepipelineRole = new Aws.Iam.Role(\"codepipeline_role\", new()\n {\n Name = \"test-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var s3kmskey = Aws.Kms.GetAlias.Invoke(new()\n {\n Name = \"alias/myKmsKey\",\n });\n\n var codepipeline = new Aws.CodePipeline.Pipeline(\"codepipeline\", new()\n {\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n ArtifactStores = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineArtifactStoreArgs\n {\n Location = codepipelineBucket.Bucket,\n Type = \"S3\",\n EncryptionKey = new Aws.CodePipeline.Inputs.PipelineArtifactStoreEncryptionKeyArgs\n {\n Id = s3kmskey.Apply(getAliasResult =\u003e getAliasResult.Arn),\n Type = \"KMS\",\n },\n },\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/example\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Build\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Build\",\n Category = \"Build\",\n Owner = \"AWS\",\n Provider = \"CodeBuild\",\n InputArtifacts = new[]\n {\n \"source_output\",\n },\n OutputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ProjectName\", \"test\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Deploy\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Deploy\",\n Category = \"Deploy\",\n Owner = \"AWS\",\n Provider = \"CloudFormation\",\n InputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ActionMode\", \"REPLACE_ON_FAILURE\" },\n { \"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\" },\n { \"OutputFileName\", \"CreateStackOutput.json\" },\n { \"StackName\", \"MyStack\" },\n { \"TemplatePath\", \"build_output::sam-templated.yaml\" },\n },\n },\n },\n },\n },\n });\n\n var codepipelineBucketPab = new Aws.S3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", new()\n {\n Bucket = codepipelineBucket.Id,\n BlockPublicAcls = true,\n BlockPublicPolicy = true,\n IgnorePublicAcls = true,\n RestrictPublicBuckets = true,\n });\n\n var codepipelinePolicy = 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 \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n codepipelineBucket.Arn,\n $\"{codepipelineBucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codestar-connections:UseConnection\",\n },\n Resources = new[]\n {\n example.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var codepipelinePolicyRolePolicy = new Aws.Iam.RolePolicy(\"codepipeline_policy\", new()\n {\n Name = \"codepipeline_policy\",\n Role = codepipelineRole.Id,\n Policy = codepipelinePolicy.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/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\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\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"GitHub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelineBucket, err := s3.NewBucketV2(ctx, \"codepipeline_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"test-bucket\"),\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\"codepipeline.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\tcodepipelineRole, err := iam.NewRole(ctx, \"codepipeline_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test-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\ts3kmskey, err := kms.LookupAlias(ctx, \u0026kms.LookupAliasArgs{\n\t\t\tName: \"alias/myKmsKey\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"codepipeline\", \u0026codepipeline.PipelineArgs{\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: codepipelineRole.Arn,\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\t\u0026codepipeline.PipelineArtifactStoreArgs{\n\t\t\t\t\tLocation: codepipelineBucket.Bucket,\n\t\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\t\tEncryptionKey: \u0026codepipeline.PipelineArtifactStoreEncryptionKeyArgs{\n\t\t\t\t\t\tId: pulumi.String(s3kmskey.Arn),\n\t\t\t\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\t\t\t},\n\t\t\t\t},\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/example\"),\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\tName: pulumi.String(\"Build\"),\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(\"Build\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Build\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeBuild\"),\n\t\t\t\t\t\t\tInputArtifacts: 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\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ProjectName\": pulumi.String(\"test\"),\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\tName: pulumi.String(\"Deploy\"),\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(\"Deploy\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Deploy\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CloudFormation\"),\n\t\t\t\t\t\t\tInputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ActionMode\": pulumi.String(\"REPLACE_ON_FAILURE\"),\n\t\t\t\t\t\t\t\t\"Capabilities\": pulumi.String(\"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n\t\t\t\t\t\t\t\t\"OutputFileName\": pulumi.String(\"CreateStackOutput.json\"),\n\t\t\t\t\t\t\t\t\"StackName\": pulumi.String(\"MyStack\"),\n\t\t\t\t\t\t\t\t\"TemplatePath\": pulumi.String(\"build_output::sam-templated.yaml\"),\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\t_, err = s3.NewBucketPublicAccessBlock(ctx, \"codepipeline_bucket_pab\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: codepipelineBucket.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(true),\n\t\t\tBlockPublicPolicy: pulumi.Bool(true),\n\t\t\tIgnorePublicAcls: pulumi.Bool(true),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelinePolicy := 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(\"s3:GetObject\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetObjectVersion\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketVersioning\"),\n\t\t\t\t\t\tpulumi.String(\"s3:PutObjectAcl\"),\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\tcodepipelineBucket.Arn,\n\t\t\t\t\t\tcodepipelineBucket.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},\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(\"codestar-connections:UseConnection\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn,\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(\"codebuild:BatchGetBuilds\"),\n\t\t\t\t\t\tpulumi.String(\"codebuild:StartBuild\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"*\"),\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, \"codepipeline_policy\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"codepipeline_policy\"),\n\t\t\tRole: codepipelineRole.ID(),\n\t\t\tPolicy: pulumi.String(codepipelinePolicy.ApplyT(func(codepipelinePolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026codepipelinePolicy.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.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\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.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.kms.KmsFunctions;\nimport com.pulumi.aws.kms.inputs.GetAliasArgs;\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.PipelineArtifactStoreEncryptionKeyArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\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 example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"GitHub\")\n .build());\n\n var codepipelineBucket = new BucketV2(\"codepipelineBucket\", BucketV2Args.builder()\n .bucket(\"test-bucket\")\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(\"codepipeline.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var codepipelineRole = new Role(\"codepipelineRole\", RoleArgs.builder()\n .name(\"test-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var s3kmskey = KmsFunctions.getAlias(GetAliasArgs.builder()\n .name(\"alias/myKmsKey\")\n .build());\n\n var codepipeline = new Pipeline(\"codepipeline\", PipelineArgs.builder()\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .artifactStores(PipelineArtifactStoreArgs.builder()\n .location(codepipelineBucket.bucket())\n .type(\"S3\")\n .encryptionKey(PipelineArtifactStoreEncryptionKeyArgs.builder()\n .id(s3kmskey.applyValue(getAliasResult -\u003e getAliasResult.arn()))\n .type(\"KMS\")\n .build())\n .build())\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/example\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Build\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Build\")\n .category(\"Build\")\n .owner(\"AWS\")\n .provider(\"CodeBuild\")\n .inputArtifacts(\"source_output\")\n .outputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.of(\"ProjectName\", \"test\"))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Deploy\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Deploy\")\n .category(\"Deploy\")\n .owner(\"AWS\")\n .provider(\"CloudFormation\")\n .inputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.ofEntries(\n Map.entry(\"ActionMode\", \"REPLACE_ON_FAILURE\"),\n Map.entry(\"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n Map.entry(\"OutputFileName\", \"CreateStackOutput.json\"),\n Map.entry(\"StackName\", \"MyStack\"),\n Map.entry(\"TemplatePath\", \"build_output::sam-templated.yaml\")\n ))\n .build())\n .build())\n .build());\n\n var codepipelineBucketPab = new BucketPublicAccessBlock(\"codepipelineBucketPab\", BucketPublicAccessBlockArgs.builder()\n .bucket(codepipelineBucket.id())\n .blockPublicAcls(true)\n .blockPublicPolicy(true)\n .ignorePublicAcls(true)\n .restrictPublicBuckets(true)\n .build());\n\n final var codepipelinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\")\n .resources( \n codepipelineBucket.arn(),\n codepipelineBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"codestar-connections:UseConnection\")\n .resources(example.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\")\n .resources(\"*\")\n .build())\n .build());\n\n var codepipelinePolicyRolePolicy = new RolePolicy(\"codepipelinePolicyRolePolicy\", RolePolicyArgs.builder()\n .name(\"codepipeline_policy\")\n .role(codepipelineRole.id())\n .policy(codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(codepipelinePolicy -\u003e codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n codepipeline:\n type: aws:codepipeline:Pipeline\n properties:\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n artifactStores:\n - location: ${codepipelineBucket.bucket}\n type: S3\n encryptionKey:\n id: ${s3kmskey.arn}\n type: KMS\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/example\n BranchName: main\n - name: Build\n actions:\n - name: Build\n category: Build\n owner: AWS\n provider: CodeBuild\n inputArtifacts:\n - source_output\n outputArtifacts:\n - build_output\n version: '1'\n configuration:\n ProjectName: test\n - name: Deploy\n actions:\n - name: Deploy\n category: Deploy\n owner: AWS\n provider: CloudFormation\n inputArtifacts:\n - build_output\n version: '1'\n configuration:\n ActionMode: REPLACE_ON_FAILURE\n Capabilities: CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\n OutputFileName: CreateStackOutput.json\n StackName: MyStack\n TemplatePath: build_output::sam-templated.yaml\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: GitHub\n codepipelineBucket:\n type: aws:s3:BucketV2\n name: codepipeline_bucket\n properties:\n bucket: test-bucket\n codepipelineBucketPab:\n type: aws:s3:BucketPublicAccessBlock\n name: codepipeline_bucket_pab\n properties:\n bucket: ${codepipelineBucket.id}\n blockPublicAcls: true\n blockPublicPolicy: true\n ignorePublicAcls: true\n restrictPublicBuckets: true\n codepipelineRole:\n type: aws:iam:Role\n name: codepipeline_role\n properties:\n name: test-role\n assumeRolePolicy: ${assumeRole.json}\n codepipelinePolicyRolePolicy:\n type: aws:iam:RolePolicy\n name: codepipeline_policy\n properties:\n name: codepipeline_policy\n role: ${codepipelineRole.id}\n policy: ${codepipelinePolicy.json}\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 - codepipeline.amazonaws.com\n actions:\n - sts:AssumeRole\n codepipelinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - s3:GetObject\n - s3:GetObjectVersion\n - s3:GetBucketVersioning\n - s3:PutObjectAcl\n - s3:PutObject\n resources:\n - ${codepipelineBucket.arn}\n - ${codepipelineBucket.arn}/*\n - effect: Allow\n actions:\n - codestar-connections:UseConnection\n resources:\n - ${example.arn}\n - effect: Allow\n actions:\n - codebuild:BatchGetBuilds\n - codebuild:StartBuild\n resources:\n - '*'\n s3kmskey:\n fn::invoke:\n Function: aws:kms:getAlias\n Arguments:\n name: alias/myKmsKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodePipelines using the name. For example:\n\n```sh\n$ pulumi import aws:codepipeline/pipeline:Pipeline foo example\n```\n", + "description": "Provides a CodePipeline.\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: \"GitHub\",\n});\nconst codepipelineBucket = new aws.s3.BucketV2(\"codepipeline_bucket\", {bucket: \"test-bucket\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"codepipeline.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst codepipelineRole = new aws.iam.Role(\"codepipeline_role\", {\n name: \"test-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst s3kmskey = aws.kms.getAlias({\n name: \"alias/myKmsKey\",\n});\nconst codepipeline = new aws.codepipeline.Pipeline(\"codepipeline\", {\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n artifactStores: [{\n location: codepipelineBucket.bucket,\n type: \"S3\",\n encryptionKey: {\n id: s3kmskey.then(s3kmskey =\u003e s3kmskey.arn),\n type: \"KMS\",\n },\n }],\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/example\",\n BranchName: \"main\",\n },\n }],\n },\n {\n name: \"Build\",\n actions: [{\n name: \"Build\",\n category: \"Build\",\n owner: \"AWS\",\n provider: \"CodeBuild\",\n inputArtifacts: [\"source_output\"],\n outputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ProjectName: \"test\",\n },\n }],\n },\n {\n name: \"Deploy\",\n actions: [{\n name: \"Deploy\",\n category: \"Deploy\",\n owner: \"AWS\",\n provider: \"CloudFormation\",\n inputArtifacts: [\"build_output\"],\n version: \"1\",\n configuration: {\n ActionMode: \"REPLACE_ON_FAILURE\",\n Capabilities: \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n OutputFileName: \"CreateStackOutput.json\",\n StackName: \"MyStack\",\n TemplatePath: \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ],\n});\nconst codepipelineBucketPab = new aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", {\n bucket: codepipelineBucket.id,\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true,\n});\nconst codepipelinePolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n resources: [\n codepipelineBucket.arn,\n pulumi.interpolate`${codepipelineBucket.arn}/*`,\n ],\n },\n {\n effect: \"Allow\",\n actions: [\"codestar-connections:UseConnection\"],\n resources: [example.arn],\n },\n {\n effect: \"Allow\",\n actions: [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n resources: [\"*\"],\n },\n ],\n});\nconst codepipelinePolicyRolePolicy = new aws.iam.RolePolicy(\"codepipeline_policy\", {\n name: \"codepipeline_policy\",\n role: codepipelineRole.id,\n policy: codepipelinePolicy.apply(codepipelinePolicy =\u003e codepipelinePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"GitHub\")\ncodepipeline_bucket = aws.s3.BucketV2(\"codepipeline_bucket\", bucket=\"test-bucket\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"codepipeline.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ncodepipeline_role = aws.iam.Role(\"codepipeline_role\",\n name=\"test-role\",\n assume_role_policy=assume_role.json)\ns3kmskey = aws.kms.get_alias(name=\"alias/myKmsKey\")\ncodepipeline = aws.codepipeline.Pipeline(\"codepipeline\",\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role.arn,\n artifact_stores=[{\n \"location\": codepipeline_bucket.bucket,\n \"type\": \"S3\",\n \"encryption_key\": {\n \"id\": s3kmskey.arn,\n \"type\": \"KMS\",\n },\n }],\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 \"ConnectionArn\": example.arn,\n \"FullRepositoryId\": \"my-organization/example\",\n \"BranchName\": \"main\",\n },\n }],\n },\n {\n \"name\": \"Build\",\n \"actions\": [{\n \"name\": \"Build\",\n \"category\": \"Build\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeBuild\",\n \"input_artifacts\": [\"source_output\"],\n \"output_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"ProjectName\": \"test\",\n },\n }],\n },\n {\n \"name\": \"Deploy\",\n \"actions\": [{\n \"name\": \"Deploy\",\n \"category\": \"Deploy\",\n \"owner\": \"AWS\",\n \"provider\": \"CloudFormation\",\n \"input_artifacts\": [\"build_output\"],\n \"version\": \"1\",\n \"configuration\": {\n \"ActionMode\": \"REPLACE_ON_FAILURE\",\n \"Capabilities\": \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\",\n \"OutputFileName\": \"CreateStackOutput.json\",\n \"StackName\": \"MyStack\",\n \"TemplatePath\": \"build_output::sam-templated.yaml\",\n },\n }],\n },\n ])\ncodepipeline_bucket_pab = aws.s3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\",\n bucket=codepipeline_bucket.id,\n block_public_acls=True,\n block_public_policy=True,\n ignore_public_acls=True,\n restrict_public_buckets=True)\ncodepipeline_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n ],\n \"resources\": [\n codepipeline_bucket.arn,\n codepipeline_bucket.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"codestar-connections:UseConnection\"],\n \"resources\": [example.arn],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n ],\n \"resources\": [\"*\"],\n },\n])\ncodepipeline_policy_role_policy = aws.iam.RolePolicy(\"codepipeline_policy\",\n name=\"codepipeline_policy\",\n role=codepipeline_role.id,\n policy=codepipeline_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.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"GitHub\",\n });\n\n var codepipelineBucket = new Aws.S3.BucketV2(\"codepipeline_bucket\", new()\n {\n Bucket = \"test-bucket\",\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 \"codepipeline.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var codepipelineRole = new Aws.Iam.Role(\"codepipeline_role\", new()\n {\n Name = \"test-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var s3kmskey = Aws.Kms.GetAlias.Invoke(new()\n {\n Name = \"alias/myKmsKey\",\n });\n\n var codepipeline = new Aws.CodePipeline.Pipeline(\"codepipeline\", new()\n {\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n ArtifactStores = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineArtifactStoreArgs\n {\n Location = codepipelineBucket.Bucket,\n Type = \"S3\",\n EncryptionKey = new Aws.CodePipeline.Inputs.PipelineArtifactStoreEncryptionKeyArgs\n {\n Id = s3kmskey.Apply(getAliasResult =\u003e getAliasResult.Arn),\n Type = \"KMS\",\n },\n },\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/example\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Build\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Build\",\n Category = \"Build\",\n Owner = \"AWS\",\n Provider = \"CodeBuild\",\n InputArtifacts = new[]\n {\n \"source_output\",\n },\n OutputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ProjectName\", \"test\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Deploy\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Deploy\",\n Category = \"Deploy\",\n Owner = \"AWS\",\n Provider = \"CloudFormation\",\n InputArtifacts = new[]\n {\n \"build_output\",\n },\n Version = \"1\",\n Configuration = \n {\n { \"ActionMode\", \"REPLACE_ON_FAILURE\" },\n { \"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\" },\n { \"OutputFileName\", \"CreateStackOutput.json\" },\n { \"StackName\", \"MyStack\" },\n { \"TemplatePath\", \"build_output::sam-templated.yaml\" },\n },\n },\n },\n },\n },\n });\n\n var codepipelineBucketPab = new Aws.S3.BucketPublicAccessBlock(\"codepipeline_bucket_pab\", new()\n {\n Bucket = codepipelineBucket.Id,\n BlockPublicAcls = true,\n BlockPublicPolicy = true,\n IgnorePublicAcls = true,\n RestrictPublicBuckets = true,\n });\n\n var codepipelinePolicy = 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 \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n codepipelineBucket.Arn,\n $\"{codepipelineBucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codestar-connections:UseConnection\",\n },\n Resources = new[]\n {\n example.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var codepipelinePolicyRolePolicy = new Aws.Iam.RolePolicy(\"codepipeline_policy\", new()\n {\n Name = \"codepipeline_policy\",\n Role = codepipelineRole.Id,\n Policy = codepipelinePolicy.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/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\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\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"GitHub\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelineBucket, err := s3.NewBucketV2(ctx, \"codepipeline_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"test-bucket\"),\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\"codepipeline.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\tcodepipelineRole, err := iam.NewRole(ctx, \"codepipeline_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test-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\ts3kmskey, err := kms.LookupAlias(ctx, \u0026kms.LookupAliasArgs{\n\t\t\tName: \"alias/myKmsKey\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"codepipeline\", \u0026codepipeline.PipelineArgs{\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: codepipelineRole.Arn,\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\t\u0026codepipeline.PipelineArtifactStoreArgs{\n\t\t\t\t\tLocation: codepipelineBucket.Bucket,\n\t\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\t\tEncryptionKey: \u0026codepipeline.PipelineArtifactStoreEncryptionKeyArgs{\n\t\t\t\t\t\tId: pulumi.String(s3kmskey.Arn),\n\t\t\t\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\t\t\t},\n\t\t\t\t},\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/example\"),\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\tName: pulumi.String(\"Build\"),\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(\"Build\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Build\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeBuild\"),\n\t\t\t\t\t\t\tInputArtifacts: 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\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ProjectName\": pulumi.String(\"test\"),\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\tName: pulumi.String(\"Deploy\"),\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(\"Deploy\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Deploy\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CloudFormation\"),\n\t\t\t\t\t\t\tInputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"build_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ActionMode\": pulumi.String(\"REPLACE_ON_FAILURE\"),\n\t\t\t\t\t\t\t\t\"Capabilities\": pulumi.String(\"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n\t\t\t\t\t\t\t\t\"OutputFileName\": pulumi.String(\"CreateStackOutput.json\"),\n\t\t\t\t\t\t\t\t\"StackName\": pulumi.String(\"MyStack\"),\n\t\t\t\t\t\t\t\t\"TemplatePath\": pulumi.String(\"build_output::sam-templated.yaml\"),\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\t_, err = s3.NewBucketPublicAccessBlock(ctx, \"codepipeline_bucket_pab\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: codepipelineBucket.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(true),\n\t\t\tBlockPublicPolicy: pulumi.Bool(true),\n\t\t\tIgnorePublicAcls: pulumi.Bool(true),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcodepipelinePolicy := 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(\"s3:GetObject\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetObjectVersion\"),\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketVersioning\"),\n\t\t\t\t\t\tpulumi.String(\"s3:PutObjectAcl\"),\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\tcodepipelineBucket.Arn,\n\t\t\t\t\t\tcodepipelineBucket.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},\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(\"codestar-connections:UseConnection\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn,\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(\"codebuild:BatchGetBuilds\"),\n\t\t\t\t\t\tpulumi.String(\"codebuild:StartBuild\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"*\"),\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, \"codepipeline_policy\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"codepipeline_policy\"),\n\t\t\tRole: codepipelineRole.ID(),\n\t\t\tPolicy: pulumi.String(codepipelinePolicy.ApplyT(func(codepipelinePolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026codepipelinePolicy.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.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\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.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.kms.KmsFunctions;\nimport com.pulumi.aws.kms.inputs.GetAliasArgs;\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.PipelineArtifactStoreEncryptionKeyArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\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 example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"GitHub\")\n .build());\n\n var codepipelineBucket = new BucketV2(\"codepipelineBucket\", BucketV2Args.builder()\n .bucket(\"test-bucket\")\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(\"codepipeline.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var codepipelineRole = new Role(\"codepipelineRole\", RoleArgs.builder()\n .name(\"test-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var s3kmskey = KmsFunctions.getAlias(GetAliasArgs.builder()\n .name(\"alias/myKmsKey\")\n .build());\n\n var codepipeline = new Pipeline(\"codepipeline\", PipelineArgs.builder()\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .artifactStores(PipelineArtifactStoreArgs.builder()\n .location(codepipelineBucket.bucket())\n .type(\"S3\")\n .encryptionKey(PipelineArtifactStoreEncryptionKeyArgs.builder()\n .id(s3kmskey.applyValue(getAliasResult -\u003e getAliasResult.arn()))\n .type(\"KMS\")\n .build())\n .build())\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/example\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Build\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Build\")\n .category(\"Build\")\n .owner(\"AWS\")\n .provider(\"CodeBuild\")\n .inputArtifacts(\"source_output\")\n .outputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.of(\"ProjectName\", \"test\"))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .name(\"Deploy\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Deploy\")\n .category(\"Deploy\")\n .owner(\"AWS\")\n .provider(\"CloudFormation\")\n .inputArtifacts(\"build_output\")\n .version(\"1\")\n .configuration(Map.ofEntries(\n Map.entry(\"ActionMode\", \"REPLACE_ON_FAILURE\"),\n Map.entry(\"Capabilities\", \"CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\"),\n Map.entry(\"OutputFileName\", \"CreateStackOutput.json\"),\n Map.entry(\"StackName\", \"MyStack\"),\n Map.entry(\"TemplatePath\", \"build_output::sam-templated.yaml\")\n ))\n .build())\n .build())\n .build());\n\n var codepipelineBucketPab = new BucketPublicAccessBlock(\"codepipelineBucketPab\", BucketPublicAccessBlockArgs.builder()\n .bucket(codepipelineBucket.id())\n .blockPublicAcls(true)\n .blockPublicPolicy(true)\n .ignorePublicAcls(true)\n .restrictPublicBuckets(true)\n .build());\n\n final var codepipelinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"s3:GetObject\",\n \"s3:GetObjectVersion\",\n \"s3:GetBucketVersioning\",\n \"s3:PutObjectAcl\",\n \"s3:PutObject\")\n .resources( \n codepipelineBucket.arn(),\n codepipelineBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"codestar-connections:UseConnection\")\n .resources(example.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"codebuild:BatchGetBuilds\",\n \"codebuild:StartBuild\")\n .resources(\"*\")\n .build())\n .build());\n\n var codepipelinePolicyRolePolicy = new RolePolicy(\"codepipelinePolicyRolePolicy\", RolePolicyArgs.builder()\n .name(\"codepipeline_policy\")\n .role(codepipelineRole.id())\n .policy(codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(codepipelinePolicy -\u003e codepipelinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n codepipeline:\n type: aws:codepipeline:Pipeline\n properties:\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n artifactStores:\n - location: ${codepipelineBucket.bucket}\n type: S3\n encryptionKey:\n id: ${s3kmskey.arn}\n type: KMS\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/example\n BranchName: main\n - name: Build\n actions:\n - name: Build\n category: Build\n owner: AWS\n provider: CodeBuild\n inputArtifacts:\n - source_output\n outputArtifacts:\n - build_output\n version: '1'\n configuration:\n ProjectName: test\n - name: Deploy\n actions:\n - name: Deploy\n category: Deploy\n owner: AWS\n provider: CloudFormation\n inputArtifacts:\n - build_output\n version: '1'\n configuration:\n ActionMode: REPLACE_ON_FAILURE\n Capabilities: CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM\n OutputFileName: CreateStackOutput.json\n StackName: MyStack\n TemplatePath: build_output::sam-templated.yaml\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: GitHub\n codepipelineBucket:\n type: aws:s3:BucketV2\n name: codepipeline_bucket\n properties:\n bucket: test-bucket\n codepipelineBucketPab:\n type: aws:s3:BucketPublicAccessBlock\n name: codepipeline_bucket_pab\n properties:\n bucket: ${codepipelineBucket.id}\n blockPublicAcls: true\n blockPublicPolicy: true\n ignorePublicAcls: true\n restrictPublicBuckets: true\n codepipelineRole:\n type: aws:iam:Role\n name: codepipeline_role\n properties:\n name: test-role\n assumeRolePolicy: ${assumeRole.json}\n codepipelinePolicyRolePolicy:\n type: aws:iam:RolePolicy\n name: codepipeline_policy\n properties:\n name: codepipeline_policy\n role: ${codepipelineRole.id}\n policy: ${codepipelinePolicy.json}\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 - codepipeline.amazonaws.com\n actions:\n - sts:AssumeRole\n codepipelinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - s3:GetObject\n - s3:GetObjectVersion\n - s3:GetBucketVersioning\n - s3:PutObjectAcl\n - s3:PutObject\n resources:\n - ${codepipelineBucket.arn}\n - ${codepipelineBucket.arn}/*\n - effect: Allow\n actions:\n - codestar-connections:UseConnection\n resources:\n - ${example.arn}\n - effect: Allow\n actions:\n - codebuild:BatchGetBuilds\n - codebuild:StartBuild\n resources:\n - '*'\n s3kmskey:\n fn::invoke:\n Function: aws:kms:getAlias\n Arguments:\n name: alias/myKmsKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodePipelines using the name. For example:\n\n```sh\n$ pulumi import aws:codepipeline/pipeline:Pipeline foo example\n```\n", "properties": { "arn": { "type": "string", @@ -208602,7 +208602,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\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", + "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 \"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 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", @@ -218532,7 +218532,7 @@ } }, "aws:datazone/domain:Domain": { - "description": "Resource for managing an AWS DataZone 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 domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"my_domain_execution_role\",\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: \"domain_execution_policy\",\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 example = new aws.datazone.Domain(\"example\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\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=\"my_domain_execution_role\",\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\": \"domain_execution_policy\",\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 }])\nexample = aws.datazone.Domain(\"example\",\n name=\"example\",\n domain_execution_role=domain_execution_role.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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"my_domain_execution_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\"] = 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 = \"domain_execution_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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\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/datazone\"\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(\"my_domain_execution_role\"),\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(\"domain_execution_policy\"),\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\t_, err = datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.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.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 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(\"my_domain_execution_role\")\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(\"domain_execution_policy\")\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 example = new Domain(\"example\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\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: my_domain_execution_role\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: domain_execution_policy\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 example:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Domain using the `domain_id`. For example:\n\n```sh\n$ pulumi import aws:datazone/domain:Domain example domain-id-12345678\n```\n", + "description": "Resource for managing an AWS DataZone 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 domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"my_domain_execution_role\",\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: \"domain_execution_policy\",\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 example = new aws.datazone.Domain(\"example\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\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=\"my_domain_execution_role\",\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\": \"domain_execution_policy\",\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 }])\nexample = aws.datazone.Domain(\"example\",\n name=\"example\",\n domain_execution_role=domain_execution_role.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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"my_domain_execution_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\"] = 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 = \"domain_execution_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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\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/datazone\"\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(\"my_domain_execution_role\"),\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(\"domain_execution_policy\"),\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\t_, err = datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.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.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 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(\"my_domain_execution_role\")\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(\"domain_execution_policy\")\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 example = new Domain(\"example\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\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: my_domain_execution_role\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: domain_execution_policy\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 example:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Domain using the `domain_id`. For example:\n\n```sh\n$ pulumi import aws:datazone/domain:Domain example domain-id-12345678\n```\n", "properties": { "arn": { "type": "string", @@ -219034,7 +219034,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, \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", + "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", @@ -219194,7 +219194,7 @@ } }, "aws:datazone/formType:FormType": { - "description": "Resource for managing an AWS DataZone Form Type.\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-role\",\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-policy\",\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 test = new aws.datazone.Domain(\"test\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testFormType = new aws.datazone.FormType(\"test\", {\n description: \"desc\",\n name: \"SageMakerModelFormType\",\n domainIdentifier: test.id,\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n model: {\n smithy: `\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\n`,\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-role\",\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-policy\",\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 = aws.datazone.Domain(\"test\",\n name=\"example\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_form_type = aws.datazone.FormType(\"test\",\n description=\"desc\",\n name=\"SageMakerModelFormType\",\n domain_identifier=test.id,\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n model={\n \"smithy\": \"\"\"\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-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\"] = 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-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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var test = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testFormType = new Aws.DataZone.FormType(\"test\", new()\n {\n Description = \"desc\",\n Name = \"SageMakerModelFormType\",\n DomainIdentifier = test.Id,\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n Model = new Aws.DataZone.Inputs.FormTypeModelArgs\n {\n Smithy = @\"\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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/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-role\"),\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-policy\"),\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\ttest, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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: test.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\t_, err = datazone.NewFormType(ctx, \"test\", \u0026datazone.FormTypeArgs{\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tName: pulumi.String(\"SageMakerModelFormType\"),\n\t\t\tDomainIdentifier: test.ID(),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tModel: \u0026datazone.FormTypeModelArgs{\n\t\t\t\tSmithy: pulumi.String(`\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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.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.datazone.FormType;\nimport com.pulumi.aws.datazone.FormTypeArgs;\nimport com.pulumi.aws.datazone.inputs.FormTypeModelArgs;\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-role\")\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-policy\")\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 test = new Domain(\"test\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testFormType = new FormType(\"testFormType\", FormTypeArgs.builder()\n .description(\"desc\")\n .name(\"SageMakerModelFormType\")\n .domainIdentifier(test.id())\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .model(FormTypeModelArgs.builder()\n .smithy(\"\"\"\n\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\n \"\"\")\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-role\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-policy\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 test:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example name\n description: desc\n skipDeletionCheck: true\n testFormType:\n type: aws:datazone:FormType\n name: test\n properties:\n description: desc\n name: SageMakerModelFormType\n domainIdentifier: ${test.id}\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n model:\n smithy: |\n \tstructure SageMakerModelFormType {\n \t\t\t@required\n \t\t\t@amazon.datazone#searchable\n \t\t\tmodelName: String\n\n \t\t\t@required\n \t\t\tmodelArn: String\n\n \t\t\t@required\n \t\t\tcreationTime: String\n \t\t\t}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Form Type using a comma separated value of `domain_identifier`,`name`,`revision`. For example:\n\n```sh\n$ pulumi import aws:datazone/formType:FormType example domain_identifier,name,revision\n```\n", + "description": "Resource for managing an AWS DataZone Form Type.\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-role\",\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-policy\",\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 test = new aws.datazone.Domain(\"test\", {\n name: \"example\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testFormType = new aws.datazone.FormType(\"test\", {\n description: \"desc\",\n name: \"SageMakerModelFormType\",\n domainIdentifier: test.id,\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n model: {\n smithy: `\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\n`,\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-role\",\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-policy\",\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 = aws.datazone.Domain(\"test\",\n name=\"example\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_form_type = aws.datazone.FormType(\"test\",\n description=\"desc\",\n name=\"SageMakerModelFormType\",\n domain_identifier=test.id,\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n model={\n \"smithy\": \"\"\"\\x09structure SageMakerModelFormType {\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09@amazon.datazone#searchable\n\\x09\\x09\\x09modelName: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09modelArn: String\n\n\\x09\\x09\\x09@required\n\\x09\\x09\\x09creationTime: String\n\\x09\\x09\\x09}\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 domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-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\"] = 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-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 \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var test = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testFormType = new Aws.DataZone.FormType(\"test\", new()\n {\n Description = \"desc\",\n Name = \"SageMakerModelFormType\",\n DomainIdentifier = test.Id,\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n Model = new Aws.DataZone.Inputs.FormTypeModelArgs\n {\n Smithy = @\"\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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/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-role\"),\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-policy\"),\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\ttest, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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: test.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\t_, err = datazone.NewFormType(ctx, \"test\", \u0026datazone.FormTypeArgs{\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tName: pulumi.String(\"SageMakerModelFormType\"),\n\t\t\tDomainIdentifier: test.ID(),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tModel: \u0026datazone.FormTypeModelArgs{\n\t\t\t\tSmithy: pulumi.String(`\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\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.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.datazone.FormType;\nimport com.pulumi.aws.datazone.FormTypeArgs;\nimport com.pulumi.aws.datazone.inputs.FormTypeModelArgs;\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-role\")\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-policy\")\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 test = new Domain(\"test\", DomainArgs.builder()\n .name(\"example\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testFormType = new FormType(\"testFormType\", FormTypeArgs.builder()\n .description(\"desc\")\n .name(\"SageMakerModelFormType\")\n .domainIdentifier(test.id())\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .model(FormTypeModelArgs.builder()\n .smithy(\"\"\"\n\tstructure SageMakerModelFormType {\n\t\t\t@required\n\t\t\t@amazon.datazone#searchable\n\t\t\tmodelName: String\n\n\t\t\t@required\n\t\t\tmodelArn: String\n\n\t\t\t@required\n\t\t\tcreationTime: String\n\t\t\t}\n \"\"\")\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-role\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-policy\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 test:\n type: aws:datazone:Domain\n properties:\n name: example\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example name\n description: desc\n skipDeletionCheck: true\n testFormType:\n type: aws:datazone:FormType\n name: test\n properties:\n description: desc\n name: SageMakerModelFormType\n domainIdentifier: ${test.id}\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n model:\n smithy: |\n \tstructure SageMakerModelFormType {\n \t\t\t@required\n \t\t\t@amazon.datazone#searchable\n \t\t\tmodelName: String\n\n \t\t\t@required\n \t\t\tmodelArn: String\n\n \t\t\t@required\n \t\t\tcreationTime: String\n \t\t\t}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Form Type using a comma separated value of `domain_identifier`,`name`,`revision`. For example:\n\n```sh\n$ pulumi import aws:datazone/formType:FormType example domain_identifier,name,revision\n```\n", "properties": { "createdAt": { "type": "string", @@ -219353,7 +219353,7 @@ } }, "aws:datazone/glossary:Glossary": { - "description": "Resource for managing an AWS DataZone Glossary.\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 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 test = 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: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example_name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testGlossary = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n domainIdentifier: testProject.domainIdentifier,\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 = 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.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example_name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_glossary = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n domain_identifier=test_project.domain_identifier)\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 test = 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 = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example_name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testGlossary = new Aws.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testProject.DomainIdentifier,\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/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\ttest, 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: test.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\t_, err = datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: testProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\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 test = new Domain(\"test\", 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(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example_name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testGlossary = new Glossary(\"testGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testProject.domainIdentifier())\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 test:\n type: aws:datazone:Domain\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: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example_name\n description: desc\n skipDeletionCheck: true\n testGlossary:\n type: aws:datazone:Glossary\n name: test\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n domainIdentifier: ${testProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\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 = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testAwsDatazoneProject.id,\n status: \"DISABLED\",\n domainIdentifier: testAwsDatazoneProject.domainIdentifier,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_aws_datazone_project[\"id\"],\n status=\"DISABLED\",\n domain_identifier=test_aws_datazone_project[\"domainIdentifier\"])\n```\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.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testAwsDatazoneProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testAwsDatazoneProject.DomainIdentifier,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: pulumi.Any(testAwsDatazoneProject.Id),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: pulumi.Any(testAwsDatazoneProject.DomainIdentifier),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Glossary(\"test\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testAwsDatazoneProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testAwsDatazoneProject.domainIdentifier())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:datazone:Glossary\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testAwsDatazoneProject.id}\n status: DISABLED\n domainIdentifier: ${testAwsDatazoneProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary using the import Datazone Glossary using a comma-delimited string combining the domain id, glossary id, and the id of the project it's under. For example:\n\n```sh\n$ pulumi import aws:datazone/glossary:Glossary example domain-id,glossary-id,owning-project-identifier\n```\n", + "description": "Resource for managing an AWS DataZone Glossary.\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 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 test = 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: test.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example_name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst testGlossary = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testProject.id,\n status: \"DISABLED\",\n domainIdentifier: testProject.domainIdentifier,\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 = 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.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example_name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest_glossary = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_project.id,\n status=\"DISABLED\",\n domain_identifier=test_project.domain_identifier)\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 test = 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 = test.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example_name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var testGlossary = new Aws.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testProject.DomainIdentifier,\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/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\ttest, 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: test.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\t_, err = datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: testProject.ID(),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: testProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\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 test = new Domain(\"test\", 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(test.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example_name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n var testGlossary = new Glossary(\"testGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testProject.domainIdentifier())\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 test:\n type: aws:datazone:Domain\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: ${test.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example_name\n description: desc\n skipDeletionCheck: true\n testGlossary:\n type: aws:datazone:Glossary\n name: test\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testProject.id}\n status: DISABLED\n domainIdentifier: ${testProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\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 = new aws.datazone.Glossary(\"test\", {\n description: \"description\",\n name: \"example_name\",\n owningProjectIdentifier: testAwsDatazoneProject.id,\n status: \"DISABLED\",\n domainIdentifier: testAwsDatazoneProject.domainIdentifier,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.datazone.Glossary(\"test\",\n description=\"description\",\n name=\"example_name\",\n owning_project_identifier=test_aws_datazone_project[\"id\"],\n status=\"DISABLED\",\n domain_identifier=test_aws_datazone_project[\"domainIdentifier\"])\n```\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.DataZone.Glossary(\"test\", new()\n {\n Description = \"description\",\n Name = \"example_name\",\n OwningProjectIdentifier = testAwsDatazoneProject.Id,\n Status = \"DISABLED\",\n DomainIdentifier = testAwsDatazoneProject.DomainIdentifier,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datazone.NewGlossary(ctx, \"test\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tOwningProjectIdentifier: pulumi.Any(testAwsDatazoneProject.Id),\n\t\t\tStatus: pulumi.String(\"DISABLED\"),\n\t\t\tDomainIdentifier: pulumi.Any(testAwsDatazoneProject.DomainIdentifier),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Glossary(\"test\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example_name\")\n .owningProjectIdentifier(testAwsDatazoneProject.id())\n .status(\"DISABLED\")\n .domainIdentifier(testAwsDatazoneProject.domainIdentifier())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:datazone:Glossary\n properties:\n description: description\n name: example_name\n owningProjectIdentifier: ${testAwsDatazoneProject.id}\n status: DISABLED\n domainIdentifier: ${testAwsDatazoneProject.domainIdentifier}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary using the import Datazone Glossary using a comma-delimited string combining the domain id, glossary id, and the id of the project it's under. For example:\n\n```sh\n$ pulumi import aws:datazone/glossary:Glossary example domain-id,glossary-id,owning-project-identifier\n```\n", "properties": { "description": { "type": "string", @@ -219432,7 +219432,7 @@ } }, "aws:datazone/glossaryTerm:GlossaryTerm": { - "description": "Resource for managing an AWS DataZone Glossary Term.\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.iam.Role(\"example\", {\n name: \"example\",\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\",\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 exampleDomain = new aws.datazone.Domain(\"example\", {\n name: \"example_name\",\n domainExecutionRole: example.arn,\n});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {name: \"example_name\"});\nconst exampleProject = new aws.datazone.Project(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example\",\n skipDeletionCheck: true,\n});\nconst exampleGlossary = new aws.datazone.Glossary(\"example\", {\n description: \"description\",\n name: \"example\",\n owningProjectIdentifier: exampleProject.id,\n status: \"ENABLED\",\n domainIdentifier: exampleProject.domainIdentifier,\n});\nconst exampleGlossaryTerm = new aws.datazone.GlossaryTerm(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryIdentifier: exampleGlossary.id,\n name: \"example\",\n status: \"ENABLED\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"example\",\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\",\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 }])\nexample_domain = aws.datazone.Domain(\"example\",\n name=\"example_name\",\n domain_execution_role=example.arn)\nexample_security_group = aws.ec2.SecurityGroup(\"example\", name=\"example_name\")\nexample_project = aws.datazone.Project(\"example\",\n domain_identifier=example_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example\",\n skip_deletion_check=True)\nexample_glossary = aws.datazone.Glossary(\"example\",\n description=\"description\",\n name=\"example\",\n owning_project_identifier=example_project.id,\n status=\"ENABLED\",\n domain_identifier=example_project.domain_identifier)\nexample_glossary_term = aws.datazone.GlossaryTerm(\"example\",\n domain_identifier=example_domain.id,\n glossary_identifier=example_glossary.id,\n name=\"example\",\n status=\"ENABLED\")\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.Iam.Role(\"example\", new()\n {\n Name = \"example\",\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\",\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 exampleDomain = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example_name\",\n DomainExecutionRole = example.Arn,\n });\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = \"example_name\",\n });\n\n var exampleProject = new Aws.DataZone.Project(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example\",\n SkipDeletionCheck = true,\n });\n\n var exampleGlossary = new Aws.DataZone.Glossary(\"example\", new()\n {\n Description = \"description\",\n Name = \"example\",\n OwningProjectIdentifier = exampleProject.Id,\n Status = \"ENABLED\",\n DomainIdentifier = exampleProject.DomainIdentifier,\n });\n\n var exampleGlossaryTerm = new Aws.DataZone.GlossaryTerm(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryIdentifier = exampleGlossary.Id,\n Name = \"example\",\n Status = \"ENABLED\",\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/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\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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\texampleDomain, err := datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tDomainExecutionRole: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"example\", \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\texampleProject, err := datazone.NewProject(ctx, \"example\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: exampleDomain.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\"),\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\texampleGlossary, err := datazone.NewGlossary(ctx, \"example\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tOwningProjectIdentifier: exampleProject.ID(),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t\tDomainIdentifier: exampleProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewGlossaryTerm(ctx, \"example\", \u0026datazone.GlossaryTermArgs{\n\t\t\tDomainIdentifier: exampleDomain.ID(),\n\t\t\tGlossaryIdentifier: exampleGlossary.ID(),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport com.pulumi.aws.datazone.GlossaryTerm;\nimport com.pulumi.aws.datazone.GlossaryTermArgs;\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 Role(\"example\", RoleArgs.builder()\n .name(\"example\")\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\")\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 exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .name(\"example_name\")\n .domainExecutionRole(example.arn())\n .build());\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example_name\")\n .build());\n\n var exampleProject = new Project(\"exampleProject\", ProjectArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example\")\n .skipDeletionCheck(true)\n .build());\n\n var exampleGlossary = new Glossary(\"exampleGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example\")\n .owningProjectIdentifier(exampleProject.id())\n .status(\"ENABLED\")\n .domainIdentifier(exampleProject.domainIdentifier())\n .build());\n\n var exampleGlossaryTerm = new GlossaryTerm(\"exampleGlossaryTerm\", GlossaryTermArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryIdentifier(exampleGlossary.id())\n .name(\"example\")\n .status(\"ENABLED\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: example\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\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 exampleDomain:\n type: aws:datazone:Domain\n name: example\n properties:\n name: example_name\n domainExecutionRole: ${example.arn}\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: example_name\n exampleProject:\n type: aws:datazone:Project\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example\n skipDeletionCheck: true\n exampleGlossary:\n type: aws:datazone:Glossary\n name: example\n properties:\n description: description\n name: example\n owningProjectIdentifier: ${exampleProject.id}\n status: ENABLED\n domainIdentifier: ${exampleProject.domainIdentifier}\n exampleGlossaryTerm:\n type: aws:datazone:GlossaryTerm\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryIdentifier: ${exampleGlossary.id}\n name: example\n status: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary Term using a comma-delimited string combining the `domain_identifier`, `id`, and the `glossary_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/glossaryTerm:GlossaryTerm example domain-id,glossary-term-id,glossary-id\n```\n", + "description": "Resource for managing an AWS DataZone Glossary Term.\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.iam.Role(\"example\", {\n name: \"example\",\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\",\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 exampleDomain = new aws.datazone.Domain(\"example\", {\n name: \"example_name\",\n domainExecutionRole: example.arn,\n});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {name: \"example_name\"});\nconst exampleProject = new aws.datazone.Project(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example\",\n skipDeletionCheck: true,\n});\nconst exampleGlossary = new aws.datazone.Glossary(\"example\", {\n description: \"description\",\n name: \"example\",\n owningProjectIdentifier: exampleProject.id,\n status: \"ENABLED\",\n domainIdentifier: exampleProject.domainIdentifier,\n});\nconst exampleGlossaryTerm = new aws.datazone.GlossaryTerm(\"example\", {\n domainIdentifier: exampleDomain.id,\n glossaryIdentifier: exampleGlossary.id,\n name: \"example\",\n status: \"ENABLED\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"example\",\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\",\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 }])\nexample_domain = aws.datazone.Domain(\"example\",\n name=\"example_name\",\n domain_execution_role=example.arn)\nexample_security_group = aws.ec2.SecurityGroup(\"example\", name=\"example_name\")\nexample_project = aws.datazone.Project(\"example\",\n domain_identifier=example_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example\",\n skip_deletion_check=True)\nexample_glossary = aws.datazone.Glossary(\"example\",\n description=\"description\",\n name=\"example\",\n owning_project_identifier=example_project.id,\n status=\"ENABLED\",\n domain_identifier=example_project.domain_identifier)\nexample_glossary_term = aws.datazone.GlossaryTerm(\"example\",\n domain_identifier=example_domain.id,\n glossary_identifier=example_glossary.id,\n name=\"example\",\n status=\"ENABLED\")\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.Iam.Role(\"example\", new()\n {\n Name = \"example\",\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\",\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 exampleDomain = new Aws.DataZone.Domain(\"example\", new()\n {\n Name = \"example_name\",\n DomainExecutionRole = example.Arn,\n });\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = \"example_name\",\n });\n\n var exampleProject = new Aws.DataZone.Project(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example\",\n SkipDeletionCheck = true,\n });\n\n var exampleGlossary = new Aws.DataZone.Glossary(\"example\", new()\n {\n Description = \"description\",\n Name = \"example\",\n OwningProjectIdentifier = exampleProject.Id,\n Status = \"ENABLED\",\n DomainIdentifier = exampleProject.DomainIdentifier,\n });\n\n var exampleGlossaryTerm = new Aws.DataZone.GlossaryTerm(\"example\", new()\n {\n DomainIdentifier = exampleDomain.Id,\n GlossaryIdentifier = exampleGlossary.Id,\n Name = \"example\",\n Status = \"ENABLED\",\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/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\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\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\"),\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\texampleDomain, err := datazone.NewDomain(ctx, \"example\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example_name\"),\n\t\t\tDomainExecutionRole: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"example\", \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\texampleProject, err := datazone.NewProject(ctx, \"example\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: exampleDomain.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\"),\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\texampleGlossary, err := datazone.NewGlossary(ctx, \"example\", \u0026datazone.GlossaryArgs{\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tOwningProjectIdentifier: exampleProject.ID(),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t\tDomainIdentifier: exampleProject.DomainIdentifier,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewGlossaryTerm(ctx, \"example\", \u0026datazone.GlossaryTermArgs{\n\t\t\tDomainIdentifier: exampleDomain.ID(),\n\t\t\tGlossaryIdentifier: exampleGlossary.ID(),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tStatus: pulumi.String(\"ENABLED\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.datazone.Glossary;\nimport com.pulumi.aws.datazone.GlossaryArgs;\nimport com.pulumi.aws.datazone.GlossaryTerm;\nimport com.pulumi.aws.datazone.GlossaryTermArgs;\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 Role(\"example\", RoleArgs.builder()\n .name(\"example\")\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\")\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 exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .name(\"example_name\")\n .domainExecutionRole(example.arn())\n .build());\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example_name\")\n .build());\n\n var exampleProject = new Project(\"exampleProject\", ProjectArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example\")\n .skipDeletionCheck(true)\n .build());\n\n var exampleGlossary = new Glossary(\"exampleGlossary\", GlossaryArgs.builder()\n .description(\"description\")\n .name(\"example\")\n .owningProjectIdentifier(exampleProject.id())\n .status(\"ENABLED\")\n .domainIdentifier(exampleProject.domainIdentifier())\n .build());\n\n var exampleGlossaryTerm = new GlossaryTerm(\"exampleGlossaryTerm\", GlossaryTermArgs.builder()\n .domainIdentifier(exampleDomain.id())\n .glossaryIdentifier(exampleGlossary.id())\n .name(\"example\")\n .status(\"ENABLED\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: example\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\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 exampleDomain:\n type: aws:datazone:Domain\n name: example\n properties:\n name: example_name\n domainExecutionRole: ${example.arn}\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: example_name\n exampleProject:\n type: aws:datazone:Project\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example\n skipDeletionCheck: true\n exampleGlossary:\n type: aws:datazone:Glossary\n name: example\n properties:\n description: description\n name: example\n owningProjectIdentifier: ${exampleProject.id}\n status: ENABLED\n domainIdentifier: ${exampleProject.domainIdentifier}\n exampleGlossaryTerm:\n type: aws:datazone:GlossaryTerm\n name: example\n properties:\n domainIdentifier: ${exampleDomain.id}\n glossaryIdentifier: ${exampleGlossary.id}\n name: example\n status: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Glossary Term using a comma-delimited string combining the `domain_identifier`, `id`, and the `glossary_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/glossaryTerm:GlossaryTerm example domain-id,glossary-term-id,glossary-id\n```\n", "properties": { "createdAt": { "type": "string", @@ -225410,7 +225410,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, \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", + "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 \"SnapshotCreator\": \"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 \"SnapshotCreator\": \"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", @@ -241717,7 +241717,7 @@ } }, "aws:ec2/spotFleetRequest:SpotFleetRequest": { - "description": "Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot\ninstances to be requested on the Spot market.\n\n\u003e **NOTE [AWS strongly discourages](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) the use of the legacy APIs called by this resource.\nWe recommend using the EC2 Fleet or Auto Scaling Group resources instead.\n\n## Example Usage\n\n### Using launch specifications\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Request a Spot fleet\nconst cheapCompute = new aws.ec2.SpotFleetRequest(\"cheap_compute\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.03\",\n allocationStrategy: \"diversified\",\n targetCapacity: 6,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m4.10xlarge\",\n ami: \"ami-1234\",\n spotPrice: \"2.793\",\n placementTenancy: \"dedicated\",\n iamInstanceProfileArn: example.arn,\n },\n {\n instanceType: \"m4.4xlarge\",\n ami: \"ami-5678\",\n keyName: \"my-key\",\n spotPrice: \"1.117\",\n iamInstanceProfileArn: example.arn,\n availabilityZone: \"us-west-1a\",\n subnetId: \"subnet-1234\",\n weightedCapacity: \"35\",\n rootBlockDevices: [{\n volumeSize: 300,\n volumeType: \"gp2\",\n }],\n tags: {\n Name: \"spot-fleet-example\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Request a Spot fleet\ncheap_compute = aws.ec2.SpotFleetRequest(\"cheap_compute\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.03\",\n allocation_strategy=\"diversified\",\n target_capacity=6,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m4.10xlarge\",\n \"ami\": \"ami-1234\",\n \"spot_price\": \"2.793\",\n \"placement_tenancy\": \"dedicated\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n },\n {\n \"instance_type\": \"m4.4xlarge\",\n \"ami\": \"ami-5678\",\n \"key_name\": \"my-key\",\n \"spot_price\": \"1.117\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n \"availability_zone\": \"us-west-1a\",\n \"subnet_id\": \"subnet-1234\",\n \"weighted_capacity\": \"35\",\n \"root_block_devices\": [{\n \"volume_size\": 300,\n \"volume_type\": \"gp2\",\n }],\n \"tags\": {\n \"name\": \"spot-fleet-example\",\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 // Request a Spot fleet\n var cheapCompute = new Aws.Ec2.SpotFleetRequest(\"cheap_compute\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.03\",\n AllocationStrategy = \"diversified\",\n TargetCapacity = 6,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.10xlarge\",\n Ami = \"ami-1234\",\n SpotPrice = \"2.793\",\n PlacementTenancy = \"dedicated\",\n IamInstanceProfileArn = example.Arn,\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.4xlarge\",\n Ami = \"ami-5678\",\n KeyName = \"my-key\",\n SpotPrice = \"1.117\",\n IamInstanceProfileArn = example.Arn,\n AvailabilityZone = \"us-west-1a\",\n SubnetId = \"subnet-1234\",\n WeightedCapacity = \"35\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 300,\n VolumeType = \"gp2\",\n },\n },\n Tags = \n {\n { \"Name\", \"spot-fleet-example\" },\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// Request a Spot fleet\n\t\t_, err := ec2.NewSpotFleetRequest(ctx, \"cheap_compute\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.03\"),\n\t\t\tAllocationStrategy: pulumi.String(\"diversified\"),\n\t\t\tTargetCapacity: pulumi.Int(6),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.10xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-1234\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"2.793\"),\n\t\t\t\t\tPlacementTenancy: pulumi.String(\"dedicated\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.4xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-5678\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"1.117\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-1a\"),\n\t\t\t\t\tSubnetId: pulumi.String(\"subnet-1234\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"35\"),\n\t\t\t\t\tRootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{\n\t\t\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{\n\t\t\t\t\t\t\tVolumeSize: pulumi.Int(300),\n\t\t\t\t\t\t\tVolumeType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\"Name\": pulumi.String(\"spot-fleet-example\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Request a Spot fleet\n var cheapCompute = new SpotFleetRequest(\"cheapCompute\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.03\")\n .allocationStrategy(\"diversified\")\n .targetCapacity(6)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.10xlarge\")\n .ami(\"ami-1234\")\n .spotPrice(\"2.793\")\n .placementTenancy(\"dedicated\")\n .iamInstanceProfileArn(example.arn())\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.4xlarge\")\n .ami(\"ami-5678\")\n .keyName(\"my-key\")\n .spotPrice(\"1.117\")\n .iamInstanceProfileArn(example.arn())\n .availabilityZone(\"us-west-1a\")\n .subnetId(\"subnet-1234\")\n .weightedCapacity(35)\n .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()\n .volumeSize(\"300\")\n .volumeType(\"gp2\")\n .build())\n .tags(Map.of(\"Name\", \"spot-fleet-example\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Request a Spot fleet\n cheapCompute:\n type: aws:ec2:SpotFleetRequest\n name: cheap_compute\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.03'\n allocationStrategy: diversified\n targetCapacity: 6\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m4.10xlarge\n ami: ami-1234\n spotPrice: '2.793'\n placementTenancy: dedicated\n iamInstanceProfileArn: ${example.arn}\n - instanceType: m4.4xlarge\n ami: ami-5678\n keyName: my-key\n spotPrice: '1.117'\n iamInstanceProfileArn: ${example.arn}\n availabilityZone: us-west-1a\n subnetId: subnet-1234\n weightedCapacity: 35\n rootBlockDevices:\n - volumeSize: '300'\n volumeType: gp2\n tags:\n Name: spot-fleet-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using launch templates\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.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\n\t\t\tName: pulumi.String(\"launch-template\"),\n\t\t\tImageId: pulumi.String(\"ami-516b9131\"),\n\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\tKeyName: pulumi.String(\"some-key\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\n\t\t\t\t\tLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\n\t\t\t\t\t\tId: foo.ID(),\n\t\t\t\t\t\tVersion: foo.LatestVersion,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttest_attach,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n options:\n dependson:\n - ${[\"test-attach\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** This provider does not support the functionality where multiple `subnet_id` or `availability_zone` parameters can be specified in the same\nlaunch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:\n\n### Using multiple launch specifications\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.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m1.small\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n {\n instanceType: \"m5.large\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m1.small\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\n },\n {\n \"instance_type\": \"m5.large\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\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 foo = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m1.small\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m5.large\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\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.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m5.large\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 SpotFleetRequest(\"foo\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m1.small\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m5.large\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:SpotFleetRequest\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m1.small\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n - instanceType: m5.large\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e In this example, we use a `dynamic` block to define zero or more `launch_specification` blocks, producing one for each element in the list of subnet ids.\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 subnets = config.requireObject(\"subnets\");\nconst example = new aws.ec2.SpotFleetRequest(\"example\", {\n launchSpecifications: .map(s =\u003e ({\n subnetId: s[1],\n })).map((v, k) =\u003e ({key: k, value: v})).map(entry =\u003e ({\n ami: \"ami-1234\",\n instanceType: \"m4.4xlarge\",\n subnetId: entry.value.subnetId,\n vpcSecurityGroupIds: \"sg-123456\",\n rootBlockDevices: [{\n volumeSize: 8,\n volumeType: \"gp2\",\n deleteOnTermination: true,\n }],\n tags: {\n Name: \"Spot Node\",\n tag_builder: \"builder\",\n },\n })),\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n targetCapacity: 3,\n validUntil: \"2019-11-04T20:44:20Z\",\n allocationStrategy: \"lowestPrice\",\n fleetType: \"request\",\n waitForFulfillment: true,\n terminateInstancesWithExpiration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nsubnets = config.require_object(\"subnets\")\nexample = aws.ec2.SpotFleetRequest(\"example\",\n launch_specifications=[{\n \"ami\": \"ami-1234\",\n \"instance_type\": \"m4.4xlarge\",\n \"subnet_id\": entry[\"value\"][\"subnetId\"],\n \"vpc_security_group_ids\": \"sg-123456\",\n \"root_block_devices\": [{\n \"volume_size\": 8,\n \"volume_type\": \"gp2\",\n \"delete_on_termination\": True,\n }],\n \"tags\": {\n \"name\": \"Spot Node\",\n \"tag_builder\": \"builder\",\n },\n } for entry in [{\"key\": k, \"value\": v} for k, v in [{\n \"subnetId\": s[1],\n } for s in subnets]]],\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n target_capacity=3,\n valid_until=\"2019-11-04T20:44:20Z\",\n allocation_strategy=\"lowestPrice\",\n fleet_type=\"request\",\n wait_for_fulfillment=True,\n terminate_instances_with_expiration=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 config = new Config();\n var subnets = config.RequireObject\u003cdynamic\u003e(\"subnets\");\n var example = new Aws.Ec2.SpotFleetRequest(\"example\", new()\n {\n LaunchSpecifications = .Select(s =\u003e \n {\n return \n {\n { \"subnetId\", s[1] },\n };\n }).ToList().Select((v, k) =\u003e new { Key = k, Value = v }).Select(entry =\u003e \n {\n return new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n Ami = \"ami-1234\",\n InstanceType = \"m4.4xlarge\",\n SubnetId = entry.Value.SubnetId,\n VpcSecurityGroupIds = \"sg-123456\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 8,\n VolumeType = \"gp2\",\n DeleteOnTermination = true,\n },\n },\n Tags = \n {\n { \"Name\", \"Spot Node\" },\n { \"tag_builder\", \"builder\" },\n },\n };\n }).ToList(),\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n TargetCapacity = 3,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n AllocationStrategy = \"lowestPrice\",\n FleetType = \"request\",\n WaitForFulfillment = true,\n TerminateInstancesWithExpiration = true,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using multiple launch configurations\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.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [vpcId],\n }],\n});\nconst foo = new aws.ec2.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n overrides: [\n {\n subnetId: example.then(example =\u003e example.ids?.[0]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[1]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[2]),\n },\n ],\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [vpc_id],\n}])\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n \"overrides\": [\n {\n \"subnet_id\": example.ids[0],\n },\n {\n \"subnet_id\": example.ids[1],\n },\n {\n \"subnet_id\": example.ids[2],\n },\n ],\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n vpcId,\n },\n },\n },\n });\n\n var foo = new Aws.Ec2.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n Overrides = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[2]),\n },\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nvpcId,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nfoo, err := ec2.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\nName: pulumi.String(\"launch-template\"),\nImageId: pulumi.String(\"ami-516b9131\"),\nInstanceType: pulumi.String(\"m1.small\"),\nKeyName: pulumi.String(\"some-key\"),\n})\nif err != nil {\nreturn err\n}\n_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\nIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\nSpotPrice: pulumi.String(\"0.005\"),\nTargetCapacity: pulumi.Int(2),\nValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\nLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\nLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\nId: foo.ID(),\nVersion: foo.LatestVersion,\n},\nOverrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[0]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[1]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[2]),\n},\n},\n},\n},\n}, pulumi.DependsOn([]pulumi.Resource{\ntest_attach,\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.GetSubnetsArgs;\nimport com.pulumi.aws.ec2.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(vpcId)\n .build())\n .build());\n\n var foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .overrides( \n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[2]))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n overrides:\n - subnetId: ${example.ids[0]}\n - subnetId: ${example.ids[1]}\n - subnetId: ${example.ids[2]}\n options:\n dependson:\n - ${[\"test-attach\"]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${vpcId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Spot Fleet Requests using `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e\n```\n", + "description": "Provides an EC2 Spot Fleet Request resource. This allows a fleet of Spot\ninstances to be requested on the Spot market.\n\n\u003e **NOTE [AWS strongly discourages](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) the use of the legacy APIs called by this resource.\nWe recommend using the EC2 Fleet or Auto Scaling Group resources instead.\n\n## Example Usage\n\n### Using launch specifications\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Request a Spot fleet\nconst cheapCompute = new aws.ec2.SpotFleetRequest(\"cheap_compute\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.03\",\n allocationStrategy: \"diversified\",\n targetCapacity: 6,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m4.10xlarge\",\n ami: \"ami-1234\",\n spotPrice: \"2.793\",\n placementTenancy: \"dedicated\",\n iamInstanceProfileArn: example.arn,\n },\n {\n instanceType: \"m4.4xlarge\",\n ami: \"ami-5678\",\n keyName: \"my-key\",\n spotPrice: \"1.117\",\n iamInstanceProfileArn: example.arn,\n availabilityZone: \"us-west-1a\",\n subnetId: \"subnet-1234\",\n weightedCapacity: \"35\",\n rootBlockDevices: [{\n volumeSize: 300,\n volumeType: \"gp2\",\n }],\n tags: {\n Name: \"spot-fleet-example\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Request a Spot fleet\ncheap_compute = aws.ec2.SpotFleetRequest(\"cheap_compute\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.03\",\n allocation_strategy=\"diversified\",\n target_capacity=6,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m4.10xlarge\",\n \"ami\": \"ami-1234\",\n \"spot_price\": \"2.793\",\n \"placement_tenancy\": \"dedicated\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n },\n {\n \"instance_type\": \"m4.4xlarge\",\n \"ami\": \"ami-5678\",\n \"key_name\": \"my-key\",\n \"spot_price\": \"1.117\",\n \"iam_instance_profile_arn\": example[\"arn\"],\n \"availability_zone\": \"us-west-1a\",\n \"subnet_id\": \"subnet-1234\",\n \"weighted_capacity\": \"35\",\n \"root_block_devices\": [{\n \"volume_size\": 300,\n \"volume_type\": \"gp2\",\n }],\n \"tags\": {\n \"Name\": \"spot-fleet-example\",\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 // Request a Spot fleet\n var cheapCompute = new Aws.Ec2.SpotFleetRequest(\"cheap_compute\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.03\",\n AllocationStrategy = \"diversified\",\n TargetCapacity = 6,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.10xlarge\",\n Ami = \"ami-1234\",\n SpotPrice = \"2.793\",\n PlacementTenancy = \"dedicated\",\n IamInstanceProfileArn = example.Arn,\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m4.4xlarge\",\n Ami = \"ami-5678\",\n KeyName = \"my-key\",\n SpotPrice = \"1.117\",\n IamInstanceProfileArn = example.Arn,\n AvailabilityZone = \"us-west-1a\",\n SubnetId = \"subnet-1234\",\n WeightedCapacity = \"35\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 300,\n VolumeType = \"gp2\",\n },\n },\n Tags = \n {\n { \"Name\", \"spot-fleet-example\" },\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// Request a Spot fleet\n\t\t_, err := ec2.NewSpotFleetRequest(ctx, \"cheap_compute\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.03\"),\n\t\t\tAllocationStrategy: pulumi.String(\"diversified\"),\n\t\t\tTargetCapacity: pulumi.Int(6),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.10xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-1234\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"2.793\"),\n\t\t\t\t\tPlacementTenancy: pulumi.String(\"dedicated\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.4xlarge\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-5678\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tSpotPrice: pulumi.String(\"1.117\"),\n\t\t\t\t\tIamInstanceProfileArn: pulumi.Any(example.Arn),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-1a\"),\n\t\t\t\t\tSubnetId: pulumi.String(\"subnet-1234\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"35\"),\n\t\t\t\t\tRootBlockDevices: ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArray{\n\t\t\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs{\n\t\t\t\t\t\t\tVolumeSize: pulumi.Int(300),\n\t\t\t\t\t\t\tVolumeType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\"Name\": pulumi.String(\"spot-fleet-example\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Request a Spot fleet\n var cheapCompute = new SpotFleetRequest(\"cheapCompute\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.03\")\n .allocationStrategy(\"diversified\")\n .targetCapacity(6)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.10xlarge\")\n .ami(\"ami-1234\")\n .spotPrice(\"2.793\")\n .placementTenancy(\"dedicated\")\n .iamInstanceProfileArn(example.arn())\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m4.4xlarge\")\n .ami(\"ami-5678\")\n .keyName(\"my-key\")\n .spotPrice(\"1.117\")\n .iamInstanceProfileArn(example.arn())\n .availabilityZone(\"us-west-1a\")\n .subnetId(\"subnet-1234\")\n .weightedCapacity(35)\n .rootBlockDevices(SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs.builder()\n .volumeSize(\"300\")\n .volumeType(\"gp2\")\n .build())\n .tags(Map.of(\"Name\", \"spot-fleet-example\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Request a Spot fleet\n cheapCompute:\n type: aws:ec2:SpotFleetRequest\n name: cheap_compute\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.03'\n allocationStrategy: diversified\n targetCapacity: 6\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m4.10xlarge\n ami: ami-1234\n spotPrice: '2.793'\n placementTenancy: dedicated\n iamInstanceProfileArn: ${example.arn}\n - instanceType: m4.4xlarge\n ami: ami-5678\n keyName: my-key\n spotPrice: '1.117'\n iamInstanceProfileArn: ${example.arn}\n availabilityZone: us-west-1a\n subnetId: subnet-1234\n weightedCapacity: 35\n rootBlockDevices:\n - volumeSize: '300'\n volumeType: gp2\n tags:\n Name: spot-fleet-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using launch templates\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.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\n\t\t\tName: pulumi.String(\"launch-template\"),\n\t\t\tImageId: pulumi.String(\"ami-516b9131\"),\n\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\tKeyName: pulumi.String(\"some-key\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\n\t\t\t\t\tLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\n\t\t\t\t\t\tId: foo.ID(),\n\t\t\t\t\t\tVersion: foo.LatestVersion,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttest_attach,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n options:\n dependson:\n - ${[\"test-attach\"]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **NOTE:** This provider does not support the functionality where multiple `subnet_id` or `availability_zone` parameters can be specified in the same\nlaunch configuration block. If you want to specify multiple values, then separate launch configuration blocks should be used or launch template overrides should be configured, one per subnet:\n\n### Using multiple launch specifications\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.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchSpecifications: [\n {\n instanceType: \"m1.small\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n {\n instanceType: \"m5.large\",\n ami: \"ami-d06a90b0\",\n keyName: \"my-key\",\n availabilityZone: \"us-west-2a\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_specifications=[\n {\n \"instance_type\": \"m1.small\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\n },\n {\n \"instance_type\": \"m5.large\",\n \"ami\": \"ami-d06a90b0\",\n \"key_name\": \"my-key\",\n \"availability_zone\": \"us-west-2a\",\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 foo = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchSpecifications = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m1.small\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n InstanceType = \"m5.large\",\n Ami = \"ami-d06a90b0\",\n KeyName = \"my-key\",\n AvailabilityZone = \"us-west-2a\",\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.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\n\t\t\tIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\n\t\t\tSpotPrice: pulumi.String(\"0.005\"),\n\t\t\tTargetCapacity: pulumi.Int(2),\n\t\t\tValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\n\t\t\tLaunchSpecifications: ec2.SpotFleetRequestLaunchSpecificationArray{\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m1.small\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.SpotFleetRequestLaunchSpecificationArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"m5.large\"),\n\t\t\t\t\tAmi: pulumi.String(\"ami-d06a90b0\"),\n\t\t\t\t\tKeyName: pulumi.String(\"my-key\"),\n\t\t\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\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.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 SpotFleetRequest(\"foo\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchSpecifications( \n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m1.small\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build(),\n SpotFleetRequestLaunchSpecificationArgs.builder()\n .instanceType(\"m5.large\")\n .ami(\"ami-d06a90b0\")\n .keyName(\"my-key\")\n .availabilityZone(\"us-west-2a\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:SpotFleetRequest\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchSpecifications:\n - instanceType: m1.small\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n - instanceType: m5.large\n ami: ami-d06a90b0\n keyName: my-key\n availabilityZone: us-west-2a\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e In this example, we use a `dynamic` block to define zero or more `launch_specification` blocks, producing one for each element in the list of subnet ids.\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 subnets = config.requireObject(\"subnets\");\nconst example = new aws.ec2.SpotFleetRequest(\"example\", {\n launchSpecifications: .map(s =\u003e ({\n subnetId: s[1],\n })).map((v, k) =\u003e ({key: k, value: v})).map(entry =\u003e ({\n ami: \"ami-1234\",\n instanceType: \"m4.4xlarge\",\n subnetId: entry.value.subnetId,\n vpcSecurityGroupIds: \"sg-123456\",\n rootBlockDevices: [{\n volumeSize: 8,\n volumeType: \"gp2\",\n deleteOnTermination: true,\n }],\n tags: {\n Name: \"Spot Node\",\n tag_builder: \"builder\",\n },\n })),\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n targetCapacity: 3,\n validUntil: \"2019-11-04T20:44:20Z\",\n allocationStrategy: \"lowestPrice\",\n fleetType: \"request\",\n waitForFulfillment: true,\n terminateInstancesWithExpiration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nsubnets = config.require_object(\"subnets\")\nexample = aws.ec2.SpotFleetRequest(\"example\",\n launch_specifications=[{\n \"ami\": \"ami-1234\",\n \"instance_type\": \"m4.4xlarge\",\n \"subnet_id\": entry[\"value\"][\"subnetId\"],\n \"vpc_security_group_ids\": \"sg-123456\",\n \"root_block_devices\": [{\n \"volume_size\": 8,\n \"volume_type\": \"gp2\",\n \"delete_on_termination\": True,\n }],\n \"tags\": {\n \"Name\": \"Spot Node\",\n \"tag_builder\": \"builder\",\n },\n } for entry in [{\"key\": k, \"value\": v} for k, v in [{\n \"subnetId\": s[1],\n } for s in subnets]]],\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n target_capacity=3,\n valid_until=\"2019-11-04T20:44:20Z\",\n allocation_strategy=\"lowestPrice\",\n fleet_type=\"request\",\n wait_for_fulfillment=True,\n terminate_instances_with_expiration=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 config = new Config();\n var subnets = config.RequireObject\u003cdynamic\u003e(\"subnets\");\n var example = new Aws.Ec2.SpotFleetRequest(\"example\", new()\n {\n LaunchSpecifications = .Select(s =\u003e \n {\n return \n {\n { \"subnetId\", s[1] },\n };\n }).ToList().Select((v, k) =\u003e new { Key = k, Value = v }).Select(entry =\u003e \n {\n return new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationArgs\n {\n Ami = \"ami-1234\",\n InstanceType = \"m4.4xlarge\",\n SubnetId = entry.Value.SubnetId,\n VpcSecurityGroupIds = \"sg-123456\",\n RootBlockDevices = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchSpecificationRootBlockDeviceArgs\n {\n VolumeSize = 8,\n VolumeType = \"gp2\",\n DeleteOnTermination = true,\n },\n },\n Tags = \n {\n { \"Name\", \"Spot Node\" },\n { \"tag_builder\", \"builder\" },\n },\n };\n }).ToList(),\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n TargetCapacity = 3,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n AllocationStrategy = \"lowestPrice\",\n FleetType = \"request\",\n WaitForFulfillment = true,\n TerminateInstancesWithExpiration = true,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using multiple launch configurations\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.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [vpcId],\n }],\n});\nconst foo = new aws.ec2.LaunchTemplate(\"foo\", {\n name: \"launch-template\",\n imageId: \"ami-516b9131\",\n instanceType: \"m1.small\",\n keyName: \"some-key\",\n});\nconst fooSpotFleetRequest = new aws.ec2.SpotFleetRequest(\"foo\", {\n iamFleetRole: \"arn:aws:iam::12345678:role/spot-fleet\",\n spotPrice: \"0.005\",\n targetCapacity: 2,\n validUntil: \"2019-11-04T20:44:20Z\",\n launchTemplateConfigs: [{\n launchTemplateSpecification: {\n id: foo.id,\n version: foo.latestVersion,\n },\n overrides: [\n {\n subnetId: example.then(example =\u003e example.ids?.[0]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[1]),\n },\n {\n subnetId: example.then(example =\u003e example.ids?.[2]),\n },\n ],\n }],\n}, {\n dependsOn: [test_attach],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [vpc_id],\n}])\nfoo = aws.ec2.LaunchTemplate(\"foo\",\n name=\"launch-template\",\n image_id=\"ami-516b9131\",\n instance_type=\"m1.small\",\n key_name=\"some-key\")\nfoo_spot_fleet_request = aws.ec2.SpotFleetRequest(\"foo\",\n iam_fleet_role=\"arn:aws:iam::12345678:role/spot-fleet\",\n spot_price=\"0.005\",\n target_capacity=2,\n valid_until=\"2019-11-04T20:44:20Z\",\n launch_template_configs=[{\n \"launch_template_specification\": {\n \"id\": foo.id,\n \"version\": foo.latest_version,\n },\n \"overrides\": [\n {\n \"subnet_id\": example.ids[0],\n },\n {\n \"subnet_id\": example.ids[1],\n },\n {\n \"subnet_id\": example.ids[2],\n },\n ],\n }],\n opts = pulumi.ResourceOptions(depends_on=[test_attach]))\n```\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.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n vpcId,\n },\n },\n },\n });\n\n var foo = new Aws.Ec2.LaunchTemplate(\"foo\", new()\n {\n Name = \"launch-template\",\n ImageId = \"ami-516b9131\",\n InstanceType = \"m1.small\",\n KeyName = \"some-key\",\n });\n\n var fooSpotFleetRequest = new Aws.Ec2.SpotFleetRequest(\"foo\", new()\n {\n IamFleetRole = \"arn:aws:iam::12345678:role/spot-fleet\",\n SpotPrice = \"0.005\",\n TargetCapacity = 2,\n ValidUntil = \"2019-11-04T20:44:20Z\",\n LaunchTemplateConfigs = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigArgs\n {\n LaunchTemplateSpecification = new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs\n {\n Id = foo.Id,\n Version = foo.LatestVersion,\n },\n Overrides = new[]\n {\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n new Aws.Ec2.Inputs.SpotFleetRequestLaunchTemplateConfigOverrideArgs\n {\n SubnetId = example.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[2]),\n },\n },\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n test_attach,\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)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nvpcId,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nfoo, err := ec2.NewLaunchTemplate(ctx, \"foo\", \u0026ec2.LaunchTemplateArgs{\nName: pulumi.String(\"launch-template\"),\nImageId: pulumi.String(\"ami-516b9131\"),\nInstanceType: pulumi.String(\"m1.small\"),\nKeyName: pulumi.String(\"some-key\"),\n})\nif err != nil {\nreturn err\n}\n_, err = ec2.NewSpotFleetRequest(ctx, \"foo\", \u0026ec2.SpotFleetRequestArgs{\nIamFleetRole: pulumi.String(\"arn:aws:iam::12345678:role/spot-fleet\"),\nSpotPrice: pulumi.String(\"0.005\"),\nTargetCapacity: pulumi.Int(2),\nValidUntil: pulumi.String(\"2019-11-04T20:44:20Z\"),\nLaunchTemplateConfigs: ec2.SpotFleetRequestLaunchTemplateConfigArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigArgs{\nLaunchTemplateSpecification: \u0026ec2.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs{\nId: foo.ID(),\nVersion: foo.LatestVersion,\n},\nOverrides: ec2.SpotFleetRequestLaunchTemplateConfigOverrideArray{\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[0]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[1]),\n},\n\u0026ec2.SpotFleetRequestLaunchTemplateConfigOverrideArgs{\nSubnetId: pulumi.String(example.Ids[2]),\n},\n},\n},\n},\n}, pulumi.DependsOn([]pulumi.Resource{\ntest_attach,\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.GetSubnetsArgs;\nimport com.pulumi.aws.ec2.LaunchTemplate;\nimport com.pulumi.aws.ec2.LaunchTemplateArgs;\nimport com.pulumi.aws.ec2.SpotFleetRequest;\nimport com.pulumi.aws.ec2.SpotFleetRequestArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigArgs;\nimport com.pulumi.aws.ec2.inputs.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs;\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 = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(vpcId)\n .build())\n .build());\n\n var foo = new LaunchTemplate(\"foo\", LaunchTemplateArgs.builder()\n .name(\"launch-template\")\n .imageId(\"ami-516b9131\")\n .instanceType(\"m1.small\")\n .keyName(\"some-key\")\n .build());\n\n var fooSpotFleetRequest = new SpotFleetRequest(\"fooSpotFleetRequest\", SpotFleetRequestArgs.builder()\n .iamFleetRole(\"arn:aws:iam::12345678:role/spot-fleet\")\n .spotPrice(\"0.005\")\n .targetCapacity(2)\n .validUntil(\"2019-11-04T20:44:20Z\")\n .launchTemplateConfigs(SpotFleetRequestLaunchTemplateConfigArgs.builder()\n .launchTemplateSpecification(SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationArgs.builder()\n .id(foo.id())\n .version(foo.latestVersion())\n .build())\n .overrides( \n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .build(),\n SpotFleetRequestLaunchTemplateConfigOverrideArgs.builder()\n .subnetId(example.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[2]))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(test_attach)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:LaunchTemplate\n properties:\n name: launch-template\n imageId: ami-516b9131\n instanceType: m1.small\n keyName: some-key\n fooSpotFleetRequest:\n type: aws:ec2:SpotFleetRequest\n name: foo\n properties:\n iamFleetRole: arn:aws:iam::12345678:role/spot-fleet\n spotPrice: '0.005'\n targetCapacity: 2\n validUntil: 2019-11-04T20:44:20Z\n launchTemplateConfigs:\n - launchTemplateSpecification:\n id: ${foo.id}\n version: ${foo.latestVersion}\n overrides:\n - subnetId: ${example.ids[0]}\n - subnetId: ${example.ids[1]}\n - subnetId: ${example.ids[2]}\n options:\n dependson:\n - ${[\"test-attach\"]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${vpcId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Spot Fleet Requests using `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/spotFleetRequest:SpotFleetRequest fleet sfr-005e9ec8-5546-4c31-b317-31a62325411e\n```\n", "properties": { "allocationStrategy": { "type": "string", @@ -253485,7 +253485,7 @@ } }, "aws:ecs/taskDefinition:TaskDefinition": { - "description": "Manages a revision of an ECS task definition to be used in `aws.ecs.Service`.\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: JSON.stringify([\n {\n name: \"first\",\n image: \"service-first\",\n cpu: 10,\n memory: 512,\n essential: true,\n portMappings: [{\n containerPort: 80,\n hostPort: 80,\n }],\n },\n {\n name: \"second\",\n image: \"service-second\",\n cpu: 10,\n memory: 256,\n essential: true,\n portMappings: [{\n containerPort: 443,\n hostPort: 443,\n }],\n },\n ]),\n volumes: [{\n name: \"service-storage\",\n hostPath: \"/ecs/service-storage\",\n }],\n placementConstraints: [{\n type: \"memberOf\",\n expression: \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=json.dumps([\n {\n \"name\": \"first\",\n \"image\": \"service-first\",\n \"cpu\": 10,\n \"memory\": 512,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 80,\n \"hostPort\": 80,\n }],\n },\n {\n \"name\": \"second\",\n \"image\": \"service-second\",\n \"cpu\": 10,\n \"memory\": 256,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 443,\n \"hostPort\": 443,\n }],\n },\n ]),\n volumes=[{\n \"name\": \"service-storage\",\n \"host_path\": \"/ecs/service-storage\",\n }],\n placement_constraints=[{\n \"type\": \"memberOf\",\n \"expression\": \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"first\",\n [\"image\"] = \"service-first\",\n [\"cpu\"] = 10,\n [\"memory\"] = 512,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 80,\n [\"hostPort\"] = 80,\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"second\",\n [\"image\"] = \"service-second\",\n [\"cpu\"] = 10,\n [\"memory\"] = 256,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 443,\n [\"hostPort\"] = 443,\n },\n },\n },\n }),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n HostPath = \"/ecs/service-storage\",\n },\n },\n PlacementConstraints = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionPlacementConstraintArgs\n {\n Type = \"memberOf\",\n Expression = \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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/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\ttmpJSON0, err := json.Marshal([]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"first\",\n\t\t\t\t\"image\": \"service-first\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 512,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 80,\n\t\t\t\t\t\t\"hostPort\": 80,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"second\",\n\t\t\t\t\"image\": \"service-second\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 256,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 443,\n\t\t\t\t\t\t\"hostPort\": 443,\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 = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(json0),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tHostPath: pulumi.String(\"/ecs/service-storage\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tPlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{\n\t\t\t\t\u0026ecs.TaskDefinitionPlacementConstraintArgs{\n\t\t\t\t\tType: pulumi.String(\"memberOf\"),\n\t\t\t\t\tExpression: pulumi.String(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs;\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 service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(serializeJson(\n jsonArray(\n jsonObject(\n jsonProperty(\"name\", \"first\"),\n jsonProperty(\"image\", \"service-first\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 512),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 80),\n jsonProperty(\"hostPort\", 80)\n )))\n ), \n jsonObject(\n jsonProperty(\"name\", \"second\"),\n jsonProperty(\"image\", \"service-second\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 256),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 443),\n jsonProperty(\"hostPort\", 443)\n )))\n )\n )))\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .hostPath(\"/ecs/service-storage\")\n .build())\n .placementConstraints(TaskDefinitionPlacementConstraintArgs.builder()\n .type(\"memberOf\")\n .expression(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::toJSON:\n - name: first\n image: service-first\n cpu: 10\n memory: 512\n essential: true\n portMappings:\n - containerPort: 80\n hostPort: 80\n - name: second\n image: service-second\n cpu: 10\n memory: 256\n essential: true\n portMappings:\n - containerPort: 443\n hostPort: 443\n volumes:\n - name: service-storage\n hostPath: /ecs/service-storage\n placementConstraints:\n - type: memberOf\n expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With AppMesh Proxy\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n proxyConfiguration: {\n type: \"APPMESH\",\n containerName: \"applicationContainerName\",\n properties: {\n AppPorts: \"8080\",\n EgressIgnoredIPs: \"169.254.170.2,169.254.169.254\",\n IgnoredUID: \"1337\",\n ProxyEgressPort: \"15001\",\n ProxyIngressPort: \"15000\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n proxy_configuration={\n \"type\": \"APPMESH\",\n \"container_name\": \"applicationContainerName\",\n \"properties\": {\n \"app_ports\": \"8080\",\n \"egress_ignored_ips\": \"169.254.170.2,169.254.169.254\",\n \"ignored_uid\": \"1337\",\n \"proxy_egress_port\": \"15001\",\n \"proxy_ingress_port\": \"15000\",\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n ProxyConfiguration = new Aws.Ecs.Inputs.TaskDefinitionProxyConfigurationArgs\n {\n Type = \"APPMESH\",\n ContainerName = \"applicationContainerName\",\n Properties = \n {\n { \"AppPorts\", \"8080\" },\n { \"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\" },\n { \"IgnoredUID\", \"1337\" },\n { \"ProxyEgressPort\", \"15001\" },\n { \"ProxyIngressPort\", \"15000\" },\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-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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tProxyConfiguration: \u0026ecs.TaskDefinitionProxyConfigurationArgs{\n\t\t\t\tType: pulumi.String(\"APPMESH\"),\n\t\t\t\tContainerName: pulumi.String(\"applicationContainerName\"),\n\t\t\t\tProperties: pulumi.StringMap{\n\t\t\t\t\t\"AppPorts\": pulumi.String(\"8080\"),\n\t\t\t\t\t\"EgressIgnoredIPs\": pulumi.String(\"169.254.170.2,169.254.169.254\"),\n\t\t\t\t\t\"IgnoredUID\": pulumi.String(\"1337\"),\n\t\t\t\t\t\"ProxyEgressPort\": pulumi.String(\"15001\"),\n\t\t\t\t\t\"ProxyIngressPort\": pulumi.String(\"15000\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionProxyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .proxyConfiguration(TaskDefinitionProxyConfigurationArgs.builder()\n .type(\"APPMESH\")\n .containerName(\"applicationContainerName\")\n .properties(Map.ofEntries(\n Map.entry(\"AppPorts\", \"8080\"),\n Map.entry(\"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\"),\n Map.entry(\"IgnoredUID\", \"1337\"),\n Map.entry(\"ProxyEgressPort\", 15001),\n Map.entry(\"ProxyIngressPort\", 15000)\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n proxyConfiguration:\n type: APPMESH\n containerName: applicationContainerName\n properties:\n AppPorts: '8080'\n EgressIgnoredIPs: 169.254.170.2,169.254.169.254\n IgnoredUID: '1337'\n ProxyEgressPort: 15001\n ProxyIngressPort: 15000\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `docker_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n dockerVolumeConfiguration: {\n scope: \"shared\",\n autoprovision: true,\n driver: \"local\",\n driverOpts: {\n type: \"nfs\",\n device: `${fs.dnsName}:/`,\n o: `addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport`,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"docker_volume_configuration\": {\n \"scope\": \"shared\",\n \"autoprovision\": True,\n \"driver\": \"local\",\n \"driver_opts\": {\n \"type\": \"nfs\",\n \"device\": f\"{fs['dnsName']}:/\",\n \"o\": f\"addr={fs['dnsName']},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n DockerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs\n {\n Scope = \"shared\",\n Autoprovision = true,\n Driver = \"local\",\n DriverOpts = \n {\n { \"type\", \"nfs\" },\n { \"device\", $\"{fs.DnsName}:/\" },\n { \"o\", $\"addr={fs.DnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\" },\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tDockerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{\n\t\t\t\t\t\tScope: pulumi.String(\"shared\"),\n\t\t\t\t\t\tAutoprovision: pulumi.Bool(true),\n\t\t\t\t\t\tDriver: pulumi.String(\"local\"),\n\t\t\t\t\t\tDriverOpts: pulumi.StringMap{\n\t\t\t\t\t\t\t\"type\": pulumi.String(\"nfs\"),\n\t\t\t\t\t\t\t\"device\": pulumi.Sprintf(\"%v:/\", fs.DnsName),\n\t\t\t\t\t\t\t\"o\": pulumi.Sprintf(\"addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.DnsName),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .dockerVolumeConfiguration(TaskDefinitionVolumeDockerVolumeConfigurationArgs.builder()\n .scope(\"shared\")\n .autoprovision(true)\n .driver(\"local\")\n .driverOpts(Map.ofEntries(\n Map.entry(\"type\", \"nfs\"),\n Map.entry(\"device\", String.format(\"%s:/\", fs.dnsName())),\n Map.entry(\"o\", String.format(\"addr=%s,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.dnsName()))\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n dockerVolumeConfiguration:\n scope: shared\n autoprovision: true\n driver: local\n driverOpts:\n type: nfs\n device: ${fs.dnsName}:/\n o: addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `efs_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n efsVolumeConfiguration: {\n fileSystemId: fs.id,\n rootDirectory: \"/opt/data\",\n transitEncryption: \"ENABLED\",\n transitEncryptionPort: 2999,\n authorizationConfig: {\n accessPointId: test.id,\n iam: \"ENABLED\",\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"efs_volume_configuration\": {\n \"file_system_id\": fs[\"id\"],\n \"root_directory\": \"/opt/data\",\n \"transit_encryption\": \"ENABLED\",\n \"transit_encryption_port\": 2999,\n \"authorization_config\": {\n \"access_point_id\": test[\"id\"],\n \"iam\": \"ENABLED\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n EfsVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs\n {\n FileSystemId = fs.Id,\n RootDirectory = \"/opt/data\",\n TransitEncryption = \"ENABLED\",\n TransitEncryptionPort = 2999,\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs\n {\n AccessPointId = test.Id,\n Iam = \"ENABLED\",\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tEfsVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(fs.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"/opt/data\"),\n\t\t\t\t\t\tTransitEncryption: pulumi.String(\"ENABLED\"),\n\t\t\t\t\t\tTransitEncryptionPort: pulumi.Int(2999),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tAccessPointId: pulumi.Any(test.Id),\n\t\t\t\t\t\t\tIam: pulumi.String(\"ENABLED\"),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .efsVolumeConfiguration(TaskDefinitionVolumeEfsVolumeConfigurationArgs.builder()\n .fileSystemId(fs.id())\n .rootDirectory(\"/opt/data\")\n .transitEncryption(\"ENABLED\")\n .transitEncryptionPort(2999)\n .authorizationConfig(TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs.builder()\n .accessPointId(test.id())\n .iam(\"ENABLED\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n efsVolumeConfiguration:\n fileSystemId: ${fs.id}\n rootDirectory: /opt/data\n transitEncryption: ENABLED\n transitEncryptionPort: 2999\n authorizationConfig:\n accessPointId: ${test.id}\n iam: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `fsx_windows_file_server_volume_configuration`\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.secretsmanager.SecretVersion(\"test\", {\n secretId: testAwsSecretsmanagerSecret.id,\n secretString: JSON.stringify({\n username: \"admin\",\n password: testAwsDirectoryServiceDirectory.password,\n }),\n});\nconst service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n fsxWindowsFileServerVolumeConfiguration: {\n fileSystemId: testAwsFsxWindowsFileSystem.id,\n rootDirectory: \"\\\\data\",\n authorizationConfig: {\n credentialsParameter: test.arn,\n domain: testAwsDirectoryServiceDirectory.name,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.secretsmanager.SecretVersion(\"test\",\n secret_id=test_aws_secretsmanager_secret[\"id\"],\n secret_string=json.dumps({\n \"username\": \"admin\",\n \"password\": test_aws_directory_service_directory[\"password\"],\n }))\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"fsx_windows_file_server_volume_configuration\": {\n \"file_system_id\": test_aws_fsx_windows_file_system[\"id\"],\n \"root_directory\": \"\\\\data\",\n \"authorization_config\": {\n \"credentials_parameter\": test.arn,\n \"domain\": test_aws_directory_service_directory[\"name\"],\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 test = new Aws.SecretsManager.SecretVersion(\"test\", new()\n {\n SecretId = testAwsSecretsmanagerSecret.Id,\n SecretString = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"username\"] = \"admin\",\n [\"password\"] = testAwsDirectoryServiceDirectory.Password,\n }),\n });\n\n var service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n FsxWindowsFileServerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs\n {\n FileSystemId = testAwsFsxWindowsFileSystem.Id,\n RootDirectory = \"\\\\data\",\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs\n {\n CredentialsParameter = test.Arn,\n Domain = testAwsDirectoryServiceDirectory.Name,\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/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager\"\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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"username\": \"admin\",\n\t\t\t\"password\": testAwsDirectoryServiceDirectory.Password,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttest, err := secretsmanager.NewSecretVersion(ctx, \"test\", \u0026secretsmanager.SecretVersionArgs{\n\t\t\tSecretId: pulumi.Any(testAwsSecretsmanagerSecret.Id),\n\t\t\tSecretString: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tFsxWindowsFileServerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(testAwsFsxWindowsFileSystem.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"\\\\data\"),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tCredentialsParameter: test.Arn,\n\t\t\t\t\t\t\tDomain: pulumi.Any(testAwsDirectoryServiceDirectory.Name),\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.secretsmanager.SecretVersion;\nimport com.pulumi.aws.secretsmanager.SecretVersionArgs;\nimport com.pulumi.aws.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs;\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 SecretVersion(\"test\", SecretVersionArgs.builder()\n .secretId(testAwsSecretsmanagerSecret.id())\n .secretString(serializeJson(\n jsonObject(\n jsonProperty(\"username\", \"admin\"),\n jsonProperty(\"password\", testAwsDirectoryServiceDirectory.password())\n )))\n .build());\n\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .fsxWindowsFileServerVolumeConfiguration(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs.builder()\n .fileSystemId(testAwsFsxWindowsFileSystem.id())\n .rootDirectory(\"\\\\data\")\n .authorizationConfig(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs.builder()\n .credentialsParameter(test.arn())\n .domain(testAwsDirectoryServiceDirectory.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n fsxWindowsFileServerVolumeConfiguration:\n fileSystemId: ${testAwsFsxWindowsFileSystem.id}\n rootDirectory: \\data\n authorizationConfig:\n credentialsParameter: ${test.arn}\n domain: ${testAwsDirectoryServiceDirectory.name}\n test:\n type: aws:secretsmanager:SecretVersion\n properties:\n secretId: ${testAwsSecretsmanagerSecret.id}\n secretString:\n fn::toJSON:\n username: admin\n password: ${testAwsDirectoryServiceDirectory.password}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `container_definitions` and `inference_accelerator`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n containerDefinitions: `[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`,\n inferenceAccelerators: [{\n deviceName: \"device_1\",\n deviceType: \"eia1.medium\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n container_definitions=\"\"\"[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n\"\"\",\n inference_accelerators=[{\n \"device_name\": \"device_1\",\n \"device_type\": \"eia1.medium\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n ContainerDefinitions = @\"[\n {\n \"\"cpu\"\": 10,\n \"\"command\"\": [\"\"sleep\"\", \"\"10\"\"],\n \"\"entryPoint\"\": [\"\"/\"\"],\n \"\"environment\"\": [\n {\"\"name\"\": \"\"VARNAME\"\", \"\"value\"\": \"\"VARVAL\"\"}\n ],\n \"\"essential\"\": true,\n \"\"image\"\": \"\"jenkins\"\",\n \"\"memory\"\": 128,\n \"\"name\"\": \"\"jenkins\"\",\n \"\"portMappings\"\": [\n {\n \"\"containerPort\"\": 80,\n \"\"hostPort\"\": 8080\n }\n ],\n \"\"resourceRequirements\"\":[\n {\n \"\"type\"\":\"\"InferenceAccelerator\"\",\n \"\"value\"\":\"\"device_1\"\"\n }\n ]\n }\n]\n\",\n InferenceAccelerators = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionInferenceAcceleratorArgs\n {\n DeviceName = \"device_1\",\n DeviceType = \"eia1.medium\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`),\n\t\t\tInferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{\n\t\t\t\t\u0026ecs.TaskDefinitionInferenceAcceleratorArgs{\n\t\t\t\t\tDeviceName: pulumi.String(\"device_1\"),\n\t\t\t\t\tDeviceType: pulumi.String(\"eia1.medium\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionInferenceAcceleratorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .containerDefinitions(\"\"\"\n[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n \"\"\")\n .inferenceAccelerators(TaskDefinitionInferenceAcceleratorArgs.builder()\n .deviceName(\"device_1\")\n .deviceType(\"eia1.medium\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n containerDefinitions: |\n [\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n ]\n inferenceAccelerators:\n - deviceName: device_1\n deviceType: eia1.medium\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `runtime_platform` and `fargate`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n requiresCompatibilities: [\"FARGATE\"],\n networkMode: \"awsvpc\",\n cpu: \"1024\",\n memory: \"2048\",\n containerDefinitions: `[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`,\n runtimePlatform: {\n operatingSystemFamily: \"WINDOWS_SERVER_2019_CORE\",\n cpuArchitecture: \"X86_64\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n requires_compatibilities=[\"FARGATE\"],\n network_mode=\"awsvpc\",\n cpu=\"1024\",\n memory=\"2048\",\n container_definitions=\"\"\"[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n\"\"\",\n runtime_platform={\n \"operating_system_family\": \"WINDOWS_SERVER_2019_CORE\",\n \"cpu_architecture\": \"X86_64\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n RequiresCompatibilities = new[]\n {\n \"FARGATE\",\n },\n NetworkMode = \"awsvpc\",\n Cpu = \"1024\",\n Memory = \"2048\",\n ContainerDefinitions = @\"[\n {\n \"\"name\"\": \"\"iis\"\",\n \"\"image\"\": \"\"mcr.microsoft.com/windows/servercore/iis\"\",\n \"\"cpu\"\": 1024,\n \"\"memory\"\": 2048,\n \"\"essential\"\": true\n }\n]\n\",\n RuntimePlatform = new Aws.Ecs.Inputs.TaskDefinitionRuntimePlatformArgs\n {\n OperatingSystemFamily = \"WINDOWS_SERVER_2019_CORE\",\n CpuArchitecture = \"X86_64\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tRequiresCompatibilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"FARGATE\"),\n\t\t\t},\n\t\t\tNetworkMode: pulumi.String(\"awsvpc\"),\n\t\t\tCpu: pulumi.String(\"1024\"),\n\t\t\tMemory: pulumi.String(\"2048\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`),\n\t\t\tRuntimePlatform: \u0026ecs.TaskDefinitionRuntimePlatformArgs{\n\t\t\t\tOperatingSystemFamily: pulumi.String(\"WINDOWS_SERVER_2019_CORE\"),\n\t\t\t\tCpuArchitecture: pulumi.String(\"X86_64\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionRuntimePlatformArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .requiresCompatibilities(\"FARGATE\")\n .networkMode(\"awsvpc\")\n .cpu(1024)\n .memory(2048)\n .containerDefinitions(\"\"\"\n[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n \"\"\")\n .runtimePlatform(TaskDefinitionRuntimePlatformArgs.builder()\n .operatingSystemFamily(\"WINDOWS_SERVER_2019_CORE\")\n .cpuArchitecture(\"X86_64\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n requiresCompatibilities:\n - FARGATE\n networkMode: awsvpc\n cpu: 1024\n memory: 2048\n containerDefinitions: |\n [\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n ]\n runtimePlatform:\n operatingSystemFamily: WINDOWS_SERVER_2019_CORE\n cpuArchitecture: X86_64\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS Task Definitions using their ARNs. For example:\n\n```sh\n$ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123\n```\n", + "description": "Manages a revision of an ECS task definition to be used in `aws.ecs.Service`.\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: JSON.stringify([\n {\n name: \"first\",\n image: \"service-first\",\n cpu: 10,\n memory: 512,\n essential: true,\n portMappings: [{\n containerPort: 80,\n hostPort: 80,\n }],\n },\n {\n name: \"second\",\n image: \"service-second\",\n cpu: 10,\n memory: 256,\n essential: true,\n portMappings: [{\n containerPort: 443,\n hostPort: 443,\n }],\n },\n ]),\n volumes: [{\n name: \"service-storage\",\n hostPath: \"/ecs/service-storage\",\n }],\n placementConstraints: [{\n type: \"memberOf\",\n expression: \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=json.dumps([\n {\n \"name\": \"first\",\n \"image\": \"service-first\",\n \"cpu\": 10,\n \"memory\": 512,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 80,\n \"hostPort\": 80,\n }],\n },\n {\n \"name\": \"second\",\n \"image\": \"service-second\",\n \"cpu\": 10,\n \"memory\": 256,\n \"essential\": True,\n \"portMappings\": [{\n \"containerPort\": 443,\n \"hostPort\": 443,\n }],\n },\n ]),\n volumes=[{\n \"name\": \"service-storage\",\n \"host_path\": \"/ecs/service-storage\",\n }],\n placement_constraints=[{\n \"type\": \"memberOf\",\n \"expression\": \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"first\",\n [\"image\"] = \"service-first\",\n [\"cpu\"] = 10,\n [\"memory\"] = 512,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 80,\n [\"hostPort\"] = 80,\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"second\",\n [\"image\"] = \"service-second\",\n [\"cpu\"] = 10,\n [\"memory\"] = 256,\n [\"essential\"] = true,\n [\"portMappings\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"containerPort\"] = 443,\n [\"hostPort\"] = 443,\n },\n },\n },\n }),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n HostPath = \"/ecs/service-storage\",\n },\n },\n PlacementConstraints = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionPlacementConstraintArgs\n {\n Type = \"memberOf\",\n Expression = \"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\",\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/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\ttmpJSON0, err := json.Marshal([]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"first\",\n\t\t\t\t\"image\": \"service-first\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 512,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 80,\n\t\t\t\t\t\t\"hostPort\": 80,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"name\": \"second\",\n\t\t\t\t\"image\": \"service-second\",\n\t\t\t\t\"cpu\": 10,\n\t\t\t\t\"memory\": 256,\n\t\t\t\t\"essential\": true,\n\t\t\t\t\"portMappings\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"containerPort\": 443,\n\t\t\t\t\t\t\"hostPort\": 443,\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 = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(json0),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tHostPath: pulumi.String(\"/ecs/service-storage\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tPlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{\n\t\t\t\t\u0026ecs.TaskDefinitionPlacementConstraintArgs{\n\t\t\t\t\tType: pulumi.String(\"memberOf\"),\n\t\t\t\t\tExpression: pulumi.String(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs;\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 service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(serializeJson(\n jsonArray(\n jsonObject(\n jsonProperty(\"name\", \"first\"),\n jsonProperty(\"image\", \"service-first\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 512),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 80),\n jsonProperty(\"hostPort\", 80)\n )))\n ), \n jsonObject(\n jsonProperty(\"name\", \"second\"),\n jsonProperty(\"image\", \"service-second\"),\n jsonProperty(\"cpu\", 10),\n jsonProperty(\"memory\", 256),\n jsonProperty(\"essential\", true),\n jsonProperty(\"portMappings\", jsonArray(jsonObject(\n jsonProperty(\"containerPort\", 443),\n jsonProperty(\"hostPort\", 443)\n )))\n )\n )))\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .hostPath(\"/ecs/service-storage\")\n .build())\n .placementConstraints(TaskDefinitionPlacementConstraintArgs.builder()\n .type(\"memberOf\")\n .expression(\"attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::toJSON:\n - name: first\n image: service-first\n cpu: 10\n memory: 512\n essential: true\n portMappings:\n - containerPort: 80\n hostPort: 80\n - name: second\n image: service-second\n cpu: 10\n memory: 256\n essential: true\n portMappings:\n - containerPort: 443\n hostPort: 443\n volumes:\n - name: service-storage\n hostPath: /ecs/service-storage\n placementConstraints:\n - type: memberOf\n expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With AppMesh Proxy\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n proxyConfiguration: {\n type: \"APPMESH\",\n containerName: \"applicationContainerName\",\n properties: {\n AppPorts: \"8080\",\n EgressIgnoredIPs: \"169.254.170.2,169.254.169.254\",\n IgnoredUID: \"1337\",\n ProxyEgressPort: \"15001\",\n ProxyIngressPort: \"15000\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n proxy_configuration={\n \"type\": \"APPMESH\",\n \"container_name\": \"applicationContainerName\",\n \"properties\": {\n \"AppPorts\": \"8080\",\n \"EgressIgnoredIPs\": \"169.254.170.2,169.254.169.254\",\n \"IgnoredUID\": \"1337\",\n \"ProxyEgressPort\": \"15001\",\n \"ProxyIngressPort\": \"15000\",\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n ProxyConfiguration = new Aws.Ecs.Inputs.TaskDefinitionProxyConfigurationArgs\n {\n Type = \"APPMESH\",\n ContainerName = \"applicationContainerName\",\n Properties = \n {\n { \"AppPorts\", \"8080\" },\n { \"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\" },\n { \"IgnoredUID\", \"1337\" },\n { \"ProxyEgressPort\", \"15001\" },\n { \"ProxyIngressPort\", \"15000\" },\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-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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tProxyConfiguration: \u0026ecs.TaskDefinitionProxyConfigurationArgs{\n\t\t\t\tType: pulumi.String(\"APPMESH\"),\n\t\t\t\tContainerName: pulumi.String(\"applicationContainerName\"),\n\t\t\t\tProperties: pulumi.StringMap{\n\t\t\t\t\t\"AppPorts\": pulumi.String(\"8080\"),\n\t\t\t\t\t\"EgressIgnoredIPs\": pulumi.String(\"169.254.170.2,169.254.169.254\"),\n\t\t\t\t\t\"IgnoredUID\": pulumi.String(\"1337\"),\n\t\t\t\t\t\"ProxyEgressPort\": pulumi.String(\"15001\"),\n\t\t\t\t\t\"ProxyIngressPort\": pulumi.String(\"15000\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionProxyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .proxyConfiguration(TaskDefinitionProxyConfigurationArgs.builder()\n .type(\"APPMESH\")\n .containerName(\"applicationContainerName\")\n .properties(Map.ofEntries(\n Map.entry(\"AppPorts\", \"8080\"),\n Map.entry(\"EgressIgnoredIPs\", \"169.254.170.2,169.254.169.254\"),\n Map.entry(\"IgnoredUID\", \"1337\"),\n Map.entry(\"ProxyEgressPort\", 15001),\n Map.entry(\"ProxyIngressPort\", 15000)\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n proxyConfiguration:\n type: APPMESH\n containerName: applicationContainerName\n properties:\n AppPorts: '8080'\n EgressIgnoredIPs: 169.254.170.2,169.254.169.254\n IgnoredUID: '1337'\n ProxyEgressPort: 15001\n ProxyIngressPort: 15000\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `docker_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n dockerVolumeConfiguration: {\n scope: \"shared\",\n autoprovision: true,\n driver: \"local\",\n driverOpts: {\n type: \"nfs\",\n device: `${fs.dnsName}:/`,\n o: `addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport`,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"docker_volume_configuration\": {\n \"scope\": \"shared\",\n \"autoprovision\": True,\n \"driver\": \"local\",\n \"driver_opts\": {\n \"type\": \"nfs\",\n \"device\": f\"{fs['dnsName']}:/\",\n \"o\": f\"addr={fs['dnsName']},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n DockerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs\n {\n Scope = \"shared\",\n Autoprovision = true,\n Driver = \"local\",\n DriverOpts = \n {\n { \"type\", \"nfs\" },\n { \"device\", $\"{fs.DnsName}:/\" },\n { \"o\", $\"addr={fs.DnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\" },\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tDockerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{\n\t\t\t\t\t\tScope: pulumi.String(\"shared\"),\n\t\t\t\t\t\tAutoprovision: pulumi.Bool(true),\n\t\t\t\t\t\tDriver: pulumi.String(\"local\"),\n\t\t\t\t\t\tDriverOpts: pulumi.StringMap{\n\t\t\t\t\t\t\t\"type\": pulumi.String(\"nfs\"),\n\t\t\t\t\t\t\t\"device\": pulumi.Sprintf(\"%v:/\", fs.DnsName),\n\t\t\t\t\t\t\t\"o\": pulumi.Sprintf(\"addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.DnsName),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .dockerVolumeConfiguration(TaskDefinitionVolumeDockerVolumeConfigurationArgs.builder()\n .scope(\"shared\")\n .autoprovision(true)\n .driver(\"local\")\n .driverOpts(Map.ofEntries(\n Map.entry(\"type\", \"nfs\"),\n Map.entry(\"device\", String.format(\"%s:/\", fs.dnsName())),\n Map.entry(\"o\", String.format(\"addr=%s,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\", fs.dnsName()))\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n dockerVolumeConfiguration:\n scope: shared\n autoprovision: true\n driver: local\n driverOpts:\n type: nfs\n device: ${fs.dnsName}:/\n o: addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `efs_volume_configuration`\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 service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n efsVolumeConfiguration: {\n fileSystemId: fs.id,\n rootDirectory: \"/opt/data\",\n transitEncryption: \"ENABLED\",\n transitEncryptionPort: 2999,\n authorizationConfig: {\n accessPointId: test.id,\n iam: \"ENABLED\",\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"efs_volume_configuration\": {\n \"file_system_id\": fs[\"id\"],\n \"root_directory\": \"/opt/data\",\n \"transit_encryption\": \"ENABLED\",\n \"transit_encryption_port\": 2999,\n \"authorization_config\": {\n \"access_point_id\": test[\"id\"],\n \"iam\": \"ENABLED\",\n },\n },\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 service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n EfsVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs\n {\n FileSystemId = fs.Id,\n RootDirectory = \"/opt/data\",\n TransitEncryption = \"ENABLED\",\n TransitEncryptionPort = 2999,\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs\n {\n AccessPointId = test.Id,\n Iam = \"ENABLED\",\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/ecs\"\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: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tEfsVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(fs.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"/opt/data\"),\n\t\t\t\t\t\tTransitEncryption: pulumi.String(\"ENABLED\"),\n\t\t\t\t\t\tTransitEncryptionPort: pulumi.Int(2999),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tAccessPointId: pulumi.Any(test.Id),\n\t\t\t\t\t\t\tIam: pulumi.String(\"ENABLED\"),\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.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .efsVolumeConfiguration(TaskDefinitionVolumeEfsVolumeConfigurationArgs.builder()\n .fileSystemId(fs.id())\n .rootDirectory(\"/opt/data\")\n .transitEncryption(\"ENABLED\")\n .transitEncryptionPort(2999)\n .authorizationConfig(TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs.builder()\n .accessPointId(test.id())\n .iam(\"ENABLED\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n efsVolumeConfiguration:\n fileSystemId: ${fs.id}\n rootDirectory: /opt/data\n transitEncryption: ENABLED\n transitEncryptionPort: 2999\n authorizationConfig:\n accessPointId: ${test.id}\n iam: ENABLED\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `fsx_windows_file_server_volume_configuration`\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.secretsmanager.SecretVersion(\"test\", {\n secretId: testAwsSecretsmanagerSecret.id,\n secretString: JSON.stringify({\n username: \"admin\",\n password: testAwsDirectoryServiceDirectory.password,\n }),\n});\nconst service = new aws.ecs.TaskDefinition(\"service\", {\n family: \"service\",\n containerDefinitions: std.file({\n input: \"task-definitions/service.json\",\n }).then(invoke =\u003e invoke.result),\n volumes: [{\n name: \"service-storage\",\n fsxWindowsFileServerVolumeConfiguration: {\n fileSystemId: testAwsFsxWindowsFileSystem.id,\n rootDirectory: \"\\\\data\",\n authorizationConfig: {\n credentialsParameter: test.arn,\n domain: testAwsDirectoryServiceDirectory.name,\n },\n },\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.secretsmanager.SecretVersion(\"test\",\n secret_id=test_aws_secretsmanager_secret[\"id\"],\n secret_string=json.dumps({\n \"username\": \"admin\",\n \"password\": test_aws_directory_service_directory[\"password\"],\n }))\nservice = aws.ecs.TaskDefinition(\"service\",\n family=\"service\",\n container_definitions=std.file(input=\"task-definitions/service.json\").result,\n volumes=[{\n \"name\": \"service-storage\",\n \"fsx_windows_file_server_volume_configuration\": {\n \"file_system_id\": test_aws_fsx_windows_file_system[\"id\"],\n \"root_directory\": \"\\\\data\",\n \"authorization_config\": {\n \"credentials_parameter\": test.arn,\n \"domain\": test_aws_directory_service_directory[\"name\"],\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 test = new Aws.SecretsManager.SecretVersion(\"test\", new()\n {\n SecretId = testAwsSecretsmanagerSecret.Id,\n SecretString = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"username\"] = \"admin\",\n [\"password\"] = testAwsDirectoryServiceDirectory.Password,\n }),\n });\n\n var service = new Aws.Ecs.TaskDefinition(\"service\", new()\n {\n Family = \"service\",\n ContainerDefinitions = Std.File.Invoke(new()\n {\n Input = \"task-definitions/service.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Volumes = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs\n {\n Name = \"service-storage\",\n FsxWindowsFileServerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs\n {\n FileSystemId = testAwsFsxWindowsFileSystem.Id,\n RootDirectory = \"\\\\data\",\n AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs\n {\n CredentialsParameter = test.Arn,\n Domain = testAwsDirectoryServiceDirectory.Name,\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/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager\"\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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"username\": \"admin\",\n\t\t\t\"password\": testAwsDirectoryServiceDirectory.Password,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttest, err := secretsmanager.NewSecretVersion(ctx, \"test\", \u0026secretsmanager.SecretVersionArgs{\n\t\t\tSecretId: pulumi.Any(testAwsSecretsmanagerSecret.Id),\n\t\t\tSecretString: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"task-definitions/service.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewTaskDefinition(ctx, \"service\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"service\"),\n\t\t\tContainerDefinitions: pulumi.String(invokeFile.Result),\n\t\t\tVolumes: ecs.TaskDefinitionVolumeArray{\n\t\t\t\t\u0026ecs.TaskDefinitionVolumeArgs{\n\t\t\t\t\tName: pulumi.String(\"service-storage\"),\n\t\t\t\t\tFsxWindowsFileServerVolumeConfiguration: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{\n\t\t\t\t\t\tFileSystemId: pulumi.Any(testAwsFsxWindowsFileSystem.Id),\n\t\t\t\t\t\tRootDirectory: pulumi.String(\"\\\\data\"),\n\t\t\t\t\t\tAuthorizationConfig: \u0026ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{\n\t\t\t\t\t\t\tCredentialsParameter: test.Arn,\n\t\t\t\t\t\t\tDomain: pulumi.Any(testAwsDirectoryServiceDirectory.Name),\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.secretsmanager.SecretVersion;\nimport com.pulumi.aws.secretsmanager.SecretVersionArgs;\nimport com.pulumi.aws.ecs.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs;\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 SecretVersion(\"test\", SecretVersionArgs.builder()\n .secretId(testAwsSecretsmanagerSecret.id())\n .secretString(serializeJson(\n jsonObject(\n jsonProperty(\"username\", \"admin\"),\n jsonProperty(\"password\", testAwsDirectoryServiceDirectory.password())\n )))\n .build());\n\n var service = new TaskDefinition(\"service\", TaskDefinitionArgs.builder()\n .family(\"service\")\n .containerDefinitions(StdFunctions.file(FileArgs.builder()\n .input(\"task-definitions/service.json\")\n .build()).result())\n .volumes(TaskDefinitionVolumeArgs.builder()\n .name(\"service-storage\")\n .fsxWindowsFileServerVolumeConfiguration(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs.builder()\n .fileSystemId(testAwsFsxWindowsFileSystem.id())\n .rootDirectory(\"\\\\data\")\n .authorizationConfig(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs.builder()\n .credentialsParameter(test.arn())\n .domain(testAwsDirectoryServiceDirectory.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n service:\n type: aws:ecs:TaskDefinition\n properties:\n family: service\n containerDefinitions:\n fn::invoke:\n Function: std:file\n Arguments:\n input: task-definitions/service.json\n Return: result\n volumes:\n - name: service-storage\n fsxWindowsFileServerVolumeConfiguration:\n fileSystemId: ${testAwsFsxWindowsFileSystem.id}\n rootDirectory: \\data\n authorizationConfig:\n credentialsParameter: ${test.arn}\n domain: ${testAwsDirectoryServiceDirectory.name}\n test:\n type: aws:secretsmanager:SecretVersion\n properties:\n secretId: ${testAwsSecretsmanagerSecret.id}\n secretString:\n fn::toJSON:\n username: admin\n password: ${testAwsDirectoryServiceDirectory.password}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `container_definitions` and `inference_accelerator`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n containerDefinitions: `[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`,\n inferenceAccelerators: [{\n deviceName: \"device_1\",\n deviceType: \"eia1.medium\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n container_definitions=\"\"\"[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n\"\"\",\n inference_accelerators=[{\n \"device_name\": \"device_1\",\n \"device_type\": \"eia1.medium\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n ContainerDefinitions = @\"[\n {\n \"\"cpu\"\": 10,\n \"\"command\"\": [\"\"sleep\"\", \"\"10\"\"],\n \"\"entryPoint\"\": [\"\"/\"\"],\n \"\"environment\"\": [\n {\"\"name\"\": \"\"VARNAME\"\", \"\"value\"\": \"\"VARVAL\"\"}\n ],\n \"\"essential\"\": true,\n \"\"image\"\": \"\"jenkins\"\",\n \"\"memory\"\": 128,\n \"\"name\"\": \"\"jenkins\"\",\n \"\"portMappings\"\": [\n {\n \"\"containerPort\"\": 80,\n \"\"hostPort\"\": 8080\n }\n ],\n \"\"resourceRequirements\"\":[\n {\n \"\"type\"\":\"\"InferenceAccelerator\"\",\n \"\"value\"\":\"\"device_1\"\"\n }\n ]\n }\n]\n\",\n InferenceAccelerators = new[]\n {\n new Aws.Ecs.Inputs.TaskDefinitionInferenceAcceleratorArgs\n {\n DeviceName = \"device_1\",\n DeviceType = \"eia1.medium\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n`),\n\t\t\tInferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{\n\t\t\t\t\u0026ecs.TaskDefinitionInferenceAcceleratorArgs{\n\t\t\t\t\tDeviceName: pulumi.String(\"device_1\"),\n\t\t\t\t\tDeviceType: pulumi.String(\"eia1.medium\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionInferenceAcceleratorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .containerDefinitions(\"\"\"\n[\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n]\n \"\"\")\n .inferenceAccelerators(TaskDefinitionInferenceAcceleratorArgs.builder()\n .deviceName(\"device_1\")\n .deviceType(\"eia1.medium\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n containerDefinitions: |\n [\n {\n \"cpu\": 10,\n \"command\": [\"sleep\", \"10\"],\n \"entryPoint\": [\"/\"],\n \"environment\": [\n {\"name\": \"VARNAME\", \"value\": \"VARVAL\"}\n ],\n \"essential\": true,\n \"image\": \"jenkins\",\n \"memory\": 128,\n \"name\": \"jenkins\",\n \"portMappings\": [\n {\n \"containerPort\": 80,\n \"hostPort\": 8080\n }\n ],\n \"resourceRequirements\":[\n {\n \"type\":\"InferenceAccelerator\",\n \"value\":\"device_1\"\n }\n ]\n }\n ]\n inferenceAccelerators:\n - deviceName: device_1\n deviceType: eia1.medium\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Using `runtime_platform` and `fargate`\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.ecs.TaskDefinition(\"test\", {\n family: \"test\",\n requiresCompatibilities: [\"FARGATE\"],\n networkMode: \"awsvpc\",\n cpu: \"1024\",\n memory: \"2048\",\n containerDefinitions: `[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`,\n runtimePlatform: {\n operatingSystemFamily: \"WINDOWS_SERVER_2019_CORE\",\n cpuArchitecture: \"X86_64\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ecs.TaskDefinition(\"test\",\n family=\"test\",\n requires_compatibilities=[\"FARGATE\"],\n network_mode=\"awsvpc\",\n cpu=\"1024\",\n memory=\"2048\",\n container_definitions=\"\"\"[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n\"\"\",\n runtime_platform={\n \"operating_system_family\": \"WINDOWS_SERVER_2019_CORE\",\n \"cpu_architecture\": \"X86_64\",\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.Ecs.TaskDefinition(\"test\", new()\n {\n Family = \"test\",\n RequiresCompatibilities = new[]\n {\n \"FARGATE\",\n },\n NetworkMode = \"awsvpc\",\n Cpu = \"1024\",\n Memory = \"2048\",\n ContainerDefinitions = @\"[\n {\n \"\"name\"\": \"\"iis\"\",\n \"\"image\"\": \"\"mcr.microsoft.com/windows/servercore/iis\"\",\n \"\"cpu\"\": 1024,\n \"\"memory\"\": 2048,\n \"\"essential\"\": true\n }\n]\n\",\n RuntimePlatform = new Aws.Ecs.Inputs.TaskDefinitionRuntimePlatformArgs\n {\n OperatingSystemFamily = \"WINDOWS_SERVER_2019_CORE\",\n CpuArchitecture = \"X86_64\",\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.NewTaskDefinition(ctx, \"test\", \u0026ecs.TaskDefinitionArgs{\n\t\t\tFamily: pulumi.String(\"test\"),\n\t\t\tRequiresCompatibilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"FARGATE\"),\n\t\t\t},\n\t\t\tNetworkMode: pulumi.String(\"awsvpc\"),\n\t\t\tCpu: pulumi.String(\"1024\"),\n\t\t\tMemory: pulumi.String(\"2048\"),\n\t\t\tContainerDefinitions: pulumi.String(`[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n`),\n\t\t\tRuntimePlatform: \u0026ecs.TaskDefinitionRuntimePlatformArgs{\n\t\t\t\tOperatingSystemFamily: pulumi.String(\"WINDOWS_SERVER_2019_CORE\"),\n\t\t\t\tCpuArchitecture: pulumi.String(\"X86_64\"),\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.TaskDefinition;\nimport com.pulumi.aws.ecs.TaskDefinitionArgs;\nimport com.pulumi.aws.ecs.inputs.TaskDefinitionRuntimePlatformArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 TaskDefinition(\"test\", TaskDefinitionArgs.builder()\n .family(\"test\")\n .requiresCompatibilities(\"FARGATE\")\n .networkMode(\"awsvpc\")\n .cpu(1024)\n .memory(2048)\n .containerDefinitions(\"\"\"\n[\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n]\n \"\"\")\n .runtimePlatform(TaskDefinitionRuntimePlatformArgs.builder()\n .operatingSystemFamily(\"WINDOWS_SERVER_2019_CORE\")\n .cpuArchitecture(\"X86_64\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ecs:TaskDefinition\n properties:\n family: test\n requiresCompatibilities:\n - FARGATE\n networkMode: awsvpc\n cpu: 1024\n memory: 2048\n containerDefinitions: |\n [\n {\n \"name\": \"iis\",\n \"image\": \"mcr.microsoft.com/windows/servercore/iis\",\n \"cpu\": 1024,\n \"memory\": 2048,\n \"essential\": true\n }\n ]\n runtimePlatform:\n operatingSystemFamily: WINDOWS_SERVER_2019_CORE\n cpuArchitecture: X86_64\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS Task Definitions using their ARNs. For example:\n\n```sh\n$ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123\n```\n", "properties": { "arn": { "type": "string", @@ -263578,7 +263578,7 @@ } }, "aws:evidently/launch:Launch": { - "description": "Provides a CloudWatch Evidently Launch 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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With description\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n description: \"example description\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n description=\"example description\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Description = \"example description\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tDescription: pulumi.String(\"example description\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .description(\"example description\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n description: example description\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple groups\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n description: \"first-group\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n description: \"second-group\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n \"description\": \"first-group\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n \"description\": \"second-group\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n \"variation2\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n Description = \"first-group\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n Description = \"second-group\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t\tDescription: pulumi.String(\"first-group\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t\tDescription: pulumi.String(\"second-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .description(\"first-group\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .description(\"second-group\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n description: first-group\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n description: second-group\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With metric_monitors\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n metricMonitors: [\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key1\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n name: \"name1\",\n unitLabel: \"unit_label1\",\n valueKey: \"value_key1\",\n },\n },\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key2\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n name: \"name2\",\n unitLabel: \"unit_label2\",\n valueKey: \"value_key2\",\n },\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n metric_monitors=[\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key1\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n \"name\": \"name1\",\n \"unit_label\": \"unit_label1\",\n \"value_key\": \"value_key1\",\n },\n },\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key2\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n \"name\": \"name2\",\n \"unit_label\": \"unit_label2\",\n \"value_key\": \"value_key2\",\n },\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n MetricMonitors = new[]\n {\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key1\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n Name = \"name1\",\n UnitLabel = \"unit_label1\",\n ValueKey = \"value_key1\",\n },\n },\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key2\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n Name = \"name2\",\n UnitLabel = \"unit_label2\",\n ValueKey = \"value_key2\",\n },\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tMetricMonitors: evidently.LaunchMetricMonitorArray{\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key1\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name1\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label1\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key2\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name2\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label2\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorMetricDefinitionArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .metricMonitors( \n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key1\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\")\n .name(\"name1\")\n .unitLabel(\"unit_label1\")\n .valueKey(\"value_key1\")\n .build())\n .build(),\n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key2\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\")\n .name(\"name2\")\n .unitLabel(\"unit_label2\")\n .valueKey(\"value_key2\")\n .build())\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n metricMonitors:\n - metricDefinition:\n entityIdKey: entity_id_key1\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",11,\"\u003c=\",22]}]}'\n name: name1\n unitLabel: unit_label1\n valueKey: value_key1\n - metricDefinition:\n entityIdKey: entity_id_key2\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",9,\"\u003c=\",19]}]}'\n name: name2\n unitLabel: unit_label2\n valueKey: value_key2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With randomization_salt\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n randomizationSalt: \"example randomization salt\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n randomization_salt=\"example randomization salt\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n RandomizationSalt = \"example randomization salt\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tRandomizationSalt: pulumi.String(\"example randomization salt\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .randomizationSalt(\"example randomization salt\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n randomizationSalt: example randomization salt\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple steps\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [\n {\n groupWeights: {\n Variation1: 15,\n Variation2: 10,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n },\n {\n groupWeights: {\n Variation1: 20,\n Variation2: 25,\n },\n startTime: \"2024-01-08 01:43:59+00:00\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [\n {\n \"group_weights\": {\n \"variation1\": 15,\n \"variation2\": 10,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\n },\n {\n \"group_weights\": {\n \"variation1\": 20,\n \"variation2\": 25,\n },\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 15 },\n { \"Variation2\", 10 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 20 },\n { \"Variation2\", 25 },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(15),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(20),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(25),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps( \n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 15),\n Map.entry(\"Variation2\", 10)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build(),\n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 20),\n Map.entry(\"Variation2\", 25)\n ))\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 15\n Variation2: 10\n startTime: 2024-01-07 01:43:59+00:00\n - groupWeights:\n Variation1: 20\n Variation2: 25\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With segment overrides\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n segmentOverrides: [\n {\n evaluationOrder: 1,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation2: 10000,\n },\n },\n {\n evaluationOrder: 2,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation1: 40000,\n Variation2: 30000,\n },\n },\n ],\n startTime: \"2024-01-08 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"variation1\": 0,\n \"variation2\": 0,\n },\n \"segment_overrides\": [\n {\n \"evaluation_order\": 1,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"variation2\": 10000,\n },\n },\n {\n \"evaluation_order\": 2,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"variation1\": 40000,\n \"variation2\": 30000,\n },\n },\n ],\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n SegmentOverrides = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 1,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation2\", 10000 },\n },\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 2,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation1\", 40000 },\n { \"Variation2\", 30000 },\n },\n },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSegmentOverrides: evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArray{\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(1),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10000),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(2),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(40000),\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(30000),\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\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .segmentOverrides( \n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(1)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.of(\"Variation2\", 10000))\n .build(),\n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(2)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.ofEntries(\n Map.entry(\"Variation1\", 40000),\n Map.entry(\"Variation2\", 30000)\n ))\n .build())\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n segmentOverrides:\n - evaluationOrder: 1\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation2: 10000\n - evaluationOrder: 2\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation1: 40000\n Variation2: 30000\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n__Using `pulumi import` to import__ CloudWatch Evidently Launch using the `name` of the launch and `name` of the project or `arn` of the hosting CloudWatch Evidently Project separated by a `:`. For example:\n\nImport using the `name` of the launch and `name` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:exampleProjectName\n```\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName\n```\n", + "description": "Provides a CloudWatch Evidently Launch 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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With description\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n description: \"example description\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n description=\"example description\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Description = \"example description\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tDescription: pulumi.String(\"example description\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .description(\"example description\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n description: example description\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple groups\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n description: \"first-group\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n description: \"second-group\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n \"description\": \"first-group\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n \"description\": \"second-group\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n \"Variation2\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n Description = \"first-group\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n Description = \"second-group\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t\tDescription: pulumi.String(\"first-group\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t\tDescription: pulumi.String(\"second-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .description(\"first-group\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .description(\"second-group\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n description: first-group\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n description: second-group\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With metric_monitors\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n metricMonitors: [\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key1\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n name: \"name1\",\n unitLabel: \"unit_label1\",\n valueKey: \"value_key1\",\n },\n },\n {\n metricDefinition: {\n entityIdKey: \"entity_id_key2\",\n eventPattern: \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n name: \"name2\",\n unitLabel: \"unit_label2\",\n valueKey: \"value_key2\",\n },\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n metric_monitors=[\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key1\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n \"name\": \"name1\",\n \"unit_label\": \"unit_label1\",\n \"value_key\": \"value_key1\",\n },\n },\n {\n \"metric_definition\": {\n \"entity_id_key\": \"entity_id_key2\",\n \"event_pattern\": \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n \"name\": \"name2\",\n \"unit_label\": \"unit_label2\",\n \"value_key\": \"value_key2\",\n },\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n MetricMonitors = new[]\n {\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key1\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\",\n Name = \"name1\",\n UnitLabel = \"unit_label1\",\n ValueKey = \"value_key1\",\n },\n },\n new Aws.Evidently.Inputs.LaunchMetricMonitorArgs\n {\n MetricDefinition = new Aws.Evidently.Inputs.LaunchMetricMonitorMetricDefinitionArgs\n {\n EntityIdKey = \"entity_id_key2\",\n EventPattern = \"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\",\n Name = \"name2\",\n UnitLabel = \"unit_label2\",\n ValueKey = \"value_key2\",\n },\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tMetricMonitors: evidently.LaunchMetricMonitorArray{\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key1\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name1\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label1\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchMetricMonitorArgs{\n\t\t\t\t\tMetricDefinition: \u0026evidently.LaunchMetricMonitorMetricDefinitionArgs{\n\t\t\t\t\t\tEntityIdKey: pulumi.String(\"entity_id_key2\"),\n\t\t\t\t\t\tEventPattern: pulumi.String(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\"),\n\t\t\t\t\t\tName: pulumi.String(\"name2\"),\n\t\t\t\t\t\tUnitLabel: pulumi.String(\"unit_label2\"),\n\t\t\t\t\t\tValueKey: pulumi.String(\"value_key2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchMetricMonitorMetricDefinitionArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .metricMonitors( \n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key1\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",11,\\\"\u003c=\\\",22]}]}\")\n .name(\"name1\")\n .unitLabel(\"unit_label1\")\n .valueKey(\"value_key1\")\n .build())\n .build(),\n LaunchMetricMonitorArgs.builder()\n .metricDefinition(LaunchMetricMonitorMetricDefinitionArgs.builder()\n .entityIdKey(\"entity_id_key2\")\n .eventPattern(\"{\\\"Price\\\":[{\\\"numeric\\\":[\\\"\u003e\\\",9,\\\"\u003c=\\\",19]}]}\")\n .name(\"name2\")\n .unitLabel(\"unit_label2\")\n .valueKey(\"value_key2\")\n .build())\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n metricMonitors:\n - metricDefinition:\n entityIdKey: entity_id_key1\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",11,\"\u003c=\",22]}]}'\n name: name1\n unitLabel: unit_label1\n valueKey: value_key1\n - metricDefinition:\n entityIdKey: entity_id_key2\n eventPattern: '{\"Price\":[{\"numeric\":[\"\u003e\",9,\"\u003c=\",19]}]}'\n name: name2\n unitLabel: unit_label2\n valueKey: value_key2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With randomization_salt\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n randomizationSalt: \"example randomization salt\",\n groups: [{\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n }],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n randomization_salt=\"example randomization salt\",\n groups=[{\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n }],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n RandomizationSalt = \"example randomization salt\",\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tRandomizationSalt: pulumi.String(\"example randomization salt\"),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .randomizationSalt(\"example randomization salt\")\n .groups(LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.of(\"Variation1\", 0))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n randomizationSalt: example randomization salt\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n startTime: 2024-01-07 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With multiple steps\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [\n {\n groupWeights: {\n Variation1: 15,\n Variation2: 10,\n },\n startTime: \"2024-01-07 01:43:59+00:00\",\n },\n {\n groupWeights: {\n Variation1: 20,\n Variation2: 25,\n },\n startTime: \"2024-01-08 01:43:59+00:00\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [\n {\n \"group_weights\": {\n \"Variation1\": 15,\n \"Variation2\": 10,\n },\n \"start_time\": \"2024-01-07 01:43:59+00:00\",\n },\n {\n \"group_weights\": {\n \"Variation1\": 20,\n \"Variation2\": 25,\n },\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 15 },\n { \"Variation2\", 10 },\n },\n StartTime = \"2024-01-07 01:43:59+00:00\",\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 20 },\n { \"Variation2\", 25 },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(15),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-07 01:43:59+00:00\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(20),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(25),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps( \n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 15),\n Map.entry(\"Variation2\", 10)\n ))\n .startTime(\"2024-01-07 01:43:59+00:00\")\n .build(),\n LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 20),\n Map.entry(\"Variation2\", 25)\n ))\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 15\n Variation2: 10\n startTime: 2024-01-07 01:43:59+00:00\n - groupWeights:\n Variation1: 20\n Variation2: 25\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With segment overrides\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.evidently.Launch(\"example\", {\n name: \"example\",\n project: exampleAwsEvidentlyProject.name,\n groups: [\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation1\",\n variation: \"Variation1\",\n },\n {\n feature: exampleAwsEvidentlyFeature.name,\n name: \"Variation2\",\n variation: \"Variation2\",\n },\n ],\n scheduledSplitsConfig: {\n steps: [{\n groupWeights: {\n Variation1: 0,\n Variation2: 0,\n },\n segmentOverrides: [\n {\n evaluationOrder: 1,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation2: 10000,\n },\n },\n {\n evaluationOrder: 2,\n segment: exampleAwsEvidentlySegment.name,\n weights: {\n Variation1: 40000,\n Variation2: 30000,\n },\n },\n ],\n startTime: \"2024-01-08 01:43:59+00:00\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.evidently.Launch(\"example\",\n name=\"example\",\n project=example_aws_evidently_project[\"name\"],\n groups=[\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation1\",\n \"variation\": \"Variation1\",\n },\n {\n \"feature\": example_aws_evidently_feature[\"name\"],\n \"name\": \"Variation2\",\n \"variation\": \"Variation2\",\n },\n ],\n scheduled_splits_config={\n \"steps\": [{\n \"group_weights\": {\n \"Variation1\": 0,\n \"Variation2\": 0,\n },\n \"segment_overrides\": [\n {\n \"evaluation_order\": 1,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"Variation2\": 10000,\n },\n },\n {\n \"evaluation_order\": 2,\n \"segment\": example_aws_evidently_segment[\"name\"],\n \"weights\": {\n \"Variation1\": 40000,\n \"Variation2\": 30000,\n },\n },\n ],\n \"start_time\": \"2024-01-08 01:43:59+00:00\",\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.Evidently.Launch(\"example\", new()\n {\n Name = \"example\",\n Project = exampleAwsEvidentlyProject.Name,\n Groups = new[]\n {\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation1\",\n Variation = \"Variation1\",\n },\n new Aws.Evidently.Inputs.LaunchGroupArgs\n {\n Feature = exampleAwsEvidentlyFeature.Name,\n Name = \"Variation2\",\n Variation = \"Variation2\",\n },\n },\n ScheduledSplitsConfig = new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigArgs\n {\n Steps = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepArgs\n {\n GroupWeights = \n {\n { \"Variation1\", 0 },\n { \"Variation2\", 0 },\n },\n SegmentOverrides = new[]\n {\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 1,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation2\", 10000 },\n },\n },\n new Aws.Evidently.Inputs.LaunchScheduledSplitsConfigStepSegmentOverrideArgs\n {\n EvaluationOrder = 2,\n Segment = exampleAwsEvidentlySegment.Name,\n Weights = \n {\n { \"Variation1\", 40000 },\n { \"Variation2\", 30000 },\n },\n },\n },\n StartTime = \"2024-01-08 01:43:59+00:00\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := evidently.NewLaunch(ctx, \"example\", \u0026evidently.LaunchArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tProject: pulumi.Any(exampleAwsEvidentlyProject.Name),\n\t\t\tGroups: evidently.LaunchGroupArray{\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation1\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation1\"),\n\t\t\t\t},\n\t\t\t\t\u0026evidently.LaunchGroupArgs{\n\t\t\t\t\tFeature: pulumi.Any(exampleAwsEvidentlyFeature.Name),\n\t\t\t\t\tName: pulumi.String(\"Variation2\"),\n\t\t\t\t\tVariation: pulumi.String(\"Variation2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tScheduledSplitsConfig: \u0026evidently.LaunchScheduledSplitsConfigArgs{\n\t\t\t\tSteps: evidently.LaunchScheduledSplitsConfigStepArray{\n\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepArgs{\n\t\t\t\t\t\tGroupWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(0),\n\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(0),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tSegmentOverrides: evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArray{\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(1),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(10000),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026evidently.LaunchScheduledSplitsConfigStepSegmentOverrideArgs{\n\t\t\t\t\t\t\t\tEvaluationOrder: pulumi.Int(2),\n\t\t\t\t\t\t\t\tSegment: pulumi.Any(exampleAwsEvidentlySegment.Name),\n\t\t\t\t\t\t\t\tWeights: pulumi.IntMap{\n\t\t\t\t\t\t\t\t\t\"Variation1\": pulumi.Int(40000),\n\t\t\t\t\t\t\t\t\t\"Variation2\": pulumi.Int(30000),\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\tStartTime: pulumi.String(\"2024-01-08 01:43:59+00:00\"),\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.evidently.Launch;\nimport com.pulumi.aws.evidently.LaunchArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchGroupArgs;\nimport com.pulumi.aws.evidently.inputs.LaunchScheduledSplitsConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Launch(\"example\", LaunchArgs.builder()\n .name(\"example\")\n .project(exampleAwsEvidentlyProject.name())\n .groups( \n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation1\")\n .variation(\"Variation1\")\n .build(),\n LaunchGroupArgs.builder()\n .feature(exampleAwsEvidentlyFeature.name())\n .name(\"Variation2\")\n .variation(\"Variation2\")\n .build())\n .scheduledSplitsConfig(LaunchScheduledSplitsConfigArgs.builder()\n .steps(LaunchScheduledSplitsConfigStepArgs.builder()\n .groupWeights(Map.ofEntries(\n Map.entry(\"Variation1\", 0),\n Map.entry(\"Variation2\", 0)\n ))\n .segmentOverrides( \n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(1)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.of(\"Variation2\", 10000))\n .build(),\n LaunchScheduledSplitsConfigStepSegmentOverrideArgs.builder()\n .evaluationOrder(2)\n .segment(exampleAwsEvidentlySegment.name())\n .weights(Map.ofEntries(\n Map.entry(\"Variation1\", 40000),\n Map.entry(\"Variation2\", 30000)\n ))\n .build())\n .startTime(\"2024-01-08 01:43:59+00:00\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:evidently:Launch\n properties:\n name: example\n project: ${exampleAwsEvidentlyProject.name}\n groups:\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation1\n variation: Variation1\n - feature: ${exampleAwsEvidentlyFeature.name}\n name: Variation2\n variation: Variation2\n scheduledSplitsConfig:\n steps:\n - groupWeights:\n Variation1: 0\n Variation2: 0\n segmentOverrides:\n - evaluationOrder: 1\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation2: 10000\n - evaluationOrder: 2\n segment: ${exampleAwsEvidentlySegment.name}\n weights:\n Variation1: 40000\n Variation2: 30000\n startTime: 2024-01-08 01:43:59+00:00\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n__Using `pulumi import` to import__ CloudWatch Evidently Launch using the `name` of the launch and `name` of the project or `arn` of the hosting CloudWatch Evidently Project separated by a `:`. For example:\n\nImport using the `name` of the launch and `name` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:exampleProjectName\n```\nImport using the `name` of the launch and `arn` of the project separated by a `:`:\n\n```sh\n$ pulumi import aws:evidently/launch:Launch example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName\n```\n", "properties": { "arn": { "type": "string", @@ -265814,7 +265814,7 @@ } }, "aws:fms/policy:Policy": { - "description": "Provides a resource to create an AWS Firewall Manager policy. You need to be using AWS organizations and have enabled the Firewall Manager administrator account.\n\n\u003e **NOTE:** Due to limitations with testing, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.\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 exampleRuleGroup = new aws.wafregional.RuleGroup(\"example\", {\n metricName: \"WAFRuleGroupExample\",\n name: \"WAF-Rule-Group-Example\",\n});\nconst example = new aws.fms.Policy(\"example\", {\n name: \"FMS-Policy-Example\",\n excludeResourceTags: false,\n remediationEnabled: false,\n resourceType: \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n securityServicePolicyData: {\n type: \"WAF\",\n managedServiceData: pulumi.jsonStringify({\n type: \"WAF\",\n ruleGroups: [{\n id: exampleRuleGroup.id,\n overrideAction: {\n type: \"COUNT\",\n },\n }],\n defaultAction: {\n type: \"BLOCK\",\n },\n overrideCustomerWebACLAssociation: false,\n }),\n },\n tags: {\n Name: \"example-fms-policy\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_rule_group = aws.wafregional.RuleGroup(\"example\",\n metric_name=\"WAFRuleGroupExample\",\n name=\"WAF-Rule-Group-Example\")\nexample = aws.fms.Policy(\"example\",\n name=\"FMS-Policy-Example\",\n exclude_resource_tags=False,\n remediation_enabled=False,\n resource_type=\"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n security_service_policy_data={\n \"type\": \"WAF\",\n \"managed_service_data\": pulumi.Output.json_dumps({\n \"type\": \"WAF\",\n \"rule_groups\": [{\n \"id\": example_rule_group.id,\n \"override_action\": {\n \"type\": \"COUNT\",\n },\n }],\n \"default_action\": {\n \"type\": \"BLOCK\",\n },\n \"override_customer_web_aclassociation\": False,\n }),\n },\n tags={\n \"Name\": \"example-fms-policy\",\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 exampleRuleGroup = new Aws.WafRegional.RuleGroup(\"example\", new()\n {\n MetricName = \"WAFRuleGroupExample\",\n Name = \"WAF-Rule-Group-Example\",\n });\n\n var example = new Aws.Fms.Policy(\"example\", new()\n {\n Name = \"FMS-Policy-Example\",\n ExcludeResourceTags = false,\n RemediationEnabled = false,\n ResourceType = \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n SecurityServicePolicyData = new Aws.Fms.Inputs.PolicySecurityServicePolicyDataArgs\n {\n Type = \"WAF\",\n ManagedServiceData = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"WAF\",\n [\"ruleGroups\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = exampleRuleGroup.Id,\n [\"overrideAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"COUNT\",\n },\n },\n },\n [\"defaultAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"BLOCK\",\n },\n [\"overrideCustomerWebACLAssociation\"] = false,\n })),\n },\n Tags = \n {\n { \"Name\", \"example-fms-policy\" },\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/fms\"\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\texampleRuleGroup, err := wafregional.NewRuleGroup(ctx, \"example\", \u0026wafregional.RuleGroupArgs{\n\t\t\tMetricName: pulumi.String(\"WAFRuleGroupExample\"),\n\t\t\tName: pulumi.String(\"WAF-Rule-Group-Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fms.NewPolicy(ctx, \"example\", \u0026fms.PolicyArgs{\n\t\t\tName: pulumi.String(\"FMS-Policy-Example\"),\n\t\t\tExcludeResourceTags: pulumi.Bool(false),\n\t\t\tRemediationEnabled: pulumi.Bool(false),\n\t\t\tResourceType: pulumi.String(\"AWS::ElasticLoadBalancingV2::LoadBalancer\"),\n\t\t\tSecurityServicePolicyData: \u0026fms.PolicySecurityServicePolicyDataArgs{\n\t\t\t\tType: pulumi.String(\"WAF\"),\n\t\t\t\tManagedServiceData: exampleRuleGroup.ID().ApplyT(func(id string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"WAF\",\n\t\t\t\t\t\t\"ruleGroups\": []map[string]interface{}{\n\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\"id\": id,\n\t\t\t\t\t\t\t\t\"overrideAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\": \"COUNT\",\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\t\"defaultAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"BLOCK\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"overrideCustomerWebACLAssociation\": false,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example-fms-policy\"),\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.wafregional.RuleGroup;\nimport com.pulumi.aws.wafregional.RuleGroupArgs;\nimport com.pulumi.aws.fms.Policy;\nimport com.pulumi.aws.fms.PolicyArgs;\nimport com.pulumi.aws.fms.inputs.PolicySecurityServicePolicyDataArgs;\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 exampleRuleGroup = new RuleGroup(\"exampleRuleGroup\", RuleGroupArgs.builder()\n .metricName(\"WAFRuleGroupExample\")\n .name(\"WAF-Rule-Group-Example\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"FMS-Policy-Example\")\n .excludeResourceTags(false)\n .remediationEnabled(false)\n .resourceType(\"AWS::ElasticLoadBalancingV2::LoadBalancer\")\n .securityServicePolicyData(PolicySecurityServicePolicyDataArgs.builder()\n .type(\"WAF\")\n .managedServiceData(exampleRuleGroup.id().applyValue(id -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"type\", \"WAF\"),\n jsonProperty(\"ruleGroups\", jsonArray(jsonObject(\n jsonProperty(\"id\", id),\n jsonProperty(\"overrideAction\", jsonObject(\n jsonProperty(\"type\", \"COUNT\")\n ))\n ))),\n jsonProperty(\"defaultAction\", jsonObject(\n jsonProperty(\"type\", \"BLOCK\")\n )),\n jsonProperty(\"overrideCustomerWebACLAssociation\", false)\n ))))\n .build())\n .tags(Map.of(\"Name\", \"example-fms-policy\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:fms:Policy\n properties:\n name: FMS-Policy-Example\n excludeResourceTags: false\n remediationEnabled: false\n resourceType: AWS::ElasticLoadBalancingV2::LoadBalancer\n securityServicePolicyData:\n type: WAF\n managedServiceData:\n fn::toJSON:\n type: WAF\n ruleGroups:\n - id: ${exampleRuleGroup.id}\n overrideAction:\n type: COUNT\n defaultAction:\n type: BLOCK\n overrideCustomerWebACLAssociation: false\n tags:\n Name: example-fms-policy\n exampleRuleGroup:\n type: aws:wafregional:RuleGroup\n name: example\n properties:\n metricName: WAFRuleGroupExample\n name: WAF-Rule-Group-Example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Firewall Manager policies using the policy ID. For example:\n\n```sh\n$ pulumi import aws:fms/policy:Policy example 5be49585-a7e3-4c49-dde1-a179fe4a619a\n```\n", + "description": "Provides a resource to create an AWS Firewall Manager policy. You need to be using AWS organizations and have enabled the Firewall Manager administrator account.\n\n\u003e **NOTE:** Due to limitations with testing, we provide it as best effort. If you find it useful, and have the ability to help test or notice issues, consider reaching out to us on GitHub.\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 exampleRuleGroup = new aws.wafregional.RuleGroup(\"example\", {\n metricName: \"WAFRuleGroupExample\",\n name: \"WAF-Rule-Group-Example\",\n});\nconst example = new aws.fms.Policy(\"example\", {\n name: \"FMS-Policy-Example\",\n excludeResourceTags: false,\n remediationEnabled: false,\n resourceType: \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n securityServicePolicyData: {\n type: \"WAF\",\n managedServiceData: pulumi.jsonStringify({\n type: \"WAF\",\n ruleGroups: [{\n id: exampleRuleGroup.id,\n overrideAction: {\n type: \"COUNT\",\n },\n }],\n defaultAction: {\n type: \"BLOCK\",\n },\n overrideCustomerWebACLAssociation: false,\n }),\n },\n tags: {\n Name: \"example-fms-policy\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample_rule_group = aws.wafregional.RuleGroup(\"example\",\n metric_name=\"WAFRuleGroupExample\",\n name=\"WAF-Rule-Group-Example\")\nexample = aws.fms.Policy(\"example\",\n name=\"FMS-Policy-Example\",\n exclude_resource_tags=False,\n remediation_enabled=False,\n resource_type=\"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n security_service_policy_data={\n \"type\": \"WAF\",\n \"managed_service_data\": pulumi.Output.json_dumps({\n \"type\": \"WAF\",\n \"ruleGroups\": [{\n \"id\": example_rule_group.id,\n \"overrideAction\": {\n \"type\": \"COUNT\",\n },\n }],\n \"defaultAction\": {\n \"type\": \"BLOCK\",\n },\n \"overrideCustomerWebACLAssociation\": False,\n }),\n },\n tags={\n \"Name\": \"example-fms-policy\",\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 exampleRuleGroup = new Aws.WafRegional.RuleGroup(\"example\", new()\n {\n MetricName = \"WAFRuleGroupExample\",\n Name = \"WAF-Rule-Group-Example\",\n });\n\n var example = new Aws.Fms.Policy(\"example\", new()\n {\n Name = \"FMS-Policy-Example\",\n ExcludeResourceTags = false,\n RemediationEnabled = false,\n ResourceType = \"AWS::ElasticLoadBalancingV2::LoadBalancer\",\n SecurityServicePolicyData = new Aws.Fms.Inputs.PolicySecurityServicePolicyDataArgs\n {\n Type = \"WAF\",\n ManagedServiceData = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"WAF\",\n [\"ruleGroups\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = exampleRuleGroup.Id,\n [\"overrideAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"COUNT\",\n },\n },\n },\n [\"defaultAction\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"BLOCK\",\n },\n [\"overrideCustomerWebACLAssociation\"] = false,\n })),\n },\n Tags = \n {\n { \"Name\", \"example-fms-policy\" },\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/fms\"\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\texampleRuleGroup, err := wafregional.NewRuleGroup(ctx, \"example\", \u0026wafregional.RuleGroupArgs{\n\t\t\tMetricName: pulumi.String(\"WAFRuleGroupExample\"),\n\t\t\tName: pulumi.String(\"WAF-Rule-Group-Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = fms.NewPolicy(ctx, \"example\", \u0026fms.PolicyArgs{\n\t\t\tName: pulumi.String(\"FMS-Policy-Example\"),\n\t\t\tExcludeResourceTags: pulumi.Bool(false),\n\t\t\tRemediationEnabled: pulumi.Bool(false),\n\t\t\tResourceType: pulumi.String(\"AWS::ElasticLoadBalancingV2::LoadBalancer\"),\n\t\t\tSecurityServicePolicyData: \u0026fms.PolicySecurityServicePolicyDataArgs{\n\t\t\t\tType: pulumi.String(\"WAF\"),\n\t\t\t\tManagedServiceData: exampleRuleGroup.ID().ApplyT(func(id string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"WAF\",\n\t\t\t\t\t\t\"ruleGroups\": []map[string]interface{}{\n\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\"id\": id,\n\t\t\t\t\t\t\t\t\"overrideAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\": \"COUNT\",\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\t\"defaultAction\": map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"BLOCK\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"overrideCustomerWebACLAssociation\": false,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example-fms-policy\"),\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.wafregional.RuleGroup;\nimport com.pulumi.aws.wafregional.RuleGroupArgs;\nimport com.pulumi.aws.fms.Policy;\nimport com.pulumi.aws.fms.PolicyArgs;\nimport com.pulumi.aws.fms.inputs.PolicySecurityServicePolicyDataArgs;\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 exampleRuleGroup = new RuleGroup(\"exampleRuleGroup\", RuleGroupArgs.builder()\n .metricName(\"WAFRuleGroupExample\")\n .name(\"WAF-Rule-Group-Example\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"FMS-Policy-Example\")\n .excludeResourceTags(false)\n .remediationEnabled(false)\n .resourceType(\"AWS::ElasticLoadBalancingV2::LoadBalancer\")\n .securityServicePolicyData(PolicySecurityServicePolicyDataArgs.builder()\n .type(\"WAF\")\n .managedServiceData(exampleRuleGroup.id().applyValue(id -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"type\", \"WAF\"),\n jsonProperty(\"ruleGroups\", jsonArray(jsonObject(\n jsonProperty(\"id\", id),\n jsonProperty(\"overrideAction\", jsonObject(\n jsonProperty(\"type\", \"COUNT\")\n ))\n ))),\n jsonProperty(\"defaultAction\", jsonObject(\n jsonProperty(\"type\", \"BLOCK\")\n )),\n jsonProperty(\"overrideCustomerWebACLAssociation\", false)\n ))))\n .build())\n .tags(Map.of(\"Name\", \"example-fms-policy\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:fms:Policy\n properties:\n name: FMS-Policy-Example\n excludeResourceTags: false\n remediationEnabled: false\n resourceType: AWS::ElasticLoadBalancingV2::LoadBalancer\n securityServicePolicyData:\n type: WAF\n managedServiceData:\n fn::toJSON:\n type: WAF\n ruleGroups:\n - id: ${exampleRuleGroup.id}\n overrideAction:\n type: COUNT\n defaultAction:\n type: BLOCK\n overrideCustomerWebACLAssociation: false\n tags:\n Name: example-fms-policy\n exampleRuleGroup:\n type: aws:wafregional:RuleGroup\n name: example\n properties:\n metricName: WAFRuleGroupExample\n name: WAF-Rule-Group-Example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Firewall Manager policies using the policy ID. For example:\n\n```sh\n$ pulumi import aws:fms/policy:Policy example 5be49585-a7e3-4c49-dde1-a179fe4a619a\n```\n", "properties": { "arn": { "type": "string" @@ -271932,7 +271932,7 @@ } }, "aws:glue/catalogTable:CatalogTable": { - "description": "Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality.\n\n## Example Usage\n\n### Basic Table\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Parquet Table for Athena\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n tableType: \"EXTERNAL_TABLE\",\n parameters: {\n EXTERNAL: \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storageDescriptor: {\n location: \"s3://my-bucket/event-streams/my-stream\",\n inputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n outputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n serDeInfo: {\n name: \"my-stream\",\n serializationLibrary: \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n parameters: {\n \"serialization.format\": \"1\",\n },\n },\n columns: [\n {\n name: \"my_string\",\n type: \"string\",\n },\n {\n name: \"my_double\",\n type: \"double\",\n },\n {\n name: \"my_date\",\n type: \"date\",\n comment: \"\",\n },\n {\n name: \"my_bigint\",\n type: \"bigint\",\n comment: \"\",\n },\n {\n name: \"my_struct\",\n type: \"struct\u003cmy_nested_string:string\u003e\",\n comment: \"\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\",\n table_type=\"EXTERNAL_TABLE\",\n parameters={\n \"EXTERNAL\": \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storage_descriptor={\n \"location\": \"s3://my-bucket/event-streams/my-stream\",\n \"input_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n \"output_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n \"ser_de_info\": {\n \"name\": \"my-stream\",\n \"serialization_library\": \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n \"parameters\": {\n \"serialization_format\": \"1\",\n },\n },\n \"columns\": [\n {\n \"name\": \"my_string\",\n \"type\": \"string\",\n },\n {\n \"name\": \"my_double\",\n \"type\": \"double\",\n },\n {\n \"name\": \"my_date\",\n \"type\": \"date\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_bigint\",\n \"type\": \"bigint\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_struct\",\n \"type\": \"struct\u003cmy_nested_string:string\u003e\",\n \"comment\": \"\",\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 awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\n TableType = \"EXTERNAL_TABLE\",\n Parameters = \n {\n { \"EXTERNAL\", \"TRUE\" },\n { \"parquet.compression\", \"SNAPPY\" },\n },\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Location = \"s3://my-bucket/event-streams/my-stream\",\n InputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n OutputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n SerDeInfo = new Aws.Glue.Inputs.CatalogTableStorageDescriptorSerDeInfoArgs\n {\n Name = \"my-stream\",\n SerializationLibrary = \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n Parameters = \n {\n { \"serialization.format\", \"1\" },\n },\n },\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_string\",\n Type = \"string\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_double\",\n Type = \"double\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_date\",\n Type = \"date\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_bigint\",\n Type = \"bigint\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_struct\",\n Type = \"struct\u003cmy_nested_string:string\u003e\",\n Comment = \"\",\n },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t\tTableType: pulumi.String(\"EXTERNAL_TABLE\"),\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"EXTERNAL\": pulumi.String(\"TRUE\"),\n\t\t\t\t\"parquet.compression\": pulumi.String(\"SNAPPY\"),\n\t\t\t},\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tLocation: pulumi.String(\"s3://my-bucket/event-streams/my-stream\"),\n\t\t\t\tInputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\"),\n\t\t\t\tOutputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\"),\n\t\t\t\tSerDeInfo: \u0026glue.CatalogTableStorageDescriptorSerDeInfoArgs{\n\t\t\t\t\tName: pulumi.String(\"my-stream\"),\n\t\t\t\t\tSerializationLibrary: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\"),\n\t\t\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"serialization.format\": pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_string\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_double\"),\n\t\t\t\t\t\tType: pulumi.String(\"double\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_date\"),\n\t\t\t\t\t\tType: pulumi.String(\"date\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_bigint\"),\n\t\t\t\t\t\tType: pulumi.String(\"bigint\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_struct\"),\n\t\t\t\t\t\tType: pulumi.String(\"struct\u003cmy_nested_string:string\u003e\"),\n\t\t\t\t\t\tComment: pulumi.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\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSerDeInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .tableType(\"EXTERNAL_TABLE\")\n .parameters(Map.ofEntries(\n Map.entry(\"EXTERNAL\", \"TRUE\"),\n Map.entry(\"parquet.compression\", \"SNAPPY\")\n ))\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .location(\"s3://my-bucket/event-streams/my-stream\")\n .inputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\")\n .outputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\")\n .serDeInfo(CatalogTableStorageDescriptorSerDeInfoArgs.builder()\n .name(\"my-stream\")\n .serializationLibrary(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\")\n .parameters(Map.of(\"serialization.format\", 1))\n .build())\n .columns( \n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_string\")\n .type(\"string\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_double\")\n .type(\"double\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_date\")\n .type(\"date\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_bigint\")\n .type(\"bigint\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_struct\")\n .type(\"struct\u003cmy_nested_string:string\u003e\")\n .comment(\"\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n tableType: EXTERNAL_TABLE\n parameters:\n EXTERNAL: TRUE\n parquet.compression: SNAPPY\n storageDescriptor:\n location: s3://my-bucket/event-streams/my-stream\n inputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\n outputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n serDeInfo:\n name: my-stream\n serializationLibrary: org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n parameters:\n serialization.format: 1\n columns:\n - name: my_string\n type: string\n - name: my_double\n type: double\n - name: my_date\n type: date\n comment:\n - name: my_bigint\n type: bigint\n comment:\n - name: my_struct\n type: struct\u003cmy_nested_string:string\u003e\n comment:\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Tables using the catalog ID (usually AWS account ID), database name, and table name. For example:\n\n```sh\n$ pulumi import aws:glue/catalogTable:CatalogTable MyTable 123456789012:MyDatabase:MyTable\n```\n", + "description": "Provides a Glue Catalog Table Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality.\n\n## Example Usage\n\n### Basic Table\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Parquet Table for Athena\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst awsGlueCatalogTable = new aws.glue.CatalogTable(\"aws_glue_catalog_table\", {\n name: \"MyCatalogTable\",\n databaseName: \"MyCatalogDatabase\",\n tableType: \"EXTERNAL_TABLE\",\n parameters: {\n EXTERNAL: \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storageDescriptor: {\n location: \"s3://my-bucket/event-streams/my-stream\",\n inputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n outputFormat: \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n serDeInfo: {\n name: \"my-stream\",\n serializationLibrary: \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n parameters: {\n \"serialization.format\": \"1\",\n },\n },\n columns: [\n {\n name: \"my_string\",\n type: \"string\",\n },\n {\n name: \"my_double\",\n type: \"double\",\n },\n {\n name: \"my_date\",\n type: \"date\",\n comment: \"\",\n },\n {\n name: \"my_bigint\",\n type: \"bigint\",\n comment: \"\",\n },\n {\n name: \"my_struct\",\n type: \"struct\u003cmy_nested_string:string\u003e\",\n comment: \"\",\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naws_glue_catalog_table = aws.glue.CatalogTable(\"aws_glue_catalog_table\",\n name=\"MyCatalogTable\",\n database_name=\"MyCatalogDatabase\",\n table_type=\"EXTERNAL_TABLE\",\n parameters={\n \"EXTERNAL\": \"TRUE\",\n \"parquet.compression\": \"SNAPPY\",\n },\n storage_descriptor={\n \"location\": \"s3://my-bucket/event-streams/my-stream\",\n \"input_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n \"output_format\": \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n \"ser_de_info\": {\n \"name\": \"my-stream\",\n \"serialization_library\": \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n \"parameters\": {\n \"serialization.format\": \"1\",\n },\n },\n \"columns\": [\n {\n \"name\": \"my_string\",\n \"type\": \"string\",\n },\n {\n \"name\": \"my_double\",\n \"type\": \"double\",\n },\n {\n \"name\": \"my_date\",\n \"type\": \"date\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_bigint\",\n \"type\": \"bigint\",\n \"comment\": \"\",\n },\n {\n \"name\": \"my_struct\",\n \"type\": \"struct\u003cmy_nested_string:string\u003e\",\n \"comment\": \"\",\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 awsGlueCatalogTable = new Aws.Glue.CatalogTable(\"aws_glue_catalog_table\", new()\n {\n Name = \"MyCatalogTable\",\n DatabaseName = \"MyCatalogDatabase\",\n TableType = \"EXTERNAL_TABLE\",\n Parameters = \n {\n { \"EXTERNAL\", \"TRUE\" },\n { \"parquet.compression\", \"SNAPPY\" },\n },\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Location = \"s3://my-bucket/event-streams/my-stream\",\n InputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\",\n OutputFormat = \"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\",\n SerDeInfo = new Aws.Glue.Inputs.CatalogTableStorageDescriptorSerDeInfoArgs\n {\n Name = \"my-stream\",\n SerializationLibrary = \"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\",\n Parameters = \n {\n { \"serialization.format\", \"1\" },\n },\n },\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_string\",\n Type = \"string\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_double\",\n Type = \"double\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_date\",\n Type = \"date\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_bigint\",\n Type = \"bigint\",\n Comment = \"\",\n },\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"my_struct\",\n Type = \"struct\u003cmy_nested_string:string\u003e\",\n Comment = \"\",\n },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogTable(ctx, \"aws_glue_catalog_table\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"MyCatalogTable\"),\n\t\t\tDatabaseName: pulumi.String(\"MyCatalogDatabase\"),\n\t\t\tTableType: pulumi.String(\"EXTERNAL_TABLE\"),\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"EXTERNAL\": pulumi.String(\"TRUE\"),\n\t\t\t\t\"parquet.compression\": pulumi.String(\"SNAPPY\"),\n\t\t\t},\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tLocation: pulumi.String(\"s3://my-bucket/event-streams/my-stream\"),\n\t\t\t\tInputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\"),\n\t\t\t\tOutputFormat: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\"),\n\t\t\t\tSerDeInfo: \u0026glue.CatalogTableStorageDescriptorSerDeInfoArgs{\n\t\t\t\t\tName: pulumi.String(\"my-stream\"),\n\t\t\t\t\tSerializationLibrary: pulumi.String(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\"),\n\t\t\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"serialization.format\": pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_string\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_double\"),\n\t\t\t\t\t\tType: pulumi.String(\"double\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_date\"),\n\t\t\t\t\t\tType: pulumi.String(\"date\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_bigint\"),\n\t\t\t\t\t\tType: pulumi.String(\"bigint\"),\n\t\t\t\t\t\tComment: pulumi.String(\"\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"my_struct\"),\n\t\t\t\t\t\tType: pulumi.String(\"struct\u003cmy_nested_string:string\u003e\"),\n\t\t\t\t\t\tComment: pulumi.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\treturn nil\n\t})\n}\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.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorSerDeInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var awsGlueCatalogTable = new CatalogTable(\"awsGlueCatalogTable\", CatalogTableArgs.builder()\n .name(\"MyCatalogTable\")\n .databaseName(\"MyCatalogDatabase\")\n .tableType(\"EXTERNAL_TABLE\")\n .parameters(Map.ofEntries(\n Map.entry(\"EXTERNAL\", \"TRUE\"),\n Map.entry(\"parquet.compression\", \"SNAPPY\")\n ))\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .location(\"s3://my-bucket/event-streams/my-stream\")\n .inputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\")\n .outputFormat(\"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\")\n .serDeInfo(CatalogTableStorageDescriptorSerDeInfoArgs.builder()\n .name(\"my-stream\")\n .serializationLibrary(\"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\")\n .parameters(Map.of(\"serialization.format\", 1))\n .build())\n .columns( \n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_string\")\n .type(\"string\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_double\")\n .type(\"double\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_date\")\n .type(\"date\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_bigint\")\n .type(\"bigint\")\n .comment(\"\")\n .build(),\n CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"my_struct\")\n .type(\"struct\u003cmy_nested_string:string\u003e\")\n .comment(\"\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n awsGlueCatalogTable:\n type: aws:glue:CatalogTable\n name: aws_glue_catalog_table\n properties:\n name: MyCatalogTable\n databaseName: MyCatalogDatabase\n tableType: EXTERNAL_TABLE\n parameters:\n EXTERNAL: TRUE\n parquet.compression: SNAPPY\n storageDescriptor:\n location: s3://my-bucket/event-streams/my-stream\n inputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat\n outputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n serDeInfo:\n name: my-stream\n serializationLibrary: org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n parameters:\n serialization.format: 1\n columns:\n - name: my_string\n type: string\n - name: my_double\n type: double\n - name: my_date\n type: date\n comment:\n - name: my_bigint\n type: bigint\n comment:\n - name: my_struct\n type: struct\u003cmy_nested_string:string\u003e\n comment:\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Tables using the catalog ID (usually AWS account ID), database name, and table name. For example:\n\n```sh\n$ pulumi import aws:glue/catalogTable:CatalogTable MyTable 123456789012:MyDatabase:MyTable\n```\n", "properties": { "arn": { "type": "string", @@ -278628,7 +278628,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\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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\n\u003e The `managed_policy_arns` argument is deprecated. Use the `aws.iam.RolePolicyAttachmentsExclusive` resource instead.\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", @@ -281493,7 +281493,7 @@ } }, "aws:imagebuilder/distributionConfiguration:DistributionConfiguration": { - "description": "Manages an Image Builder Distribution 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 = new aws.imagebuilder.DistributionConfiguration(\"example\", {\n name: \"example\",\n distributions: [{\n amiDistributionConfiguration: {\n amiTags: {\n CostCenter: \"IT\",\n },\n name: \"example-{{ imagebuilder:buildDate }}\",\n launchPermission: {\n userIds: [\"123456789012\"],\n },\n },\n launchTemplateConfigurations: [{\n launchTemplateId: \"lt-0aaa1bcde2ff3456\",\n }],\n region: \"us-east-1\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.imagebuilder.DistributionConfiguration(\"example\",\n name=\"example\",\n distributions=[{\n \"ami_distribution_configuration\": {\n \"ami_tags\": {\n \"cost_center\": \"IT\",\n },\n \"name\": \"example-{{ imagebuilder:buildDate }}\",\n \"launch_permission\": {\n \"user_ids\": [\"123456789012\"],\n },\n },\n \"launch_template_configurations\": [{\n \"launch_template_id\": \"lt-0aaa1bcde2ff3456\",\n }],\n \"region\": \"us-east-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.ImageBuilder.DistributionConfiguration(\"example\", new()\n {\n Name = \"example\",\n Distributions = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionArgs\n {\n AmiDistributionConfiguration = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs\n {\n AmiTags = \n {\n { \"CostCenter\", \"IT\" },\n },\n Name = \"example-{{ imagebuilder:buildDate }}\",\n LaunchPermission = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs\n {\n UserIds = new[]\n {\n \"123456789012\",\n },\n },\n },\n LaunchTemplateConfigurations = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs\n {\n LaunchTemplateId = \"lt-0aaa1bcde2ff3456\",\n },\n },\n Region = \"us-east-1\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := imagebuilder.NewDistributionConfiguration(ctx, \"example\", \u0026imagebuilder.DistributionConfigurationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDistributions: imagebuilder.DistributionConfigurationDistributionArray{\n\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionArgs{\n\t\t\t\t\tAmiDistributionConfiguration: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationArgs{\n\t\t\t\t\t\tAmiTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\"CostCenter\": pulumi.String(\"IT\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"example-{{ imagebuilder:buildDate }}\"),\n\t\t\t\t\t\tLaunchPermission: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs{\n\t\t\t\t\t\t\tUserIds: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"123456789012\"),\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\tLaunchTemplateConfigurations: imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArray{\n\t\t\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs{\n\t\t\t\t\t\t\tLaunchTemplateId: pulumi.String(\"lt-0aaa1bcde2ff3456\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tRegion: pulumi.String(\"us-east-1\"),\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.imagebuilder.DistributionConfiguration;\nimport com.pulumi.aws.imagebuilder.DistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 DistributionConfiguration(\"example\", DistributionConfigurationArgs.builder()\n .name(\"example\")\n .distributions(DistributionConfigurationDistributionArgs.builder()\n .amiDistributionConfiguration(DistributionConfigurationDistributionAmiDistributionConfigurationArgs.builder()\n .amiTags(Map.of(\"CostCenter\", \"IT\"))\n .name(\"example-{{ imagebuilder:buildDate }}\")\n .launchPermission(DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs.builder()\n .userIds(\"123456789012\")\n .build())\n .build())\n .launchTemplateConfigurations(DistributionConfigurationDistributionLaunchTemplateConfigurationArgs.builder()\n .launchTemplateId(\"lt-0aaa1bcde2ff3456\")\n .build())\n .region(\"us-east-1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:imagebuilder:DistributionConfiguration\n properties:\n name: example\n distributions:\n - amiDistributionConfiguration:\n amiTags:\n CostCenter: IT\n name: example-{{ imagebuilder:buildDate }}\n launchPermission:\n userIds:\n - '123456789012'\n launchTemplateConfigurations:\n - launchTemplateId: lt-0aaa1bcde2ff3456\n region: us-east-1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_imagebuilder_distribution_configurations` resources using the Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:imagebuilder/distributionConfiguration:DistributionConfiguration example arn:aws:imagebuilder:us-east-1:123456789012:distribution-configuration/example\n```\n", + "description": "Manages an Image Builder Distribution 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 = new aws.imagebuilder.DistributionConfiguration(\"example\", {\n name: \"example\",\n distributions: [{\n amiDistributionConfiguration: {\n amiTags: {\n CostCenter: \"IT\",\n },\n name: \"example-{{ imagebuilder:buildDate }}\",\n launchPermission: {\n userIds: [\"123456789012\"],\n },\n },\n launchTemplateConfigurations: [{\n launchTemplateId: \"lt-0aaa1bcde2ff3456\",\n }],\n region: \"us-east-1\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.imagebuilder.DistributionConfiguration(\"example\",\n name=\"example\",\n distributions=[{\n \"ami_distribution_configuration\": {\n \"ami_tags\": {\n \"CostCenter\": \"IT\",\n },\n \"name\": \"example-{{ imagebuilder:buildDate }}\",\n \"launch_permission\": {\n \"user_ids\": [\"123456789012\"],\n },\n },\n \"launch_template_configurations\": [{\n \"launch_template_id\": \"lt-0aaa1bcde2ff3456\",\n }],\n \"region\": \"us-east-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.ImageBuilder.DistributionConfiguration(\"example\", new()\n {\n Name = \"example\",\n Distributions = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionArgs\n {\n AmiDistributionConfiguration = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs\n {\n AmiTags = \n {\n { \"CostCenter\", \"IT\" },\n },\n Name = \"example-{{ imagebuilder:buildDate }}\",\n LaunchPermission = new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs\n {\n UserIds = new[]\n {\n \"123456789012\",\n },\n },\n },\n LaunchTemplateConfigurations = new[]\n {\n new Aws.ImageBuilder.Inputs.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs\n {\n LaunchTemplateId = \"lt-0aaa1bcde2ff3456\",\n },\n },\n Region = \"us-east-1\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := imagebuilder.NewDistributionConfiguration(ctx, \"example\", \u0026imagebuilder.DistributionConfigurationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDistributions: imagebuilder.DistributionConfigurationDistributionArray{\n\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionArgs{\n\t\t\t\t\tAmiDistributionConfiguration: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationArgs{\n\t\t\t\t\t\tAmiTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\"CostCenter\": pulumi.String(\"IT\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"example-{{ imagebuilder:buildDate }}\"),\n\t\t\t\t\t\tLaunchPermission: \u0026imagebuilder.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs{\n\t\t\t\t\t\t\tUserIds: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"123456789012\"),\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\tLaunchTemplateConfigurations: imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArray{\n\t\t\t\t\t\t\u0026imagebuilder.DistributionConfigurationDistributionLaunchTemplateConfigurationArgs{\n\t\t\t\t\t\t\tLaunchTemplateId: pulumi.String(\"lt-0aaa1bcde2ff3456\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tRegion: pulumi.String(\"us-east-1\"),\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.imagebuilder.DistributionConfiguration;\nimport com.pulumi.aws.imagebuilder.DistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationArgs;\nimport com.pulumi.aws.imagebuilder.inputs.DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 DistributionConfiguration(\"example\", DistributionConfigurationArgs.builder()\n .name(\"example\")\n .distributions(DistributionConfigurationDistributionArgs.builder()\n .amiDistributionConfiguration(DistributionConfigurationDistributionAmiDistributionConfigurationArgs.builder()\n .amiTags(Map.of(\"CostCenter\", \"IT\"))\n .name(\"example-{{ imagebuilder:buildDate }}\")\n .launchPermission(DistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionArgs.builder()\n .userIds(\"123456789012\")\n .build())\n .build())\n .launchTemplateConfigurations(DistributionConfigurationDistributionLaunchTemplateConfigurationArgs.builder()\n .launchTemplateId(\"lt-0aaa1bcde2ff3456\")\n .build())\n .region(\"us-east-1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:imagebuilder:DistributionConfiguration\n properties:\n name: example\n distributions:\n - amiDistributionConfiguration:\n amiTags:\n CostCenter: IT\n name: example-{{ imagebuilder:buildDate }}\n launchPermission:\n userIds:\n - '123456789012'\n launchTemplateConfigurations:\n - launchTemplateId: lt-0aaa1bcde2ff3456\n region: us-east-1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_imagebuilder_distribution_configurations` resources using the Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:imagebuilder/distributionConfiguration:DistributionConfiguration example arn:aws:imagebuilder:us-east-1:123456789012:distribution-configuration/example\n```\n", "properties": { "arn": { "type": "string", @@ -284965,7 +284965,7 @@ } }, "aws:iot/thingGroup:ThingGroup": { - "description": "Manages an AWS IoT Thing 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 parent = new aws.iot.ThingGroup(\"parent\", {name: \"parent\"});\nconst example = new aws.iot.ThingGroup(\"example\", {\n name: \"example\",\n parentGroupName: parent.name,\n properties: {\n attributePayload: {\n attributes: {\n One: \"11111\",\n Two: \"TwoTwo\",\n },\n },\n description: \"This is my thing group\",\n },\n tags: {\n managed: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nparent = aws.iot.ThingGroup(\"parent\", name=\"parent\")\nexample = aws.iot.ThingGroup(\"example\",\n name=\"example\",\n parent_group_name=parent.name,\n properties={\n \"attribute_payload\": {\n \"attributes\": {\n \"one\": \"11111\",\n \"two\": \"TwoTwo\",\n },\n },\n \"description\": \"This is my thing group\",\n },\n tags={\n \"managed\": \"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 parent = new Aws.Iot.ThingGroup(\"parent\", new()\n {\n Name = \"parent\",\n });\n\n var example = new Aws.Iot.ThingGroup(\"example\", new()\n {\n Name = \"example\",\n ParentGroupName = parent.Name,\n Properties = new Aws.Iot.Inputs.ThingGroupPropertiesArgs\n {\n AttributePayload = new Aws.Iot.Inputs.ThingGroupPropertiesAttributePayloadArgs\n {\n Attributes = \n {\n { \"One\", \"11111\" },\n { \"Two\", \"TwoTwo\" },\n },\n },\n Description = \"This is my thing group\",\n },\n Tags = \n {\n { \"managed\", \"true\" },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tparent, err := iot.NewThingGroup(ctx, \"parent\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"parent\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewThingGroup(ctx, \"example\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tParentGroupName: parent.Name,\n\t\t\tProperties: \u0026iot.ThingGroupPropertiesArgs{\n\t\t\t\tAttributePayload: \u0026iot.ThingGroupPropertiesAttributePayloadArgs{\n\t\t\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\t\t\"One\": pulumi.String(\"11111\"),\n\t\t\t\t\t\t\"Two\": pulumi.String(\"TwoTwo\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDescription: pulumi.String(\"This is my thing group\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"managed\": 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.iot.ThingGroup;\nimport com.pulumi.aws.iot.ThingGroupArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesAttributePayloadArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var parent = new ThingGroup(\"parent\", ThingGroupArgs.builder()\n .name(\"parent\")\n .build());\n\n var example = new ThingGroup(\"example\", ThingGroupArgs.builder()\n .name(\"example\")\n .parentGroupName(parent.name())\n .properties(ThingGroupPropertiesArgs.builder()\n .attributePayload(ThingGroupPropertiesAttributePayloadArgs.builder()\n .attributes(Map.ofEntries(\n Map.entry(\"One\", \"11111\"),\n Map.entry(\"Two\", \"TwoTwo\")\n ))\n .build())\n .description(\"This is my thing group\")\n .build())\n .tags(Map.of(\"managed\", \"true\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n parent:\n type: aws:iot:ThingGroup\n properties:\n name: parent\n example:\n type: aws:iot:ThingGroup\n properties:\n name: example\n parentGroupName: ${parent.name}\n properties:\n attributePayload:\n attributes:\n One: '11111'\n Two: TwoTwo\n description: This is my thing group\n tags:\n managed: 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IoT Things Groups using the name. For example:\n\n```sh\n$ pulumi import aws:iot/thingGroup:ThingGroup example example\n```\n", + "description": "Manages an AWS IoT Thing 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 parent = new aws.iot.ThingGroup(\"parent\", {name: \"parent\"});\nconst example = new aws.iot.ThingGroup(\"example\", {\n name: \"example\",\n parentGroupName: parent.name,\n properties: {\n attributePayload: {\n attributes: {\n One: \"11111\",\n Two: \"TwoTwo\",\n },\n },\n description: \"This is my thing group\",\n },\n tags: {\n managed: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nparent = aws.iot.ThingGroup(\"parent\", name=\"parent\")\nexample = aws.iot.ThingGroup(\"example\",\n name=\"example\",\n parent_group_name=parent.name,\n properties={\n \"attribute_payload\": {\n \"attributes\": {\n \"One\": \"11111\",\n \"Two\": \"TwoTwo\",\n },\n },\n \"description\": \"This is my thing group\",\n },\n tags={\n \"managed\": \"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 parent = new Aws.Iot.ThingGroup(\"parent\", new()\n {\n Name = \"parent\",\n });\n\n var example = new Aws.Iot.ThingGroup(\"example\", new()\n {\n Name = \"example\",\n ParentGroupName = parent.Name,\n Properties = new Aws.Iot.Inputs.ThingGroupPropertiesArgs\n {\n AttributePayload = new Aws.Iot.Inputs.ThingGroupPropertiesAttributePayloadArgs\n {\n Attributes = \n {\n { \"One\", \"11111\" },\n { \"Two\", \"TwoTwo\" },\n },\n },\n Description = \"This is my thing group\",\n },\n Tags = \n {\n { \"managed\", \"true\" },\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/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tparent, err := iot.NewThingGroup(ctx, \"parent\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"parent\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewThingGroup(ctx, \"example\", \u0026iot.ThingGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tParentGroupName: parent.Name,\n\t\t\tProperties: \u0026iot.ThingGroupPropertiesArgs{\n\t\t\t\tAttributePayload: \u0026iot.ThingGroupPropertiesAttributePayloadArgs{\n\t\t\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\t\t\"One\": pulumi.String(\"11111\"),\n\t\t\t\t\t\t\"Two\": pulumi.String(\"TwoTwo\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDescription: pulumi.String(\"This is my thing group\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"managed\": 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.iot.ThingGroup;\nimport com.pulumi.aws.iot.ThingGroupArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesArgs;\nimport com.pulumi.aws.iot.inputs.ThingGroupPropertiesAttributePayloadArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var parent = new ThingGroup(\"parent\", ThingGroupArgs.builder()\n .name(\"parent\")\n .build());\n\n var example = new ThingGroup(\"example\", ThingGroupArgs.builder()\n .name(\"example\")\n .parentGroupName(parent.name())\n .properties(ThingGroupPropertiesArgs.builder()\n .attributePayload(ThingGroupPropertiesAttributePayloadArgs.builder()\n .attributes(Map.ofEntries(\n Map.entry(\"One\", \"11111\"),\n Map.entry(\"Two\", \"TwoTwo\")\n ))\n .build())\n .description(\"This is my thing group\")\n .build())\n .tags(Map.of(\"managed\", \"true\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n parent:\n type: aws:iot:ThingGroup\n properties:\n name: parent\n example:\n type: aws:iot:ThingGroup\n properties:\n name: example\n parentGroupName: ${parent.name}\n properties:\n attributePayload:\n attributes:\n One: '11111'\n Two: TwoTwo\n description: This is my thing group\n tags:\n managed: 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IoT Things Groups using the name. For example:\n\n```sh\n$ pulumi import aws:iot/thingGroup:ThingGroup example example\n```\n", "properties": { "arn": { "type": "string", @@ -288763,7 +288763,7 @@ } }, "aws:kinesisanalyticsv2/application:Application": { - "description": "Manages a Kinesis Analytics v2 Application.\nThis resource can be used to manage both Kinesis Data Analytics for SQL applications and Kinesis Data Analytics for Apache Flink applications.\n\n\u003e **Note:** Kinesis Data Analytics for SQL applications created using this resource cannot currently be viewed in the AWS Console. To manage Kinesis Data Analytics for SQL applications that can also be viewed in the AWS Console, use the `aws.kinesis.AnalyticsApplication` resource.\n\n## Example Usage\n\n### Apache Flink Application\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: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n environmentProperties: {\n propertyGroups: [\n {\n propertyGroupId: \"PROPERTY-GROUP-1\",\n propertyMap: {\n Key1: \"Value1\",\n },\n },\n {\n propertyGroupId: \"PROPERTY-GROUP-2\",\n propertyMap: {\n KeyA: \"ValueA\",\n KeyB: \"ValueB\",\n },\n },\n ],\n },\n flinkApplicationConfiguration: {\n checkpointConfiguration: {\n configurationType: \"DEFAULT\",\n },\n monitoringConfiguration: {\n configurationType: \"CUSTOM\",\n logLevel: \"DEBUG\",\n metricsLevel: \"TASK\",\n },\n parallelismConfiguration: {\n autoScalingEnabled: true,\n configurationType: \"CUSTOM\",\n parallelism: 10,\n parallelismPerKpu: 4,\n },\n },\n },\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"environment_properties\": {\n \"property_groups\": [\n {\n \"property_group_id\": \"PROPERTY-GROUP-1\",\n \"property_map\": {\n \"key1\": \"Value1\",\n },\n },\n {\n \"property_group_id\": \"PROPERTY-GROUP-2\",\n \"property_map\": {\n \"key_a\": \"ValueA\",\n \"key_b\": \"ValueB\",\n },\n },\n ],\n },\n \"flink_application_configuration\": {\n \"checkpoint_configuration\": {\n \"configuration_type\": \"DEFAULT\",\n },\n \"monitoring_configuration\": {\n \"configuration_type\": \"CUSTOM\",\n \"log_level\": \"DEBUG\",\n \"metrics_level\": \"TASK\",\n },\n \"parallelism_configuration\": {\n \"auto_scaling_enabled\": True,\n \"configuration_type\": \"CUSTOM\",\n \"parallelism\": 10,\n \"parallelism_per_kpu\": 4,\n },\n },\n },\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n EnvironmentProperties = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs\n {\n PropertyGroups = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-1\",\n PropertyMap = \n {\n { \"Key1\", \"Value1\" },\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-2\",\n PropertyMap = \n {\n { \"KeyA\", \"ValueA\" },\n { \"KeyB\", \"ValueB\" },\n },\n },\n },\n },\n FlinkApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs\n {\n CheckpointConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs\n {\n ConfigurationType = \"DEFAULT\",\n },\n MonitoringConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs\n {\n ConfigurationType = \"CUSTOM\",\n LogLevel = \"DEBUG\",\n MetricsLevel = \"TASK\",\n },\n ParallelismConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs\n {\n AutoScalingEnabled = true,\n ConfigurationType = \"CUSTOM\",\n Parallelism = 10,\n ParallelismPerKpu = 4,\n },\n },\n },\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/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tEnvironmentProperties: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesArgs{\n\t\t\t\t\tPropertyGroups: kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-1\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-2\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"KeyA\": pulumi.String(\"ValueA\"),\n\t\t\t\t\t\t\t\t\"KeyB\": pulumi.String(\"ValueB\"),\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\tFlinkApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs{\n\t\t\t\t\tCheckpointConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"DEFAULT\"),\n\t\t\t\t\t},\n\t\t\t\t\tMonitoringConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tLogLevel: pulumi.String(\"DEBUG\"),\n\t\t\t\t\t\tMetricsLevel: pulumi.String(\"TASK\"),\n\t\t\t\t\t},\n\t\t\t\t\tParallelismConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs{\n\t\t\t\t\t\tAutoScalingEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tParallelism: pulumi.Int(10),\n\t\t\t\t\t\tParallelismPerKpu: pulumi.Int(4),\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\"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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .environmentProperties(ApplicationApplicationConfigurationEnvironmentPropertiesArgs.builder()\n .propertyGroups( \n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-1\")\n .propertyMap(Map.of(\"Key1\", \"Value1\"))\n .build(),\n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-2\")\n .propertyMap(Map.ofEntries(\n Map.entry(\"KeyA\", \"ValueA\"),\n Map.entry(\"KeyB\", \"ValueB\")\n ))\n .build())\n .build())\n .flinkApplicationConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs.builder()\n .checkpointConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs.builder()\n .configurationType(\"DEFAULT\")\n .build())\n .monitoringConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs.builder()\n .configurationType(\"CUSTOM\")\n .logLevel(\"DEBUG\")\n .metricsLevel(\"TASK\")\n .build())\n .parallelismConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs.builder()\n .autoScalingEnabled(true)\n .configurationType(\"CUSTOM\")\n .parallelism(10)\n .parallelismPerKpu(4)\n .build())\n .build())\n .build())\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n environmentProperties:\n propertyGroups:\n - propertyGroupId: PROPERTY-GROUP-1\n propertyMap:\n Key1: Value1\n - propertyGroupId: PROPERTY-GROUP-2\n propertyMap:\n KeyA: ValueA\n KeyB: ValueB\n flinkApplicationConfiguration:\n checkpointConfiguration:\n configurationType: DEFAULT\n monitoringConfiguration:\n configurationType: CUSTOM\n logLevel: DEBUG\n metricsLevel: TASK\n parallelismConfiguration:\n autoScalingEnabled: true\n configurationType: CUSTOM\n parallelism: 10\n parallelismPerKpu: 4\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQL Application\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-sql-application\"});\nconst exampleLogStream = new aws.cloudwatch.LogStream(\"example\", {\n name: \"example-sql-application\",\n logGroupName: example.name,\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-sql-application\",\n runtimeEnvironment: \"SQL-1_0\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n textContent: \"SELECT 1;\\n\",\n },\n codeContentType: \"PLAINTEXT\",\n },\n sqlApplicationConfiguration: {\n input: {\n namePrefix: \"PREFIX_1\",\n inputParallelism: {\n count: 3,\n },\n inputSchema: {\n recordColumns: [\n {\n name: \"COLUMN_1\",\n sqlType: \"VARCHAR(8)\",\n mapping: \"MAPPING-1\",\n },\n {\n name: \"COLUMN_2\",\n sqlType: \"DOUBLE\",\n },\n ],\n recordEncoding: \"UTF-8\",\n recordFormat: {\n recordFormatType: \"CSV\",\n mappingParameters: {\n csvMappingParameters: {\n recordColumnDelimiter: \",\",\n recordRowDelimiter: \"\\n\",\n },\n },\n },\n },\n kinesisStreamsInput: {\n resourceArn: exampleAwsKinesisStream.arn,\n },\n },\n outputs: [\n {\n name: \"OUTPUT_1\",\n destinationSchema: {\n recordFormatType: \"JSON\",\n },\n lambdaOutput: {\n resourceArn: exampleAwsLambdaFunction.arn,\n },\n },\n {\n name: \"OUTPUT_2\",\n destinationSchema: {\n recordFormatType: \"CSV\",\n },\n kinesisFirehoseOutput: {\n resourceArn: exampleAwsKinesisFirehoseDeliveryStream.arn,\n },\n },\n ],\n referenceDataSource: {\n tableName: \"TABLE-1\",\n referenceSchema: {\n recordColumns: [{\n name: \"COLUMN_1\",\n sqlType: \"INTEGER\",\n }],\n recordFormat: {\n recordFormatType: \"JSON\",\n mappingParameters: {\n jsonMappingParameters: {\n recordRowPath: \"$\",\n },\n },\n },\n },\n s3ReferenceDataSource: {\n bucketArn: exampleAwsS3Bucket.arn,\n fileKey: \"KEY-1\",\n },\n },\n },\n },\n cloudwatchLoggingOptions: {\n logStreamArn: exampleLogStream.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-sql-application\")\nexample_log_stream = aws.cloudwatch.LogStream(\"example\",\n name=\"example-sql-application\",\n log_group_name=example.name)\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-sql-application\",\n runtime_environment=\"SQL-1_0\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"text_content\": \"SELECT 1;\\n\",\n },\n \"code_content_type\": \"PLAINTEXT\",\n },\n \"sql_application_configuration\": {\n \"input\": {\n \"name_prefix\": \"PREFIX_1\",\n \"input_parallelism\": {\n \"count\": 3,\n },\n \"input_schema\": {\n \"record_columns\": [\n {\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"VARCHAR(8)\",\n \"mapping\": \"MAPPING-1\",\n },\n {\n \"name\": \"COLUMN_2\",\n \"sql_type\": \"DOUBLE\",\n },\n ],\n \"record_encoding\": \"UTF-8\",\n \"record_format\": {\n \"record_format_type\": \"CSV\",\n \"mapping_parameters\": {\n \"csv_mapping_parameters\": {\n \"record_column_delimiter\": \",\",\n \"record_row_delimiter\": \"\\n\",\n },\n },\n },\n },\n \"kinesis_streams_input\": {\n \"resource_arn\": example_aws_kinesis_stream[\"arn\"],\n },\n },\n \"outputs\": [\n {\n \"name\": \"OUTPUT_1\",\n \"destination_schema\": {\n \"record_format_type\": \"JSON\",\n },\n \"lambda_output\": {\n \"resource_arn\": example_aws_lambda_function[\"arn\"],\n },\n },\n {\n \"name\": \"OUTPUT_2\",\n \"destination_schema\": {\n \"record_format_type\": \"CSV\",\n },\n \"kinesis_firehose_output\": {\n \"resource_arn\": example_aws_kinesis_firehose_delivery_stream[\"arn\"],\n },\n },\n ],\n \"reference_data_source\": {\n \"table_name\": \"TABLE-1\",\n \"reference_schema\": {\n \"record_columns\": [{\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"INTEGER\",\n }],\n \"record_format\": {\n \"record_format_type\": \"JSON\",\n \"mapping_parameters\": {\n \"json_mapping_parameters\": {\n \"record_row_path\": \"$\",\n },\n },\n },\n },\n \"s3_reference_data_source\": {\n \"bucket_arn\": example_aws_s3_bucket[\"arn\"],\n \"file_key\": \"KEY-1\",\n },\n },\n },\n },\n cloudwatch_logging_options={\n \"log_stream_arn\": example_log_stream.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.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-sql-application\",\n });\n\n var exampleLogStream = new Aws.CloudWatch.LogStream(\"example\", new()\n {\n Name = \"example-sql-application\",\n LogGroupName = example.Name,\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-sql-application\",\n RuntimeEnvironment = \"SQL-1_0\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n TextContent = @\"SELECT 1;\n\",\n },\n CodeContentType = \"PLAINTEXT\",\n },\n SqlApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs\n {\n Input = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs\n {\n NamePrefix = \"PREFIX_1\",\n InputParallelism = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs\n {\n Count = 3,\n },\n InputSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"VARCHAR(8)\",\n Mapping = \"MAPPING-1\",\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_2\",\n SqlType = \"DOUBLE\",\n },\n },\n RecordEncoding = \"UTF-8\",\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs\n {\n RecordFormatType = \"CSV\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs\n {\n CsvMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs\n {\n RecordColumnDelimiter = \",\",\n RecordRowDelimiter = @\"\n\",\n },\n },\n },\n },\n KinesisStreamsInput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs\n {\n ResourceArn = exampleAwsKinesisStream.Arn,\n },\n },\n Outputs = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_1\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"JSON\",\n },\n LambdaOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs\n {\n ResourceArn = exampleAwsLambdaFunction.Arn,\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_2\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"CSV\",\n },\n KinesisFirehoseOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs\n {\n ResourceArn = exampleAwsKinesisFirehoseDeliveryStream.Arn,\n },\n },\n },\n ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs\n {\n TableName = \"TABLE-1\",\n ReferenceSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"INTEGER\",\n },\n },\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs\n {\n RecordFormatType = \"JSON\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs\n {\n JsonMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs\n {\n RecordRowPath = \"$\",\n },\n },\n },\n },\n S3ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs\n {\n BucketArn = exampleAwsS3Bucket.Arn,\n FileKey = \"KEY-1\",\n },\n },\n },\n },\n CloudwatchLoggingOptions = new Aws.KinesisAnalyticsV2.Inputs.ApplicationCloudwatchLoggingOptionsArgs\n {\n LogStreamArn = exampleLogStream.Arn,\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/kinesisanalyticsv2\"\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-sql-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogStream, err := cloudwatch.NewLogStream(ctx, \"example\", \u0026cloudwatch.LogStreamArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tLogGroupName: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"SQL-1_0\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tTextContent: pulumi.String(\"SELECT 1;\\n\"),\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"PLAINTEXT\"),\n\t\t\t\t},\n\t\t\t\tSqlApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs{\n\t\t\t\t\tInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputTypeArgs{\n\t\t\t\t\t\tNamePrefix: pulumi.String(\"PREFIX_1\"),\n\t\t\t\t\t\tInputParallelism: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(3),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInputSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"VARCHAR(8)\"),\n\t\t\t\t\t\t\t\t\tMapping: pulumi.String(\"MAPPING-1\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_2\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"DOUBLE\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordEncoding: pulumi.String(\"UTF-8\"),\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tCsvMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordColumnDelimiter: pulumi.String(\",\"),\n\t\t\t\t\t\t\t\t\t\tRecordRowDelimiter: pulumi.String(\"\\n\"),\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\tKinesisStreamsInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs{\n\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tOutputs: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_1\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLambdaOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_2\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tKinesisFirehoseOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.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\tReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs{\n\t\t\t\t\t\tTableName: pulumi.String(\"TABLE-1\"),\n\t\t\t\t\t\tReferenceSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"INTEGER\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tJsonMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordRowPath: pulumi.String(\"$\"),\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\tS3ReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs{\n\t\t\t\t\t\t\tBucketArn: pulumi.Any(exampleAwsS3Bucket.Arn),\n\t\t\t\t\t\t\tFileKey: pulumi.String(\"KEY-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\tCloudwatchLoggingOptions: \u0026kinesisanalyticsv2.ApplicationCloudwatchLoggingOptionsArgs{\n\t\t\t\tLogStreamArn: exampleLogStream.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.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.LogStream;\nimport com.pulumi.aws.cloudwatch.LogStreamArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationCloudwatchLoggingOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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-sql-application\")\n .build());\n\n var exampleLogStream = new LogStream(\"exampleLogStream\", LogStreamArgs.builder()\n .name(\"example-sql-application\")\n .logGroupName(example.name())\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-sql-application\")\n .runtimeEnvironment(\"SQL-1_0\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .textContent(\"\"\"\nSELECT 1;\n \"\"\")\n .build())\n .codeContentType(\"PLAINTEXT\")\n .build())\n .sqlApplicationConfiguration(ApplicationApplicationConfigurationSqlApplicationConfigurationArgs.builder()\n .input(ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs.builder()\n .namePrefix(\"PREFIX_1\")\n .inputParallelism(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs.builder()\n .count(3)\n .build())\n .inputSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs.builder()\n .recordColumns( \n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"VARCHAR(8)\")\n .mapping(\"MAPPING-1\")\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_2\")\n .sqlType(\"DOUBLE\")\n .build())\n .recordEncoding(\"UTF-8\")\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs.builder()\n .recordFormatType(\"CSV\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs.builder()\n .csvMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs.builder()\n .recordColumnDelimiter(\",\")\n .recordRowDelimiter(\"\"\"\n\n \"\"\")\n .build())\n .build())\n .build())\n .build())\n .kinesisStreamsInput(ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs.builder()\n .resourceArn(exampleAwsKinesisStream.arn())\n .build())\n .build())\n .outputs( \n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_1\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"JSON\")\n .build())\n .lambdaOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs.builder()\n .resourceArn(exampleAwsLambdaFunction.arn())\n .build())\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_2\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"CSV\")\n .build())\n .kinesisFirehoseOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs.builder()\n .resourceArn(exampleAwsKinesisFirehoseDeliveryStream.arn())\n .build())\n .build())\n .referenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs.builder()\n .tableName(\"TABLE-1\")\n .referenceSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs.builder()\n .recordColumns(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"INTEGER\")\n .build())\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs.builder()\n .recordFormatType(\"JSON\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs.builder()\n .jsonMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs.builder()\n .recordRowPath(\"$\")\n .build())\n .build())\n .build())\n .build())\n .s3ReferenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs.builder()\n .bucketArn(exampleAwsS3Bucket.arn())\n .fileKey(\"KEY-1\")\n .build())\n .build())\n .build())\n .build())\n .cloudwatchLoggingOptions(ApplicationCloudwatchLoggingOptionsArgs.builder()\n .logStreamArn(exampleLogStream.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-sql-application\n exampleLogStream:\n type: aws:cloudwatch:LogStream\n name: example\n properties:\n name: example-sql-application\n logGroupName: ${example.name}\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-sql-application\n runtimeEnvironment: SQL-1_0\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n textContent: |\n SELECT 1;\n codeContentType: PLAINTEXT\n sqlApplicationConfiguration:\n input:\n namePrefix: PREFIX_1\n inputParallelism:\n count: 3\n inputSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: VARCHAR(8)\n mapping: MAPPING-1\n - name: COLUMN_2\n sqlType: DOUBLE\n recordEncoding: UTF-8\n recordFormat:\n recordFormatType: CSV\n mappingParameters:\n csvMappingParameters:\n recordColumnDelimiter: ','\n recordRowDelimiter: |2+\n kinesisStreamsInput:\n resourceArn: ${exampleAwsKinesisStream.arn}\n outputs:\n - name: OUTPUT_1\n destinationSchema:\n recordFormatType: JSON\n lambdaOutput:\n resourceArn: ${exampleAwsLambdaFunction.arn}\n - name: OUTPUT_2\n destinationSchema:\n recordFormatType: CSV\n kinesisFirehoseOutput:\n resourceArn: ${exampleAwsKinesisFirehoseDeliveryStream.arn}\n referenceDataSource:\n tableName: TABLE-1\n referenceSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: INTEGER\n recordFormat:\n recordFormatType: JSON\n mappingParameters:\n jsonMappingParameters:\n recordRowPath: $\n s3ReferenceDataSource:\n bucketArn: ${exampleAwsS3Bucket.arn}\n fileKey: KEY-1\n cloudwatchLoggingOptions:\n logStreamArn: ${exampleLogStream.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC 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.s3.BucketV2(\"example\", {bucket: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n vpcConfiguration: {\n securityGroupIds: [\n exampleAwsSecurityGroup[0].id,\n exampleAwsSecurityGroup[1].id,\n ],\n subnetIds: [exampleAwsSubnet.id],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"vpc_configuration\": {\n \"security_group_ids\": [\n example_aws_security_group[0][\"id\"],\n example_aws_security_group[1][\"id\"],\n ],\n \"subnet_ids\": [example_aws_subnet[\"id\"]],\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.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n VpcConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationVpcConfigurationArgs\n {\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup[0].Id,\n exampleAwsSecurityGroup[1].Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tVpcConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationVpcConfigurationArgs{\n\t\t\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSecurityGroup[0].Id,\n\t\t\t\t\t\texampleAwsSecurityGroup[1].Id,\n\t\t\t\t\t},\n\t\t\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSubnet.Id,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationVpcConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .vpcConfiguration(ApplicationApplicationConfigurationVpcConfigurationArgs.builder()\n .securityGroupIds( \n exampleAwsSecurityGroup[0].id(),\n exampleAwsSecurityGroup[1].id())\n .subnetIds(exampleAwsSubnet.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n vpcConfiguration:\n securityGroupIds:\n - ${exampleAwsSecurityGroup[0].id}\n - ${exampleAwsSecurityGroup[1].id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_kinesisanalyticsv2_application` using the application ARN. For example:\n\n```sh\n$ pulumi import aws:kinesisanalyticsv2/application:Application example arn:aws:kinesisanalytics:us-west-2:123456789012:application/example-sql-application\n```\n", + "description": "Manages a Kinesis Analytics v2 Application.\nThis resource can be used to manage both Kinesis Data Analytics for SQL applications and Kinesis Data Analytics for Apache Flink applications.\n\n\u003e **Note:** Kinesis Data Analytics for SQL applications created using this resource cannot currently be viewed in the AWS Console. To manage Kinesis Data Analytics for SQL applications that can also be viewed in the AWS Console, use the `aws.kinesis.AnalyticsApplication` resource.\n\n## Example Usage\n\n### Apache Flink Application\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: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n environmentProperties: {\n propertyGroups: [\n {\n propertyGroupId: \"PROPERTY-GROUP-1\",\n propertyMap: {\n Key1: \"Value1\",\n },\n },\n {\n propertyGroupId: \"PROPERTY-GROUP-2\",\n propertyMap: {\n KeyA: \"ValueA\",\n KeyB: \"ValueB\",\n },\n },\n ],\n },\n flinkApplicationConfiguration: {\n checkpointConfiguration: {\n configurationType: \"DEFAULT\",\n },\n monitoringConfiguration: {\n configurationType: \"CUSTOM\",\n logLevel: \"DEBUG\",\n metricsLevel: \"TASK\",\n },\n parallelismConfiguration: {\n autoScalingEnabled: true,\n configurationType: \"CUSTOM\",\n parallelism: 10,\n parallelismPerKpu: 4,\n },\n },\n },\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"environment_properties\": {\n \"property_groups\": [\n {\n \"property_group_id\": \"PROPERTY-GROUP-1\",\n \"property_map\": {\n \"Key1\": \"Value1\",\n },\n },\n {\n \"property_group_id\": \"PROPERTY-GROUP-2\",\n \"property_map\": {\n \"KeyA\": \"ValueA\",\n \"KeyB\": \"ValueB\",\n },\n },\n ],\n },\n \"flink_application_configuration\": {\n \"checkpoint_configuration\": {\n \"configuration_type\": \"DEFAULT\",\n },\n \"monitoring_configuration\": {\n \"configuration_type\": \"CUSTOM\",\n \"log_level\": \"DEBUG\",\n \"metrics_level\": \"TASK\",\n },\n \"parallelism_configuration\": {\n \"auto_scaling_enabled\": True,\n \"configuration_type\": \"CUSTOM\",\n \"parallelism\": 10,\n \"parallelism_per_kpu\": 4,\n },\n },\n },\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n EnvironmentProperties = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs\n {\n PropertyGroups = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-1\",\n PropertyMap = \n {\n { \"Key1\", \"Value1\" },\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs\n {\n PropertyGroupId = \"PROPERTY-GROUP-2\",\n PropertyMap = \n {\n { \"KeyA\", \"ValueA\" },\n { \"KeyB\", \"ValueB\" },\n },\n },\n },\n },\n FlinkApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs\n {\n CheckpointConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs\n {\n ConfigurationType = \"DEFAULT\",\n },\n MonitoringConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs\n {\n ConfigurationType = \"CUSTOM\",\n LogLevel = \"DEBUG\",\n MetricsLevel = \"TASK\",\n },\n ParallelismConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs\n {\n AutoScalingEnabled = true,\n ConfigurationType = \"CUSTOM\",\n Parallelism = 10,\n ParallelismPerKpu = 4,\n },\n },\n },\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/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tEnvironmentProperties: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesArgs{\n\t\t\t\t\tPropertyGroups: kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-1\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs{\n\t\t\t\t\t\t\tPropertyGroupId: pulumi.String(\"PROPERTY-GROUP-2\"),\n\t\t\t\t\t\t\tPropertyMap: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"KeyA\": pulumi.String(\"ValueA\"),\n\t\t\t\t\t\t\t\t\"KeyB\": pulumi.String(\"ValueB\"),\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\tFlinkApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs{\n\t\t\t\t\tCheckpointConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"DEFAULT\"),\n\t\t\t\t\t},\n\t\t\t\t\tMonitoringConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs{\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tLogLevel: pulumi.String(\"DEBUG\"),\n\t\t\t\t\t\tMetricsLevel: pulumi.String(\"TASK\"),\n\t\t\t\t\t},\n\t\t\t\t\tParallelismConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs{\n\t\t\t\t\t\tAutoScalingEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tConfigurationType: pulumi.String(\"CUSTOM\"),\n\t\t\t\t\t\tParallelism: pulumi.Int(10),\n\t\t\t\t\t\tParallelismPerKpu: pulumi.Int(4),\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\"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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationEnvironmentPropertiesArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .environmentProperties(ApplicationApplicationConfigurationEnvironmentPropertiesArgs.builder()\n .propertyGroups( \n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-1\")\n .propertyMap(Map.of(\"Key1\", \"Value1\"))\n .build(),\n ApplicationApplicationConfigurationEnvironmentPropertiesPropertyGroupArgs.builder()\n .propertyGroupId(\"PROPERTY-GROUP-2\")\n .propertyMap(Map.ofEntries(\n Map.entry(\"KeyA\", \"ValueA\"),\n Map.entry(\"KeyB\", \"ValueB\")\n ))\n .build())\n .build())\n .flinkApplicationConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationArgs.builder()\n .checkpointConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationCheckpointConfigurationArgs.builder()\n .configurationType(\"DEFAULT\")\n .build())\n .monitoringConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationMonitoringConfigurationArgs.builder()\n .configurationType(\"CUSTOM\")\n .logLevel(\"DEBUG\")\n .metricsLevel(\"TASK\")\n .build())\n .parallelismConfiguration(ApplicationApplicationConfigurationFlinkApplicationConfigurationParallelismConfigurationArgs.builder()\n .autoScalingEnabled(true)\n .configurationType(\"CUSTOM\")\n .parallelism(10)\n .parallelismPerKpu(4)\n .build())\n .build())\n .build())\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n environmentProperties:\n propertyGroups:\n - propertyGroupId: PROPERTY-GROUP-1\n propertyMap:\n Key1: Value1\n - propertyGroupId: PROPERTY-GROUP-2\n propertyMap:\n KeyA: ValueA\n KeyB: ValueB\n flinkApplicationConfiguration:\n checkpointConfiguration:\n configurationType: DEFAULT\n monitoringConfiguration:\n configurationType: CUSTOM\n logLevel: DEBUG\n metricsLevel: TASK\n parallelismConfiguration:\n autoScalingEnabled: true\n configurationType: CUSTOM\n parallelism: 10\n parallelismPerKpu: 4\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQL Application\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-sql-application\"});\nconst exampleLogStream = new aws.cloudwatch.LogStream(\"example\", {\n name: \"example-sql-application\",\n logGroupName: example.name,\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-sql-application\",\n runtimeEnvironment: \"SQL-1_0\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n textContent: \"SELECT 1;\\n\",\n },\n codeContentType: \"PLAINTEXT\",\n },\n sqlApplicationConfiguration: {\n input: {\n namePrefix: \"PREFIX_1\",\n inputParallelism: {\n count: 3,\n },\n inputSchema: {\n recordColumns: [\n {\n name: \"COLUMN_1\",\n sqlType: \"VARCHAR(8)\",\n mapping: \"MAPPING-1\",\n },\n {\n name: \"COLUMN_2\",\n sqlType: \"DOUBLE\",\n },\n ],\n recordEncoding: \"UTF-8\",\n recordFormat: {\n recordFormatType: \"CSV\",\n mappingParameters: {\n csvMappingParameters: {\n recordColumnDelimiter: \",\",\n recordRowDelimiter: \"\\n\",\n },\n },\n },\n },\n kinesisStreamsInput: {\n resourceArn: exampleAwsKinesisStream.arn,\n },\n },\n outputs: [\n {\n name: \"OUTPUT_1\",\n destinationSchema: {\n recordFormatType: \"JSON\",\n },\n lambdaOutput: {\n resourceArn: exampleAwsLambdaFunction.arn,\n },\n },\n {\n name: \"OUTPUT_2\",\n destinationSchema: {\n recordFormatType: \"CSV\",\n },\n kinesisFirehoseOutput: {\n resourceArn: exampleAwsKinesisFirehoseDeliveryStream.arn,\n },\n },\n ],\n referenceDataSource: {\n tableName: \"TABLE-1\",\n referenceSchema: {\n recordColumns: [{\n name: \"COLUMN_1\",\n sqlType: \"INTEGER\",\n }],\n recordFormat: {\n recordFormatType: \"JSON\",\n mappingParameters: {\n jsonMappingParameters: {\n recordRowPath: \"$\",\n },\n },\n },\n },\n s3ReferenceDataSource: {\n bucketArn: exampleAwsS3Bucket.arn,\n fileKey: \"KEY-1\",\n },\n },\n },\n },\n cloudwatchLoggingOptions: {\n logStreamArn: exampleLogStream.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-sql-application\")\nexample_log_stream = aws.cloudwatch.LogStream(\"example\",\n name=\"example-sql-application\",\n log_group_name=example.name)\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-sql-application\",\n runtime_environment=\"SQL-1_0\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"text_content\": \"SELECT 1;\\n\",\n },\n \"code_content_type\": \"PLAINTEXT\",\n },\n \"sql_application_configuration\": {\n \"input\": {\n \"name_prefix\": \"PREFIX_1\",\n \"input_parallelism\": {\n \"count\": 3,\n },\n \"input_schema\": {\n \"record_columns\": [\n {\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"VARCHAR(8)\",\n \"mapping\": \"MAPPING-1\",\n },\n {\n \"name\": \"COLUMN_2\",\n \"sql_type\": \"DOUBLE\",\n },\n ],\n \"record_encoding\": \"UTF-8\",\n \"record_format\": {\n \"record_format_type\": \"CSV\",\n \"mapping_parameters\": {\n \"csv_mapping_parameters\": {\n \"record_column_delimiter\": \",\",\n \"record_row_delimiter\": \"\\n\",\n },\n },\n },\n },\n \"kinesis_streams_input\": {\n \"resource_arn\": example_aws_kinesis_stream[\"arn\"],\n },\n },\n \"outputs\": [\n {\n \"name\": \"OUTPUT_1\",\n \"destination_schema\": {\n \"record_format_type\": \"JSON\",\n },\n \"lambda_output\": {\n \"resource_arn\": example_aws_lambda_function[\"arn\"],\n },\n },\n {\n \"name\": \"OUTPUT_2\",\n \"destination_schema\": {\n \"record_format_type\": \"CSV\",\n },\n \"kinesis_firehose_output\": {\n \"resource_arn\": example_aws_kinesis_firehose_delivery_stream[\"arn\"],\n },\n },\n ],\n \"reference_data_source\": {\n \"table_name\": \"TABLE-1\",\n \"reference_schema\": {\n \"record_columns\": [{\n \"name\": \"COLUMN_1\",\n \"sql_type\": \"INTEGER\",\n }],\n \"record_format\": {\n \"record_format_type\": \"JSON\",\n \"mapping_parameters\": {\n \"json_mapping_parameters\": {\n \"record_row_path\": \"$\",\n },\n },\n },\n },\n \"s3_reference_data_source\": {\n \"bucket_arn\": example_aws_s3_bucket[\"arn\"],\n \"file_key\": \"KEY-1\",\n },\n },\n },\n },\n cloudwatch_logging_options={\n \"log_stream_arn\": example_log_stream.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.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-sql-application\",\n });\n\n var exampleLogStream = new Aws.CloudWatch.LogStream(\"example\", new()\n {\n Name = \"example-sql-application\",\n LogGroupName = example.Name,\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-sql-application\",\n RuntimeEnvironment = \"SQL-1_0\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n TextContent = @\"SELECT 1;\n\",\n },\n CodeContentType = \"PLAINTEXT\",\n },\n SqlApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs\n {\n Input = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs\n {\n NamePrefix = \"PREFIX_1\",\n InputParallelism = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs\n {\n Count = 3,\n },\n InputSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"VARCHAR(8)\",\n Mapping = \"MAPPING-1\",\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs\n {\n Name = \"COLUMN_2\",\n SqlType = \"DOUBLE\",\n },\n },\n RecordEncoding = \"UTF-8\",\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs\n {\n RecordFormatType = \"CSV\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs\n {\n CsvMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs\n {\n RecordColumnDelimiter = \",\",\n RecordRowDelimiter = @\"\n\",\n },\n },\n },\n },\n KinesisStreamsInput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs\n {\n ResourceArn = exampleAwsKinesisStream.Arn,\n },\n },\n Outputs = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_1\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"JSON\",\n },\n LambdaOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs\n {\n ResourceArn = exampleAwsLambdaFunction.Arn,\n },\n },\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs\n {\n Name = \"OUTPUT_2\",\n DestinationSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs\n {\n RecordFormatType = \"CSV\",\n },\n KinesisFirehoseOutput = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs\n {\n ResourceArn = exampleAwsKinesisFirehoseDeliveryStream.Arn,\n },\n },\n },\n ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs\n {\n TableName = \"TABLE-1\",\n ReferenceSchema = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs\n {\n RecordColumns = new[]\n {\n new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs\n {\n Name = \"COLUMN_1\",\n SqlType = \"INTEGER\",\n },\n },\n RecordFormat = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs\n {\n RecordFormatType = \"JSON\",\n MappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs\n {\n JsonMappingParameters = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs\n {\n RecordRowPath = \"$\",\n },\n },\n },\n },\n S3ReferenceDataSource = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs\n {\n BucketArn = exampleAwsS3Bucket.Arn,\n FileKey = \"KEY-1\",\n },\n },\n },\n },\n CloudwatchLoggingOptions = new Aws.KinesisAnalyticsV2.Inputs.ApplicationCloudwatchLoggingOptionsArgs\n {\n LogStreamArn = exampleLogStream.Arn,\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/kinesisanalyticsv2\"\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-sql-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogStream, err := cloudwatch.NewLogStream(ctx, \"example\", \u0026cloudwatch.LogStreamArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tLogGroupName: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-sql-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"SQL-1_0\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tTextContent: pulumi.String(\"SELECT 1;\\n\"),\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"PLAINTEXT\"),\n\t\t\t\t},\n\t\t\t\tSqlApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs{\n\t\t\t\t\tInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputTypeArgs{\n\t\t\t\t\t\tNamePrefix: pulumi.String(\"PREFIX_1\"),\n\t\t\t\t\t\tInputParallelism: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(3),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInputSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"VARCHAR(8)\"),\n\t\t\t\t\t\t\t\t\tMapping: pulumi.String(\"MAPPING-1\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_2\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"DOUBLE\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordEncoding: pulumi.String(\"UTF-8\"),\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tCsvMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordColumnDelimiter: pulumi.String(\",\"),\n\t\t\t\t\t\t\t\t\t\tRecordRowDelimiter: pulumi.String(\"\\n\"),\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\tKinesisStreamsInput: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs{\n\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tOutputs: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArray{\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_1\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tLambdaOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputTypeArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"OUTPUT_2\"),\n\t\t\t\t\t\t\tDestinationSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"CSV\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tKinesisFirehoseOutput: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs{\n\t\t\t\t\t\t\t\tResourceArn: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.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\tReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs{\n\t\t\t\t\t\tTableName: pulumi.String(\"TABLE-1\"),\n\t\t\t\t\t\tReferenceSchema: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs{\n\t\t\t\t\t\t\tRecordColumns: kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArray{\n\t\t\t\t\t\t\t\t\u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs{\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"COLUMN_1\"),\n\t\t\t\t\t\t\t\t\tSqlType: pulumi.String(\"INTEGER\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tRecordFormat: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs{\n\t\t\t\t\t\t\t\tRecordFormatType: pulumi.String(\"JSON\"),\n\t\t\t\t\t\t\t\tMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs{\n\t\t\t\t\t\t\t\t\tJsonMappingParameters: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs{\n\t\t\t\t\t\t\t\t\t\tRecordRowPath: pulumi.String(\"$\"),\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\tS3ReferenceDataSource: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs{\n\t\t\t\t\t\t\tBucketArn: pulumi.Any(exampleAwsS3Bucket.Arn),\n\t\t\t\t\t\t\tFileKey: pulumi.String(\"KEY-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\tCloudwatchLoggingOptions: \u0026kinesisanalyticsv2.ApplicationCloudwatchLoggingOptionsArgs{\n\t\t\t\tLogStreamArn: exampleLogStream.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.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.LogStream;\nimport com.pulumi.aws.cloudwatch.LogStreamArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationCloudwatchLoggingOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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-sql-application\")\n .build());\n\n var exampleLogStream = new LogStream(\"exampleLogStream\", LogStreamArgs.builder()\n .name(\"example-sql-application\")\n .logGroupName(example.name())\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-sql-application\")\n .runtimeEnvironment(\"SQL-1_0\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .textContent(\"\"\"\nSELECT 1;\n \"\"\")\n .build())\n .codeContentType(\"PLAINTEXT\")\n .build())\n .sqlApplicationConfiguration(ApplicationApplicationConfigurationSqlApplicationConfigurationArgs.builder()\n .input(ApplicationApplicationConfigurationSqlApplicationConfigurationInputArgs.builder()\n .namePrefix(\"PREFIX_1\")\n .inputParallelism(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputParallelismArgs.builder()\n .count(3)\n .build())\n .inputSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaArgs.builder()\n .recordColumns( \n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"VARCHAR(8)\")\n .mapping(\"MAPPING-1\")\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_2\")\n .sqlType(\"DOUBLE\")\n .build())\n .recordEncoding(\"UTF-8\")\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatArgs.builder()\n .recordFormatType(\"CSV\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersArgs.builder()\n .csvMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationInputInputSchemaRecordFormatMappingParametersCsvMappingParametersArgs.builder()\n .recordColumnDelimiter(\",\")\n .recordRowDelimiter(\"\"\"\n\n \"\"\")\n .build())\n .build())\n .build())\n .build())\n .kinesisStreamsInput(ApplicationApplicationConfigurationSqlApplicationConfigurationInputKinesisStreamsInputArgs.builder()\n .resourceArn(exampleAwsKinesisStream.arn())\n .build())\n .build())\n .outputs( \n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_1\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"JSON\")\n .build())\n .lambdaOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputLambdaOutputArgs.builder()\n .resourceArn(exampleAwsLambdaFunction.arn())\n .build())\n .build(),\n ApplicationApplicationConfigurationSqlApplicationConfigurationOutputArgs.builder()\n .name(\"OUTPUT_2\")\n .destinationSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputDestinationSchemaArgs.builder()\n .recordFormatType(\"CSV\")\n .build())\n .kinesisFirehoseOutput(ApplicationApplicationConfigurationSqlApplicationConfigurationOutputKinesisFirehoseOutputArgs.builder()\n .resourceArn(exampleAwsKinesisFirehoseDeliveryStream.arn())\n .build())\n .build())\n .referenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceArgs.builder()\n .tableName(\"TABLE-1\")\n .referenceSchema(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaArgs.builder()\n .recordColumns(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordColumnArgs.builder()\n .name(\"COLUMN_1\")\n .sqlType(\"INTEGER\")\n .build())\n .recordFormat(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatArgs.builder()\n .recordFormatType(\"JSON\")\n .mappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersArgs.builder()\n .jsonMappingParameters(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceReferenceSchemaRecordFormatMappingParametersJsonMappingParametersArgs.builder()\n .recordRowPath(\"$\")\n .build())\n .build())\n .build())\n .build())\n .s3ReferenceDataSource(ApplicationApplicationConfigurationSqlApplicationConfigurationReferenceDataSourceS3ReferenceDataSourceArgs.builder()\n .bucketArn(exampleAwsS3Bucket.arn())\n .fileKey(\"KEY-1\")\n .build())\n .build())\n .build())\n .build())\n .cloudwatchLoggingOptions(ApplicationCloudwatchLoggingOptionsArgs.builder()\n .logStreamArn(exampleLogStream.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-sql-application\n exampleLogStream:\n type: aws:cloudwatch:LogStream\n name: example\n properties:\n name: example-sql-application\n logGroupName: ${example.name}\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-sql-application\n runtimeEnvironment: SQL-1_0\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n textContent: |\n SELECT 1;\n codeContentType: PLAINTEXT\n sqlApplicationConfiguration:\n input:\n namePrefix: PREFIX_1\n inputParallelism:\n count: 3\n inputSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: VARCHAR(8)\n mapping: MAPPING-1\n - name: COLUMN_2\n sqlType: DOUBLE\n recordEncoding: UTF-8\n recordFormat:\n recordFormatType: CSV\n mappingParameters:\n csvMappingParameters:\n recordColumnDelimiter: ','\n recordRowDelimiter: |2+\n kinesisStreamsInput:\n resourceArn: ${exampleAwsKinesisStream.arn}\n outputs:\n - name: OUTPUT_1\n destinationSchema:\n recordFormatType: JSON\n lambdaOutput:\n resourceArn: ${exampleAwsLambdaFunction.arn}\n - name: OUTPUT_2\n destinationSchema:\n recordFormatType: CSV\n kinesisFirehoseOutput:\n resourceArn: ${exampleAwsKinesisFirehoseDeliveryStream.arn}\n referenceDataSource:\n tableName: TABLE-1\n referenceSchema:\n recordColumns:\n - name: COLUMN_1\n sqlType: INTEGER\n recordFormat:\n recordFormatType: JSON\n mappingParameters:\n jsonMappingParameters:\n recordRowPath: $\n s3ReferenceDataSource:\n bucketArn: ${exampleAwsS3Bucket.arn}\n fileKey: KEY-1\n cloudwatchLoggingOptions:\n logStreamArn: ${exampleLogStream.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC 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.s3.BucketV2(\"example\", {bucket: \"example-flink-application\"});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n bucket: example.id,\n key: \"example-flink-application\",\n source: new pulumi.asset.FileAsset(\"flink-app.jar\"),\n});\nconst exampleApplication = new aws.kinesisanalyticsv2.Application(\"example\", {\n name: \"example-flink-application\",\n runtimeEnvironment: \"FLINK-1_8\",\n serviceExecutionRole: exampleAwsIamRole.arn,\n applicationConfiguration: {\n applicationCodeConfiguration: {\n codeContent: {\n s3ContentLocation: {\n bucketArn: example.arn,\n fileKey: exampleBucketObjectv2.key,\n },\n },\n codeContentType: \"ZIPFILE\",\n },\n vpcConfiguration: {\n securityGroupIds: [\n exampleAwsSecurityGroup[0].id,\n exampleAwsSecurityGroup[1].id,\n ],\n subnetIds: [exampleAwsSubnet.id],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-flink-application\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n bucket=example.id,\n key=\"example-flink-application\",\n source=pulumi.FileAsset(\"flink-app.jar\"))\nexample_application = aws.kinesisanalyticsv2.Application(\"example\",\n name=\"example-flink-application\",\n runtime_environment=\"FLINK-1_8\",\n service_execution_role=example_aws_iam_role[\"arn\"],\n application_configuration={\n \"application_code_configuration\": {\n \"code_content\": {\n \"s3_content_location\": {\n \"bucket_arn\": example.arn,\n \"file_key\": example_bucket_objectv2.key,\n },\n },\n \"code_content_type\": \"ZIPFILE\",\n },\n \"vpc_configuration\": {\n \"security_group_ids\": [\n example_aws_security_group[0][\"id\"],\n example_aws_security_group[1][\"id\"],\n ],\n \"subnet_ids\": [example_aws_subnet[\"id\"]],\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.BucketV2(\"example\", new()\n {\n Bucket = \"example-flink-application\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Bucket = example.Id,\n Key = \"example-flink-application\",\n Source = new FileAsset(\"flink-app.jar\"),\n });\n\n var exampleApplication = new Aws.KinesisAnalyticsV2.Application(\"example\", new()\n {\n Name = \"example-flink-application\",\n RuntimeEnvironment = \"FLINK-1_8\",\n ServiceExecutionRole = exampleAwsIamRole.Arn,\n ApplicationConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationArgs\n {\n ApplicationCodeConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs\n {\n CodeContent = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs\n {\n S3ContentLocation = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs\n {\n BucketArn = example.Arn,\n FileKey = exampleBucketObjectv2.Key,\n },\n },\n CodeContentType = \"ZIPFILE\",\n },\n VpcConfiguration = new Aws.KinesisAnalyticsV2.Inputs.ApplicationApplicationConfigurationVpcConfigurationArgs\n {\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup[0].Id,\n exampleAwsSecurityGroup[1].Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesisanalyticsv2\"\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(\"example-flink-application\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketObjectv2, err := s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tKey: pulumi.String(\"example-flink-application\"),\n\t\t\tSource: pulumi.NewFileAsset(\"flink-app.jar\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = kinesisanalyticsv2.NewApplication(ctx, \"example\", \u0026kinesisanalyticsv2.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example-flink-application\"),\n\t\t\tRuntimeEnvironment: pulumi.String(\"FLINK-1_8\"),\n\t\t\tServiceExecutionRole: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tApplicationConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationArgs{\n\t\t\t\tApplicationCodeConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs{\n\t\t\t\t\tCodeContent: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs{\n\t\t\t\t\t\tS3ContentLocation: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs{\n\t\t\t\t\t\t\tBucketArn: example.Arn,\n\t\t\t\t\t\t\tFileKey: exampleBucketObjectv2.Key,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tCodeContentType: pulumi.String(\"ZIPFILE\"),\n\t\t\t\t},\n\t\t\t\tVpcConfiguration: \u0026kinesisanalyticsv2.ApplicationApplicationConfigurationVpcConfigurationArgs{\n\t\t\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSecurityGroup[0].Id,\n\t\t\t\t\t\texampleAwsSecurityGroup[1].Id,\n\t\t\t\t\t},\n\t\t\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\t\t\texampleAwsSubnet.Id,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.kinesisanalyticsv2.Application;\nimport com.pulumi.aws.kinesisanalyticsv2.ApplicationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs;\nimport com.pulumi.aws.kinesisanalyticsv2.inputs.ApplicationApplicationConfigurationVpcConfigurationArgs;\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 example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-flink-application\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .bucket(example.id())\n .key(\"example-flink-application\")\n .source(new FileAsset(\"flink-app.jar\"))\n .build());\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example-flink-application\")\n .runtimeEnvironment(\"FLINK-1_8\")\n .serviceExecutionRole(exampleAwsIamRole.arn())\n .applicationConfiguration(ApplicationApplicationConfigurationArgs.builder()\n .applicationCodeConfiguration(ApplicationApplicationConfigurationApplicationCodeConfigurationArgs.builder()\n .codeContent(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentArgs.builder()\n .s3ContentLocation(ApplicationApplicationConfigurationApplicationCodeConfigurationCodeContentS3ContentLocationArgs.builder()\n .bucketArn(example.arn())\n .fileKey(exampleBucketObjectv2.key())\n .build())\n .build())\n .codeContentType(\"ZIPFILE\")\n .build())\n .vpcConfiguration(ApplicationApplicationConfigurationVpcConfigurationArgs.builder()\n .securityGroupIds( \n exampleAwsSecurityGroup[0].id(),\n exampleAwsSecurityGroup[1].id())\n .subnetIds(exampleAwsSubnet.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-flink-application\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n bucket: ${example.id}\n key: example-flink-application\n source:\n fn::FileAsset: flink-app.jar\n exampleApplication:\n type: aws:kinesisanalyticsv2:Application\n name: example\n properties:\n name: example-flink-application\n runtimeEnvironment: FLINK-1_8\n serviceExecutionRole: ${exampleAwsIamRole.arn}\n applicationConfiguration:\n applicationCodeConfiguration:\n codeContent:\n s3ContentLocation:\n bucketArn: ${example.arn}\n fileKey: ${exampleBucketObjectv2.key}\n codeContentType: ZIPFILE\n vpcConfiguration:\n securityGroupIds:\n - ${exampleAwsSecurityGroup[0].id}\n - ${exampleAwsSecurityGroup[1].id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_kinesisanalyticsv2_application` using the application ARN. For example:\n\n```sh\n$ pulumi import aws:kinesisanalyticsv2/application:Application example arn:aws:kinesisanalytics:us-west-2:123456789012:application/example-sql-application\n```\n", "properties": { "applicationConfiguration": { "$ref": "#/types/aws:kinesisanalyticsv2/ApplicationApplicationConfiguration:ApplicationApplicationConfiguration", @@ -291186,7 +291186,7 @@ } }, "aws:lambda/alias:Alias": { - "description": "Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\nFor information about function aliases, see [CreateAlias](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateAlias.html) and [AliasRoutingConfiguration](https://docs.aws.amazon.com/lambda/latest/dg/API_AliasRoutingConfiguration.html) in the API docs.\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 testLambdaAlias = new aws.lambda.Alias(\"test_lambda_alias\", {\n name: \"my_alias\",\n description: \"a sample description\",\n functionName: lambdaFunctionTest.arn,\n functionVersion: \"1\",\n routingConfig: {\n additionalVersionWeights: {\n \"2\": 0.5,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_lambda_alias = aws.lambda_.Alias(\"test_lambda_alias\",\n name=\"my_alias\",\n description=\"a sample description\",\n function_name=lambda_function_test[\"arn\"],\n function_version=\"1\",\n routing_config={\n \"additional_version_weights\": {\n \"_2\": 0.5,\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 testLambdaAlias = new Aws.Lambda.Alias(\"test_lambda_alias\", new()\n {\n Name = \"my_alias\",\n Description = \"a sample description\",\n FunctionName = lambdaFunctionTest.Arn,\n FunctionVersion = \"1\",\n RoutingConfig = new Aws.Lambda.Inputs.AliasRoutingConfigArgs\n {\n AdditionalVersionWeights = \n {\n { \"2\", 0.5 },\n },\n },\n });\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.NewAlias(ctx, \"test_lambda_alias\", \u0026lambda.AliasArgs{\n\t\t\tName: pulumi.String(\"my_alias\"),\n\t\t\tDescription: pulumi.String(\"a sample description\"),\n\t\t\tFunctionName: pulumi.Any(lambdaFunctionTest.Arn),\n\t\t\tFunctionVersion: pulumi.String(\"1\"),\n\t\t\tRoutingConfig: \u0026lambda.AliasRoutingConfigArgs{\n\t\t\t\tAdditionalVersionWeights: pulumi.Float64Map{\n\t\t\t\t\t\"2\": pulumi.Float64(0.5),\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.lambda.Alias;\nimport com.pulumi.aws.lambda.AliasArgs;\nimport com.pulumi.aws.lambda.inputs.AliasRoutingConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testLambdaAlias = new Alias(\"testLambdaAlias\", AliasArgs.builder()\n .name(\"my_alias\")\n .description(\"a sample description\")\n .functionName(lambdaFunctionTest.arn())\n .functionVersion(\"1\")\n .routingConfig(AliasRoutingConfigArgs.builder()\n .additionalVersionWeights(Map.of(\"2\", 0.5))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testLambdaAlias:\n type: aws:lambda:Alias\n name: test_lambda_alias\n properties:\n name: my_alias\n description: a sample description\n functionName: ${lambdaFunctionTest.arn}\n functionVersion: '1'\n routingConfig:\n additionalVersionWeights:\n '2': 0.5\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda Function Aliases using the `function_name/alias`. For example:\n\n```sh\n$ pulumi import aws:lambda/alias:Alias test_lambda_alias my_test_lambda_function/my_alias\n```\n", + "description": "Creates a Lambda function alias. Creates an alias that points to the specified Lambda function version.\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\nFor information about function aliases, see [CreateAlias](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateAlias.html) and [AliasRoutingConfiguration](https://docs.aws.amazon.com/lambda/latest/dg/API_AliasRoutingConfiguration.html) in the API docs.\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 testLambdaAlias = new aws.lambda.Alias(\"test_lambda_alias\", {\n name: \"my_alias\",\n description: \"a sample description\",\n functionName: lambdaFunctionTest.arn,\n functionVersion: \"1\",\n routingConfig: {\n additionalVersionWeights: {\n \"2\": 0.5,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_lambda_alias = aws.lambda_.Alias(\"test_lambda_alias\",\n name=\"my_alias\",\n description=\"a sample description\",\n function_name=lambda_function_test[\"arn\"],\n function_version=\"1\",\n routing_config={\n \"additional_version_weights\": {\n \"2\": 0.5,\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 testLambdaAlias = new Aws.Lambda.Alias(\"test_lambda_alias\", new()\n {\n Name = \"my_alias\",\n Description = \"a sample description\",\n FunctionName = lambdaFunctionTest.Arn,\n FunctionVersion = \"1\",\n RoutingConfig = new Aws.Lambda.Inputs.AliasRoutingConfigArgs\n {\n AdditionalVersionWeights = \n {\n { \"2\", 0.5 },\n },\n },\n });\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.NewAlias(ctx, \"test_lambda_alias\", \u0026lambda.AliasArgs{\n\t\t\tName: pulumi.String(\"my_alias\"),\n\t\t\tDescription: pulumi.String(\"a sample description\"),\n\t\t\tFunctionName: pulumi.Any(lambdaFunctionTest.Arn),\n\t\t\tFunctionVersion: pulumi.String(\"1\"),\n\t\t\tRoutingConfig: \u0026lambda.AliasRoutingConfigArgs{\n\t\t\t\tAdditionalVersionWeights: pulumi.Float64Map{\n\t\t\t\t\t\"2\": pulumi.Float64(0.5),\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.lambda.Alias;\nimport com.pulumi.aws.lambda.AliasArgs;\nimport com.pulumi.aws.lambda.inputs.AliasRoutingConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testLambdaAlias = new Alias(\"testLambdaAlias\", AliasArgs.builder()\n .name(\"my_alias\")\n .description(\"a sample description\")\n .functionName(lambdaFunctionTest.arn())\n .functionVersion(\"1\")\n .routingConfig(AliasRoutingConfigArgs.builder()\n .additionalVersionWeights(Map.of(\"2\", 0.5))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testLambdaAlias:\n type: aws:lambda:Alias\n name: test_lambda_alias\n properties:\n name: my_alias\n description: a sample description\n functionName: ${lambdaFunctionTest.arn}\n functionVersion: '1'\n routingConfig:\n additionalVersionWeights:\n '2': 0.5\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda Function Aliases using the `function_name/alias`. For example:\n\n```sh\n$ pulumi import aws:lambda/alias:Alias test_lambda_alias my_test_lambda_function/my_alias\n```\n", "properties": { "arn": { "type": "string", @@ -291797,7 +291797,7 @@ } }, "aws:lambda/eventSourceMapping:EventSourceMapping": { - "description": "Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB, SQS, Amazon MQ and Managed Streaming for Apache Kafka (MSK).\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html).\nFor information about event source mappings, see [CreateEventSourceMapping](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html) in the API docs.\n\n## Example Usage\n\n### DynamoDB\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsDynamodbTable.streamArn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n tags: {\n Name: \"dynamodb\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_dynamodb_table[\"streamArn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\",\n tags={\n \"Name\": \"dynamodb\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsDynamodbTable.StreamArn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n Tags = \n {\n { \"Name\", \"dynamodb\" },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsDynamodbTable.StreamArn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsDynamodbTable.streamArn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .tags(Map.of(\"Name\", \"dynamodb\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsDynamodbTable.streamArn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n tags:\n Name: dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Kinesis\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsKinesisStream.arn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_kinesis_stream[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsKinesisStream.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsKinesisStream.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsKinesisStream.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managed Streaming for Apache Kafka (MSK)\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsMskCluster.arn,\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_msk_cluster[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsMskCluster.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsMskCluster.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsMskCluster.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Self Managed Apache Kafka\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.lambda.EventSourceMapping(\"example\", {\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n selfManagedEventSource: {\n endpoints: {\n KAFKA_BOOTSTRAP_SERVERS: \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n sourceAccessConfigurations: [\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example1\",\n },\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example2\",\n },\n {\n type: \"VPC_SECURITY_GROUP\",\n uri: \"security_group:sg-example\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\",\n self_managed_event_source={\n \"endpoints\": {\n \"kafk_a__bootstra_p__servers\": \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n source_access_configurations=[\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example1\",\n },\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example2\",\n },\n {\n \"type\": \"VPC_SECURITY_GROUP\",\n \"uri\": \"security_group:sg-example\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs\n {\n Endpoints = \n {\n { \"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\" },\n },\n },\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example1\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example2\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SECURITY_GROUP\",\n Uri = \"security_group:sg-example\",\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t\tSelfManagedEventSource: \u0026lambda.EventSourceMappingSelfManagedEventSourceArgs{\n\t\t\t\tEndpoints: pulumi.StringMap{\n\t\t\t\t\t\"KAFKA_BOOTSTRAP_SERVERS\": pulumi.String(\"kafka1.example.com:9092,kafka2.example.com:9092\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example1\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example2\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SECURITY_GROUP\"),\n\t\t\t\t\tUri: pulumi.String(\"security_group:sg-example\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()\n .endpoints(Map.of(\"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\"))\n .build())\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example1\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example2\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SECURITY_GROUP\")\n .uri(\"security_group:sg-example\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n selfManagedEventSource:\n endpoints:\n KAFKA_BOOTSTRAP_SERVERS: kafka1.example.com:9092,kafka2.example.com:9092\n sourceAccessConfigurations:\n - type: VPC_SUBNET\n uri: subnet:subnet-example1\n - type: VPC_SUBNET\n uri: subnet:subnet-example2\n - type: VPC_SECURITY_GROUP\n uri: security_group:sg-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS with event filter\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n body: {\n Temperature: [{\n numeric: [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n Location: [\"New York\"],\n },\n }),\n }],\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n filter_criteria={\n \"filters\": [{\n \"pattern\": json.dumps({\n \"body\": {\n \"temperature\": [{\n \"numeric\": [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n \"location\": [\"New York\"],\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"body\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Temperature\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"numeric\"] = new object?[]\n {\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n },\n },\n },\n [\"Location\"] = new[]\n {\n \"New York\",\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/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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"body\": map[string]interface{}{\n\t\t\t\t\"Temperature\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"numeric\": []interface{}{\n\t\t\t\t\t\t\t\"\u003e\",\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\"\u003c=\",\n\t\t\t\t\t\t\t100,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Location\": []string{\n\t\t\t\t\t\"New York\",\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 = lambda.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tFilterCriteria: \u0026lambda.EventSourceMappingFilterCriteriaArgs{\n\t\t\t\tFilters: lambda.EventSourceMappingFilterCriteriaFilterArray{\n\t\t\t\t\t\u0026lambda.EventSourceMappingFilterCriteriaFilterArgs{\n\t\t\t\t\t\tPattern: pulumi.String(json0),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;\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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()\n .filters(EventSourceMappingFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"body\", jsonObject(\n jsonProperty(\"Temperature\", jsonArray(jsonObject(\n jsonProperty(\"numeric\", jsonArray(\n \"\u003e\", \n 0, \n \"\u003c=\", \n 100\n ))\n ))),\n jsonProperty(\"Location\", jsonArray(\"New York\"))\n ))\n )))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n body:\n Temperature:\n - numeric:\n - '\u003e'\n - 0\n - \u003c=\n - 100\n Location:\n - New York\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (ActiveMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 10,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [{\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=10,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[{\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 10,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(10),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(10)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 10\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (RabbitMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 1,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [\n {\n type: \"VIRTUAL_HOST\",\n uri: \"/example\",\n },\n {\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=1,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[\n {\n \"type\": \"VIRTUAL_HOST\",\n \"uri\": \"/example\",\n },\n {\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 1,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VIRTUAL_HOST\",\n Uri = \"/example\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(1),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VIRTUAL_HOST\"),\n\t\t\t\t\tUri: pulumi.String(\"/example\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(1)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VIRTUAL_HOST\")\n .uri(\"/example\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 1\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: VIRTUAL_HOST\n uri: /example\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda event source mappings using the `UUID` (event source mapping identifier). For example:\n\n```sh\n$ pulumi import aws:lambda/eventSourceMapping:EventSourceMapping event_source_mapping 12345kxodurf3443\n```\n", + "description": "Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB, SQS, Amazon MQ and Managed Streaming for Apache Kafka (MSK).\n\nFor information about Lambda and how to use it, see [What is AWS Lambda?](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html).\nFor information about event source mappings, see [CreateEventSourceMapping](http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html) in the API docs.\n\n## Example Usage\n\n### DynamoDB\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsDynamodbTable.streamArn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n tags: {\n Name: \"dynamodb\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_dynamodb_table[\"streamArn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\",\n tags={\n \"Name\": \"dynamodb\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsDynamodbTable.StreamArn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n Tags = \n {\n { \"Name\", \"dynamodb\" },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsDynamodbTable.StreamArn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsDynamodbTable.streamArn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .tags(Map.of(\"Name\", \"dynamodb\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsDynamodbTable.streamArn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n tags:\n Name: dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Kinesis\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsKinesisStream.arn,\n functionName: exampleAwsLambdaFunction.arn,\n startingPosition: \"LATEST\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_kinesis_stream[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n starting_position=\"LATEST\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsKinesisStream.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n StartingPosition = \"LATEST\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsKinesisStream.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tStartingPosition: pulumi.String(\"LATEST\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsKinesisStream.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .startingPosition(\"LATEST\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsKinesisStream.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n startingPosition: LATEST\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managed Streaming for Apache Kafka (MSK)\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: exampleAwsMskCluster.arn,\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=example_aws_msk_cluster[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\")\n```\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = exampleAwsMskCluster.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(exampleAwsMskCluster.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${exampleAwsMskCluster.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Self Managed Apache Kafka\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.lambda.EventSourceMapping(\"example\", {\n functionName: exampleAwsLambdaFunction.arn,\n topics: [\"Example\"],\n startingPosition: \"TRIM_HORIZON\",\n selfManagedEventSource: {\n endpoints: {\n KAFKA_BOOTSTRAP_SERVERS: \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n sourceAccessConfigurations: [\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example1\",\n },\n {\n type: \"VPC_SUBNET\",\n uri: \"subnet:subnet-example2\",\n },\n {\n type: \"VPC_SECURITY_GROUP\",\n uri: \"security_group:sg-example\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n function_name=example_aws_lambda_function[\"arn\"],\n topics=[\"Example\"],\n starting_position=\"TRIM_HORIZON\",\n self_managed_event_source={\n \"endpoints\": {\n \"KAFKA_BOOTSTRAP_SERVERS\": \"kafka1.example.com:9092,kafka2.example.com:9092\",\n },\n },\n source_access_configurations=[\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example1\",\n },\n {\n \"type\": \"VPC_SUBNET\",\n \"uri\": \"subnet:subnet-example2\",\n },\n {\n \"type\": \"VPC_SECURITY_GROUP\",\n \"uri\": \"security_group:sg-example\",\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.Lambda.EventSourceMapping(\"example\", new()\n {\n FunctionName = exampleAwsLambdaFunction.Arn,\n Topics = new[]\n {\n \"Example\",\n },\n StartingPosition = \"TRIM_HORIZON\",\n SelfManagedEventSource = new Aws.Lambda.Inputs.EventSourceMappingSelfManagedEventSourceArgs\n {\n Endpoints = \n {\n { \"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\" },\n },\n },\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example1\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SUBNET\",\n Uri = \"subnet:subnet-example2\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VPC_SECURITY_GROUP\",\n Uri = \"security_group:sg-example\",\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tTopics: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Example\"),\n\t\t\t},\n\t\t\tStartingPosition: pulumi.String(\"TRIM_HORIZON\"),\n\t\t\tSelfManagedEventSource: \u0026lambda.EventSourceMappingSelfManagedEventSourceArgs{\n\t\t\t\tEndpoints: pulumi.StringMap{\n\t\t\t\t\t\"KAFKA_BOOTSTRAP_SERVERS\": pulumi.String(\"kafka1.example.com:9092,kafka2.example.com:9092\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example1\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SUBNET\"),\n\t\t\t\t\tUri: pulumi.String(\"subnet:subnet-example2\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VPC_SECURITY_GROUP\"),\n\t\t\t\t\tUri: pulumi.String(\"security_group:sg-example\"),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .functionName(exampleAwsLambdaFunction.arn())\n .topics(\"Example\")\n .startingPosition(\"TRIM_HORIZON\")\n .selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs.builder()\n .endpoints(Map.of(\"KAFKA_BOOTSTRAP_SERVERS\", \"kafka1.example.com:9092,kafka2.example.com:9092\"))\n .build())\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example1\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SUBNET\")\n .uri(\"subnet:subnet-example2\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VPC_SECURITY_GROUP\")\n .uri(\"security_group:sg-example\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n functionName: ${exampleAwsLambdaFunction.arn}\n topics:\n - Example\n startingPosition: TRIM_HORIZON\n selfManagedEventSource:\n endpoints:\n KAFKA_BOOTSTRAP_SERVERS: kafka1.example.com:9092,kafka2.example.com:9092\n sourceAccessConfigurations:\n - type: VPC_SUBNET\n uri: subnet:subnet-example1\n - type: VPC_SUBNET\n uri: subnet:subnet-example2\n - type: VPC_SECURITY_GROUP\n uri: security_group:sg-example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS with event filter\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.lambda.EventSourceMapping(\"example\", {\n eventSourceArn: sqsQueueTest.arn,\n functionName: exampleAwsLambdaFunction.arn,\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n body: {\n Temperature: [{\n numeric: [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n Location: [\"New York\"],\n },\n }),\n }],\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n event_source_arn=sqs_queue_test[\"arn\"],\n function_name=example_aws_lambda_function[\"arn\"],\n filter_criteria={\n \"filters\": [{\n \"pattern\": json.dumps({\n \"body\": {\n \"Temperature\": [{\n \"numeric\": [\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n ],\n }],\n \"Location\": [\"New York\"],\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.Lambda.EventSourceMapping(\"example\", new()\n {\n EventSourceArn = sqsQueueTest.Arn,\n FunctionName = exampleAwsLambdaFunction.Arn,\n FilterCriteria = new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"body\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Temperature\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"numeric\"] = new object?[]\n {\n \"\u003e\",\n 0,\n \"\u003c=\",\n 100,\n },\n },\n },\n [\"Location\"] = new[]\n {\n \"New York\",\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/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\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"body\": map[string]interface{}{\n\t\t\t\t\"Temperature\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"numeric\": []interface{}{\n\t\t\t\t\t\t\t\"\u003e\",\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\"\u003c=\",\n\t\t\t\t\t\t\t100,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Location\": []string{\n\t\t\t\t\t\"New York\",\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 = lambda.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tEventSourceArn: pulumi.Any(sqsQueueTest.Arn),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tFilterCriteria: \u0026lambda.EventSourceMappingFilterCriteriaArgs{\n\t\t\t\tFilters: lambda.EventSourceMappingFilterCriteriaFilterArray{\n\t\t\t\t\t\u0026lambda.EventSourceMappingFilterCriteriaFilterArgs{\n\t\t\t\t\t\tPattern: pulumi.String(json0),\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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;\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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .eventSourceArn(sqsQueueTest.arn())\n .functionName(exampleAwsLambdaFunction.arn())\n .filterCriteria(EventSourceMappingFilterCriteriaArgs.builder()\n .filters(EventSourceMappingFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"body\", jsonObject(\n jsonProperty(\"Temperature\", jsonArray(jsonObject(\n jsonProperty(\"numeric\", jsonArray(\n \"\u003e\", \n 0, \n \"\u003c=\", \n 100\n ))\n ))),\n jsonProperty(\"Location\", jsonArray(\"New York\"))\n ))\n )))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n eventSourceArn: ${sqsQueueTest.arn}\n functionName: ${exampleAwsLambdaFunction.arn}\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n body:\n Temperature:\n - numeric:\n - '\u003e'\n - 0\n - \u003c=\n - 100\n Location:\n - New York\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (ActiveMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 10,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [{\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=10,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[{\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 10,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(10),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(10)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 10\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Amazon MQ (RabbitMQ)\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.lambda.EventSourceMapping(\"example\", {\n batchSize: 1,\n eventSourceArn: exampleAwsMqBroker.arn,\n enabled: true,\n functionName: exampleAwsLambdaFunction.arn,\n queues: \"example\",\n sourceAccessConfigurations: [\n {\n type: \"VIRTUAL_HOST\",\n uri: \"/example\",\n },\n {\n type: \"BASIC_AUTH\",\n uri: exampleAwsSecretsmanagerSecretVersion.arn,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lambda_.EventSourceMapping(\"example\",\n batch_size=1,\n event_source_arn=example_aws_mq_broker[\"arn\"],\n enabled=True,\n function_name=example_aws_lambda_function[\"arn\"],\n queues=\"example\",\n source_access_configurations=[\n {\n \"type\": \"VIRTUAL_HOST\",\n \"uri\": \"/example\",\n },\n {\n \"type\": \"BASIC_AUTH\",\n \"uri\": example_aws_secretsmanager_secret_version[\"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.Lambda.EventSourceMapping(\"example\", new()\n {\n BatchSize = 1,\n EventSourceArn = exampleAwsMqBroker.Arn,\n Enabled = true,\n FunctionName = exampleAwsLambdaFunction.Arn,\n Queues = \"example\",\n SourceAccessConfigurations = new[]\n {\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"VIRTUAL_HOST\",\n Uri = \"/example\",\n },\n new Aws.Lambda.Inputs.EventSourceMappingSourceAccessConfigurationArgs\n {\n Type = \"BASIC_AUTH\",\n Uri = exampleAwsSecretsmanagerSecretVersion.Arn,\n },\n },\n });\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.NewEventSourceMapping(ctx, \"example\", \u0026lambda.EventSourceMappingArgs{\n\t\t\tBatchSize: pulumi.Int(1),\n\t\t\tEventSourceArn: pulumi.Any(exampleAwsMqBroker.Arn),\n\t\t\tEnabled: pulumi.Bool(true),\n\t\t\tFunctionName: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tQueues: pulumi.String(\"example\"),\n\t\t\tSourceAccessConfigurations: lambda.EventSourceMappingSourceAccessConfigurationArray{\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"VIRTUAL_HOST\"),\n\t\t\t\t\tUri: pulumi.String(\"/example\"),\n\t\t\t\t},\n\t\t\t\t\u0026lambda.EventSourceMappingSourceAccessConfigurationArgs{\n\t\t\t\t\tType: pulumi.String(\"BASIC_AUTH\"),\n\t\t\t\t\tUri: pulumi.Any(exampleAwsSecretsmanagerSecretVersion.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.lambda.EventSourceMapping;\nimport com.pulumi.aws.lambda.EventSourceMappingArgs;\nimport com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 EventSourceMapping(\"example\", EventSourceMappingArgs.builder()\n .batchSize(1)\n .eventSourceArn(exampleAwsMqBroker.arn())\n .enabled(true)\n .functionName(exampleAwsLambdaFunction.arn())\n .queues(\"example\")\n .sourceAccessConfigurations( \n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"VIRTUAL_HOST\")\n .uri(\"/example\")\n .build(),\n EventSourceMappingSourceAccessConfigurationArgs.builder()\n .type(\"BASIC_AUTH\")\n .uri(exampleAwsSecretsmanagerSecretVersion.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lambda:EventSourceMapping\n properties:\n batchSize: 1\n eventSourceArn: ${exampleAwsMqBroker.arn}\n enabled: true\n functionName: ${exampleAwsLambdaFunction.arn}\n queues: example\n sourceAccessConfigurations:\n - type: VIRTUAL_HOST\n uri: /example\n - type: BASIC_AUTH\n uri: ${exampleAwsSecretsmanagerSecretVersion.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lambda event source mappings using the `UUID` (event source mapping identifier). For example:\n\n```sh\n$ pulumi import aws:lambda/eventSourceMapping:EventSourceMapping event_source_mapping 12345kxodurf3443\n```\n", "properties": { "amazonManagedKafkaEventSourceConfig": { "$ref": "#/types/aws:lambda/EventSourceMappingAmazonManagedKafkaEventSourceConfig:EventSourceMappingAmazonManagedKafkaEventSourceConfig", @@ -298397,7 +298397,7 @@ } }, "aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion": { - "description": "Provides a resource to manage a deployment version for your Amazon Lightsail container service.\n\n\u003e **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment.\n\n\u003e **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile.\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.lightsail.ContainerServiceDeploymentVersion(\"example\", {\n containers: [{\n containerName: \"hello-world\",\n image: \"amazon/amazon-lightsail:hello-world\",\n commands: [],\n environment: {\n MY_ENVIRONMENT_VARIABLE: \"my_value\",\n },\n ports: {\n \"80\": \"HTTP\",\n },\n }],\n publicEndpoint: {\n containerName: \"hello-world\",\n containerPort: 80,\n healthCheck: {\n healthyThreshold: 2,\n unhealthyThreshold: 2,\n timeoutSeconds: 2,\n intervalSeconds: 5,\n path: \"/\",\n successCodes: \"200-499\",\n },\n },\n serviceName: exampleAwsLightsailContainerService.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lightsail.ContainerServiceDeploymentVersion(\"example\",\n containers=[{\n \"container_name\": \"hello-world\",\n \"image\": \"amazon/amazon-lightsail:hello-world\",\n \"commands\": [],\n \"environment\": {\n \"m_y__environmen_t__variable\": \"my_value\",\n },\n \"ports\": {\n \"_80\": \"HTTP\",\n },\n }],\n public_endpoint={\n \"container_name\": \"hello-world\",\n \"container_port\": 80,\n \"health_check\": {\n \"healthy_threshold\": 2,\n \"unhealthy_threshold\": 2,\n \"timeout_seconds\": 2,\n \"interval_seconds\": 5,\n \"path\": \"/\",\n \"success_codes\": \"200-499\",\n },\n },\n service_name=example_aws_lightsail_container_service[\"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 = new Aws.LightSail.ContainerServiceDeploymentVersion(\"example\", new()\n {\n Containers = new[]\n {\n new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionContainerArgs\n {\n ContainerName = \"hello-world\",\n Image = \"amazon/amazon-lightsail:hello-world\",\n Commands = new() { },\n Environment = \n {\n { \"MY_ENVIRONMENT_VARIABLE\", \"my_value\" },\n },\n Ports = \n {\n { \"80\", \"HTTP\" },\n },\n },\n },\n PublicEndpoint = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointArgs\n {\n ContainerName = \"hello-world\",\n ContainerPort = 80,\n HealthCheck = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs\n {\n HealthyThreshold = 2,\n UnhealthyThreshold = 2,\n TimeoutSeconds = 2,\n IntervalSeconds = 5,\n Path = \"/\",\n SuccessCodes = \"200-499\",\n },\n },\n ServiceName = exampleAwsLightsailContainerService.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lightsail.NewContainerServiceDeploymentVersion(ctx, \"example\", \u0026lightsail.ContainerServiceDeploymentVersionArgs{\n\t\t\tContainers: lightsail.ContainerServiceDeploymentVersionContainerArray{\n\t\t\t\t\u0026lightsail.ContainerServiceDeploymentVersionContainerArgs{\n\t\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\t\tImage: pulumi.String(\"amazon/amazon-lightsail:hello-world\"),\n\t\t\t\t\tCommands: pulumi.StringArray{},\n\t\t\t\t\tEnvironment: pulumi.StringMap{\n\t\t\t\t\t\t\"MY_ENVIRONMENT_VARIABLE\": pulumi.String(\"my_value\"),\n\t\t\t\t\t},\n\t\t\t\t\tPorts: pulumi.StringMap{\n\t\t\t\t\t\t\"80\": pulumi.String(\"HTTP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPublicEndpoint: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointArgs{\n\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\tContainerPort: pulumi.Int(80),\n\t\t\t\tHealthCheck: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs{\n\t\t\t\t\tHealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tUnhealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tTimeoutSeconds: pulumi.Int(2),\n\t\t\t\t\tIntervalSeconds: pulumi.Int(5),\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t\tSuccessCodes: pulumi.String(\"200-499\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tServiceName: pulumi.Any(exampleAwsLightsailContainerService.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.lightsail.ContainerServiceDeploymentVersion;\nimport com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 ContainerServiceDeploymentVersion(\"example\", ContainerServiceDeploymentVersionArgs.builder()\n .containers(ContainerServiceDeploymentVersionContainerArgs.builder()\n .containerName(\"hello-world\")\n .image(\"amazon/amazon-lightsail:hello-world\")\n .commands()\n .environment(Map.of(\"MY_ENVIRONMENT_VARIABLE\", \"my_value\"))\n .ports(Map.of(\"80\", \"HTTP\"))\n .build())\n .publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()\n .containerName(\"hello-world\")\n .containerPort(80)\n .healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()\n .healthyThreshold(2)\n .unhealthyThreshold(2)\n .timeoutSeconds(2)\n .intervalSeconds(5)\n .path(\"/\")\n .successCodes(\"200-499\")\n .build())\n .build())\n .serviceName(exampleAwsLightsailContainerService.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lightsail:ContainerServiceDeploymentVersion\n properties:\n containers:\n - containerName: hello-world\n image: amazon/amazon-lightsail:hello-world\n commands: []\n environment:\n MY_ENVIRONMENT_VARIABLE: my_value\n ports:\n '80': HTTP\n publicEndpoint:\n containerName: hello-world\n containerPort: 80\n healthCheck:\n healthyThreshold: 2\n unhealthyThreshold: 2\n timeoutSeconds: 2\n intervalSeconds: 5\n path: /\n successCodes: 200-499\n serviceName: ${exampleAwsLightsailContainerService.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lightsail Container Service Deployment Version using the `service_name` and `version` separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1\n```\n", + "description": "Provides a resource to manage a deployment version for your Amazon Lightsail container service.\n\n\u003e **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment.\n\n\u003e **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile.\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.lightsail.ContainerServiceDeploymentVersion(\"example\", {\n containers: [{\n containerName: \"hello-world\",\n image: \"amazon/amazon-lightsail:hello-world\",\n commands: [],\n environment: {\n MY_ENVIRONMENT_VARIABLE: \"my_value\",\n },\n ports: {\n \"80\": \"HTTP\",\n },\n }],\n publicEndpoint: {\n containerName: \"hello-world\",\n containerPort: 80,\n healthCheck: {\n healthyThreshold: 2,\n unhealthyThreshold: 2,\n timeoutSeconds: 2,\n intervalSeconds: 5,\n path: \"/\",\n successCodes: \"200-499\",\n },\n },\n serviceName: exampleAwsLightsailContainerService.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lightsail.ContainerServiceDeploymentVersion(\"example\",\n containers=[{\n \"container_name\": \"hello-world\",\n \"image\": \"amazon/amazon-lightsail:hello-world\",\n \"commands\": [],\n \"environment\": {\n \"MY_ENVIRONMENT_VARIABLE\": \"my_value\",\n },\n \"ports\": {\n \"80\": \"HTTP\",\n },\n }],\n public_endpoint={\n \"container_name\": \"hello-world\",\n \"container_port\": 80,\n \"health_check\": {\n \"healthy_threshold\": 2,\n \"unhealthy_threshold\": 2,\n \"timeout_seconds\": 2,\n \"interval_seconds\": 5,\n \"path\": \"/\",\n \"success_codes\": \"200-499\",\n },\n },\n service_name=example_aws_lightsail_container_service[\"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 = new Aws.LightSail.ContainerServiceDeploymentVersion(\"example\", new()\n {\n Containers = new[]\n {\n new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionContainerArgs\n {\n ContainerName = \"hello-world\",\n Image = \"amazon/amazon-lightsail:hello-world\",\n Commands = new() { },\n Environment = \n {\n { \"MY_ENVIRONMENT_VARIABLE\", \"my_value\" },\n },\n Ports = \n {\n { \"80\", \"HTTP\" },\n },\n },\n },\n PublicEndpoint = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointArgs\n {\n ContainerName = \"hello-world\",\n ContainerPort = 80,\n HealthCheck = new Aws.LightSail.Inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs\n {\n HealthyThreshold = 2,\n UnhealthyThreshold = 2,\n TimeoutSeconds = 2,\n IntervalSeconds = 5,\n Path = \"/\",\n SuccessCodes = \"200-499\",\n },\n },\n ServiceName = exampleAwsLightsailContainerService.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lightsail.NewContainerServiceDeploymentVersion(ctx, \"example\", \u0026lightsail.ContainerServiceDeploymentVersionArgs{\n\t\t\tContainers: lightsail.ContainerServiceDeploymentVersionContainerArray{\n\t\t\t\t\u0026lightsail.ContainerServiceDeploymentVersionContainerArgs{\n\t\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\t\tImage: pulumi.String(\"amazon/amazon-lightsail:hello-world\"),\n\t\t\t\t\tCommands: pulumi.StringArray{},\n\t\t\t\t\tEnvironment: pulumi.StringMap{\n\t\t\t\t\t\t\"MY_ENVIRONMENT_VARIABLE\": pulumi.String(\"my_value\"),\n\t\t\t\t\t},\n\t\t\t\t\tPorts: pulumi.StringMap{\n\t\t\t\t\t\t\"80\": pulumi.String(\"HTTP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPublicEndpoint: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointArgs{\n\t\t\t\tContainerName: pulumi.String(\"hello-world\"),\n\t\t\t\tContainerPort: pulumi.Int(80),\n\t\t\t\tHealthCheck: \u0026lightsail.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs{\n\t\t\t\t\tHealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tUnhealthyThreshold: pulumi.Int(2),\n\t\t\t\t\tTimeoutSeconds: pulumi.Int(2),\n\t\t\t\t\tIntervalSeconds: pulumi.Int(5),\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t\tSuccessCodes: pulumi.String(\"200-499\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tServiceName: pulumi.Any(exampleAwsLightsailContainerService.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.lightsail.ContainerServiceDeploymentVersion;\nimport com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;\nimport com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 ContainerServiceDeploymentVersion(\"example\", ContainerServiceDeploymentVersionArgs.builder()\n .containers(ContainerServiceDeploymentVersionContainerArgs.builder()\n .containerName(\"hello-world\")\n .image(\"amazon/amazon-lightsail:hello-world\")\n .commands()\n .environment(Map.of(\"MY_ENVIRONMENT_VARIABLE\", \"my_value\"))\n .ports(Map.of(\"80\", \"HTTP\"))\n .build())\n .publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()\n .containerName(\"hello-world\")\n .containerPort(80)\n .healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()\n .healthyThreshold(2)\n .unhealthyThreshold(2)\n .timeoutSeconds(2)\n .intervalSeconds(5)\n .path(\"/\")\n .successCodes(\"200-499\")\n .build())\n .build())\n .serviceName(exampleAwsLightsailContainerService.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lightsail:ContainerServiceDeploymentVersion\n properties:\n containers:\n - containerName: hello-world\n image: amazon/amazon-lightsail:hello-world\n commands: []\n environment:\n MY_ENVIRONMENT_VARIABLE: my_value\n ports:\n '80': HTTP\n publicEndpoint:\n containerName: hello-world\n containerPort: 80\n healthCheck:\n healthyThreshold: 2\n unhealthyThreshold: 2\n timeoutSeconds: 2\n intervalSeconds: 5\n path: /\n successCodes: 200-499\n serviceName: ${exampleAwsLightsailContainerService.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Lightsail Container Service Deployment Version using the `service_name` and `version` separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1\n```\n", "properties": { "containers": { "type": "array", @@ -309837,7 +309837,7 @@ } }, "aws:networkfirewall/loggingConfiguration:LoggingConfiguration": { - "description": "Provides an AWS Network Firewall Logging Configuration Resource\n\n## Example Usage\n\n### Logging to S3\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n bucketName: exampleAwsS3Bucket.bucket,\n prefix: \"/example\",\n },\n logDestinationType: \"S3\",\n logType: \"FLOW\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"bucket_name\": example_aws_s3_bucket[\"bucket\"],\n \"prefix\": \"/example\",\n },\n \"log_destination_type\": \"S3\",\n \"log_type\": \"FLOW\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"bucketName\", exampleAwsS3Bucket.Bucket },\n { \"prefix\", \"/example\" },\n },\n LogDestinationType = \"S3\",\n LogType = \"FLOW\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"bucketName\": pulumi.Any(exampleAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\"prefix\": pulumi.String(\"/example\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"S3\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"FLOW\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.ofEntries(\n Map.entry(\"bucketName\", exampleAwsS3Bucket.bucket()),\n Map.entry(\"prefix\", \"/example\")\n ))\n .logDestinationType(\"S3\")\n .logType(\"FLOW\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n bucketName: ${exampleAwsS3Bucket.bucket}\n prefix: /example\n logDestinationType: S3\n logType: FLOW\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to CloudWatch\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n logGroup: exampleAwsCloudwatchLogGroup.name,\n },\n logDestinationType: \"CloudWatchLogs\",\n logType: \"ALERT\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"log_group\": example_aws_cloudwatch_log_group[\"name\"],\n },\n \"log_destination_type\": \"CloudWatchLogs\",\n \"log_type\": \"ALERT\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"logGroup\", exampleAwsCloudwatchLogGroup.Name },\n },\n LogDestinationType = \"CloudWatchLogs\",\n LogType = \"ALERT\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"logGroup\": pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"CloudWatchLogs\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"ALERT\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"logGroup\", exampleAwsCloudwatchLogGroup.name()))\n .logDestinationType(\"CloudWatchLogs\")\n .logType(\"ALERT\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n logGroup: ${exampleAwsCloudwatchLogGroup.name}\n logDestinationType: CloudWatchLogs\n logType: ALERT\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to Kinesis Data Firehose\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name,\n },\n logDestinationType: \"KinesisDataFirehose\",\n logType: \"TLS\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"delivery_stream\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"log_destination_type\": \"KinesisDataFirehose\",\n \"log_type\": \"TLS\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.Name },\n },\n LogDestinationType = \"KinesisDataFirehose\",\n LogType = \"TLS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"deliveryStream\": pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"KinesisDataFirehose\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"TLS\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.name()))\n .logDestinationType(\"KinesisDataFirehose\")\n .logType(\"TLS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n deliveryStream: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n logDestinationType: KinesisDataFirehose\n logType: TLS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Network Firewall Logging Configurations using the `firewall_arn`. For example:\n\n```sh\n$ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example\n```\n", + "description": "Provides an AWS Network Firewall Logging Configuration Resource\n\n## Example Usage\n\n### Logging to S3\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n bucketName: exampleAwsS3Bucket.bucket,\n prefix: \"/example\",\n },\n logDestinationType: \"S3\",\n logType: \"FLOW\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"bucketName\": example_aws_s3_bucket[\"bucket\"],\n \"prefix\": \"/example\",\n },\n \"log_destination_type\": \"S3\",\n \"log_type\": \"FLOW\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"bucketName\", exampleAwsS3Bucket.Bucket },\n { \"prefix\", \"/example\" },\n },\n LogDestinationType = \"S3\",\n LogType = \"FLOW\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"bucketName\": pulumi.Any(exampleAwsS3Bucket.Bucket),\n\t\t\t\t\t\t\t\"prefix\": pulumi.String(\"/example\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"S3\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"FLOW\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.ofEntries(\n Map.entry(\"bucketName\", exampleAwsS3Bucket.bucket()),\n Map.entry(\"prefix\", \"/example\")\n ))\n .logDestinationType(\"S3\")\n .logType(\"FLOW\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n bucketName: ${exampleAwsS3Bucket.bucket}\n prefix: /example\n logDestinationType: S3\n logType: FLOW\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to CloudWatch\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n logGroup: exampleAwsCloudwatchLogGroup.name,\n },\n logDestinationType: \"CloudWatchLogs\",\n logType: \"ALERT\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"logGroup\": example_aws_cloudwatch_log_group[\"name\"],\n },\n \"log_destination_type\": \"CloudWatchLogs\",\n \"log_type\": \"ALERT\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"logGroup\", exampleAwsCloudwatchLogGroup.Name },\n },\n LogDestinationType = \"CloudWatchLogs\",\n LogType = \"ALERT\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"logGroup\": pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"CloudWatchLogs\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"ALERT\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"logGroup\", exampleAwsCloudwatchLogGroup.name()))\n .logDestinationType(\"CloudWatchLogs\")\n .logType(\"ALERT\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n logGroup: ${exampleAwsCloudwatchLogGroup.name}\n logDestinationType: CloudWatchLogs\n logType: ALERT\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging to Kinesis Data Firehose\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.networkfirewall.LoggingConfiguration(\"example\", {\n firewallArn: exampleAwsNetworkfirewallFirewall.arn,\n loggingConfiguration: {\n logDestinationConfigs: [{\n logDestination: {\n deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name,\n },\n logDestinationType: \"KinesisDataFirehose\",\n logType: \"TLS\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.networkfirewall.LoggingConfiguration(\"example\",\n firewall_arn=example_aws_networkfirewall_firewall[\"arn\"],\n logging_configuration={\n \"log_destination_configs\": [{\n \"log_destination\": {\n \"deliveryStream\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"log_destination_type\": \"KinesisDataFirehose\",\n \"log_type\": \"TLS\",\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.NetworkFirewall.LoggingConfiguration(\"example\", new()\n {\n FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,\n LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs\n {\n LogDestinationConfigs = new[]\n {\n new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs\n {\n LogDestination = \n {\n { \"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.Name },\n },\n LogDestinationType = \"KinesisDataFirehose\",\n LogType = \"TLS\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkfirewall\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := networkfirewall.NewLoggingConfiguration(ctx, \"example\", \u0026networkfirewall.LoggingConfigurationArgs{\n\t\t\tFirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),\n\t\t\tLoggingConfiguration: \u0026networkfirewall.LoggingConfigurationLoggingConfigurationArgs{\n\t\t\t\tLogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{\n\t\t\t\t\t\u0026networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{\n\t\t\t\t\t\tLogDestination: pulumi.StringMap{\n\t\t\t\t\t\t\t\"deliveryStream\": pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tLogDestinationType: pulumi.String(\"KinesisDataFirehose\"),\n\t\t\t\t\t\tLogType: pulumi.String(\"TLS\"),\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.networkfirewall.LoggingConfiguration;\nimport com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;\nimport com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 LoggingConfiguration(\"example\", LoggingConfigurationArgs.builder()\n .firewallArn(exampleAwsNetworkfirewallFirewall.arn())\n .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()\n .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()\n .logDestination(Map.of(\"deliveryStream\", exampleAwsKinesisFirehoseDeliveryStream.name()))\n .logDestinationType(\"KinesisDataFirehose\")\n .logType(\"TLS\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:networkfirewall:LoggingConfiguration\n properties:\n firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}\n loggingConfiguration:\n logDestinationConfigs:\n - logDestination:\n deliveryStream: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n logDestinationType: KinesisDataFirehose\n logType: TLS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Network Firewall Logging Configurations using the `firewall_arn`. For example:\n\n```sh\n$ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example\n```\n", "properties": { "firewallArn": { "type": "string", @@ -323731,7 +323731,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, \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", + "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", @@ -326954,7 +326954,7 @@ } }, "aws:quicksight/vpcConnection:VpcConnection": { - "description": "Resource for managing an AWS QuickSight VPC 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 vpcConnectionRole = new aws.iam.Role(\"vpc_connection_role\", {\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inlinePolicies: [{\n name: \"QuickSightVPCConnectionRolePolicy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n Resource: [\"*\"],\n }],\n }),\n }],\n});\nconst example = new aws.quicksight.VpcConnection(\"example\", {\n vpcConnectionId: \"example-connection-id\",\n name: \"Example Connection\",\n roleArn: vpcConnectionRole.arn,\n securityGroupIds: [\"sg-00000000000000000\"],\n subnetIds: [\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nvpc_connection_role = aws.iam.Role(\"vpc_connection_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inline_policies=[{\n \"name\": \"QuickSightVPCConnectionRolePolicy\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"effect\": \"Allow\",\n \"action\": [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n \"resource\": [\"*\"],\n }],\n }),\n }])\nexample = aws.quicksight.VpcConnection(\"example\",\n vpc_connection_id=\"example-connection-id\",\n name=\"Example Connection\",\n role_arn=vpc_connection_role.arn,\n security_group_ids=[\"sg-00000000000000000\"],\n subnet_ids=[\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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 vpcConnectionRole = new Aws.Iam.Role(\"vpc_connection_role\", 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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"quicksight.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"QuickSightVPCConnectionRolePolicy\",\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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n },\n [\"Resource\"] = new[]\n {\n \"*\",\n },\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.Quicksight.VpcConnection(\"example\", new()\n {\n VpcConnectionId = \"example-connection-id\",\n Name = \"Example Connection\",\n RoleArn = vpcConnectionRole.Arn,\n SecurityGroupIds = new[]\n {\n \"sg-00000000000000000\",\n },\n SubnetIds = new[]\n {\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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/quicksight\"\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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"quicksight.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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:CreateNetworkInterface\",\n\t\t\t\t\t\t\"ec2:ModifyNetworkInterfaceAttribute\",\n\t\t\t\t\t\t\"ec2:DeleteNetworkInterface\",\n\t\t\t\t\t\t\"ec2:DescribeSubnets\",\n\t\t\t\t\t\t\"ec2:DescribeSecurityGroups\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []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})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tvpcConnectionRole, err := iam.NewRole(ctx, \"vpc_connection_role\", \u0026iam.RoleArgs{\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(\"QuickSightVPCConnectionRolePolicy\"),\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\t_, err = quicksight.NewVpcConnection(ctx, \"example\", \u0026quicksight.VpcConnectionArgs{\n\t\t\tVpcConnectionId: pulumi.String(\"example-connection-id\"),\n\t\t\tName: pulumi.String(\"Example Connection\"),\n\t\t\tRoleArn: vpcConnectionRole.Arn,\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"sg-00000000000000000\"),\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-00000000000000000\"),\n\t\t\t\tpulumi.String(\"subnet-00000000000000001\"),\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.quicksight.VpcConnection;\nimport com.pulumi.aws.quicksight.VpcConnectionArgs;\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 vpcConnectionRole = new Role(\"vpcConnectionRole\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"quicksight.amazonaws.com\")\n ))\n )))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"QuickSightVPCConnectionRolePolicy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"ec2:CreateNetworkInterface\", \n \"ec2:ModifyNetworkInterfaceAttribute\", \n \"ec2:DeleteNetworkInterface\", \n \"ec2:DescribeSubnets\", \n \"ec2:DescribeSecurityGroups\"\n )),\n jsonProperty(\"Resource\", jsonArray(\"*\"))\n )))\n )))\n .build())\n .build());\n\n var example = new VpcConnection(\"example\", VpcConnectionArgs.builder()\n .vpcConnectionId(\"example-connection-id\")\n .name(\"Example Connection\")\n .roleArn(vpcConnectionRole.arn())\n .securityGroupIds(\"sg-00000000000000000\")\n .subnetIds( \n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpcConnectionRole:\n type: aws:iam:Role\n name: vpc_connection_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: quicksight.amazonaws.com\n inlinePolicies:\n - name: QuickSightVPCConnectionRolePolicy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - ec2:CreateNetworkInterface\n - ec2:ModifyNetworkInterfaceAttribute\n - ec2:DeleteNetworkInterface\n - ec2:DescribeSubnets\n - ec2:DescribeSecurityGroups\n Resource:\n - '*'\n example:\n type: aws:quicksight:VpcConnection\n properties:\n vpcConnectionId: example-connection-id\n name: Example Connection\n roleArn: ${vpcConnectionRole.arn}\n securityGroupIds:\n - sg-00000000000000000\n subnetIds:\n - subnet-00000000000000000\n - subnet-00000000000000001\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import QuickSight VPC connection using the AWS account ID and VPC connection ID separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:quicksight/vpcConnection:VpcConnection example 123456789012,example\n```\n", + "description": "Resource for managing an AWS QuickSight VPC 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 vpcConnectionRole = new aws.iam.Role(\"vpc_connection_role\", {\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inlinePolicies: [{\n name: \"QuickSightVPCConnectionRolePolicy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n Resource: [\"*\"],\n }],\n }),\n }],\n});\nconst example = new aws.quicksight.VpcConnection(\"example\", {\n vpcConnectionId: \"example-connection-id\",\n name: \"Example Connection\",\n roleArn: vpcConnectionRole.arn,\n securityGroupIds: [\"sg-00000000000000000\"],\n subnetIds: [\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nvpc_connection_role = aws.iam.Role(\"vpc_connection_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"quicksight.amazonaws.com\",\n },\n }],\n }),\n inline_policies=[{\n \"name\": \"QuickSightVPCConnectionRolePolicy\",\n \"policy\": json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n ],\n \"Resource\": [\"*\"],\n }],\n }),\n }])\nexample = aws.quicksight.VpcConnection(\"example\",\n vpc_connection_id=\"example-connection-id\",\n name=\"Example Connection\",\n role_arn=vpc_connection_role.arn,\n security_group_ids=[\"sg-00000000000000000\"],\n subnet_ids=[\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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 vpcConnectionRole = new Aws.Iam.Role(\"vpc_connection_role\", 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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"quicksight.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"QuickSightVPCConnectionRolePolicy\",\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 [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"ec2:CreateNetworkInterface\",\n \"ec2:ModifyNetworkInterfaceAttribute\",\n \"ec2:DeleteNetworkInterface\",\n \"ec2:DescribeSubnets\",\n \"ec2:DescribeSecurityGroups\",\n },\n [\"Resource\"] = new[]\n {\n \"*\",\n },\n },\n },\n }),\n },\n },\n });\n\n var example = new Aws.Quicksight.VpcConnection(\"example\", new()\n {\n VpcConnectionId = \"example-connection-id\",\n Name = \"Example Connection\",\n RoleArn = vpcConnectionRole.Arn,\n SecurityGroupIds = new[]\n {\n \"sg-00000000000000000\",\n },\n SubnetIds = new[]\n {\n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\",\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/quicksight\"\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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"quicksight.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\"Effect\": \"Allow\",\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:CreateNetworkInterface\",\n\t\t\t\t\t\t\"ec2:ModifyNetworkInterfaceAttribute\",\n\t\t\t\t\t\t\"ec2:DeleteNetworkInterface\",\n\t\t\t\t\t\t\"ec2:DescribeSubnets\",\n\t\t\t\t\t\t\"ec2:DescribeSecurityGroups\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []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})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tvpcConnectionRole, err := iam.NewRole(ctx, \"vpc_connection_role\", \u0026iam.RoleArgs{\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(\"QuickSightVPCConnectionRolePolicy\"),\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\t_, err = quicksight.NewVpcConnection(ctx, \"example\", \u0026quicksight.VpcConnectionArgs{\n\t\t\tVpcConnectionId: pulumi.String(\"example-connection-id\"),\n\t\t\tName: pulumi.String(\"Example Connection\"),\n\t\t\tRoleArn: vpcConnectionRole.Arn,\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"sg-00000000000000000\"),\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-00000000000000000\"),\n\t\t\t\tpulumi.String(\"subnet-00000000000000001\"),\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.quicksight.VpcConnection;\nimport com.pulumi.aws.quicksight.VpcConnectionArgs;\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 vpcConnectionRole = new Role(\"vpcConnectionRole\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"quicksight.amazonaws.com\")\n ))\n )))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"QuickSightVPCConnectionRolePolicy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"ec2:CreateNetworkInterface\", \n \"ec2:ModifyNetworkInterfaceAttribute\", \n \"ec2:DeleteNetworkInterface\", \n \"ec2:DescribeSubnets\", \n \"ec2:DescribeSecurityGroups\"\n )),\n jsonProperty(\"Resource\", jsonArray(\"*\"))\n )))\n )))\n .build())\n .build());\n\n var example = new VpcConnection(\"example\", VpcConnectionArgs.builder()\n .vpcConnectionId(\"example-connection-id\")\n .name(\"Example Connection\")\n .roleArn(vpcConnectionRole.arn())\n .securityGroupIds(\"sg-00000000000000000\")\n .subnetIds( \n \"subnet-00000000000000000\",\n \"subnet-00000000000000001\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpcConnectionRole:\n type: aws:iam:Role\n name: vpc_connection_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: quicksight.amazonaws.com\n inlinePolicies:\n - name: QuickSightVPCConnectionRolePolicy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - ec2:CreateNetworkInterface\n - ec2:ModifyNetworkInterfaceAttribute\n - ec2:DeleteNetworkInterface\n - ec2:DescribeSubnets\n - ec2:DescribeSecurityGroups\n Resource:\n - '*'\n example:\n type: aws:quicksight:VpcConnection\n properties:\n vpcConnectionId: example-connection-id\n name: Example Connection\n roleArn: ${vpcConnectionRole.arn}\n securityGroupIds:\n - sg-00000000000000000\n subnetIds:\n - subnet-00000000000000000\n - subnet-00000000000000001\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import QuickSight VPC connection using the AWS account ID and VPC connection ID separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:quicksight/vpcConnection:VpcConnection example 123456789012,example\n```\n", "properties": { "arn": { "type": "string", @@ -338106,7 +338106,7 @@ } }, "aws:rekognition/streamProcessor:StreamProcessor": { - "description": "Resource for managing an AWS Rekognition Stream Processor.\n\n\u003e This resource must be configured specifically for your use case, and not all options are compatible with one another. See [Stream Processor API documentation](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html#rekognition-CreateStreamProcessor-request-Input) for configuration information.\n\n\u003e Stream Processors configured for Face Recognition cannot have _any_ properties updated after the fact, and it will result in an AWS API error.\n\n## Example Usage\n\n### Label Detection\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: \"example-bucket\"});\nconst exampleTopic = new aws.sns.Topic(\"example\", {name: \"example-topic\"});\nconst exampleVideoStream = new aws.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\"s3:PutObject\"],\n Effect: \"Allow\",\n Resource: [pulumi.interpolate`${example.arn}/*`],\n },\n {\n Action: [\"sns:Publish\"],\n Effect: \"Allow\",\n Resource: [exampleTopic.arn],\n },\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [exampleVideoStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n output: {\n s3Destination: {\n bucket: example.bucket,\n },\n },\n settings: {\n connectedHome: {\n labels: [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input: {\n kinesisVideoStream: {\n arn: exampleVideoStream.arn,\n },\n },\n notificationChannel: {\n snsTopicArn: exampleTopic.arn,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-bucket\")\nexample_topic = aws.sns.Topic(\"example\", name=\"example-topic\")\nexample_video_stream = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [\n {\n \"action\": [\"s3:PutObject\"],\n \"effect\": \"Allow\",\n \"resource\": [example.arn.apply(lambda arn: f\"{arn}/*\")],\n },\n {\n \"Action\": [\"sns:Publish\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_topic.arn],\n },\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example_video_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n output={\n \"s3_destination\": {\n \"bucket\": example.bucket,\n },\n },\n settings={\n \"connected_home\": {\n \"labels\": [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input={\n \"kinesis_video_stream\": {\n \"arn\": example_video_stream.arn,\n },\n },\n notification_channel={\n \"sns_topic_arn\": example_topic.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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-bucket\",\n });\n\n var exampleTopic = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example-topic\",\n });\n\n var exampleVideoStream = new Aws.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"s3:PutObject\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sns:Publish\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleTopic.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleVideoStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n S3Destination = new Aws.Rekognition.Inputs.StreamProcessorOutputS3DestinationArgs\n {\n Bucket = example.Bucket,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n ConnectedHome = new Aws.Rekognition.Inputs.StreamProcessorSettingsConnectedHomeArgs\n {\n Labels = new[]\n {\n \"PERSON\",\n \"PET\",\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = exampleVideoStream.Arn,\n },\n },\n NotificationChannel = new Aws.Rekognition.Inputs.StreamProcessorNotificationChannelArgs\n {\n SnsTopicArn = exampleTopic.Arn,\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/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\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 := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTopic, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example-topic\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVideoStream, err := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\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\": \"sts:AssumeRole\",\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\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleTopic.Arn, exampleVideoStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleTopicArn := _args[1].(string)\n\t\t\t\t\t\texampleVideoStreamArn := _args[2].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleArn),\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"sns:Publish\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleTopicArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleVideoStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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 = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tS3Destination: \u0026rekognition.StreamProcessorOutputS3DestinationArgs{\n\t\t\t\t\tBucket: example.Bucket,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tConnectedHome: \u0026rekognition.StreamProcessorSettingsConnectedHomeArgs{\n\t\t\t\t\tLabels: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"PERSON\"),\n\t\t\t\t\t\tpulumi.String(\"PET\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: exampleVideoStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNotificationChannel: \u0026rekognition.StreamProcessorNotificationChannelArgs{\n\t\t\t\tSnsTopicArn: exampleTopic.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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputS3DestinationArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsConnectedHomeArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorNotificationChannelArgs;\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 BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-bucket\")\n .build());\n\n var exampleTopic = new Topic(\"exampleTopic\", TopicArgs.builder()\n .name(\"example-topic\")\n .build());\n\n var exampleVideoStream = new VideoStream(\"exampleVideoStream\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleTopic.arn(), exampleVideoStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleTopicArn = values.t2;\n var exampleVideoStreamArn = values.t3;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"s3:PutObject\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(String.format(\"%s/*\", exampleArn)))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"sns:Publish\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleTopicArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleVideoStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .s3Destination(StreamProcessorOutputS3DestinationArgs.builder()\n .bucket(example.bucket())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .connectedHome(StreamProcessorSettingsConnectedHomeArgs.builder()\n .labels( \n \"PERSON\",\n \"PET\")\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(exampleVideoStream.arn())\n .build())\n .build())\n .notificationChannel(StreamProcessorNotificationChannelArgs.builder()\n .snsTopicArn(exampleTopic.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-bucket\n exampleTopic:\n type: aws:sns:Topic\n name: example\n properties:\n name: example-topic\n exampleVideoStream:\n type: aws:kinesis:VideoStream\n name: example\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:PutObject\n Effect: Allow\n Resource:\n - ${example.arn}/*\n - Action:\n - sns:Publish\n Effect: Allow\n Resource:\n - ${exampleTopic.arn}\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${exampleVideoStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n output:\n s3Destination:\n bucket: ${example.bucket}\n settings:\n connectedHome:\n labels:\n - PERSON\n - PET\n input:\n kinesisVideoStream:\n arn: ${exampleVideoStream.arn}\n notificationChannel:\n snsTopicArn: ${exampleTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Face Detection 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.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleStream = new aws.kinesis.Stream(\"example\", {\n name: \"pulumi-kinesis-example\",\n shardCount: 1,\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [example.arn],\n },\n {\n Action: [\"kinesis:PutRecord\"],\n Effect: \"Allow\",\n Resource: [exampleStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleCollection = new aws.rekognition.Collection(\"example\", {collectionId: \"example-collection\"});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n regionsOfInterests: [{\n polygons: [\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n ],\n }],\n input: {\n kinesisVideoStream: {\n arn: example.arn,\n },\n },\n output: {\n kinesisDataStream: {\n arn: exampleStream.arn,\n },\n },\n settings: {\n faceSearch: {\n collectionId: exampleCollection.id,\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_stream = aws.kinesis.Stream(\"example\",\n name=\"pulumi-kinesis-example\",\n shard_count=1)\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [\n {\n \"action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"effect\": \"Allow\",\n \"resource\": [example.arn],\n },\n {\n \"Action\": [\"kinesis:PutRecord\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_collection = aws.rekognition.Collection(\"example\", collection_id=\"example-collection\")\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n regions_of_interests=[{\n \"polygons\": [\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n ],\n }],\n input={\n \"kinesis_video_stream\": {\n \"arn\": example.arn,\n },\n },\n output={\n \"kinesis_data_stream\": {\n \"arn\": example_stream.arn,\n },\n },\n settings={\n \"face_search\": {\n \"collection_id\": example_collection.id,\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.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleStream = new Aws.Kinesis.Stream(\"example\", new()\n {\n Name = \"pulumi-kinesis-example\",\n ShardCount = 1,\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:PutRecord\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleCollection = new Aws.Rekognition.Collection(\"example\", new()\n {\n CollectionId = \"example-collection\",\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n RegionsOfInterests = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestArgs\n {\n Polygons = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = example.Arn,\n },\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n KinesisDataStream = new Aws.Rekognition.Inputs.StreamProcessorOutputKinesisDataStreamArgs\n {\n Arn = exampleStream.Arn,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n FaceSearch = new Aws.Rekognition.Inputs.StreamProcessorSettingsFaceSearchArgs\n {\n CollectionId = exampleCollection.Id,\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/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\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 := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStream, err := kinesis.NewStream(ctx, \"example\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"pulumi-kinesis-example\"),\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\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\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleStreamArn := _args[1].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:PutRecord\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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\texampleCollection, err := rekognition.NewCollection(ctx, \"example\", \u0026rekognition.CollectionArgs{\n\t\t\tCollectionId: pulumi.String(\"example-collection\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tRegionsOfInterests: rekognition.StreamProcessorRegionsOfInterestArray{\n\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestArgs{\n\t\t\t\t\tPolygons: rekognition.StreamProcessorRegionsOfInterestPolygonArray{\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\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\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: example.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tKinesisDataStream: \u0026rekognition.StreamProcessorOutputKinesisDataStreamArgs{\n\t\t\t\t\tArn: exampleStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tFaceSearch: \u0026rekognition.StreamProcessorSettingsFaceSearchArgs{\n\t\t\t\t\tCollectionId: exampleCollection.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\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.Collection;\nimport com.pulumi.aws.rekognition.CollectionArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorRegionsOfInterestArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputKinesisDataStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsFaceSearchArgs;\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 VideoStream(\"example\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleStream = new Stream(\"exampleStream\", StreamArgs.builder()\n .name(\"pulumi-kinesis-example\")\n .shardCount(1)\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleStreamArn = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"kinesis:PutRecord\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleCollection = new Collection(\"exampleCollection\", CollectionArgs.builder()\n .collectionId(\"example-collection\")\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .regionsOfInterests(StreamProcessorRegionsOfInterestArgs.builder()\n .polygons( \n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(example.arn())\n .build())\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .kinesisDataStream(StreamProcessorOutputKinesisDataStreamArgs.builder()\n .arn(exampleStream.arn())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .faceSearch(StreamProcessorSettingsFaceSearchArgs.builder()\n .collectionId(exampleCollection.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kinesis:VideoStream\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleStream:\n type: aws:kinesis:Stream\n name: example\n properties:\n name: pulumi-kinesis-example\n shardCount: 1\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${example.arn}\n - Action:\n - kinesis:PutRecord\n Effect: Allow\n Resource:\n - ${exampleStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleCollection:\n type: aws:rekognition:Collection\n name: example\n properties:\n collectionId: example-collection\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n regionsOfInterests:\n - polygons:\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n input:\n kinesisVideoStream:\n arn: ${example.arn}\n output:\n kinesisDataStream:\n arn: ${exampleStream.arn}\n settings:\n faceSearch:\n collectionId: ${exampleCollection.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Rekognition Stream Processor using the `name`. For example:\n\n```sh\n$ pulumi import aws:rekognition/streamProcessor:StreamProcessor example my-stream\n```\n", + "description": "Resource for managing an AWS Rekognition Stream Processor.\n\n\u003e This resource must be configured specifically for your use case, and not all options are compatible with one another. See [Stream Processor API documentation](https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateStreamProcessor.html#rekognition-CreateStreamProcessor-request-Input) for configuration information.\n\n\u003e Stream Processors configured for Face Recognition cannot have _any_ properties updated after the fact, and it will result in an AWS API error.\n\n## Example Usage\n\n### Label Detection\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: \"example-bucket\"});\nconst exampleTopic = new aws.sns.Topic(\"example\", {name: \"example-topic\"});\nconst exampleVideoStream = new aws.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\"s3:PutObject\"],\n Effect: \"Allow\",\n Resource: [pulumi.interpolate`${example.arn}/*`],\n },\n {\n Action: [\"sns:Publish\"],\n Effect: \"Allow\",\n Resource: [exampleTopic.arn],\n },\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [exampleVideoStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n output: {\n s3Destination: {\n bucket: example.bucket,\n },\n },\n settings: {\n connectedHome: {\n labels: [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input: {\n kinesisVideoStream: {\n arn: exampleVideoStream.arn,\n },\n },\n notificationChannel: {\n snsTopicArn: exampleTopic.arn,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example-bucket\")\nexample_topic = aws.sns.Topic(\"example\", name=\"example-topic\")\nexample_video_stream = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\"s3:PutObject\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example.arn.apply(lambda arn: f\"{arn}/*\")],\n },\n {\n \"Action\": [\"sns:Publish\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_topic.arn],\n },\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example_video_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n output={\n \"s3_destination\": {\n \"bucket\": example.bucket,\n },\n },\n settings={\n \"connected_home\": {\n \"labels\": [\n \"PERSON\",\n \"PET\",\n ],\n },\n },\n input={\n \"kinesis_video_stream\": {\n \"arn\": example_video_stream.arn,\n },\n },\n notification_channel={\n \"sns_topic_arn\": example_topic.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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example-bucket\",\n });\n\n var exampleTopic = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example-topic\",\n });\n\n var exampleVideoStream = new Aws.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"s3:PutObject\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sns:Publish\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleTopic.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleVideoStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n S3Destination = new Aws.Rekognition.Inputs.StreamProcessorOutputS3DestinationArgs\n {\n Bucket = example.Bucket,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n ConnectedHome = new Aws.Rekognition.Inputs.StreamProcessorSettingsConnectedHomeArgs\n {\n Labels = new[]\n {\n \"PERSON\",\n \"PET\",\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = exampleVideoStream.Arn,\n },\n },\n NotificationChannel = new Aws.Rekognition.Inputs.StreamProcessorNotificationChannelArgs\n {\n SnsTopicArn = exampleTopic.Arn,\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/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\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 := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTopic, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example-topic\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVideoStream, err := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\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\": \"sts:AssumeRole\",\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\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleTopic.Arn, exampleVideoStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleTopicArn := _args[1].(string)\n\t\t\t\t\t\texampleVideoStreamArn := _args[2].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleArn),\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"sns:Publish\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleTopicArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleVideoStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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 = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tS3Destination: \u0026rekognition.StreamProcessorOutputS3DestinationArgs{\n\t\t\t\t\tBucket: example.Bucket,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tConnectedHome: \u0026rekognition.StreamProcessorSettingsConnectedHomeArgs{\n\t\t\t\t\tLabels: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"PERSON\"),\n\t\t\t\t\t\tpulumi.String(\"PET\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: exampleVideoStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNotificationChannel: \u0026rekognition.StreamProcessorNotificationChannelArgs{\n\t\t\t\tSnsTopicArn: exampleTopic.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.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputS3DestinationArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsConnectedHomeArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorNotificationChannelArgs;\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 BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"example-bucket\")\n .build());\n\n var exampleTopic = new Topic(\"exampleTopic\", TopicArgs.builder()\n .name(\"example-topic\")\n .build());\n\n var exampleVideoStream = new VideoStream(\"exampleVideoStream\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleTopic.arn(), exampleVideoStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleTopicArn = values.t2;\n var exampleVideoStreamArn = values.t3;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"s3:PutObject\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(String.format(\"%s/*\", exampleArn)))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"sns:Publish\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleTopicArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleVideoStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .s3Destination(StreamProcessorOutputS3DestinationArgs.builder()\n .bucket(example.bucket())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .connectedHome(StreamProcessorSettingsConnectedHomeArgs.builder()\n .labels( \n \"PERSON\",\n \"PET\")\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(exampleVideoStream.arn())\n .build())\n .build())\n .notificationChannel(StreamProcessorNotificationChannelArgs.builder()\n .snsTopicArn(exampleTopic.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example-bucket\n exampleTopic:\n type: aws:sns:Topic\n name: example\n properties:\n name: example-topic\n exampleVideoStream:\n type: aws:kinesis:VideoStream\n name: example\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:PutObject\n Effect: Allow\n Resource:\n - ${example.arn}/*\n - Action:\n - sns:Publish\n Effect: Allow\n Resource:\n - ${exampleTopic.arn}\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${exampleVideoStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n output:\n s3Destination:\n bucket: ${example.bucket}\n settings:\n connectedHome:\n labels:\n - PERSON\n - PET\n input:\n kinesisVideoStream:\n arn: ${exampleVideoStream.arn}\n notificationChannel:\n snsTopicArn: ${exampleTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Face Detection 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.kinesis.VideoStream(\"example\", {\n name: \"example-kinesis-input\",\n dataRetentionInHours: 1,\n deviceName: \"kinesis-video-device-name\",\n mediaType: \"video/h264\",\n});\nconst exampleStream = new aws.kinesis.Stream(\"example\", {\n name: \"pulumi-kinesis-example\",\n shardCount: 1,\n});\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n inlinePolicies: [{\n name: \"Rekognition-Access\",\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n Effect: \"Allow\",\n Resource: [example.arn],\n },\n {\n Action: [\"kinesis:PutRecord\"],\n Effect: \"Allow\",\n Resource: [exampleStream.arn],\n },\n ],\n }),\n }],\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Principal: {\n Service: \"rekognition.amazonaws.com\",\n },\n }],\n }),\n});\nconst exampleCollection = new aws.rekognition.Collection(\"example\", {collectionId: \"example-collection\"});\nconst exampleStreamProcessor = new aws.rekognition.StreamProcessor(\"example\", {\n roleArn: exampleRole.arn,\n name: \"example-processor\",\n dataSharingPreference: {\n optIn: false,\n },\n regionsOfInterests: [{\n polygons: [\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n {\n x: 0.5,\n y: 0.5,\n },\n ],\n }],\n input: {\n kinesisVideoStream: {\n arn: example.arn,\n },\n },\n output: {\n kinesisDataStream: {\n arn: exampleStream.arn,\n },\n },\n settings: {\n faceSearch: {\n collectionId: exampleCollection.id,\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.kinesis.VideoStream(\"example\",\n name=\"example-kinesis-input\",\n data_retention_in_hours=1,\n device_name=\"kinesis-video-device-name\",\n media_type=\"video/h264\")\nexample_stream = aws.kinesis.Stream(\"example\",\n name=\"pulumi-kinesis-example\",\n shard_count=1)\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n inline_policies=[{\n \"name\": \"Rekognition-Access\",\n \"policy\": pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": [example.arn],\n },\n {\n \"Action\": [\"kinesis:PutRecord\"],\n \"Effect\": \"Allow\",\n \"Resource\": [example_stream.arn],\n },\n ],\n }),\n }],\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"rekognition.amazonaws.com\",\n },\n }],\n }))\nexample_collection = aws.rekognition.Collection(\"example\", collection_id=\"example-collection\")\nexample_stream_processor = aws.rekognition.StreamProcessor(\"example\",\n role_arn=example_role.arn,\n name=\"example-processor\",\n data_sharing_preference={\n \"opt_in\": False,\n },\n regions_of_interests=[{\n \"polygons\": [\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n {\n \"x\": 0.5,\n \"y\": 0.5,\n },\n ],\n }],\n input={\n \"kinesis_video_stream\": {\n \"arn\": example.arn,\n },\n },\n output={\n \"kinesis_data_stream\": {\n \"arn\": example_stream.arn,\n },\n },\n settings={\n \"face_search\": {\n \"collection_id\": example_collection.id,\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.Kinesis.VideoStream(\"example\", new()\n {\n Name = \"example-kinesis-input\",\n DataRetentionInHours = 1,\n DeviceName = \"kinesis-video-device-name\",\n MediaType = \"video/h264\",\n });\n\n var exampleStream = new Aws.Kinesis.Stream(\"example\", new()\n {\n Name = \"pulumi-kinesis-example\",\n ShardCount = 1,\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"Rekognition-Access\",\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\"] = new[]\n {\n \"kinesis:Get*\",\n \"kinesis:DescribeStreamSummary\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n example.Arn,\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kinesis:PutRecord\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = new[]\n {\n exampleStream.Arn,\n },\n },\n },\n })),\n },\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 [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"rekognition.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var exampleCollection = new Aws.Rekognition.Collection(\"example\", new()\n {\n CollectionId = \"example-collection\",\n });\n\n var exampleStreamProcessor = new Aws.Rekognition.StreamProcessor(\"example\", new()\n {\n RoleArn = exampleRole.Arn,\n Name = \"example-processor\",\n DataSharingPreference = new Aws.Rekognition.Inputs.StreamProcessorDataSharingPreferenceArgs\n {\n OptIn = false,\n },\n RegionsOfInterests = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestArgs\n {\n Polygons = new[]\n {\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n new Aws.Rekognition.Inputs.StreamProcessorRegionsOfInterestPolygonArgs\n {\n X = 0.5,\n Y = 0.5,\n },\n },\n },\n },\n Input = new Aws.Rekognition.Inputs.StreamProcessorInputArgs\n {\n KinesisVideoStream = new Aws.Rekognition.Inputs.StreamProcessorInputKinesisVideoStreamArgs\n {\n Arn = example.Arn,\n },\n },\n Output = new Aws.Rekognition.Inputs.StreamProcessorOutputArgs\n {\n KinesisDataStream = new Aws.Rekognition.Inputs.StreamProcessorOutputKinesisDataStreamArgs\n {\n Arn = exampleStream.Arn,\n },\n },\n Settings = new Aws.Rekognition.Inputs.StreamProcessorSettingsArgs\n {\n FaceSearch = new Aws.Rekognition.Inputs.StreamProcessorSettingsFaceSearchArgs\n {\n CollectionId = exampleCollection.Id,\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/kinesis\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rekognition\"\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 := kinesis.NewVideoStream(ctx, \"example\", \u0026kinesis.VideoStreamArgs{\n\t\t\tName: pulumi.String(\"example-kinesis-input\"),\n\t\t\tDataRetentionInHours: pulumi.Int(1),\n\t\t\tDeviceName: pulumi.String(\"kinesis-video-device-name\"),\n\t\t\tMediaType: pulumi.String(\"video/h264\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStream, err := kinesis.NewStream(ctx, \"example\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"pulumi-kinesis-example\"),\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\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\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"rekognition.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\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"Rekognition-Access\"),\n\t\t\t\t\tPolicy: pulumi.All(example.Arn, exampleStream.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\t\t\texampleArn := _args[0].(string)\n\t\t\t\t\t\texampleStreamArn := _args[1].(string)\n\t\t\t\t\t\tvar _zero string\n\t\t\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:Get*\",\n\t\t\t\t\t\t\t\t\t\t\"kinesis:DescribeStreamSummary\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleArn,\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\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\t\t\"kinesis:PutRecord\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\t\t\texampleStreamArn,\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\tif err != nil {\n\t\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\t\t\treturn json1, nil\n\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t},\n\t\t\t},\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\texampleCollection, err := rekognition.NewCollection(ctx, \"example\", \u0026rekognition.CollectionArgs{\n\t\t\tCollectionId: pulumi.String(\"example-collection\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rekognition.NewStreamProcessor(ctx, \"example\", \u0026rekognition.StreamProcessorArgs{\n\t\t\tRoleArn: exampleRole.Arn,\n\t\t\tName: pulumi.String(\"example-processor\"),\n\t\t\tDataSharingPreference: \u0026rekognition.StreamProcessorDataSharingPreferenceArgs{\n\t\t\t\tOptIn: pulumi.Bool(false),\n\t\t\t},\n\t\t\tRegionsOfInterests: rekognition.StreamProcessorRegionsOfInterestArray{\n\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestArgs{\n\t\t\t\t\tPolygons: rekognition.StreamProcessorRegionsOfInterestPolygonArray{\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026rekognition.StreamProcessorRegionsOfInterestPolygonArgs{\n\t\t\t\t\t\t\tX: pulumi.Float64(0.5),\n\t\t\t\t\t\t\tY: pulumi.Float64(0.5),\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\tInput: \u0026rekognition.StreamProcessorInputTypeArgs{\n\t\t\t\tKinesisVideoStream: \u0026rekognition.StreamProcessorInputKinesisVideoStreamArgs{\n\t\t\t\t\tArn: example.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tOutput: \u0026rekognition.StreamProcessorOutputTypeArgs{\n\t\t\t\tKinesisDataStream: \u0026rekognition.StreamProcessorOutputKinesisDataStreamArgs{\n\t\t\t\t\tArn: exampleStream.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t\tSettings: \u0026rekognition.StreamProcessorSettingsArgs{\n\t\t\t\tFaceSearch: \u0026rekognition.StreamProcessorSettingsFaceSearchArgs{\n\t\t\t\t\tCollectionId: exampleCollection.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\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kinesis.VideoStream;\nimport com.pulumi.aws.kinesis.VideoStreamArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.rekognition.Collection;\nimport com.pulumi.aws.rekognition.CollectionArgs;\nimport com.pulumi.aws.rekognition.StreamProcessor;\nimport com.pulumi.aws.rekognition.StreamProcessorArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorDataSharingPreferenceArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorRegionsOfInterestArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorInputKinesisVideoStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorOutputKinesisDataStreamArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsArgs;\nimport com.pulumi.aws.rekognition.inputs.StreamProcessorSettingsFaceSearchArgs;\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 VideoStream(\"example\", VideoStreamArgs.builder()\n .name(\"example-kinesis-input\")\n .dataRetentionInHours(1)\n .deviceName(\"kinesis-video-device-name\")\n .mediaType(\"video/h264\")\n .build());\n\n var exampleStream = new Stream(\"exampleStream\", StreamArgs.builder()\n .name(\"pulumi-kinesis-example\")\n .shardCount(1)\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"Rekognition-Access\")\n .policy(Output.tuple(example.arn(), exampleStream.arn()).applyValue(values -\u003e {\n var exampleArn = values.t1;\n var exampleStreamArn = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kinesis:Get*\", \n \"kinesis:DescribeStreamSummary\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleArn))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\"kinesis:PutRecord\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", jsonArray(exampleStreamArn))\n )\n ))\n ));\n }))\n .build())\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(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"rekognition.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var exampleCollection = new Collection(\"exampleCollection\", CollectionArgs.builder()\n .collectionId(\"example-collection\")\n .build());\n\n var exampleStreamProcessor = new StreamProcessor(\"exampleStreamProcessor\", StreamProcessorArgs.builder()\n .roleArn(exampleRole.arn())\n .name(\"example-processor\")\n .dataSharingPreference(StreamProcessorDataSharingPreferenceArgs.builder()\n .optIn(false)\n .build())\n .regionsOfInterests(StreamProcessorRegionsOfInterestArgs.builder()\n .polygons( \n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build(),\n StreamProcessorRegionsOfInterestPolygonArgs.builder()\n .x(0.5)\n .y(0.5)\n .build())\n .build())\n .input(StreamProcessorInputArgs.builder()\n .kinesisVideoStream(StreamProcessorInputKinesisVideoStreamArgs.builder()\n .arn(example.arn())\n .build())\n .build())\n .output(StreamProcessorOutputArgs.builder()\n .kinesisDataStream(StreamProcessorOutputKinesisDataStreamArgs.builder()\n .arn(exampleStream.arn())\n .build())\n .build())\n .settings(StreamProcessorSettingsArgs.builder()\n .faceSearch(StreamProcessorSettingsFaceSearchArgs.builder()\n .collectionId(exampleCollection.id())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kinesis:VideoStream\n properties:\n name: example-kinesis-input\n dataRetentionInHours: 1\n deviceName: kinesis-video-device-name\n mediaType: video/h264\n exampleStream:\n type: aws:kinesis:Stream\n name: example\n properties:\n name: pulumi-kinesis-example\n shardCount: 1\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n inlinePolicies:\n - name: Rekognition-Access\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - kinesis:Get*\n - kinesis:DescribeStreamSummary\n Effect: Allow\n Resource:\n - ${example.arn}\n - Action:\n - kinesis:PutRecord\n Effect: Allow\n Resource:\n - ${exampleStream.arn}\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Principal:\n Service: rekognition.amazonaws.com\n exampleCollection:\n type: aws:rekognition:Collection\n name: example\n properties:\n collectionId: example-collection\n exampleStreamProcessor:\n type: aws:rekognition:StreamProcessor\n name: example\n properties:\n roleArn: ${exampleRole.arn}\n name: example-processor\n dataSharingPreference:\n optIn: false\n regionsOfInterests:\n - polygons:\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n - x: 0.5\n y: 0.5\n input:\n kinesisVideoStream:\n arn: ${example.arn}\n output:\n kinesisDataStream:\n arn: ${exampleStream.arn}\n settings:\n faceSearch:\n collectionId: ${exampleCollection.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Rekognition Stream Processor using the `name`. For example:\n\n```sh\n$ pulumi import aws:rekognition/streamProcessor:StreamProcessor example my-stream\n```\n", "properties": { "dataSharingPreference": { "$ref": "#/types/aws:rekognition/StreamProcessorDataSharingPreference:StreamProcessorDataSharingPreference", @@ -343940,7 +343940,7 @@ } }, "aws:s3/analyticsConfiguration:AnalyticsConfiguration": { - "description": "Provides a S3 bucket [analytics configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add analytics configuration for entire S3 bucket and export results to a second S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst analytics = new aws.s3.BucketV2(\"analytics\", {bucket: \"analytics-destination\"});\nconst example_entire_bucket = new aws.s3.AnalyticsConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n storageClassAnalysis: {\n dataExport: {\n destination: {\n s3BucketDestination: {\n bucketArn: analytics.arn,\n },\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nanalytics = aws.s3.BucketV2(\"analytics\", bucket=\"analytics-destination\")\nexample_entire_bucket = aws.s3.AnalyticsConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n storage_class_analysis={\n \"data_export\": {\n \"destination\": {\n \"s3_bucket_destination\": {\n \"bucket_arn\": analytics.arn,\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var analytics = new Aws.S3.BucketV2(\"analytics\", new()\n {\n Bucket = \"analytics-destination\",\n });\n\n var example_entire_bucket = new Aws.S3.AnalyticsConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n StorageClassAnalysis = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisArgs\n {\n DataExport = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs\n {\n Destination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs\n {\n S3BucketDestination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs\n {\n BucketArn = analytics.Arn,\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\texample, 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\tanalytics, err := s3.NewBucketV2(ctx, \"analytics\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"analytics-destination\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewAnalyticsConfiguration(ctx, \"example-entire-bucket\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tStorageClassAnalysis: \u0026s3.AnalyticsConfigurationStorageClassAnalysisArgs{\n\t\t\t\tDataExport: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportArgs{\n\t\t\t\t\tDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs{\n\t\t\t\t\t\tS3BucketDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs{\n\t\t\t\t\t\t\tBucketArn: analytics.Arn,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var analytics = new BucketV2(\"analytics\", BucketV2Args.builder()\n .bucket(\"analytics-destination\")\n .build());\n\n var example_entire_bucket = new AnalyticsConfiguration(\"example-entire-bucket\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .storageClassAnalysis(AnalyticsConfigurationStorageClassAnalysisArgs.builder()\n .dataExport(AnalyticsConfigurationStorageClassAnalysisDataExportArgs.builder()\n .destination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs.builder()\n .s3BucketDestination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs.builder()\n .bucketArn(analytics.arn())\n .build())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n storageClassAnalysis:\n dataExport:\n destination:\n s3BucketDestination:\n bucketArn: ${analytics.arn}\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n analytics:\n type: aws:s3:BucketV2\n properties:\n bucket: analytics-destination\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add analytics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.AnalyticsConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.AnalyticsConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.AnalyticsConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.AnalyticsConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAnalyticsConfiguration(ctx, \"example-filtered\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.AnalyticsConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new AnalyticsConfiguration(\"example-filtered\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(AnalyticsConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket analytics configurations using `bucket:analytics`. For example:\n\n```sh\n$ pulumi import aws:s3/analyticsConfiguration:AnalyticsConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides a S3 bucket [analytics configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add analytics configuration for entire S3 bucket and export results to a second S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst analytics = new aws.s3.BucketV2(\"analytics\", {bucket: \"analytics-destination\"});\nconst example_entire_bucket = new aws.s3.AnalyticsConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n storageClassAnalysis: {\n dataExport: {\n destination: {\n s3BucketDestination: {\n bucketArn: analytics.arn,\n },\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nanalytics = aws.s3.BucketV2(\"analytics\", bucket=\"analytics-destination\")\nexample_entire_bucket = aws.s3.AnalyticsConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n storage_class_analysis={\n \"data_export\": {\n \"destination\": {\n \"s3_bucket_destination\": {\n \"bucket_arn\": analytics.arn,\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 example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var analytics = new Aws.S3.BucketV2(\"analytics\", new()\n {\n Bucket = \"analytics-destination\",\n });\n\n var example_entire_bucket = new Aws.S3.AnalyticsConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n StorageClassAnalysis = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisArgs\n {\n DataExport = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs\n {\n Destination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs\n {\n S3BucketDestination = new Aws.S3.Inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs\n {\n BucketArn = analytics.Arn,\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\texample, 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\tanalytics, err := s3.NewBucketV2(ctx, \"analytics\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"analytics-destination\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewAnalyticsConfiguration(ctx, \"example-entire-bucket\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tStorageClassAnalysis: \u0026s3.AnalyticsConfigurationStorageClassAnalysisArgs{\n\t\t\t\tDataExport: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportArgs{\n\t\t\t\t\tDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs{\n\t\t\t\t\t\tS3BucketDestination: \u0026s3.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs{\n\t\t\t\t\t\t\tBucketArn: analytics.Arn,\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.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var analytics = new BucketV2(\"analytics\", BucketV2Args.builder()\n .bucket(\"analytics-destination\")\n .build());\n\n var example_entire_bucket = new AnalyticsConfiguration(\"example-entire-bucket\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .storageClassAnalysis(AnalyticsConfigurationStorageClassAnalysisArgs.builder()\n .dataExport(AnalyticsConfigurationStorageClassAnalysisDataExportArgs.builder()\n .destination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationArgs.builder()\n .s3BucketDestination(AnalyticsConfigurationStorageClassAnalysisDataExportDestinationS3BucketDestinationArgs.builder()\n .bucketArn(analytics.arn())\n .build())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n storageClassAnalysis:\n dataExport:\n destination:\n s3BucketDestination:\n bucketArn: ${analytics.arn}\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n analytics:\n type: aws:s3:BucketV2\n properties:\n bucket: analytics-destination\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add analytics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.AnalyticsConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.AnalyticsConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.AnalyticsConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.AnalyticsConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAnalyticsConfiguration(ctx, \"example-filtered\", \u0026s3.AnalyticsConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.AnalyticsConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AnalyticsConfiguration;\nimport com.pulumi.aws.s3.AnalyticsConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.AnalyticsConfigurationFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new AnalyticsConfiguration(\"example-filtered\", AnalyticsConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(AnalyticsConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:AnalyticsConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket analytics configurations using `bucket:analytics`. For example:\n\n```sh\n$ pulumi import aws:s3/analyticsConfiguration:AnalyticsConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -344635,7 +344635,7 @@ } }, "aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration": { - "description": "Provides an [S3 Intelligent-Tiering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) configuration resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add intelligent tiering configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n tierings: [\n {\n accessTier: \"DEEP_ARCHIVE_ACCESS\",\n days: 180,\n },\n {\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n tierings=[\n {\n \"access_tier\": \"DEEP_ARCHIVE_ACCESS\",\n \"days\": 180,\n },\n {\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"DEEP_ARCHIVE_ACCESS\",\n Days = 180,\n },\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-entire-bucket\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"DEEP_ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(180),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketIntelligentTieringConfiguration(\"example-entire-bucket\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .tierings( \n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"DEEP_ARCHIVE_ACCESS\")\n .days(180)\n .build(),\n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n tierings:\n - accessTier: DEEP_ARCHIVE_ACCESS\n days: 180\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add intelligent tiering configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n status: \"Disabled\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n tierings: [{\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n status=\"Disabled\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\n },\n },\n tierings=[{\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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 = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Status = \"Disabled\",\n Filter = new Aws.S3.Inputs.BucketIntelligentTieringConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\n },\n },\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-filtered\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tStatus: pulumi.String(\"Disabled\"),\n\t\t\tFilter: \u0026s3.BucketIntelligentTieringConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketIntelligentTieringConfiguration(\"example-filtered\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .status(\"Disabled\")\n .filter(BucketIntelligentTieringConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .tierings(BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n status: Disabled\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n tierings:\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket intelligent tiering configurations using `bucket:name`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides an [S3 Intelligent-Tiering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) configuration resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add intelligent tiering configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n tierings: [\n {\n accessTier: \"DEEP_ARCHIVE_ACCESS\",\n days: 180,\n },\n {\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\",\n tierings=[\n {\n \"access_tier\": \"DEEP_ARCHIVE_ACCESS\",\n \"days\": 180,\n },\n {\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"DEEP_ARCHIVE_ACCESS\",\n Days = 180,\n },\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-entire-bucket\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"DEEP_ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(180),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketIntelligentTieringConfiguration(\"example-entire-bucket\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .tierings( \n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"DEEP_ARCHIVE_ACCESS\")\n .days(180)\n .build(),\n BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-entire-bucket:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: EntireBucket\n tierings:\n - accessTier: DEEP_ARCHIVE_ACCESS\n days: 180\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add intelligent tiering configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n status: \"Disabled\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n tierings: [{\n accessTier: \"ARCHIVE_ACCESS\",\n days: 125,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketIntelligentTieringConfiguration(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n status=\"Disabled\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\n },\n },\n tierings=[{\n \"access_tier\": \"ARCHIVE_ACCESS\",\n \"days\": 125,\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 = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketIntelligentTieringConfiguration(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Status = \"Disabled\",\n Filter = new Aws.S3.Inputs.BucketIntelligentTieringConfigurationFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\n },\n },\n Tierings = new[]\n {\n new Aws.S3.Inputs.BucketIntelligentTieringConfigurationTieringArgs\n {\n AccessTier = \"ARCHIVE_ACCESS\",\n Days = 125,\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\texample, 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.NewBucketIntelligentTieringConfiguration(ctx, \"example-filtered\", \u0026s3.BucketIntelligentTieringConfigurationArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tStatus: pulumi.String(\"Disabled\"),\n\t\t\tFilter: \u0026s3.BucketIntelligentTieringConfigurationFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTierings: s3.BucketIntelligentTieringConfigurationTieringArray{\n\t\t\t\t\u0026s3.BucketIntelligentTieringConfigurationTieringArgs{\n\t\t\t\t\tAccessTier: pulumi.String(\"ARCHIVE_ACCESS\"),\n\t\t\t\t\tDays: pulumi.Int(125),\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.BucketIntelligentTieringConfiguration;\nimport com.pulumi.aws.s3.BucketIntelligentTieringConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketIntelligentTieringConfigurationTieringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketIntelligentTieringConfiguration(\"example-filtered\", BucketIntelligentTieringConfigurationArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .status(\"Disabled\")\n .filter(BucketIntelligentTieringConfigurationFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .tierings(BucketIntelligentTieringConfigurationTieringArgs.builder()\n .accessTier(\"ARCHIVE_ACCESS\")\n .days(125)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example-filtered:\n type: aws:s3:BucketIntelligentTieringConfiguration\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n status: Disabled\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n tierings:\n - accessTier: ARCHIVE_ACCESS\n days: 125\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket intelligent tiering configurations using `bucket:name`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketIntelligentTieringConfiguration:BucketIntelligentTieringConfiguration my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -344730,7 +344730,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: \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", + "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", @@ -344921,7 +344921,7 @@ } }, "aws:s3/bucketMetric:BucketMetric": { - "description": "Provides a S3 bucket [metrics configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/metrics-configurations.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add metrics configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketMetric(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketMetric(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\")\n```\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 = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketMetric(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\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(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-entire-bucket\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketMetric(\"example-entire-bucket\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-entire-bucket:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: EntireBucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter for S3 Access Point\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: \"example\"});\nconst example_access_point = new aws.s3.AccessPoint(\"example-access-point\", {\n bucket: example.id,\n name: \"example-access-point\",\n});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n accessPoint: example_access_point.arn,\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_access_point = aws.s3.AccessPoint(\"example-access-point\",\n bucket=example.id,\n name=\"example-access-point\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"access_point\": example_access_point.arn,\n \"tags\": {\n \"priority\": \"high\",\n \"class_\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_access_point = new Aws.S3.AccessPoint(\"example-access-point\", new()\n {\n Bucket = example.Id,\n Name = \"example-access-point\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n AccessPoint = example_access_point.Arn,\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAccessPoint(ctx, \"example-access-point\", \u0026s3.AccessPointArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"example-access-point\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tAccessPoint: example_access_point.Arn,\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AccessPoint;\nimport com.pulumi.aws.s3.AccessPointArgs;\nimport com.pulumi.aws.s3.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_access_point = new AccessPoint(\"example-access-point\", AccessPointArgs.builder()\n .bucket(example.id())\n .name(\"example-access-point\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .accessPoint(example_access_point.arn())\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-access-point:\n type: aws:s3:AccessPoint\n properties:\n bucket: ${example.id}\n name: example-access-point\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n accessPoint: ${[\"example-access-point\"].arn}\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket metric configurations using `bucket:metric`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketMetric:BucketMetric my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", + "description": "Provides a S3 bucket [metrics configuration](http://docs.aws.amazon.com/AmazonS3/latest/dev/metrics-configurations.html) resource.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### Add metrics configuration for entire S3 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.BucketV2(\"example\", {bucket: \"example\"});\nconst example_entire_bucket = new aws.s3.BucketMetric(\"example-entire-bucket\", {\n bucket: example.id,\n name: \"EntireBucket\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_entire_bucket = aws.s3.BucketMetric(\"example-entire-bucket\",\n bucket=example.id,\n name=\"EntireBucket\")\n```\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 = \"example\",\n });\n\n var example_entire_bucket = new Aws.S3.BucketMetric(\"example-entire-bucket\", new()\n {\n Bucket = example.Id,\n Name = \"EntireBucket\",\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(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-entire-bucket\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"EntireBucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_entire_bucket = new BucketMetric(\"example-entire-bucket\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"EntireBucket\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-entire-bucket:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: EntireBucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter\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: \"example\"});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n prefix: \"documents/\",\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"prefix\": \"documents/\",\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n Prefix = \"documents/\",\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tPrefix: pulumi.String(\"documents/\"),\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .prefix(\"documents/\")\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n prefix: documents/\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Add metrics configuration with S3 object filter for S3 Access Point\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: \"example\"});\nconst example_access_point = new aws.s3.AccessPoint(\"example-access-point\", {\n bucket: example.id,\n name: \"example-access-point\",\n});\nconst example_filtered = new aws.s3.BucketMetric(\"example-filtered\", {\n bucket: example.id,\n name: \"ImportantBlueDocuments\",\n filter: {\n accessPoint: example_access_point.arn,\n tags: {\n priority: \"high\",\n \"class\": \"blue\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_access_point = aws.s3.AccessPoint(\"example-access-point\",\n bucket=example.id,\n name=\"example-access-point\")\nexample_filtered = aws.s3.BucketMetric(\"example-filtered\",\n bucket=example.id,\n name=\"ImportantBlueDocuments\",\n filter={\n \"access_point\": example_access_point.arn,\n \"tags\": {\n \"priority\": \"high\",\n \"class\": \"blue\",\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.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var example_access_point = new Aws.S3.AccessPoint(\"example-access-point\", new()\n {\n Bucket = example.Id,\n Name = \"example-access-point\",\n });\n\n var example_filtered = new Aws.S3.BucketMetric(\"example-filtered\", new()\n {\n Bucket = example.Id,\n Name = \"ImportantBlueDocuments\",\n Filter = new Aws.S3.Inputs.BucketMetricFilterArgs\n {\n AccessPoint = example_access_point.Arn,\n Tags = \n {\n { \"priority\", \"high\" },\n { \"class\", \"blue\" },\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\texample, 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.NewAccessPoint(ctx, \"example-access-point\", \u0026s3.AccessPointArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"example-access-point\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketMetric(ctx, \"example-filtered\", \u0026s3.BucketMetricArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tName: pulumi.String(\"ImportantBlueDocuments\"),\n\t\t\tFilter: \u0026s3.BucketMetricFilterArgs{\n\t\t\t\tAccessPoint: example_access_point.Arn,\n\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\"priority\": pulumi.String(\"high\"),\n\t\t\t\t\t\"class\": pulumi.String(\"blue\"),\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.AccessPoint;\nimport com.pulumi.aws.s3.AccessPointArgs;\nimport com.pulumi.aws.s3.BucketMetric;\nimport com.pulumi.aws.s3.BucketMetricArgs;\nimport com.pulumi.aws.s3.inputs.BucketMetricFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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(\"example\")\n .build());\n\n var example_access_point = new AccessPoint(\"example-access-point\", AccessPointArgs.builder()\n .bucket(example.id())\n .name(\"example-access-point\")\n .build());\n\n var example_filtered = new BucketMetric(\"example-filtered\", BucketMetricArgs.builder()\n .bucket(example.id())\n .name(\"ImportantBlueDocuments\")\n .filter(BucketMetricFilterArgs.builder()\n .accessPoint(example_access_point.arn())\n .tags(Map.ofEntries(\n Map.entry(\"priority\", \"high\"),\n Map.entry(\"class\", \"blue\")\n ))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: example\n example-access-point:\n type: aws:s3:AccessPoint\n properties:\n bucket: ${example.id}\n name: example-access-point\n example-filtered:\n type: aws:s3:BucketMetric\n properties:\n bucket: ${example.id}\n name: ImportantBlueDocuments\n filter:\n accessPoint: ${[\"example-access-point\"].arn}\n tags:\n priority: high\n class: blue\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 bucket metric configurations using `bucket:metric`. For example:\n\n```sh\n$ pulumi import aws:s3/bucketMetric:BucketMetric my-bucket-entire-bucket my-bucket:EntireBucket\n```\n", "properties": { "bucket": { "type": "string", @@ -353331,7 +353331,7 @@ } }, "aws:scheduler/schedule:Schedule": { - "description": "Provides an EventBridge Scheduler Schedule resource.\n\nYou can find out more about EventBridge Scheduler in the [User Guide](https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.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 example = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n groupName: \"default\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: exampleAwsSqsQueue.arn,\n roleArn: exampleAwsIamRole.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n group_name=\"default\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": example_aws_sqs_queue[\"arn\"],\n \"role_arn\": example_aws_iam_role[\"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.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n GroupName = \"default\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = exampleAwsSqsQueue.Arn,\n RoleArn = exampleAwsIamRole.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/scheduler\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tGroupName: pulumi.String(\"default\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsSqsQueue.Arn),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.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.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Schedule(\"example\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .groupName(\"default\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(exampleAwsSqsQueue.arn())\n .roleArn(exampleAwsIamRole.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:scheduler:Schedule\n properties:\n name: my-schedule\n groupName: default\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: ${exampleAwsSqsQueue.arn}\n roleArn: ${exampleAwsIamRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Universal Target\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.sqs.Queue(\"example\", {});\nconst exampleSchedule = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n roleArn: exampleAwsIamRole.arn,\n input: pulumi.jsonStringify({\n MessageBody: \"Greetings, programs!\",\n QueueUrl: example.url,\n }),\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sqs.Queue(\"example\")\nexample_schedule = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n \"role_arn\": example_aws_iam_role[\"arn\"],\n \"input\": pulumi.Output.json_dumps({\n \"message_body\": \"Greetings, programs!\",\n \"queue_url\": example.url,\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.Sqs.Queue(\"example\");\n\n var exampleSchedule = new Aws.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n RoleArn = exampleAwsIamRole.Arn,\n Input = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"MessageBody\"] = \"Greetings, programs!\",\n [\"QueueUrl\"] = example.Url,\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/scheduler\"\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\texample, err := sqs.NewQueue(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.String(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\"),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\t\tInput: example.Url.ApplyT(func(url string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"MessageBody\": \"Greetings, programs!\",\n\t\t\t\t\t\t\"QueueUrl\": url,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\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.sqs.Queue;\nimport com.pulumi.aws.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\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 Queue(\"example\");\n\n var exampleSchedule = new Schedule(\"exampleSchedule\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\")\n .roleArn(exampleAwsIamRole.arn())\n .input(example.url().applyValue(url -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"MessageBody\", \"Greetings, programs!\"),\n jsonProperty(\"QueueUrl\", url)\n ))))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sqs:Queue\n exampleSchedule:\n type: aws:scheduler:Schedule\n name: example\n properties:\n name: my-schedule\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: arn:aws:scheduler:::aws-sdk:sqs:sendMessage\n roleArn: ${exampleAwsIamRole.arn}\n input:\n fn::toJSON:\n MessageBody: Greetings, programs!\n QueueUrl: ${example.url}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import schedules using the combination `group_name/name`. For example:\n\n```sh\n$ pulumi import aws:scheduler/schedule:Schedule example my-schedule-group/my-schedule\n```\n", + "description": "Provides an EventBridge Scheduler Schedule resource.\n\nYou can find out more about EventBridge Scheduler in the [User Guide](https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.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 example = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n groupName: \"default\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: exampleAwsSqsQueue.arn,\n roleArn: exampleAwsIamRole.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n group_name=\"default\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": example_aws_sqs_queue[\"arn\"],\n \"role_arn\": example_aws_iam_role[\"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.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n GroupName = \"default\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = exampleAwsSqsQueue.Arn,\n RoleArn = exampleAwsIamRole.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/scheduler\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tGroupName: pulumi.String(\"default\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsSqsQueue.Arn),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.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.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class 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 Schedule(\"example\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .groupName(\"default\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(exampleAwsSqsQueue.arn())\n .roleArn(exampleAwsIamRole.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:scheduler:Schedule\n properties:\n name: my-schedule\n groupName: default\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: ${exampleAwsSqsQueue.arn}\n roleArn: ${exampleAwsIamRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Universal Target\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.sqs.Queue(\"example\", {});\nconst exampleSchedule = new aws.scheduler.Schedule(\"example\", {\n name: \"my-schedule\",\n flexibleTimeWindow: {\n mode: \"OFF\",\n },\n scheduleExpression: \"rate(1 hours)\",\n target: {\n arn: \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n roleArn: exampleAwsIamRole.arn,\n input: pulumi.jsonStringify({\n MessageBody: \"Greetings, programs!\",\n QueueUrl: example.url,\n }),\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sqs.Queue(\"example\")\nexample_schedule = aws.scheduler.Schedule(\"example\",\n name=\"my-schedule\",\n flexible_time_window={\n \"mode\": \"OFF\",\n },\n schedule_expression=\"rate(1 hours)\",\n target={\n \"arn\": \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n \"role_arn\": example_aws_iam_role[\"arn\"],\n \"input\": pulumi.Output.json_dumps({\n \"MessageBody\": \"Greetings, programs!\",\n \"QueueUrl\": example.url,\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.Sqs.Queue(\"example\");\n\n var exampleSchedule = new Aws.Scheduler.Schedule(\"example\", new()\n {\n Name = \"my-schedule\",\n FlexibleTimeWindow = new Aws.Scheduler.Inputs.ScheduleFlexibleTimeWindowArgs\n {\n Mode = \"OFF\",\n },\n ScheduleExpression = \"rate(1 hours)\",\n Target = new Aws.Scheduler.Inputs.ScheduleTargetArgs\n {\n Arn = \"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\",\n RoleArn = exampleAwsIamRole.Arn,\n Input = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"MessageBody\"] = \"Greetings, programs!\",\n [\"QueueUrl\"] = example.Url,\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/scheduler\"\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\texample, err := sqs.NewQueue(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = scheduler.NewSchedule(ctx, \"example\", \u0026scheduler.ScheduleArgs{\n\t\t\tName: pulumi.String(\"my-schedule\"),\n\t\t\tFlexibleTimeWindow: \u0026scheduler.ScheduleFlexibleTimeWindowArgs{\n\t\t\t\tMode: pulumi.String(\"OFF\"),\n\t\t\t},\n\t\t\tScheduleExpression: pulumi.String(\"rate(1 hours)\"),\n\t\t\tTarget: \u0026scheduler.ScheduleTargetArgs{\n\t\t\t\tArn: pulumi.String(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\"),\n\t\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\t\tInput: example.Url.ApplyT(func(url string) (pulumi.String, error) {\n\t\t\t\t\tvar _zero pulumi.String\n\t\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\t\"MessageBody\": \"Greetings, programs!\",\n\t\t\t\t\t\t\"QueueUrl\": url,\n\t\t\t\t\t})\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn _zero, err\n\t\t\t\t\t}\n\t\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t\t}).(pulumi.StringOutput),\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.sqs.Queue;\nimport com.pulumi.aws.scheduler.Schedule;\nimport com.pulumi.aws.scheduler.ScheduleArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleFlexibleTimeWindowArgs;\nimport com.pulumi.aws.scheduler.inputs.ScheduleTargetArgs;\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 Queue(\"example\");\n\n var exampleSchedule = new Schedule(\"exampleSchedule\", ScheduleArgs.builder()\n .name(\"my-schedule\")\n .flexibleTimeWindow(ScheduleFlexibleTimeWindowArgs.builder()\n .mode(\"OFF\")\n .build())\n .scheduleExpression(\"rate(1 hours)\")\n .target(ScheduleTargetArgs.builder()\n .arn(\"arn:aws:scheduler:::aws-sdk:sqs:sendMessage\")\n .roleArn(exampleAwsIamRole.arn())\n .input(example.url().applyValue(url -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"MessageBody\", \"Greetings, programs!\"),\n jsonProperty(\"QueueUrl\", url)\n ))))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sqs:Queue\n exampleSchedule:\n type: aws:scheduler:Schedule\n name: example\n properties:\n name: my-schedule\n flexibleTimeWindow:\n mode: OFF\n scheduleExpression: rate(1 hours)\n target:\n arn: arn:aws:scheduler:::aws-sdk:sqs:sendMessage\n roleArn: ${exampleAwsIamRole.arn}\n input:\n fn::toJSON:\n MessageBody: Greetings, programs!\n QueueUrl: ${example.url}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import schedules using the combination `group_name/name`. For example:\n\n```sh\n$ pulumi import aws:scheduler/schedule:Schedule example my-schedule-group/my-schedule\n```\n", "properties": { "arn": { "type": "string", @@ -365568,7 +365568,7 @@ } }, "aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager": { - "description": "Resource for managing an AWS SSM Quick Setup Configuration Manager.\n\n## Example Usage\n\n### Patch Policy Configuration 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 currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.ssm.getPatchBaselines({\n defaultBaselines: true,\n});\n// transform the output of the aws_ssm_patch_baselines data source\n// into the format expected by the SelectedPatchBaselines parameter\nconst selectedPatchBaselines = JSON.stringify(example.then(example =\u003e .reduce((__obj, baseline) =\u003e ({ ...__obj, [baseline.operatingSystem]: {\n value: baseline.baselineId,\n label: baseline.baselineName,\n description: baseline.baselineDescription,\n disabled: !baseline.defaultBaseline,\n} }))));\nconst exampleQuicksetupConfigurationManager = new aws.ssm.QuicksetupConfigurationManager(\"example\", {\n name: \"example\",\n configurationDefinition: {\n localDeploymentAdministrationRoleArn: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole`),\n localDeploymentExecutionRoleName: \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n type: \"AWSQuickSetupType-PatchPolicy\",\n parameters: {\n ConfigurationOptionsPatchOperation: \"Scan\",\n ConfigurationOptionsScanValue: \"cron(0 1 * * ? *)\",\n ConfigurationOptionsScanNextInterval: \"false\",\n PatchBaselineRegion: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n PatchBaselineUseDefault: \"default\",\n PatchPolicyName: \"example\",\n SelectedPatchBaselines: selectedPatchBaselines,\n OutputLogEnableS3: \"false\",\n RateControlConcurrency: \"10%\",\n RateControlErrorThreshold: \"2%\",\n IsPolicyAttachAllowed: \"false\",\n TargetAccounts: current.then(current =\u003e current.accountId),\n TargetRegions: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n TargetType: \"*\",\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()\ncurrent_get_region = aws.get_region()\nexample = aws.ssm.get_patch_baselines(default_baselines=True)\n# transform the output of the aws_ssm_patch_baselines data source\n# into the format expected by the SelectedPatchBaselines parameter\nselected_patch_baselines = json.dumps({baseline.operating_system: {\n \"value\": baseline.baseline_id,\n \"label\": baseline.baseline_name,\n \"description\": baseline.baseline_description,\n \"disabled\": not baseline.default_baseline,\n} for baseline in example.baseline_identities})\nexample_quicksetup_configuration_manager = aws.ssm.QuicksetupConfigurationManager(\"example\",\n name=\"example\",\n configuration_definition={\n \"local_deployment_administration_role_arn\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\",\n \"local_deployment_execution_role_name\": \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n \"type\": \"AWSQuickSetupType-PatchPolicy\",\n \"parameters\": {\n \"configuration_options_patch_operation\": \"Scan\",\n \"configuration_options_scan_value\": \"cron(0 1 * * ? *)\",\n \"configuration_options_scan_next_interval\": \"false\",\n \"patch_baseline_region\": current_get_region.name,\n \"patch_baseline_use_default\": \"default\",\n \"patch_policy_name\": \"example\",\n \"selected_patch_baselines\": selected_patch_baselines,\n \"output_log_enable_s3\": \"false\",\n \"rate_control_concurrency\": \"10%\",\n \"rate_control_error_threshold\": \"2%\",\n \"is_policy_attach_allowed\": \"false\",\n \"target_accounts\": current.account_id,\n \"target_regions\": current_get_region.name,\n \"target_type\": \"*\",\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 currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Ssm.GetPatchBaselines.Invoke(new()\n {\n DefaultBaselines = true,\n });\n\n // transform the output of the aws_ssm_patch_baselines data source\n // into the format expected by the SelectedPatchBaselines parameter\n var selectedPatchBaselines = JsonSerializer.Serialize(.ToDictionary(item =\u003e {\n var baseline = item.Value;\n return baseline.OperatingSystem;\n }, item =\u003e {\n var baseline = item.Value;\n return \n {\n { \"value\", baseline.BaselineId },\n { \"label\", baseline.BaselineName },\n { \"description\", baseline.BaselineDescription },\n { \"disabled\", !baseline.DefaultBaseline },\n };\n }));\n\n var exampleQuicksetupConfigurationManager = new Aws.Ssm.QuicksetupConfigurationManager(\"example\", new()\n {\n Name = \"example\",\n ConfigurationDefinition = new Aws.Ssm.Inputs.QuicksetupConfigurationManagerConfigurationDefinitionArgs\n {\n LocalDeploymentAdministrationRoleArn = 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)}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\";\n }),\n LocalDeploymentExecutionRoleName = \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n Type = \"AWSQuickSetupType-PatchPolicy\",\n Parameters = \n {\n { \"ConfigurationOptionsPatchOperation\", \"Scan\" },\n { \"ConfigurationOptionsScanValue\", \"cron(0 1 * * ? *)\" },\n { \"ConfigurationOptionsScanNextInterval\", \"false\" },\n { \"PatchBaselineRegion\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"PatchBaselineUseDefault\", \"default\" },\n { \"PatchPolicyName\", \"example\" },\n { \"SelectedPatchBaselines\", selectedPatchBaselines },\n { \"OutputLogEnableS3\", \"false\" },\n { \"RateControlConcurrency\", \"10%\" },\n { \"RateControlErrorThreshold\", \"2%\" },\n { \"IsPolicyAttachAllowed\", \"false\" },\n { \"TargetAccounts\", current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId) },\n { \"TargetRegions\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"TargetType\", \"*\" },\n },\n },\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Quick Setup Configuration Manager using the `manager_arn`. For example:\n\n```sh\n$ pulumi import aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager example arn:aws:ssm-quicksetup:us-east-1:012345678901:configuration-manager/abcd-1234\n```\n", + "description": "Resource for managing an AWS SSM Quick Setup Configuration Manager.\n\n## Example Usage\n\n### Patch Policy Configuration 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 currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.ssm.getPatchBaselines({\n defaultBaselines: true,\n});\n// transform the output of the aws_ssm_patch_baselines data source\n// into the format expected by the SelectedPatchBaselines parameter\nconst selectedPatchBaselines = JSON.stringify(example.then(example =\u003e .reduce((__obj, baseline) =\u003e ({ ...__obj, [baseline.operatingSystem]: {\n value: baseline.baselineId,\n label: baseline.baselineName,\n description: baseline.baselineDescription,\n disabled: !baseline.defaultBaseline,\n} }))));\nconst exampleQuicksetupConfigurationManager = new aws.ssm.QuicksetupConfigurationManager(\"example\", {\n name: \"example\",\n configurationDefinition: {\n localDeploymentAdministrationRoleArn: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole`),\n localDeploymentExecutionRoleName: \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n type: \"AWSQuickSetupType-PatchPolicy\",\n parameters: {\n ConfigurationOptionsPatchOperation: \"Scan\",\n ConfigurationOptionsScanValue: \"cron(0 1 * * ? *)\",\n ConfigurationOptionsScanNextInterval: \"false\",\n PatchBaselineRegion: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n PatchBaselineUseDefault: \"default\",\n PatchPolicyName: \"example\",\n SelectedPatchBaselines: selectedPatchBaselines,\n OutputLogEnableS3: \"false\",\n RateControlConcurrency: \"10%\",\n RateControlErrorThreshold: \"2%\",\n IsPolicyAttachAllowed: \"false\",\n TargetAccounts: current.then(current =\u003e current.accountId),\n TargetRegions: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n TargetType: \"*\",\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()\ncurrent_get_region = aws.get_region()\nexample = aws.ssm.get_patch_baselines(default_baselines=True)\n# transform the output of the aws_ssm_patch_baselines data source\n# into the format expected by the SelectedPatchBaselines parameter\nselected_patch_baselines = json.dumps({baseline.operating_system: {\n \"value\": baseline.baseline_id,\n \"label\": baseline.baseline_name,\n \"description\": baseline.baseline_description,\n \"disabled\": not baseline.default_baseline,\n} for baseline in example.baseline_identities})\nexample_quicksetup_configuration_manager = aws.ssm.QuicksetupConfigurationManager(\"example\",\n name=\"example\",\n configuration_definition={\n \"local_deployment_administration_role_arn\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\",\n \"local_deployment_execution_role_name\": \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n \"type\": \"AWSQuickSetupType-PatchPolicy\",\n \"parameters\": {\n \"ConfigurationOptionsPatchOperation\": \"Scan\",\n \"ConfigurationOptionsScanValue\": \"cron(0 1 * * ? *)\",\n \"ConfigurationOptionsScanNextInterval\": \"false\",\n \"PatchBaselineRegion\": current_get_region.name,\n \"PatchBaselineUseDefault\": \"default\",\n \"PatchPolicyName\": \"example\",\n \"SelectedPatchBaselines\": selected_patch_baselines,\n \"OutputLogEnableS3\": \"false\",\n \"RateControlConcurrency\": \"10%\",\n \"RateControlErrorThreshold\": \"2%\",\n \"IsPolicyAttachAllowed\": \"false\",\n \"TargetAccounts\": current.account_id,\n \"TargetRegions\": current_get_region.name,\n \"TargetType\": \"*\",\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 currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Ssm.GetPatchBaselines.Invoke(new()\n {\n DefaultBaselines = true,\n });\n\n // transform the output of the aws_ssm_patch_baselines data source\n // into the format expected by the SelectedPatchBaselines parameter\n var selectedPatchBaselines = JsonSerializer.Serialize(.ToDictionary(item =\u003e {\n var baseline = item.Value;\n return baseline.OperatingSystem;\n }, item =\u003e {\n var baseline = item.Value;\n return \n {\n { \"value\", baseline.BaselineId },\n { \"label\", baseline.BaselineName },\n { \"description\", baseline.BaselineDescription },\n { \"disabled\", !baseline.DefaultBaseline },\n };\n }));\n\n var exampleQuicksetupConfigurationManager = new Aws.Ssm.QuicksetupConfigurationManager(\"example\", new()\n {\n Name = \"example\",\n ConfigurationDefinition = new Aws.Ssm.Inputs.QuicksetupConfigurationManagerConfigurationDefinitionArgs\n {\n LocalDeploymentAdministrationRoleArn = 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)}:role/AWS-QuickSetup-PatchPolicy-LocalAdministrationRole\";\n }),\n LocalDeploymentExecutionRoleName = \"AWS-QuickSetup-PatchPolicy-LocalExecutionRole\",\n Type = \"AWSQuickSetupType-PatchPolicy\",\n Parameters = \n {\n { \"ConfigurationOptionsPatchOperation\", \"Scan\" },\n { \"ConfigurationOptionsScanValue\", \"cron(0 1 * * ? *)\" },\n { \"ConfigurationOptionsScanNextInterval\", \"false\" },\n { \"PatchBaselineRegion\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"PatchBaselineUseDefault\", \"default\" },\n { \"PatchPolicyName\", \"example\" },\n { \"SelectedPatchBaselines\", selectedPatchBaselines },\n { \"OutputLogEnableS3\", \"false\" },\n { \"RateControlConcurrency\", \"10%\" },\n { \"RateControlErrorThreshold\", \"2%\" },\n { \"IsPolicyAttachAllowed\", \"false\" },\n { \"TargetAccounts\", current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId) },\n { \"TargetRegions\", currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name) },\n { \"TargetType\", \"*\" },\n },\n },\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Quick Setup Configuration Manager using the `manager_arn`. For example:\n\n```sh\n$ pulumi import aws:ssm/quicksetupConfigurationManager:QuicksetupConfigurationManager example arn:aws:ssm-quicksetup:us-east-1:012345678901:configuration-manager/abcd-1234\n```\n", "properties": { "configurationDefinition": { "$ref": "#/types/aws:ssm/QuicksetupConfigurationManagerConfigurationDefinition:QuicksetupConfigurationManagerConfigurationDefinition", @@ -366178,7 +366178,7 @@ } }, "aws:ssmincidents/responsePlan:ResponsePlan": { - "description": "Provides a resource to manage response plans 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 = new aws.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With All Fields\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.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n dedupeString: \"dedupe\",\n incidentTags: {\n key: \"value\",\n },\n notificationTargets: [\n {\n snsTopicArn: example1.arn,\n },\n {\n snsTopicArn: example2.arn,\n },\n ],\n summary: \"summary\",\n },\n displayName: \"display name\",\n chatChannels: [topic.arn],\n engagements: [\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action: {\n ssmAutomations: [{\n documentName: document1.name,\n roleArn: role1.arn,\n documentVersion: \"version1\",\n targetAccount: \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n parameters: [\n {\n name: \"key\",\n values: [\n \"value1\",\n \"value2\",\n ],\n },\n {\n name: \"foo\",\n values: [\"bar\"],\n },\n ],\n dynamicParameters: {\n someKey: \"INVOLVED_RESOURCES\",\n anotherKey: \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration: {\n pagerduties: [{\n name: \"pagerdutyIntergration\",\n serviceId: \"example\",\n secretId: \"example\",\n }],\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n \"dedupe_string\": \"dedupe\",\n \"incident_tags\": {\n \"key\": \"value\",\n },\n \"notification_targets\": [\n {\n \"sns_topic_arn\": example1[\"arn\"],\n },\n {\n \"sns_topic_arn\": example2[\"arn\"],\n },\n ],\n \"summary\": \"summary\",\n },\n display_name=\"display name\",\n chat_channels=[topic[\"arn\"]],\n engagements=[\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action={\n \"ssm_automations\": [{\n \"document_name\": document1[\"name\"],\n \"role_arn\": role1[\"arn\"],\n \"document_version\": \"version1\",\n \"target_account\": \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n \"parameters\": [\n {\n \"name\": \"key\",\n \"values\": [\n \"value1\",\n \"value2\",\n ],\n },\n {\n \"name\": \"foo\",\n \"values\": [\"bar\"],\n },\n ],\n \"dynamic_parameters\": {\n \"some_key\": \"INVOLVED_RESOURCES\",\n \"another_key\": \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration={\n \"pagerduties\": [{\n \"name\": \"pagerdutyIntergration\",\n \"service_id\": \"example\",\n \"secret_id\": \"example\",\n }],\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n DedupeString = \"dedupe\",\n IncidentTags = \n {\n { \"key\", \"value\" },\n },\n NotificationTargets = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example1.Arn,\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example2.Arn,\n },\n },\n Summary = \"summary\",\n },\n DisplayName = \"display name\",\n ChatChannels = new[]\n {\n topic.Arn,\n },\n Engagements = new[]\n {\n \"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\",\n },\n Action = new Aws.SsmIncidents.Inputs.ResponsePlanActionArgs\n {\n SsmAutomations = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationArgs\n {\n DocumentName = document1.Name,\n RoleArn = role1.Arn,\n DocumentVersion = \"version1\",\n TargetAccount = \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n Parameters = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"key\",\n Values = new[]\n {\n \"value1\",\n \"value2\",\n },\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"foo\",\n Values = new[]\n {\n \"bar\",\n },\n },\n },\n DynamicParameters = \n {\n { \"someKey\", \"INVOLVED_RESOURCES\" },\n { \"anotherKey\", \"INCIDENT_RECORD_ARN\" },\n },\n },\n },\n },\n Integration = new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationArgs\n {\n Pagerduties = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationPagerdutyArgs\n {\n Name = \"pagerdutyIntergration\",\n ServiceId = \"example\",\n SecretId = \"example\",\n },\n },\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t\tDedupeString: pulumi.String(\"dedupe\"),\n\t\t\t\tIncidentTags: pulumi.StringMap{\n\t\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t\tNotificationTargets: ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example1.Arn),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example2.Arn),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tSummary: pulumi.String(\"summary\"),\n\t\t\t},\n\t\t\tDisplayName: pulumi.String(\"display name\"),\n\t\t\tChatChannels: pulumi.StringArray{\n\t\t\t\ttopic.Arn,\n\t\t\t},\n\t\t\tEngagements: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"),\n\t\t\t},\n\t\t\tAction: \u0026ssmincidents.ResponsePlanActionArgs{\n\t\t\t\tSsmAutomations: ssmincidents.ResponsePlanActionSsmAutomationArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationArgs{\n\t\t\t\t\t\tDocumentName: pulumi.Any(document1.Name),\n\t\t\t\t\t\tRoleArn: pulumi.Any(role1.Arn),\n\t\t\t\t\t\tDocumentVersion: pulumi.String(\"version1\"),\n\t\t\t\t\t\tTargetAccount: pulumi.String(\"RESPONSE_PLAN_OWNER_ACCOUNT\"),\n\t\t\t\t\t\tParameters: ssmincidents.ResponsePlanActionSsmAutomationParameterArray{\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"key\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value1\"),\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value2\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"bar\"),\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\tDynamicParameters: pulumi.StringMap{\n\t\t\t\t\t\t\t\"someKey\": pulumi.String(\"INVOLVED_RESOURCES\"),\n\t\t\t\t\t\t\t\"anotherKey\": pulumi.String(\"INCIDENT_RECORD_ARN\"),\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\tIntegration: \u0026ssmincidents.ResponsePlanIntegrationArgs{\n\t\t\t\tPagerduties: ssmincidents.ResponsePlanIntegrationPagerdutyArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIntegrationPagerdutyArgs{\n\t\t\t\t\t\tName: pulumi.String(\"pagerdutyIntergration\"),\n\t\t\t\t\t\tServiceId: pulumi.String(\"example\"),\n\t\t\t\t\t\tSecretId: pulumi.String(\"example\"),\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\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanActionArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIntegrationArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .dedupeString(\"dedupe\")\n .incidentTags(Map.of(\"key\", \"value\"))\n .notificationTargets( \n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example1.arn())\n .build(),\n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example2.arn())\n .build())\n .summary(\"summary\")\n .build())\n .displayName(\"display name\")\n .chatChannels(topic.arn())\n .engagements(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\")\n .action(ResponsePlanActionArgs.builder()\n .ssmAutomations(ResponsePlanActionSsmAutomationArgs.builder()\n .documentName(document1.name())\n .roleArn(role1.arn())\n .documentVersion(\"version1\")\n .targetAccount(\"RESPONSE_PLAN_OWNER_ACCOUNT\")\n .parameters( \n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"key\")\n .values( \n \"value1\",\n \"value2\")\n .build(),\n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"foo\")\n .values(\"bar\")\n .build())\n .dynamicParameters(Map.ofEntries(\n Map.entry(\"someKey\", \"INVOLVED_RESOURCES\"),\n Map.entry(\"anotherKey\", \"INCIDENT_RECORD_ARN\")\n ))\n .build())\n .build())\n .integration(ResponsePlanIntegrationArgs.builder()\n .pagerduties(ResponsePlanIntegrationPagerdutyArgs.builder()\n .name(\"pagerdutyIntergration\")\n .serviceId(\"example\")\n .secretId(\"example\")\n .build())\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n dedupeString: dedupe\n incidentTags:\n key: value\n notificationTargets:\n - snsTopicArn: ${example1.arn}\n - snsTopicArn: ${example2.arn}\n summary: summary\n displayName: display name\n chatChannels:\n - ${topic.arn}\n engagements:\n - arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\n action:\n ssmAutomations:\n - documentName: ${document1.name}\n roleArn: ${role1.arn}\n documentVersion: version1\n targetAccount: RESPONSE_PLAN_OWNER_ACCOUNT\n parameters:\n - name: key\n values:\n - value1\n - value2\n - name: foo\n values:\n - bar\n dynamicParameters:\n someKey: INVOLVED_RESOURCES\n anotherKey: INCIDENT_RECORD_ARN\n integration:\n pagerduties:\n - name: pagerdutyIntergration\n serviceId: example\n secretId: example\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an Incident Manager response plan using the response plan ARN. You can find the response plan ARN in the AWS Management Console. For example:\n\n```sh\n$ pulumi import aws:ssmincidents/responsePlan:ResponsePlan responsePlanName ARNValue\n```\n", + "description": "Provides a resource to manage response plans 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 = new aws.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With All Fields\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.ssmincidents.ResponsePlan(\"example\", {\n name: \"name\",\n incidentTemplate: {\n title: \"title\",\n impact: 3,\n dedupeString: \"dedupe\",\n incidentTags: {\n key: \"value\",\n },\n notificationTargets: [\n {\n snsTopicArn: example1.arn,\n },\n {\n snsTopicArn: example2.arn,\n },\n ],\n summary: \"summary\",\n },\n displayName: \"display name\",\n chatChannels: [topic.arn],\n engagements: [\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action: {\n ssmAutomations: [{\n documentName: document1.name,\n roleArn: role1.arn,\n documentVersion: \"version1\",\n targetAccount: \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n parameters: [\n {\n name: \"key\",\n values: [\n \"value1\",\n \"value2\",\n ],\n },\n {\n name: \"foo\",\n values: [\"bar\"],\n },\n ],\n dynamicParameters: {\n someKey: \"INVOLVED_RESOURCES\",\n anotherKey: \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration: {\n pagerduties: [{\n name: \"pagerdutyIntergration\",\n serviceId: \"example\",\n secretId: \"example\",\n }],\n },\n tags: {\n key: \"value\",\n },\n}, {\n dependsOn: [exampleAwsSsmincidentsReplicationSet],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.ResponsePlan(\"example\",\n name=\"name\",\n incident_template={\n \"title\": \"title\",\n \"impact\": 3,\n \"dedupe_string\": \"dedupe\",\n \"incident_tags\": {\n \"key\": \"value\",\n },\n \"notification_targets\": [\n {\n \"sns_topic_arn\": example1[\"arn\"],\n },\n {\n \"sns_topic_arn\": example2[\"arn\"],\n },\n ],\n \"summary\": \"summary\",\n },\n display_name=\"display name\",\n chat_channels=[topic[\"arn\"]],\n engagements=[\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"],\n action={\n \"ssm_automations\": [{\n \"document_name\": document1[\"name\"],\n \"role_arn\": role1[\"arn\"],\n \"document_version\": \"version1\",\n \"target_account\": \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n \"parameters\": [\n {\n \"name\": \"key\",\n \"values\": [\n \"value1\",\n \"value2\",\n ],\n },\n {\n \"name\": \"foo\",\n \"values\": [\"bar\"],\n },\n ],\n \"dynamic_parameters\": {\n \"someKey\": \"INVOLVED_RESOURCES\",\n \"anotherKey\": \"INCIDENT_RECORD_ARN\",\n },\n }],\n },\n integration={\n \"pagerduties\": [{\n \"name\": \"pagerdutyIntergration\",\n \"service_id\": \"example\",\n \"secret_id\": \"example\",\n }],\n },\n tags={\n \"key\": \"value\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_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 = new Aws.SsmIncidents.ResponsePlan(\"example\", new()\n {\n Name = \"name\",\n IncidentTemplate = new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateArgs\n {\n Title = \"title\",\n Impact = 3,\n DedupeString = \"dedupe\",\n IncidentTags = \n {\n { \"key\", \"value\" },\n },\n NotificationTargets = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example1.Arn,\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanIncidentTemplateNotificationTargetArgs\n {\n SnsTopicArn = example2.Arn,\n },\n },\n Summary = \"summary\",\n },\n DisplayName = \"display name\",\n ChatChannels = new[]\n {\n topic.Arn,\n },\n Engagements = new[]\n {\n \"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\",\n },\n Action = new Aws.SsmIncidents.Inputs.ResponsePlanActionArgs\n {\n SsmAutomations = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationArgs\n {\n DocumentName = document1.Name,\n RoleArn = role1.Arn,\n DocumentVersion = \"version1\",\n TargetAccount = \"RESPONSE_PLAN_OWNER_ACCOUNT\",\n Parameters = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"key\",\n Values = new[]\n {\n \"value1\",\n \"value2\",\n },\n },\n new Aws.SsmIncidents.Inputs.ResponsePlanActionSsmAutomationParameterArgs\n {\n Name = \"foo\",\n Values = new[]\n {\n \"bar\",\n },\n },\n },\n DynamicParameters = \n {\n { \"someKey\", \"INVOLVED_RESOURCES\" },\n { \"anotherKey\", \"INCIDENT_RECORD_ARN\" },\n },\n },\n },\n },\n Integration = new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationArgs\n {\n Pagerduties = new[]\n {\n new Aws.SsmIncidents.Inputs.ResponsePlanIntegrationPagerdutyArgs\n {\n Name = \"pagerdutyIntergration\",\n ServiceId = \"example\",\n SecretId = \"example\",\n },\n },\n },\n Tags = \n {\n { \"key\", \"value\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsmincidentsReplicationSet,\n },\n });\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.NewResponsePlan(ctx, \"example\", \u0026ssmincidents.ResponsePlanArgs{\n\t\t\tName: pulumi.String(\"name\"),\n\t\t\tIncidentTemplate: \u0026ssmincidents.ResponsePlanIncidentTemplateArgs{\n\t\t\t\tTitle: pulumi.String(\"title\"),\n\t\t\t\tImpact: pulumi.Int(3),\n\t\t\t\tDedupeString: pulumi.String(\"dedupe\"),\n\t\t\t\tIncidentTags: pulumi.StringMap{\n\t\t\t\t\t\"key\": pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t\tNotificationTargets: ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example1.Arn),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIncidentTemplateNotificationTargetArgs{\n\t\t\t\t\t\tSnsTopicArn: pulumi.Any(example2.Arn),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tSummary: pulumi.String(\"summary\"),\n\t\t\t},\n\t\t\tDisplayName: pulumi.String(\"display name\"),\n\t\t\tChatChannels: pulumi.StringArray{\n\t\t\t\ttopic.Arn,\n\t\t\t},\n\t\t\tEngagements: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\"),\n\t\t\t},\n\t\t\tAction: \u0026ssmincidents.ResponsePlanActionArgs{\n\t\t\t\tSsmAutomations: ssmincidents.ResponsePlanActionSsmAutomationArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationArgs{\n\t\t\t\t\t\tDocumentName: pulumi.Any(document1.Name),\n\t\t\t\t\t\tRoleArn: pulumi.Any(role1.Arn),\n\t\t\t\t\t\tDocumentVersion: pulumi.String(\"version1\"),\n\t\t\t\t\t\tTargetAccount: pulumi.String(\"RESPONSE_PLAN_OWNER_ACCOUNT\"),\n\t\t\t\t\t\tParameters: ssmincidents.ResponsePlanActionSsmAutomationParameterArray{\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"key\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value1\"),\n\t\t\t\t\t\t\t\t\tpulumi.String(\"value2\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ssmincidents.ResponsePlanActionSsmAutomationParameterArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\t\tpulumi.String(\"bar\"),\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\tDynamicParameters: pulumi.StringMap{\n\t\t\t\t\t\t\t\"someKey\": pulumi.String(\"INVOLVED_RESOURCES\"),\n\t\t\t\t\t\t\t\"anotherKey\": pulumi.String(\"INCIDENT_RECORD_ARN\"),\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\tIntegration: \u0026ssmincidents.ResponsePlanIntegrationArgs{\n\t\t\t\tPagerduties: ssmincidents.ResponsePlanIntegrationPagerdutyArray{\n\t\t\t\t\t\u0026ssmincidents.ResponsePlanIntegrationPagerdutyArgs{\n\t\t\t\t\t\tName: pulumi.String(\"pagerdutyIntergration\"),\n\t\t\t\t\t\tServiceId: pulumi.String(\"example\"),\n\t\t\t\t\t\tSecretId: pulumi.String(\"example\"),\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\"key\": pulumi.String(\"value\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsmincidentsReplicationSet,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\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.ResponsePlan;\nimport com.pulumi.aws.ssmincidents.ResponsePlanArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIncidentTemplateArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanActionArgs;\nimport com.pulumi.aws.ssmincidents.inputs.ResponsePlanIntegrationArgs;\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 ResponsePlan(\"example\", ResponsePlanArgs.builder()\n .name(\"name\")\n .incidentTemplate(ResponsePlanIncidentTemplateArgs.builder()\n .title(\"title\")\n .impact(\"3\")\n .dedupeString(\"dedupe\")\n .incidentTags(Map.of(\"key\", \"value\"))\n .notificationTargets( \n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example1.arn())\n .build(),\n ResponsePlanIncidentTemplateNotificationTargetArgs.builder()\n .snsTopicArn(example2.arn())\n .build())\n .summary(\"summary\")\n .build())\n .displayName(\"display name\")\n .chatChannels(topic.arn())\n .engagements(\"arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\")\n .action(ResponsePlanActionArgs.builder()\n .ssmAutomations(ResponsePlanActionSsmAutomationArgs.builder()\n .documentName(document1.name())\n .roleArn(role1.arn())\n .documentVersion(\"version1\")\n .targetAccount(\"RESPONSE_PLAN_OWNER_ACCOUNT\")\n .parameters( \n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"key\")\n .values( \n \"value1\",\n \"value2\")\n .build(),\n ResponsePlanActionSsmAutomationParameterArgs.builder()\n .name(\"foo\")\n .values(\"bar\")\n .build())\n .dynamicParameters(Map.ofEntries(\n Map.entry(\"someKey\", \"INVOLVED_RESOURCES\"),\n Map.entry(\"anotherKey\", \"INCIDENT_RECORD_ARN\")\n ))\n .build())\n .build())\n .integration(ResponsePlanIntegrationArgs.builder()\n .pagerduties(ResponsePlanIntegrationPagerdutyArgs.builder()\n .name(\"pagerdutyIntergration\")\n .serviceId(\"example\")\n .secretId(\"example\")\n .build())\n .build())\n .tags(Map.of(\"key\", \"value\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsmincidentsReplicationSet)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssmincidents:ResponsePlan\n properties:\n name: name\n incidentTemplate:\n title: title\n impact: '3'\n dedupeString: dedupe\n incidentTags:\n key: value\n notificationTargets:\n - snsTopicArn: ${example1.arn}\n - snsTopicArn: ${example2.arn}\n summary: summary\n displayName: display name\n chatChannels:\n - ${topic.arn}\n engagements:\n - arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1\n action:\n ssmAutomations:\n - documentName: ${document1.name}\n roleArn: ${role1.arn}\n documentVersion: version1\n targetAccount: RESPONSE_PLAN_OWNER_ACCOUNT\n parameters:\n - name: key\n values:\n - value1\n - value2\n - name: foo\n values:\n - bar\n dynamicParameters:\n someKey: INVOLVED_RESOURCES\n anotherKey: INCIDENT_RECORD_ARN\n integration:\n pagerduties:\n - name: pagerdutyIntergration\n serviceId: example\n secretId: example\n tags:\n key: value\n options:\n dependson:\n - ${exampleAwsSsmincidentsReplicationSet}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an Incident Manager response plan using the response plan ARN. You can find the response plan ARN in the AWS Management Console. For example:\n\n```sh\n$ pulumi import aws:ssmincidents/responsePlan:ResponsePlan responsePlanName ARNValue\n```\n", "properties": { "action": { "$ref": "#/types/aws:ssmincidents/ResponsePlanAction:ResponsePlanAction" diff --git a/provider/go.mod b/provider/go.mod index 8082e7f01e6..d9f01e76bce 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -19,10 +19,10 @@ 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.1.2 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1 - github.com/pulumi/pulumi/pkg/v3 v3.136.1 - github.com/pulumi/pulumi/sdk/v3 v3.136.1 + github.com/pulumi/providertest v0.1.3 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.94.0 + github.com/pulumi/pulumi/pkg/v3 v3.137.0 + github.com/pulumi/pulumi/sdk/v3 v3.137.0 github.com/stretchr/testify v1.9.0 pgregory.net/rapid v0.6.1 ) @@ -396,7 +396,7 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.21.0 // indirect github.com/hashicorp/terraform-json v0.23.0 // indirect - github.com/hashicorp/terraform-plugin-framework v1.12.0 // indirect + github.com/hashicorp/terraform-plugin-framework v1.13.0 // indirect github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 // indirect github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 // indirect github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0 // indirect @@ -456,7 +456,7 @@ 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-yaml v1.10.3 // indirect + github.com/pulumi/pulumi-yaml v1.11.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/provider/go.sum b/provider/go.sum index e262d7b6b77..c9b1be60d29 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2172,8 +2172,8 @@ github.com/hashicorp/terraform-json v0.19.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2D github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI= github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c= -github.com/hashicorp/terraform-plugin-framework v1.12.0 h1:7HKaueHPaikX5/7cbC1r9d1m12iYHY+FlNZEGxQ42CQ= -github.com/hashicorp/terraform-plugin-framework v1.12.0/go.mod h1:N/IOQ2uYjW60Jp39Cp3mw7I/OpC/GfZ0385R0YibmkE= +github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ532Bh2BobF4H+yBiYJ/scw= +github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0 h1:SJXL5FfJJm17554Kpt9jFXngdM6fXbnUnZ6iT2IeiYA= github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0/go.mod h1:p0phD0IYhsu9bR4+6OetVvvH59I6LwjXGnTVEr8ox6E= github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 h1:gm5b1kHgFFhaKFhm4h2TgvMUlNzFAtUqlcOWnWPm+9E= @@ -2444,18 +2444,18 @@ 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.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng= -github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= +github.com/pulumi/providertest v0.1.3 h1:GpNKRy/haNjRHiUA9bi4diU4Op2zf3axYXbga5AepHg= +github.com/pulumi/providertest v0.1.3/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/v3 v3.93.1 h1:EEf5W3buVR5pcCKTXGouDS1/oY6TqVUIRKLksl5h4Es= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1/go.mod h1:jNpOSGkfTeZSnSjpGBHHiyllciCEDRqFaZhLUpQPlpo= -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/pulumi-terraform-bridge/v3 v3.94.0 h1:wRJxFAQVV5Bg+BUVKpsNTWDIBSPCZUnbtxTyujZiM2o= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.94.0/go.mod h1:S7rLe9paLUP2U7iwJhNJslwQszlgUfND83KRVCogbog= +github.com/pulumi/pulumi-yaml v1.11.1 h1:ULUL9fpb2Bwgf3jJHx0FamKYm0ld0KxBQr/uSAslRLk= +github.com/pulumi/pulumi-yaml v1.11.1/go.mod h1:RdXRBupRGGAD1kbYNG1V1h6pyFnXisvQsl0AANvVjGI= +github.com/pulumi/pulumi/pkg/v3 v3.137.0 h1:/KPFQQaB5W0/GhVxSTGnEzv3ZW5uieGN5Q2q+Lsr+Zw= +github.com/pulumi/pulumi/pkg/v3 v3.137.0/go.mod h1:ZQXJUTysDwq/mtilutRBKguH6DI+3b2WgNcOrs0whJ0= +github.com/pulumi/pulumi/sdk/v3 v3.137.0 h1:bxhYpOY7Z4xt+VmezEpHuhjpOekkaMqOjzxFg/1OhCw= +github.com/pulumi/pulumi/sdk/v3 v3.137.0/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/sdk/go.mod b/sdk/go.mod index 2e1bdc4257c..f018af2bf48 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.136.1 + github.com/pulumi/pulumi/sdk/v3 v3.137.0 ) retract ( diff --git a/sdk/go.sum b/sdk/go.sum index e34dbf5cbd2..5fe3ecdb3cd 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.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= -github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= +github.com/pulumi/pulumi/sdk/v3 v3.137.0 h1:bxhYpOY7Z4xt+VmezEpHuhjpOekkaMqOjzxFg/1OhCw= +github.com/pulumi/pulumi/sdk/v3 v3.137.0/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/java/build.gradle b/sdk/java/build.gradle index a50276f3f47..5b49e864716 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.16.1") + implementation("com.pulumi:pulumi:0.17.0") } task sourcesJar(type: Jar) { diff --git a/sdk/python/pulumi_aws/amplify/branch.py b/sdk/python/pulumi_aws/amplify/branch.py index 840b2f22826..6ac7e235ec2 100644 --- a/sdk/python/pulumi_aws/amplify/branch.py +++ b/sdk/python/pulumi_aws/amplify/branch.py @@ -771,8 +771,8 @@ def __init__(__self__, arn=amplify_app_master_topic.arn, input_transformer={ "input_paths": { - "job_id": "$.detail.jobId", - "app_id": "$.detail.appId", + "jobId": "$.detail.jobId", + "appId": "$.detail.appId", "region": "$.region", "branch": "$.detail.branchName", "status": "$.detail.jobStatus", @@ -910,8 +910,8 @@ def __init__(__self__, arn=amplify_app_master_topic.arn, input_transformer={ "input_paths": { - "job_id": "$.detail.jobId", - "app_id": "$.detail.appId", + "jobId": "$.detail.jobId", + "appId": "$.detail.appId", "region": "$.region", "branch": "$.detail.branchName", "status": "$.detail.jobStatus", diff --git a/sdk/python/pulumi_aws/apigatewayv2/integration.py b/sdk/python/pulumi_aws/apigatewayv2/integration.py index 8a98ea4a36c..d66bc97529d 100644 --- a/sdk/python/pulumi_aws/apigatewayv2/integration.py +++ b/sdk/python/pulumi_aws/apigatewayv2/integration.py @@ -764,13 +764,13 @@ def __init__(__self__, { "status_code": "403", "mappings": { - "append_header_auth": "$context.authorizer.authorizerResponse", + "append:header.auth": "$context.authorizer.authorizerResponse", }, }, { "status_code": "200", "mappings": { - "overwrite_statuscode": "204", + "overwrite:statuscode": "204", }, }, ]) @@ -904,13 +904,13 @@ def __init__(__self__, { "status_code": "403", "mappings": { - "append_header_auth": "$context.authorizer.authorizerResponse", + "append:header.auth": "$context.authorizer.authorizerResponse", }, }, { "status_code": "200", "mappings": { - "overwrite_statuscode": "204", + "overwrite:statuscode": "204", }, }, ]) diff --git a/sdk/python/pulumi_aws/applicationinsights/application.py b/sdk/python/pulumi_aws/applicationinsights/application.py index 2a42304e337..1104c3c453e 100644 --- a/sdk/python/pulumi_aws/applicationinsights/application.py +++ b/sdk/python/pulumi_aws/applicationinsights/application.py @@ -359,10 +359,10 @@ def __init__(__self__, name="example", resource_query={ "query": json.dumps({ - "resource_type_filters": ["AWS::EC2::Instance"], - "tag_filters": [{ - "key": "Stage", - "values": ["Test"], + "ResourceTypeFilters": ["AWS::EC2::Instance"], + "TagFilters": [{ + "Key": "Stage", + "Values": ["Test"], }], }), }) @@ -410,10 +410,10 @@ def __init__(__self__, name="example", resource_query={ "query": json.dumps({ - "resource_type_filters": ["AWS::EC2::Instance"], - "tag_filters": [{ - "key": "Stage", - "values": ["Test"], + "ResourceTypeFilters": ["AWS::EC2::Instance"], + "TagFilters": [{ + "Key": "Stage", + "Values": ["Test"], }], }), }) diff --git a/sdk/python/pulumi_aws/backup/plan.py b/sdk/python/pulumi_aws/backup/plan.py index 9a08734ce3d..f58c3a6b60d 100644 --- a/sdk/python/pulumi_aws/backup/plan.py +++ b/sdk/python/pulumi_aws/backup/plan.py @@ -244,7 +244,7 @@ def __init__(__self__, }], advanced_backup_settings=[{ "backup_options": { - "windows_vss": "enabled", + "WindowsVSS": "enabled", }, "resource_type": "EC2", }]) @@ -292,7 +292,7 @@ def __init__(__self__, }], advanced_backup_settings=[{ "backup_options": { - "windows_vss": "enabled", + "WindowsVSS": "enabled", }, "resource_type": "EC2", }]) diff --git a/sdk/python/pulumi_aws/bcmdata/export.py b/sdk/python/pulumi_aws/bcmdata/export.py index 56d96d3b059..d4628d8472f 100644 --- a/sdk/python/pulumi_aws/bcmdata/export.py +++ b/sdk/python/pulumi_aws/bcmdata/export.py @@ -155,11 +155,11 @@ def __init__(__self__, "data_queries": [{ "query_statement": "SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT", "table_configurations": { - "cos_t__an_d__usag_e__report": { - "tim_e__granularity": "HOURLY", - "includ_e__resources": "FALSE", - "includ_e__manua_l__discoun_t__compatibility": "FALSE", - "includ_e__spli_t__cos_t__allocatio_n__data": "FALSE", + "COST_AND_USAGE_REPORT": { + "TIME_GRANULARITY": "HOURLY", + "INCLUDE_RESOURCES": "FALSE", + "INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY": "FALSE", + "INCLUDE_SPLIT_COST_ALLOCATION_DATA": "FALSE", }, }, }], @@ -216,11 +216,11 @@ def __init__(__self__, "data_queries": [{ "query_statement": "SELECT identity_line_item_id, identity_time_interval, line_item_product_code,line_item_unblended_cost FROM COST_AND_USAGE_REPORT", "table_configurations": { - "cos_t__an_d__usag_e__report": { - "tim_e__granularity": "HOURLY", - "includ_e__resources": "FALSE", - "includ_e__manua_l__discoun_t__compatibility": "FALSE", - "includ_e__spli_t__cos_t__allocatio_n__data": "FALSE", + "COST_AND_USAGE_REPORT": { + "TIME_GRANULARITY": "HOURLY", + "INCLUDE_RESOURCES": "FALSE", + "INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY": "FALSE", + "INCLUDE_SPLIT_COST_ALLOCATION_DATA": "FALSE", }, }, }], diff --git a/sdk/python/pulumi_aws/cloudwatch/event_target.py b/sdk/python/pulumi_aws/cloudwatch/event_target.py index 0af2cdfa2cc..797ac86c8c3 100644 --- a/sdk/python/pulumi_aws/cloudwatch/event_target.py +++ b/sdk/python/pulumi_aws/cloudwatch/event_target.py @@ -921,10 +921,10 @@ def __init__(__self__, rule=example_event_rule.id, http_target={ "query_string_parameters": { - "body": "$.detail.body", + "Body": "$.detail.body", }, "header_parameters": { - "env": "Test", + "Env": "Test", }, }) ``` @@ -1395,10 +1395,10 @@ def __init__(__self__, rule=example_event_rule.id, http_target={ "query_string_parameters": { - "body": "$.detail.body", + "Body": "$.detail.body", }, "header_parameters": { - "env": "Test", + "Env": "Test", }, }) ``` diff --git a/sdk/python/pulumi_aws/cloudwatch/metric_alarm.py b/sdk/python/pulumi_aws/cloudwatch/metric_alarm.py index 3b4594f338c..66c3e6ecf3a 100644 --- a/sdk/python/pulumi_aws/cloudwatch/metric_alarm.py +++ b/sdk/python/pulumi_aws/cloudwatch/metric_alarm.py @@ -915,7 +915,7 @@ def __init__(__self__, "stat": "Sum", "unit": "Count", "dimensions": { - "load_balancer": "app/web", + "LoadBalancer": "app/web", }, }, }, @@ -928,7 +928,7 @@ def __init__(__self__, "stat": "Sum", "unit": "Count", "dimensions": { - "load_balancer": "app/web", + "LoadBalancer": "app/web", }, }, }, @@ -963,7 +963,7 @@ def __init__(__self__, "stat": "Average", "unit": "Count", "dimensions": { - "instance_id": "i-abc123", + "InstanceId": "i-abc123", }, }, }, @@ -1125,7 +1125,7 @@ def __init__(__self__, "stat": "Sum", "unit": "Count", "dimensions": { - "load_balancer": "app/web", + "LoadBalancer": "app/web", }, }, }, @@ -1138,7 +1138,7 @@ def __init__(__self__, "stat": "Sum", "unit": "Count", "dimensions": { - "load_balancer": "app/web", + "LoadBalancer": "app/web", }, }, }, @@ -1173,7 +1173,7 @@ def __init__(__self__, "stat": "Average", "unit": "Count", "dimensions": { - "instance_id": "i-abc123", + "InstanceId": "i-abc123", }, }, }, diff --git a/sdk/python/pulumi_aws/codepipeline/pipeline.py b/sdk/python/pulumi_aws/codepipeline/pipeline.py index 251df330818..027de573389 100644 --- a/sdk/python/pulumi_aws/codepipeline/pipeline.py +++ b/sdk/python/pulumi_aws/codepipeline/pipeline.py @@ -425,9 +425,9 @@ def __init__(__self__, "version": "1", "output_artifacts": ["source_output"], "configuration": { - "connection_arn": example.arn, - "full_repository_id": "my-organization/example", - "branch_name": "main", + "ConnectionArn": example.arn, + "FullRepositoryId": "my-organization/example", + "BranchName": "main", }, }], }, @@ -442,7 +442,7 @@ def __init__(__self__, "output_artifacts": ["build_output"], "version": "1", "configuration": { - "project_name": "test", + "ProjectName": "test", }, }], }, @@ -456,11 +456,11 @@ def __init__(__self__, "input_artifacts": ["build_output"], "version": "1", "configuration": { - "action_mode": "REPLACE_ON_FAILURE", - "capabilities": "CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM", - "output_file_name": "CreateStackOutput.json", - "stack_name": "MyStack", - "template_path": "build_output::sam-templated.yaml", + "ActionMode": "REPLACE_ON_FAILURE", + "Capabilities": "CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM", + "OutputFileName": "CreateStackOutput.json", + "StackName": "MyStack", + "TemplatePath": "build_output::sam-templated.yaml", }, }], }, @@ -581,9 +581,9 @@ def __init__(__self__, "version": "1", "output_artifacts": ["source_output"], "configuration": { - "connection_arn": example.arn, - "full_repository_id": "my-organization/example", - "branch_name": "main", + "ConnectionArn": example.arn, + "FullRepositoryId": "my-organization/example", + "BranchName": "main", }, }], }, @@ -598,7 +598,7 @@ def __init__(__self__, "output_artifacts": ["build_output"], "version": "1", "configuration": { - "project_name": "test", + "ProjectName": "test", }, }], }, @@ -612,11 +612,11 @@ def __init__(__self__, "input_artifacts": ["build_output"], "version": "1", "configuration": { - "action_mode": "REPLACE_ON_FAILURE", - "capabilities": "CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM", - "output_file_name": "CreateStackOutput.json", - "stack_name": "MyStack", - "template_path": "build_output::sam-templated.yaml", + "ActionMode": "REPLACE_ON_FAILURE", + "Capabilities": "CAPABILITY_AUTO_EXPAND,CAPABILITY_IAM", + "OutputFileName": "CreateStackOutput.json", + "StackName": "MyStack", + "TemplatePath": "build_output::sam-templated.yaml", }, }], }, diff --git a/sdk/python/pulumi_aws/codestarconnections/connection.py b/sdk/python/pulumi_aws/codestarconnections/connection.py index 26bdbfef8b7..13dbcaf7c24 100644 --- a/sdk/python/pulumi_aws/codestarconnections/connection.py +++ b/sdk/python/pulumi_aws/codestarconnections/connection.py @@ -249,9 +249,9 @@ def __init__(__self__, "version": "1", "output_artifacts": ["source_output"], "configuration": { - "connection_arn": example.arn, - "full_repository_id": "my-organization/test", - "branch_name": "main", + "ConnectionArn": example.arn, + "FullRepositoryId": "my-organization/test", + "BranchName": "main", }, }], }, @@ -316,9 +316,9 @@ def __init__(__self__, "version": "1", "output_artifacts": ["source_output"], "configuration": { - "connection_arn": example.arn, - "full_repository_id": "my-organization/test", - "branch_name": "main", + "ConnectionArn": example.arn, + "FullRepositoryId": "my-organization/test", + "BranchName": "main", }, }], }, diff --git a/sdk/python/pulumi_aws/datazone/domain.py b/sdk/python/pulumi_aws/datazone/domain.py index e9c79d9e1ed..28492f92698 100644 --- a/sdk/python/pulumi_aws/datazone/domain.py +++ b/sdk/python/pulumi_aws/datazone/domain.py @@ -389,16 +389,16 @@ def __init__(__self__, inline_policies=[{ "name": "domain_execution_policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) @@ -474,16 +474,16 @@ def __init__(__self__, inline_policies=[{ "name": "domain_execution_policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) diff --git a/sdk/python/pulumi_aws/datazone/environment_profile.py b/sdk/python/pulumi_aws/datazone/environment_profile.py index 75350e910e5..ce782a6ddfe 100644 --- a/sdk/python/pulumi_aws/datazone/environment_profile.py +++ b/sdk/python/pulumi_aws/datazone/environment_profile.py @@ -398,16 +398,16 @@ def __init__(__self__, inline_policies=[{ "name": "example-name", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) @@ -514,16 +514,16 @@ def __init__(__self__, inline_policies=[{ "name": "example-name", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) diff --git a/sdk/python/pulumi_aws/datazone/form_type.py b/sdk/python/pulumi_aws/datazone/form_type.py index f4b0fec7e50..6eb85e8079a 100644 --- a/sdk/python/pulumi_aws/datazone/form_type.py +++ b/sdk/python/pulumi_aws/datazone/form_type.py @@ -387,16 +387,16 @@ def __init__(__self__, inline_policies=[{ "name": "example-policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) @@ -496,16 +496,16 @@ def __init__(__self__, inline_policies=[{ "name": "example-policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) diff --git a/sdk/python/pulumi_aws/datazone/glossary.py b/sdk/python/pulumi_aws/datazone/glossary.py index abf5237a00e..2e5896e3d78 100644 --- a/sdk/python/pulumi_aws/datazone/glossary.py +++ b/sdk/python/pulumi_aws/datazone/glossary.py @@ -241,16 +241,16 @@ def __init__(__self__, inline_policies=[{ "name": "example_name", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) @@ -349,16 +349,16 @@ def __init__(__self__, inline_policies=[{ "name": "example_name", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) diff --git a/sdk/python/pulumi_aws/datazone/glossary_term.py b/sdk/python/pulumi_aws/datazone/glossary_term.py index fb08a7bc411..3daa51f3b36 100644 --- a/sdk/python/pulumi_aws/datazone/glossary_term.py +++ b/sdk/python/pulumi_aws/datazone/glossary_term.py @@ -375,16 +375,16 @@ def __init__(__self__, inline_policies=[{ "name": "example", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) @@ -476,16 +476,16 @@ def __init__(__self__, inline_policies=[{ "name": "example", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Action": [ "datazone:*", "ram:*", "sso:*", "kms:*", ], - "effect": "Allow", - "resource": "*", + "Effect": "Allow", + "Resource": "*", }], }), }]) diff --git a/sdk/python/pulumi_aws/dlm/lifecycle_policy.py b/sdk/python/pulumi_aws/dlm/lifecycle_policy.py index 1ac9c160a84..f8a2952803f 100644 --- a/sdk/python/pulumi_aws/dlm/lifecycle_policy.py +++ b/sdk/python/pulumi_aws/dlm/lifecycle_policy.py @@ -300,12 +300,12 @@ def __init__(__self__, "count": 14, }, "tags_to_add": { - "snapshot_creator": "DLM", + "SnapshotCreator": "DLM", }, "copy_tags": False, }], "target_tags": { - "snapshot": "true", + "Snapshot": "true", }, }) ``` @@ -348,7 +348,7 @@ def __init__(__self__, "count": 14, }, "tags_to_add": { - "snapshot_creator": "DLM", + "SnapshotCreator": "DLM", }, "copy_tags": False, "cross_region_copy_rules": [{ @@ -363,7 +363,7 @@ def __init__(__self__, }], }], "target_tags": { - "snapshot": "true", + "Snapshot": "true", }, }) ``` @@ -490,12 +490,12 @@ def __init__(__self__, "count": 14, }, "tags_to_add": { - "snapshot_creator": "DLM", + "SnapshotCreator": "DLM", }, "copy_tags": False, }], "target_tags": { - "snapshot": "true", + "Snapshot": "true", }, }) ``` @@ -538,7 +538,7 @@ def __init__(__self__, "count": 14, }, "tags_to_add": { - "snapshot_creator": "DLM", + "SnapshotCreator": "DLM", }, "copy_tags": False, "cross_region_copy_rules": [{ @@ -553,7 +553,7 @@ def __init__(__self__, }], }], "target_tags": { - "snapshot": "true", + "Snapshot": "true", }, }) ``` diff --git a/sdk/python/pulumi_aws/ec2/spot_fleet_request.py b/sdk/python/pulumi_aws/ec2/spot_fleet_request.py index 3f4341c841b..f4af2f1b324 100644 --- a/sdk/python/pulumi_aws/ec2/spot_fleet_request.py +++ b/sdk/python/pulumi_aws/ec2/spot_fleet_request.py @@ -1067,7 +1067,7 @@ def __init__(__self__, "volume_type": "gp2", }], "tags": { - "name": "spot-fleet-example", + "Name": "spot-fleet-example", }, }, ]) @@ -1148,7 +1148,7 @@ def __init__(__self__, "delete_on_termination": True, }], "tags": { - "name": "Spot Node", + "Name": "Spot Node", "tag_builder": "builder", }, } for entry in [{"key": k, "value": v} for k, v in [{ @@ -1317,7 +1317,7 @@ def __init__(__self__, "volume_type": "gp2", }], "tags": { - "name": "spot-fleet-example", + "Name": "spot-fleet-example", }, }, ]) @@ -1398,7 +1398,7 @@ def __init__(__self__, "delete_on_termination": True, }], "tags": { - "name": "Spot Node", + "Name": "Spot Node", "tag_builder": "builder", }, } for entry in [{"key": k, "value": v} for k, v in [{ diff --git a/sdk/python/pulumi_aws/ecs/task_definition.py b/sdk/python/pulumi_aws/ecs/task_definition.py index cd502b816d5..48b26b8bab4 100644 --- a/sdk/python/pulumi_aws/ecs/task_definition.py +++ b/sdk/python/pulumi_aws/ecs/task_definition.py @@ -803,11 +803,11 @@ def __init__(__self__, "type": "APPMESH", "container_name": "applicationContainerName", "properties": { - "app_ports": "8080", - "egress_ignored_ips": "169.254.170.2,169.254.169.254", - "ignored_uid": "1337", - "proxy_egress_port": "15001", - "proxy_ingress_port": "15000", + "AppPorts": "8080", + "EgressIgnoredIPs": "169.254.170.2,169.254.169.254", + "IgnoredUID": "1337", + "ProxyEgressPort": "15001", + "ProxyIngressPort": "15000", }, }) ``` @@ -1061,11 +1061,11 @@ def __init__(__self__, "type": "APPMESH", "container_name": "applicationContainerName", "properties": { - "app_ports": "8080", - "egress_ignored_ips": "169.254.170.2,169.254.169.254", - "ignored_uid": "1337", - "proxy_egress_port": "15001", - "proxy_ingress_port": "15000", + "AppPorts": "8080", + "EgressIgnoredIPs": "169.254.170.2,169.254.169.254", + "IgnoredUID": "1337", + "ProxyEgressPort": "15001", + "ProxyIngressPort": "15000", }, }) ``` diff --git a/sdk/python/pulumi_aws/evidently/launch.py b/sdk/python/pulumi_aws/evidently/launch.py index d3dd58bd727..35a878048dd 100644 --- a/sdk/python/pulumi_aws/evidently/launch.py +++ b/sdk/python/pulumi_aws/evidently/launch.py @@ -456,7 +456,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -481,7 +481,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -514,8 +514,8 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, - "variation2": 0, + "Variation1": 0, + "Variation2": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -559,7 +559,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -584,7 +584,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -616,15 +616,15 @@ def __init__(__self__, "steps": [ { "group_weights": { - "variation1": 15, - "variation2": 10, + "Variation1": 15, + "Variation2": 10, }, "start_time": "2024-01-07 01:43:59+00:00", }, { "group_weights": { - "variation1": 20, - "variation2": 25, + "Variation1": 20, + "Variation2": 25, }, "start_time": "2024-01-08 01:43:59+00:00", }, @@ -656,23 +656,23 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, - "variation2": 0, + "Variation1": 0, + "Variation2": 0, }, "segment_overrides": [ { "evaluation_order": 1, "segment": example_aws_evidently_segment["name"], "weights": { - "variation2": 10000, + "Variation2": 10000, }, }, { "evaluation_order": 2, "segment": example_aws_evidently_segment["name"], "weights": { - "variation1": 40000, - "variation2": 30000, + "Variation1": 40000, + "Variation2": 30000, }, }, ], @@ -737,7 +737,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -762,7 +762,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -795,8 +795,8 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, - "variation2": 0, + "Variation1": 0, + "Variation2": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -840,7 +840,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -865,7 +865,7 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, + "Variation1": 0, }, "start_time": "2024-01-07 01:43:59+00:00", }], @@ -897,15 +897,15 @@ def __init__(__self__, "steps": [ { "group_weights": { - "variation1": 15, - "variation2": 10, + "Variation1": 15, + "Variation2": 10, }, "start_time": "2024-01-07 01:43:59+00:00", }, { "group_weights": { - "variation1": 20, - "variation2": 25, + "Variation1": 20, + "Variation2": 25, }, "start_time": "2024-01-08 01:43:59+00:00", }, @@ -937,23 +937,23 @@ def __init__(__self__, scheduled_splits_config={ "steps": [{ "group_weights": { - "variation1": 0, - "variation2": 0, + "Variation1": 0, + "Variation2": 0, }, "segment_overrides": [ { "evaluation_order": 1, "segment": example_aws_evidently_segment["name"], "weights": { - "variation2": 10000, + "Variation2": 10000, }, }, { "evaluation_order": 2, "segment": example_aws_evidently_segment["name"], "weights": { - "variation1": 40000, - "variation2": 30000, + "Variation1": 40000, + "Variation2": 30000, }, }, ], diff --git a/sdk/python/pulumi_aws/fms/policy.py b/sdk/python/pulumi_aws/fms/policy.py index d507de505c4..0e9f2516613 100644 --- a/sdk/python/pulumi_aws/fms/policy.py +++ b/sdk/python/pulumi_aws/fms/policy.py @@ -564,16 +564,16 @@ def __init__(__self__, "type": "WAF", "managed_service_data": pulumi.Output.json_dumps({ "type": "WAF", - "rule_groups": [{ + "ruleGroups": [{ "id": example_rule_group.id, - "override_action": { + "overrideAction": { "type": "COUNT", }, }], - "default_action": { + "defaultAction": { "type": "BLOCK", }, - "override_customer_web_aclassociation": False, + "overrideCustomerWebACLAssociation": False, }), }, tags={ @@ -635,16 +635,16 @@ def __init__(__self__, "type": "WAF", "managed_service_data": pulumi.Output.json_dumps({ "type": "WAF", - "rule_groups": [{ + "ruleGroups": [{ "id": example_rule_group.id, - "override_action": { + "overrideAction": { "type": "COUNT", }, }], - "default_action": { + "defaultAction": { "type": "BLOCK", }, - "override_customer_web_aclassociation": False, + "overrideCustomerWebACLAssociation": False, }), }, tags={ diff --git a/sdk/python/pulumi_aws/glue/catalog_table.py b/sdk/python/pulumi_aws/glue/catalog_table.py index f5ce4812b29..1e5ee812210 100644 --- a/sdk/python/pulumi_aws/glue/catalog_table.py +++ b/sdk/python/pulumi_aws/glue/catalog_table.py @@ -596,7 +596,7 @@ def __init__(__self__, "name": "my-stream", "serialization_library": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe", "parameters": { - "serialization_format": "1", + "serialization.format": "1", }, }, "columns": [ @@ -699,7 +699,7 @@ def __init__(__self__, "name": "my-stream", "serialization_library": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe", "parameters": { - "serialization_format": "1", + "serialization.format": "1", }, }, "columns": [ diff --git a/sdk/python/pulumi_aws/iam/role.py b/sdk/python/pulumi_aws/iam/role.py index c94cd448073..4101b48aa80 100644 --- a/sdk/python/pulumi_aws/iam/role.py +++ b/sdk/python/pulumi_aws/iam/role.py @@ -571,11 +571,11 @@ def __init__(__self__, { "name": "my_inline_policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": ["ec2:Describe*"], - "effect": "Allow", - "resource": "*", + "Version": "2012-10-17", + "Statement": [{ + "Action": ["ec2:Describe*"], + "Effect": "Allow", + "Resource": "*", }], }), }, @@ -771,11 +771,11 @@ def __init__(__self__, { "name": "my_inline_policy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "action": ["ec2:Describe*"], - "effect": "Allow", - "resource": "*", + "Version": "2012-10-17", + "Statement": [{ + "Action": ["ec2:Describe*"], + "Effect": "Allow", + "Resource": "*", }], }), }, diff --git a/sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py b/sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py index 287f385ba2f..278aa66fd1e 100644 --- a/sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py +++ b/sdk/python/pulumi_aws/imagebuilder/distribution_configuration.py @@ -261,7 +261,7 @@ def __init__(__self__, distributions=[{ "ami_distribution_configuration": { "ami_tags": { - "cost_center": "IT", + "CostCenter": "IT", }, "name": "example-{{ imagebuilder:buildDate }}", "launch_permission": { @@ -312,7 +312,7 @@ def __init__(__self__, distributions=[{ "ami_distribution_configuration": { "ami_tags": { - "cost_center": "IT", + "CostCenter": "IT", }, "name": "example-{{ imagebuilder:buildDate }}", "launch_permission": { diff --git a/sdk/python/pulumi_aws/iot/thing_group.py b/sdk/python/pulumi_aws/iot/thing_group.py index 0d91a8fca98..490bd1ea36f 100644 --- a/sdk/python/pulumi_aws/iot/thing_group.py +++ b/sdk/python/pulumi_aws/iot/thing_group.py @@ -248,8 +248,8 @@ def __init__(__self__, properties={ "attribute_payload": { "attributes": { - "one": "11111", - "two": "TwoTwo", + "One": "11111", + "Two": "TwoTwo", }, }, "description": "This is my thing group", @@ -296,8 +296,8 @@ def __init__(__self__, properties={ "attribute_payload": { "attributes": { - "one": "11111", - "two": "TwoTwo", + "One": "11111", + "Two": "TwoTwo", }, }, "description": "This is my thing group", diff --git a/sdk/python/pulumi_aws/kinesisanalyticsv2/application.py b/sdk/python/pulumi_aws/kinesisanalyticsv2/application.py index 6c404e0b17b..b316fdcd849 100644 --- a/sdk/python/pulumi_aws/kinesisanalyticsv2/application.py +++ b/sdk/python/pulumi_aws/kinesisanalyticsv2/application.py @@ -506,14 +506,14 @@ def __init__(__self__, { "property_group_id": "PROPERTY-GROUP-1", "property_map": { - "key1": "Value1", + "Key1": "Value1", }, }, { "property_group_id": "PROPERTY-GROUP-2", "property_map": { - "key_a": "ValueA", - "key_b": "ValueB", + "KeyA": "ValueA", + "KeyB": "ValueB", }, }, ], @@ -742,14 +742,14 @@ def __init__(__self__, { "property_group_id": "PROPERTY-GROUP-1", "property_map": { - "key1": "Value1", + "Key1": "Value1", }, }, { "property_group_id": "PROPERTY-GROUP-2", "property_map": { - "key_a": "ValueA", - "key_b": "ValueB", + "KeyA": "ValueA", + "KeyB": "ValueB", }, }, ], diff --git a/sdk/python/pulumi_aws/lambda_/alias.py b/sdk/python/pulumi_aws/lambda_/alias.py index 415354699f4..895135c3986 100644 --- a/sdk/python/pulumi_aws/lambda_/alias.py +++ b/sdk/python/pulumi_aws/lambda_/alias.py @@ -254,7 +254,7 @@ def __init__(__self__, function_version="1", routing_config={ "additional_version_weights": { - "_2": 0.5, + "2": 0.5, }, }) ``` @@ -300,7 +300,7 @@ def __init__(__self__, function_version="1", routing_config={ "additional_version_weights": { - "_2": 0.5, + "2": 0.5, }, }) ``` diff --git a/sdk/python/pulumi_aws/lambda_/event_source_mapping.py b/sdk/python/pulumi_aws/lambda_/event_source_mapping.py index 31d3641a68f..7657d129e1e 100644 --- a/sdk/python/pulumi_aws/lambda_/event_source_mapping.py +++ b/sdk/python/pulumi_aws/lambda_/event_source_mapping.py @@ -1056,7 +1056,7 @@ def __init__(__self__, starting_position="TRIM_HORIZON", self_managed_event_source={ "endpoints": { - "kafk_a__bootstra_p__servers": "kafka1.example.com:9092,kafka2.example.com:9092", + "KAFKA_BOOTSTRAP_SERVERS": "kafka1.example.com:9092,kafka2.example.com:9092", }, }, source_access_configurations=[ @@ -1100,7 +1100,7 @@ def __init__(__self__, "filters": [{ "pattern": json.dumps({ "body": { - "temperature": [{ + "Temperature": [{ "numeric": [ ">", 0, @@ -1108,7 +1108,7 @@ def __init__(__self__, 100, ], }], - "location": ["New York"], + "Location": ["New York"], }, }), }], @@ -1259,7 +1259,7 @@ def __init__(__self__, starting_position="TRIM_HORIZON", self_managed_event_source={ "endpoints": { - "kafk_a__bootstra_p__servers": "kafka1.example.com:9092,kafka2.example.com:9092", + "KAFKA_BOOTSTRAP_SERVERS": "kafka1.example.com:9092,kafka2.example.com:9092", }, }, source_access_configurations=[ @@ -1303,7 +1303,7 @@ def __init__(__self__, "filters": [{ "pattern": json.dumps({ "body": { - "temperature": [{ + "Temperature": [{ "numeric": [ ">", 0, @@ -1311,7 +1311,7 @@ def __init__(__self__, 100, ], }], - "location": ["New York"], + "Location": ["New York"], }, }), }], diff --git a/sdk/python/pulumi_aws/lightsail/container_service_deployment_version.py b/sdk/python/pulumi_aws/lightsail/container_service_deployment_version.py index fb383e5462c..87e7d6a4e2c 100644 --- a/sdk/python/pulumi_aws/lightsail/container_service_deployment_version.py +++ b/sdk/python/pulumi_aws/lightsail/container_service_deployment_version.py @@ -206,10 +206,10 @@ def __init__(__self__, "image": "amazon/amazon-lightsail:hello-world", "commands": [], "environment": { - "m_y__environmen_t__variable": "my_value", + "MY_ENVIRONMENT_VARIABLE": "my_value", }, "ports": { - "_80": "HTTP", + "80": "HTTP", }, }], public_endpoint={ @@ -268,10 +268,10 @@ def __init__(__self__, "image": "amazon/amazon-lightsail:hello-world", "commands": [], "environment": { - "m_y__environmen_t__variable": "my_value", + "MY_ENVIRONMENT_VARIABLE": "my_value", }, "ports": { - "_80": "HTTP", + "80": "HTTP", }, }], public_endpoint={ diff --git a/sdk/python/pulumi_aws/networkfirewall/logging_configuration.py b/sdk/python/pulumi_aws/networkfirewall/logging_configuration.py index 62a29f22a28..96d250841f6 100644 --- a/sdk/python/pulumi_aws/networkfirewall/logging_configuration.py +++ b/sdk/python/pulumi_aws/networkfirewall/logging_configuration.py @@ -120,7 +120,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "bucket_name": example_aws_s3_bucket["bucket"], + "bucketName": example_aws_s3_bucket["bucket"], "prefix": "/example", }, "log_destination_type": "S3", @@ -140,7 +140,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "log_group": example_aws_cloudwatch_log_group["name"], + "logGroup": example_aws_cloudwatch_log_group["name"], }, "log_destination_type": "CloudWatchLogs", "log_type": "ALERT", @@ -159,7 +159,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "delivery_stream": example_aws_kinesis_firehose_delivery_stream["name"], + "deliveryStream": example_aws_kinesis_firehose_delivery_stream["name"], }, "log_destination_type": "KinesisDataFirehose", "log_type": "TLS", @@ -202,7 +202,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "bucket_name": example_aws_s3_bucket["bucket"], + "bucketName": example_aws_s3_bucket["bucket"], "prefix": "/example", }, "log_destination_type": "S3", @@ -222,7 +222,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "log_group": example_aws_cloudwatch_log_group["name"], + "logGroup": example_aws_cloudwatch_log_group["name"], }, "log_destination_type": "CloudWatchLogs", "log_type": "ALERT", @@ -241,7 +241,7 @@ def __init__(__self__, logging_configuration={ "log_destination_configs": [{ "log_destination": { - "delivery_stream": example_aws_kinesis_firehose_delivery_stream["name"], + "deliveryStream": example_aws_kinesis_firehose_delivery_stream["name"], }, "log_destination_type": "KinesisDataFirehose", "log_type": "TLS", diff --git a/sdk/python/pulumi_aws/pipes/pipe.py b/sdk/python/pulumi_aws/pipes/pipe.py index 9902118507e..6f167217c28 100644 --- a/sdk/python/pulumi_aws/pipes/pipe.py +++ b/sdk/python/pulumi_aws/pipes/pipe.py @@ -597,12 +597,12 @@ def __init__(__self__, "http_parameters": { "path_parameter_values": "example-path-param", "header_parameters": { - "example_header": "example-value", - "second_example_header": "second-example-value", + "example-header": "example-value", + "second-example-header": "second-example-value", }, "query_string_parameters": { - "example_query_string": "example-value", - "second_example_query_string": "second-example-value", + "example-query-string": "example-value", + "second-example-query-string": "second-example-value", }, }, }) @@ -800,12 +800,12 @@ def __init__(__self__, "http_parameters": { "path_parameter_values": "example-path-param", "header_parameters": { - "example_header": "example-value", - "second_example_header": "second-example-value", + "example-header": "example-value", + "second-example-header": "second-example-value", }, "query_string_parameters": { - "example_query_string": "example-value", - "second_example_query_string": "second-example-value", + "example-query-string": "example-value", + "second-example-query-string": "second-example-value", }, }, }) diff --git a/sdk/python/pulumi_aws/quicksight/vpc_connection.py b/sdk/python/pulumi_aws/quicksight/vpc_connection.py index 7fb93cc65af..2b81927172e 100644 --- a/sdk/python/pulumi_aws/quicksight/vpc_connection.py +++ b/sdk/python/pulumi_aws/quicksight/vpc_connection.py @@ -411,17 +411,17 @@ def __init__(__self__, inline_policies=[{ "name": "QuickSightVPCConnectionRolePolicy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "effect": "Allow", - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Effect": "Allow", + "Action": [ "ec2:CreateNetworkInterface", "ec2:ModifyNetworkInterfaceAttribute", "ec2:DeleteNetworkInterface", "ec2:DescribeSubnets", "ec2:DescribeSecurityGroups", ], - "resource": ["*"], + "Resource": ["*"], }], }), }]) @@ -489,17 +489,17 @@ def __init__(__self__, inline_policies=[{ "name": "QuickSightVPCConnectionRolePolicy", "policy": json.dumps({ - "version": "2012-10-17", - "statement": [{ - "effect": "Allow", - "action": [ + "Version": "2012-10-17", + "Statement": [{ + "Effect": "Allow", + "Action": [ "ec2:CreateNetworkInterface", "ec2:ModifyNetworkInterfaceAttribute", "ec2:DeleteNetworkInterface", "ec2:DescribeSubnets", "ec2:DescribeSecurityGroups", ], - "resource": ["*"], + "Resource": ["*"], }], }), }]) diff --git a/sdk/python/pulumi_aws/rekognition/stream_processor.py b/sdk/python/pulumi_aws/rekognition/stream_processor.py index 9fb890d2e90..a6e74d6adf5 100644 --- a/sdk/python/pulumi_aws/rekognition/stream_processor.py +++ b/sdk/python/pulumi_aws/rekognition/stream_processor.py @@ -466,12 +466,12 @@ def __init__(__self__, inline_policies=[{ "name": "Rekognition-Access", "policy": pulumi.Output.json_dumps({ - "version": "2012-10-17", - "statement": [ + "Version": "2012-10-17", + "Statement": [ { - "action": ["s3:PutObject"], - "effect": "Allow", - "resource": [example.arn.apply(lambda arn: f"{arn}/*")], + "Action": ["s3:PutObject"], + "Effect": "Allow", + "Resource": [example.arn.apply(lambda arn: f"{arn}/*")], }, { "Action": ["sns:Publish"], @@ -548,15 +548,15 @@ def __init__(__self__, inline_policies=[{ "name": "Rekognition-Access", "policy": pulumi.Output.json_dumps({ - "version": "2012-10-17", - "statement": [ + "Version": "2012-10-17", + "Statement": [ { - "action": [ + "Action": [ "kinesis:Get*", "kinesis:DescribeStreamSummary", ], - "effect": "Allow", - "resource": [example.arn], + "Effect": "Allow", + "Resource": [example.arn], }, { "Action": ["kinesis:PutRecord"], @@ -673,12 +673,12 @@ def __init__(__self__, inline_policies=[{ "name": "Rekognition-Access", "policy": pulumi.Output.json_dumps({ - "version": "2012-10-17", - "statement": [ + "Version": "2012-10-17", + "Statement": [ { - "action": ["s3:PutObject"], - "effect": "Allow", - "resource": [example.arn.apply(lambda arn: f"{arn}/*")], + "Action": ["s3:PutObject"], + "Effect": "Allow", + "Resource": [example.arn.apply(lambda arn: f"{arn}/*")], }, { "Action": ["sns:Publish"], @@ -755,15 +755,15 @@ def __init__(__self__, inline_policies=[{ "name": "Rekognition-Access", "policy": pulumi.Output.json_dumps({ - "version": "2012-10-17", - "statement": [ + "Version": "2012-10-17", + "Statement": [ { - "action": [ + "Action": [ "kinesis:Get*", "kinesis:DescribeStreamSummary", ], - "effect": "Allow", - "resource": [example.arn], + "Effect": "Allow", + "Resource": [example.arn], }, { "Action": ["kinesis:PutRecord"], diff --git a/sdk/python/pulumi_aws/s3/analytics_configuration.py b/sdk/python/pulumi_aws/s3/analytics_configuration.py index 34a4b8f4f55..6e5cddd3fbc 100644 --- a/sdk/python/pulumi_aws/s3/analytics_configuration.py +++ b/sdk/python/pulumi_aws/s3/analytics_configuration.py @@ -214,7 +214,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` @@ -283,7 +283,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` diff --git a/sdk/python/pulumi_aws/s3/bucket_intelligent_tiering_configuration.py b/sdk/python/pulumi_aws/s3/bucket_intelligent_tiering_configuration.py index 2e0d271a4da..b5e50545649 100644 --- a/sdk/python/pulumi_aws/s3/bucket_intelligent_tiering_configuration.py +++ b/sdk/python/pulumi_aws/s3/bucket_intelligent_tiering_configuration.py @@ -247,7 +247,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }, tierings=[{ @@ -322,7 +322,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }, tierings=[{ diff --git a/sdk/python/pulumi_aws/s3/bucket_lifecycle_configuration_v2.py b/sdk/python/pulumi_aws/s3/bucket_lifecycle_configuration_v2.py index fa1da09a01a..fd057e427ea 100644 --- a/sdk/python/pulumi_aws/s3/bucket_lifecycle_configuration_v2.py +++ b/sdk/python/pulumi_aws/s3/bucket_lifecycle_configuration_v2.py @@ -309,8 +309,8 @@ def __init__(__self__, "filter": { "and_": { "tags": { - "key1": "Value1", - "key2": "Value2", + "Key1": "Value1", + "Key2": "Value2", }, }, }, @@ -334,8 +334,8 @@ def __init__(__self__, "and_": { "prefix": "logs/", "tags": { - "key1": "Value1", - "key2": "Value2", + "Key1": "Value1", + "Key2": "Value2", }, }, }, @@ -642,8 +642,8 @@ def __init__(__self__, "filter": { "and_": { "tags": { - "key1": "Value1", - "key2": "Value2", + "Key1": "Value1", + "Key2": "Value2", }, }, }, @@ -667,8 +667,8 @@ def __init__(__self__, "and_": { "prefix": "logs/", "tags": { - "key1": "Value1", - "key2": "Value2", + "Key1": "Value1", + "Key2": "Value2", }, }, }, diff --git a/sdk/python/pulumi_aws/s3/bucket_metric.py b/sdk/python/pulumi_aws/s3/bucket_metric.py index 1593e20c66f..33cdf82affe 100644 --- a/sdk/python/pulumi_aws/s3/bucket_metric.py +++ b/sdk/python/pulumi_aws/s3/bucket_metric.py @@ -171,7 +171,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` @@ -193,7 +193,7 @@ def __init__(__self__, "access_point": example_access_point.arn, "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` @@ -251,7 +251,7 @@ def __init__(__self__, "prefix": "documents/", "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` @@ -273,7 +273,7 @@ def __init__(__self__, "access_point": example_access_point.arn, "tags": { "priority": "high", - "class_": "blue", + "class": "blue", }, }) ``` diff --git a/sdk/python/pulumi_aws/scheduler/schedule.py b/sdk/python/pulumi_aws/scheduler/schedule.py index 25aee157be8..2daa7e0759c 100644 --- a/sdk/python/pulumi_aws/scheduler/schedule.py +++ b/sdk/python/pulumi_aws/scheduler/schedule.py @@ -503,8 +503,8 @@ def __init__(__self__, "arn": "arn:aws:scheduler:::aws-sdk:sqs:sendMessage", "role_arn": example_aws_iam_role["arn"], "input": pulumi.Output.json_dumps({ - "message_body": "Greetings, programs!", - "queue_url": example.url, + "MessageBody": "Greetings, programs!", + "QueueUrl": example.url, }), }) ``` @@ -586,8 +586,8 @@ def __init__(__self__, "arn": "arn:aws:scheduler:::aws-sdk:sqs:sendMessage", "role_arn": example_aws_iam_role["arn"], "input": pulumi.Output.json_dumps({ - "message_body": "Greetings, programs!", - "queue_url": example.url, + "MessageBody": "Greetings, programs!", + "QueueUrl": example.url, }), }) ``` diff --git a/sdk/python/pulumi_aws/ssm/quicksetup_configuration_manager.py b/sdk/python/pulumi_aws/ssm/quicksetup_configuration_manager.py index 21edd7ad543..a42df826895 100644 --- a/sdk/python/pulumi_aws/ssm/quicksetup_configuration_manager.py +++ b/sdk/python/pulumi_aws/ssm/quicksetup_configuration_manager.py @@ -288,20 +288,20 @@ def __init__(__self__, "local_deployment_execution_role_name": "AWS-QuickSetup-PatchPolicy-LocalExecutionRole", "type": "AWSQuickSetupType-PatchPolicy", "parameters": { - "configuration_options_patch_operation": "Scan", - "configuration_options_scan_value": "cron(0 1 * * ? *)", - "configuration_options_scan_next_interval": "false", - "patch_baseline_region": current_get_region.name, - "patch_baseline_use_default": "default", - "patch_policy_name": "example", - "selected_patch_baselines": selected_patch_baselines, - "output_log_enable_s3": "false", - "rate_control_concurrency": "10%", - "rate_control_error_threshold": "2%", - "is_policy_attach_allowed": "false", - "target_accounts": current.account_id, - "target_regions": current_get_region.name, - "target_type": "*", + "ConfigurationOptionsPatchOperation": "Scan", + "ConfigurationOptionsScanValue": "cron(0 1 * * ? *)", + "ConfigurationOptionsScanNextInterval": "false", + "PatchBaselineRegion": current_get_region.name, + "PatchBaselineUseDefault": "default", + "PatchPolicyName": "example", + "SelectedPatchBaselines": selected_patch_baselines, + "OutputLogEnableS3": "false", + "RateControlConcurrency": "10%", + "RateControlErrorThreshold": "2%", + "IsPolicyAttachAllowed": "false", + "TargetAccounts": current.account_id, + "TargetRegions": current_get_region.name, + "TargetType": "*", }, }) ``` @@ -360,20 +360,20 @@ def __init__(__self__, "local_deployment_execution_role_name": "AWS-QuickSetup-PatchPolicy-LocalExecutionRole", "type": "AWSQuickSetupType-PatchPolicy", "parameters": { - "configuration_options_patch_operation": "Scan", - "configuration_options_scan_value": "cron(0 1 * * ? *)", - "configuration_options_scan_next_interval": "false", - "patch_baseline_region": current_get_region.name, - "patch_baseline_use_default": "default", - "patch_policy_name": "example", - "selected_patch_baselines": selected_patch_baselines, - "output_log_enable_s3": "false", - "rate_control_concurrency": "10%", - "rate_control_error_threshold": "2%", - "is_policy_attach_allowed": "false", - "target_accounts": current.account_id, - "target_regions": current_get_region.name, - "target_type": "*", + "ConfigurationOptionsPatchOperation": "Scan", + "ConfigurationOptionsScanValue": "cron(0 1 * * ? *)", + "ConfigurationOptionsScanNextInterval": "false", + "PatchBaselineRegion": current_get_region.name, + "PatchBaselineUseDefault": "default", + "PatchPolicyName": "example", + "SelectedPatchBaselines": selected_patch_baselines, + "OutputLogEnableS3": "false", + "RateControlConcurrency": "10%", + "RateControlErrorThreshold": "2%", + "IsPolicyAttachAllowed": "false", + "TargetAccounts": current.account_id, + "TargetRegions": current_get_region.name, + "TargetType": "*", }, }) ``` diff --git a/sdk/python/pulumi_aws/ssmincidents/response_plan.py b/sdk/python/pulumi_aws/ssmincidents/response_plan.py index 86e351e6eac..e592c3533d4 100644 --- a/sdk/python/pulumi_aws/ssmincidents/response_plan.py +++ b/sdk/python/pulumi_aws/ssmincidents/response_plan.py @@ -354,8 +354,8 @@ def __init__(__self__, }, ], "dynamic_parameters": { - "some_key": "INVOLVED_RESOURCES", - "another_key": "INCIDENT_RECORD_ARN", + "someKey": "INVOLVED_RESOURCES", + "anotherKey": "INCIDENT_RECORD_ARN", }, }], }, @@ -461,8 +461,8 @@ def __init__(__self__, }, ], "dynamic_parameters": { - "some_key": "INVOLVED_RESOURCES", - "another_key": "INCIDENT_RECORD_ARN", + "someKey": "INVOLVED_RESOURCES", + "anotherKey": "INCIDENT_RECORD_ARN", }, }], },