CreateSimulationJob - AWS RoboMaker

CreateSimulationJob

Creates a simulation job.

Note

After 90 days, simulation jobs expire and will be deleted. They will no longer be accessible.

Request Syntax

POST /createSimulationJob HTTP/1.1 Content-type: application/json { "clientRequestToken": "string", "compute": { "computeType": "string", "gpuUnitLimit": number, "simulationUnitLimit": number }, "dataSources": [ { "destination": "string", "name": "string", "s3Bucket": "string", "s3Keys": [ "string" ], "type": "string" } ], "failureBehavior": "string", "iamRole": "string", "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "command": [ "string" ], "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "tools": [ { "command": "string", "exitBehavior": "string", "name": "string", "streamOutputToCloudWatch": boolean, "streamUI": boolean } ], "uploadConfigurations": [ { "name": "string", "path": "string", "uploadBehavior": "string" } ], "useDefaultTools": boolean, "useDefaultUploadConfigurations": boolean } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "command": [ "string" ], "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "tools": [ { "command": "string", "exitBehavior": "string", "name": "string", "streamOutputToCloudWatch": boolean, "streamUI": boolean } ], "uploadConfigurations": [ { "name": "string", "path": "string", "uploadBehavior": "string" } ], "useDefaultTools": boolean, "useDefaultUploadConfigurations": boolean, "worldConfigs": [ { "world": "string" } ] } ], "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ] } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientRequestToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

Required: No

compute

Compute information for the simulation job.

Type: Compute object

Required: No

dataSources

Specify data sources to mount read-only files from S3 into your simulation. These files are available under /opt/robomaker/datasources/data_source_name.

Note

There is a limit of 100 files and a combined size of 25GB for all DataSourceConfig objects.

Type: Array of DataSourceConfig objects

Array Members: Minimum number of 1 item. Maximum number of 6 items.

Required: No

failureBehavior

The failure behavior the simulation job.

Continue

Leaves the instance running for its maximum timeout duration after a 4XX error code.

Fail

Stop the simulation job and terminate the instance.

Type: String

Valid Values: Fail | Continue

Required: No

iamRole

The IAM role name that allows the simulation instance to call the AWS APIs that are specified in its associated policies on your behalf. This is how credentials are passed in to your simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

Required: Yes

loggingConfig

The logging configuration.

Type: LoggingConfig object

Required: No

maxJobDurationInSeconds

The maximum simulation job duration in seconds (up to 14 days or 1,209,600 seconds. When maxJobDurationInSeconds is reached, the simulation job will status will transition to Completed.

Type: Long

Required: Yes

outputLocation

Location for output files generated by the simulation job.

Type: OutputLocation object

Required: No

robotApplications

The robot application to use in the simulation job.

Type: Array of RobotApplicationConfig objects

Array Members: Fixed number of 1 item.

Required: No

simulationApplications

The simulation application to use in the simulation job.

Type: Array of SimulationApplicationConfig objects

Array Members: Fixed number of 1 item.

Required: No

tags

A map that contains tag keys and tag values that are attached to the simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Required: No

vpcConfig

If your simulation job accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.

Type: VPCConfig object

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "arn": "string", "clientRequestToken": "string", "compute": { "computeType": "string", "gpuUnitLimit": number, "simulationUnitLimit": number }, "dataSources": [ { "destination": "string", "name": "string", "s3Bucket": "string", "s3Keys": [ { "etag": "string", "s3Key": "string" } ], "type": "string" } ], "failureBehavior": "string", "failureCode": "string", "iamRole": "string", "lastStartedAt": number, "lastUpdatedAt": number, "loggingConfig": { "recordAllRosTopics": boolean }, "maxJobDurationInSeconds": number, "outputLocation": { "s3Bucket": "string", "s3Prefix": "string" }, "robotApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "command": [ "string" ], "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "tools": [ { "command": "string", "exitBehavior": "string", "name": "string", "streamOutputToCloudWatch": boolean, "streamUI": boolean } ], "uploadConfigurations": [ { "name": "string", "path": "string", "uploadBehavior": "string" } ], "useDefaultTools": boolean, "useDefaultUploadConfigurations": boolean } ], "simulationApplications": [ { "application": "string", "applicationVersion": "string", "launchConfig": { "command": [ "string" ], "environmentVariables": { "string" : "string" }, "launchFile": "string", "packageName": "string", "portForwardingConfig": { "portMappings": [ { "applicationPort": number, "enableOnPublicIp": boolean, "jobPort": number } ] }, "streamUI": boolean }, "tools": [ { "command": "string", "exitBehavior": "string", "name": "string", "streamOutputToCloudWatch": boolean, "streamUI": boolean } ], "uploadConfigurations": [ { "name": "string", "path": "string", "uploadBehavior": "string" } ], "useDefaultTools": boolean, "useDefaultUploadConfigurations": boolean, "worldConfigs": [ { "world": "string" } ] } ], "simulationTimeMillis": number, "status": "string", "tags": { "string" : "string" }, "vpcConfig": { "assignPublicIp": boolean, "securityGroups": [ "string" ], "subnets": [ "string" ], "vpcId": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn

The Amazon Resource Name (ARN) of the simulation job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1224.

Pattern: arn:.*

clientRequestToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_\-=]*

