# MediaConvertCreateJobProps

Properties for creating a MediaConvert Job.

See the CreateJob API for complete documentation

Extends: [TaskStateBaseProps](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.TaskStateBaseProps.html)
Used as props by: [MediaConvertCreateJob](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.MediaConvertCreateJob.html)

- Source: [`aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/mediaconvert/create-job.ts#L32)
- Type last changed: v2.144.0 · 31 May 2024

## Example

TypeScript:

```ts
new tasks.MediaConvertCreateJob(this, 'CreateJob', {
  createJobRequest: {
    "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"
        }
      ]
    }
  },
  integrationPattern: sfn.IntegrationPattern.RUN_JOB,
});
```

Python:

```python
tasks.MediaConvertCreateJob(self, "CreateJob",
    create_job_request={
        "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"
            }
            ]
        }
    },
    integration_pattern=sfn.IntegrationPattern.RUN_JOB
)
```

Java:

```java
MediaConvertCreateJob.Builder.create(this, "CreateJob")
        .createJobRequest(Map.of(
                "Role", "arn:aws:iam::123456789012:role/MediaConvertRole",
                "Settings", Map.of(
                        "OutputGroups", List.of(Map.of(
                                "Outputs", List.of(Map.of(
                                        "ContainerSettings", Map.of(
                                                "Container", "MP4"),
                                        "VideoDescription", Map.of(
                                                "CodecSettings", Map.of(
                                                        "Codec", "H_264",
                                                        "H264Settings", Map.of(
                                                                "MaxBitrate", 1000,
                                                                "RateControlMode", "QVBR",
                                                                "SceneChangeDetect", "TRANSITION_DETECTION"))),
                                        "AudioDescriptions", List.of(Map.of(
                                                "CodecSettings", Map.of(
                                                        "Codec", "AAC",
                                                        "AacSettings", Map.of(
                                                                "Bitrate", 96000,
                                                                "CodingMode", "CODING_MODE_2_0",
                                                                "SampleRate", 48000)))))),
                                "OutputGroupSettings", Map.of(
                                        "Type", "FILE_GROUP_SETTINGS",
                                        "FileGroupSettings", Map.of(
                                                "Destination", "s3://EXAMPLE-DESTINATION-BUCKET/")))),
                        "Inputs", List.of(Map.of(
                                "AudioSelectors", Map.of(
                                        "Audio Selector 1", Map.of(
                                                "DefaultSelection", "DEFAULT")),
                                "FileInput", "s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE")))))
        .integrationPattern(IntegrationPattern.RUN_JOB)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new MediaConvertCreateJob(this, "CreateJob", new MediaConvertCreateJobProps {
    CreateJobRequest = new Dictionary<string, object> {
        { "Role", "arn:aws:iam::123456789012:role/MediaConvertRole" },
        { "Settings", new Dictionary<string, IDictionary<string, object>[]> {
            { "OutputGroups", new [] { new Struct {
                Outputs = new [] { new Struct {
                    ContainerSettings = new Struct {
                        Container = "MP4"
                    },
                    VideoDescription = new Struct {
                        CodecSettings = new Struct {
                            Codec = "H_264",
                            H264Settings = new Struct {
                                MaxBitrate = 1000,
                                RateControlMode = "QVBR",
                                SceneChangeDetect = "TRANSITION_DETECTION"
                            }
                        }
                    },
                    AudioDescriptions = new [] { new Struct {
                        CodecSettings = new Struct {
                            Codec = "AAC",
                            AacSettings = new Struct {
                                Bitrate = 96000,
                                CodingMode = "CODING_MODE_2_0",
                                SampleRate = 48000
                            }
                        }
                    } }
                } },
                OutputGroupSettings = new Struct {
                    Type = "FILE_GROUP_SETTINGS",
                    FileGroupSettings = new Struct {
                        Destination = "s3://EXAMPLE-DESTINATION-BUCKET/"
                    }
                }
            } } },
            { "Inputs", new [] { new Struct {
                AudioSelectors = new Struct {
                    Audio Selector 1 = new Struct {
                        DefaultSelection = "DEFAULT"
                    }
                },
                FileInput = "s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"
            } } }
        } }
    },
    IntegrationPattern = IntegrationPattern.RUN_JOB
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
tasks.NewMediaConvertCreateJob(this, jsii.String("CreateJob"), &MediaConvertCreateJobProps{
	CreateJobRequest: map[string]interface{}{
		"Role": jsii.String("arn:aws:iam::123456789012:role/MediaConvertRole"),
		"Settings": map[string][]map[string]interface{}{
			"OutputGroups": []map[string]interface{}{
				map[string]interface{}{
					"Outputs": []map[string]interface{}{
						map[string]interface{}{
							"ContainerSettings": map[string]*string{
								"Container": jsii.String("MP4"),
							},
							"VideoDescription": map[string]map[string]interface{}{
								"CodecSettings": map[string]interface{}{
									"Codec": jsii.String("H_264"),
									"H264Settings": map[string]interface{}{
										"MaxBitrate": jsii.Number(1000),
										"RateControlMode": jsii.String("QVBR"),
										"SceneChangeDetect": jsii.String("TRANSITION_DETECTION"),
									},
								},
							},
							"AudioDescriptions": []map[string]map[string]interface{}{
								map[string]map[string]interface{}{
									"CodecSettings": map[string]interface{}{
										"Codec": jsii.String("AAC"),
										"AacSettings": map[string]interface{}{
											"Bitrate": jsii.Number(96000),
											"CodingMode": jsii.String("CODING_MODE_2_0"),
											"SampleRate": jsii.Number(48000),
										},
									},
								},
							},
						},
					},
					"OutputGroupSettings": map[string]interface{}{
						"Type": jsii.String("FILE_GROUP_SETTINGS"),
						"FileGroupSettings": map[string]*string{
							"Destination": jsii.String("s3://EXAMPLE-DESTINATION-BUCKET/"),
						},
					},
				},
			},
			"Inputs": []map[string]interface{}{
				map[string]interface{}{
					"AudioSelectors": map[string]map[string]*string{
						"Audio Selector 1": map[string]*string{
							"DefaultSelection": jsii.String("DEFAULT"),
						},
					},
					"FileInput": jsii.String("s3://EXAMPLE-SOURCE-BUCKET/EXAMPLE-SOURCE_FILE"),
				},
			},
		},
	},
	IntegrationPattern: sfn.IntegrationPattern_RUN_JOB,
})
```

## Properties

- `assign`: { [key: string]: any } — Workflow variables to store in this step.

  **Default:** Not assign variables

  Using workflow variables, you can store data in a step and retrieve that data in future steps.

- `comment`: string — A comment describing this state.

  **Default:** No comment

- `createJobRequest`: { [key: string]: any } (required) — The input data for the MediaConvert Create Job invocation.

- `credentials`: [Credentials](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Credentials.html) — Credentials for an IAM Role that the State Machine assumes for executing the task.

  **Default:** None (Task is executed using the State Machine's execution role)

  This enables cross-account resource invocations.

- `heartbeat`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `heartbeatTimeout`

- `heartbeatTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the heartbeat.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `inputPath`: string = $ — JSONPath expression to select part of the state to be the input to this state.

  May also be the special value JsonPath.DISCARD, which will cause the effective
  input to be the empty object {}.

- `integrationPattern`: [IntegrationPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.IntegrationPattern.html) — AWS Step Functions integrates with services directly in the Amazon States Language.

  **Default:** `IntegrationPattern.REQUEST_RESPONSE` for most tasks. `IntegrationPattern.RUN_JOB` for the following exceptions: `BatchSubmitJob`, `EmrAddStep`, `EmrCreateCluster`, `EmrTerminationCluster`, and `EmrContainersStartJobRun`.

  You can control these AWS services using service integration patterns.

  Depending on the AWS Service, the Service Integration Pattern availability will vary.

- `outputPath`: string = $ — JSONPath expression to select part of the state to be the output to this state.

  May also be the special value JsonPath.DISCARD, which will cause the effective
  output to be the empty object {}.

- `outputs`: any — Used to specify and transform output from the state.

  **Default:** $states.result or $states.errorOutput

  When specified, the value overrides the state output default.
  The output field accepts any JSON value (object, array, string, number, boolean, null).
  Any string value, including those inside objects or arrays,
  will be evaluated as JSONata if surrounded by {% %} characters.
  Output also accepts a JSONata expression directly.

- `queryLanguage`: [QueryLanguage](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.QueryLanguage.html) = JSONPath — The name of the query language used by the state.

  If the state does not contain a `queryLanguage` field,
  then it will use the query language specified in the top-level `queryLanguage` field.

- `resultPath`: string = $ — JSONPath expression to indicate where to inject the state's output.

  May also be the special value JsonPath.DISCARD, which will cause the state's
  input to become its output.

- `resultSelector`: { [key: string]: any } = None — The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

  You can use ResultSelector to create a payload with values that are static
  or selected from the state's raw result.

- `stateName`: string — Optional name for this state.

  **Default:** The construct ID will be used as state name

- `taskTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the task.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `timeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `taskTimeout`
