-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
…t optimized integration for createJob api (#30300) Step Functions recently released an [Optimized Integration for MediaConvert CreateJob API](https://docs.aws.amazon.com/step-functions/latest/dg/connect-mediaconvert.html) and these changes add support for the MediaConvert CreateJob task to Step Functions state machines. ### Issue # (if applicable) Closes [#30299](#30299) ### Reason for this change The aws-stepfunctions-tasks now needs to support creating MediaConvert CreateJob tasks ### Description of changes Added a new L2 construct for MediaConvert Create-Job Task: ``packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts`` ### Description of how you validated changes Unit test - ``packages/aws-cdk-lib/aws-stepfunctions-tasks/test/mediaconvert/create-job.test.ts`` Integration test - ``packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/mediaconvert/test/integ.create-job.ts`` Verified the State Machine with MediaConvert CreateJob Task with all the necessary permissions ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"Resources": { | ||
"StateMachineRoleB840431D": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "states.amazonaws.com" | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} | ||
} | ||
}, | ||
"StateMachineRoleDefaultPolicyDF1E6607": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "iam:PassRole", | ||
"Condition": { | ||
"StringLike": { | ||
"iam:PassedToService": "mediaconvert.amazonaws.com" | ||
} | ||
}, | ||
"Effect": "Allow", | ||
"Resource": "arn:aws:iam::123456789012:role/MediaConvertRole" | ||
}, | ||
{ | ||
"Action": "mediaconvert:CreateJob", | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", | ||
"Roles": [ | ||
{ | ||
"Ref": "StateMachineRoleB840431D" | ||
} | ||
] | ||
} | ||
}, | ||
"StateMachine2E01A3A5": { | ||
"Type": "AWS::StepFunctions::StateMachine", | ||
"Properties": { | ||
"DefinitionString": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"{\"StartAt\":\"MediaConvertCreateJob\",\"States\":{\"MediaConvertCreateJob\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":states:::mediaconvert:createJob\",\"Parameters\":{\"Role\":\"arn:aws:iam::123456789012:role/MediaConvertRole\",\"Settings\":{\"OutputGroups\":[{\"Outputs\":[{\"ContainerSettings\":{\"Container\":\"MP4\"},\"VideoDescription\":{\"CodecSettings\":{\"Codec\":\"H_264\",\"H264Settings\":{\"MaxBitrate\":1000,\"RateControlMode\":\"QVBR\",\"SceneChangeDetect\":\"TRANSITION_DETECTION\"}}},\"AudioDescriptions\":[{\"CodecSettings\":{\"Codec\":\"AAC\",\"AacSettings\":{\"Bitrate\":96000,\"CodingMode\":\"CODING_MODE_2_0\",\"SampleRate\":48000}}}]}],\"OutputGroupSettings\":{\"Type\":\"FILE_GROUP_SETTINGS\",\"FileGroupSettings\":{\"Destination\":\"s3://EXAMPLE-DESTINATION-BUCKET/\"}}}],\"Inputs\":[{\"AudioSelectors\":{\"Audio Selector 1\":{\"DefaultSelection\":\"DEFAULT\"}},\"FileInput\":\"s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE\"}]}}}}}" | ||
] | ||
] | ||
}, | ||
"RoleArn": { | ||
"Fn::GetAtt": [ | ||
"StateMachineRoleB840431D", | ||
"Arn" | ||
] | ||
} | ||
}, | ||
"DependsOn": [ | ||
"StateMachineRoleDefaultPolicyDF1E6607", | ||
"StateMachineRoleB840431D" | ||
], | ||
"UpdateReplacePolicy": "Delete", | ||
"DeletionPolicy": "Delete" | ||
} | ||
}, | ||
"Parameters": { | ||
"BootstrapVersion": { | ||
"Type": "AWS::SSM::Parameter::Value<String>", | ||
"Default": "/cdk-bootstrap/hnb659fds/version", | ||
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
} | ||
}, | ||
"Rules": { | ||
"CheckBootstrapVersion": { | ||
"Assertions": [ | ||
{ | ||
"Assert": { | ||
"Fn::Not": [ | ||
{ | ||
"Fn::Contains": [ | ||
[ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5" | ||
], | ||
{ | ||
"Ref": "BootstrapVersion" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
} | ||
] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.