compute

Compute information for the simulation job.

Type: ComputeResponse object

dataSources

The data sources for the simulation job.

Type: Array of DataSource objects

failureBehavior

the failure behavior for the simulation job.

Type: String

Valid Values: Fail | Continue

failureCode

The failure code of the simulation job if it failed:

InternalServiceError

Internal service error.

RobotApplicationCrash

Robot application exited abnormally.

SimulationApplicationCrash

Simulation application exited abnormally.

BadPermissionsRobotApplication

Robot application bundle could not be downloaded.

BadPermissionsSimulationApplication

Simulation application bundle could not be downloaded.

BadPermissionsS3Output

Unable to publish outputs to customer-provided S3 bucket.

BadPermissionsCloudwatchLogs

Unable to publish logs to customer-provided CloudWatch Logs resource.

SubnetIpLimitExceeded

Subnet IP limit exceeded.

ENILimitExceeded

ENI limit exceeded.

BadPermissionsUserCredentials

Unable to use the Role provided.

InvalidBundleRobotApplication

Robot bundle cannot be extracted (invalid format, bundling error, or other issue).

InvalidBundleSimulationApplication

Simulation bundle cannot be extracted (invalid format, bundling error, or other issue).

RobotApplicationVersionMismatchedEtag

Etag for RobotApplication does not match value during version creation.

SimulationApplicationVersionMismatchedEtag

Etag for SimulationApplication does not match value during version creation.

Type: String

Valid Values: InternalServiceError | RobotApplicationCrash | SimulationApplicationCrash | RobotApplicationHealthCheckFailure | SimulationApplicationHealthCheckFailure | BadPermissionsRobotApplication | BadPermissionsSimulationApplication | BadPermissionsS3Object | BadPermissionsS3Output | BadPermissionsCloudwatchLogs | SubnetIpLimitExceeded | ENILimitExceeded | BadPermissionsUserCredentials | InvalidBundleRobotApplication | InvalidBundleSimulationApplication | InvalidS3Resource | ThrottlingError | LimitExceeded | MismatchedEtag | RobotApplicationVersionMismatchedEtag | SimulationApplicationVersionMismatchedEtag | ResourceNotFound | RequestThrottled | BatchTimedOut | BatchCanceled | InvalidInput | WrongRegionS3Bucket | WrongRegionS3Output | WrongRegionRobotApplication | WrongRegionSimulationApplication | UploadContentMismatchError

iamRole

The IAM role that allows the simulation job to call the AWS APIs that are specified in its associated policies on your behalf.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: arn:aws:iam::\w+:role/.*

lastStartedAt

The time, in milliseconds since the epoch, when the simulation job was last started.

Type: Timestamp

lastUpdatedAt

The time, in milliseconds since the epoch, when the simulation job was last updated.

Type: Timestamp

loggingConfig

The logging configuration.

Type: LoggingConfig object

maxJobDurationInSeconds

The maximum simulation job duration in seconds.

Type: Long

outputLocation

Simulation job output files location.

Type: OutputLocation object

robotApplications

The robot application used by the simulation job.

Type: Array of RobotApplicationConfig objects

Array Members: Fixed number of 1 item.

simulationApplications

The simulation application used by the simulation job.

Type: Array of SimulationApplicationConfig objects

Array Members: Fixed number of 1 item.

simulationTimeMillis

The simulation job execution duration in milliseconds.

Type: Long

status

The status of the simulation job.

Type: String

Valid Values: Pending | Preparing | Running | Restarting | Completed | Failed | RunningFailed | Terminating | Terminated | Canceled

tags

The list of all tags added to the simulation job.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9 _.\-\/+=:]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9 _.\-\/+=:]*

vpcConfig

Information about the vpc configuration.

Type: VPCConfigResponse object

Errors

For information about the errors that are common to all actions, see Common Errors.

IdempotentParameterMismatchException

The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.

HTTP Status Code: 400

InternalServerException

AWS RoboMaker experienced a service issue. Try your call again.

HTTP Status Code: 500

InvalidParameterException

A parameter specified in a request is not valid, is unsupported, or cannot be used. The returned message provides an explanation of the error value.

HTTP Status Code: 400

LimitExceededException

The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

HTTP Status Code: 400

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 400

ServiceUnavailableException

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503

ThrottlingException

AWS RoboMaker is temporarily unable to process the request. Try your call again.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: