CreateUpload - AWS Device Farm

CreateUpload

Uploads an app or test scripts.

Request Syntax

{ "contentType": "string", "name": "string", "projectArn": "string", "type": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

contentType

The upload's content type (for example, application/octet-stream).

Type: String

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

Required: No

name

The upload's file name. The name should not contain any forward slashes (/). If you are uploading an iOS app, the file name must end with the .ipa extension. If you are uploading an Android app, the file name must end with the .apk extension. For all others, the file name must end with the .zip file extension.

Type: String

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

Required: Yes

projectArn

The ARN of the project for the upload.

Type: String

Length Constraints: Minimum length of 32. Maximum length of 1011.

Pattern: ^arn:.+

Required: Yes

type

The upload's upload type.

Must be one of the following values:

  • ANDROID_APP

  • IOS_APP

  • WEB_APP

  • EXTERNAL_DATA

  • APPIUM_JAVA_JUNIT_TEST_PACKAGE

  • APPIUM_JAVA_TESTNG_TEST_PACKAGE

  • APPIUM_PYTHON_TEST_PACKAGE

  • APPIUM_NODE_TEST_PACKAGE

  • APPIUM_RUBY_TEST_PACKAGE

  • APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE

  • APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE

  • APPIUM_WEB_PYTHON_TEST_PACKAGE

  • APPIUM_WEB_NODE_TEST_PACKAGE

  • APPIUM_WEB_RUBY_TEST_PACKAGE

  • CALABASH_TEST_PACKAGE

  • INSTRUMENTATION_TEST_PACKAGE

  • UIAUTOMATION_TEST_PACKAGE

  • UIAUTOMATOR_TEST_PACKAGE

  • XCTEST_TEST_PACKAGE

  • XCTEST_UI_TEST_PACKAGE

  • APPIUM_JAVA_JUNIT_TEST_SPEC

  • APPIUM_JAVA_TESTNG_TEST_SPEC

  • APPIUM_PYTHON_TEST_SPEC

  • APPIUM_NODE_TEST_SPEC

  • APPIUM_RUBY_TEST_SPEC

  • APPIUM_WEB_JAVA_JUNIT_TEST_SPEC

  • APPIUM_WEB_JAVA_TESTNG_TEST_SPEC

  • APPIUM_WEB_PYTHON_TEST_SPEC

  • APPIUM_WEB_NODE_TEST_SPEC

  • APPIUM_WEB_RUBY_TEST_SPEC

  • INSTRUMENTATION_TEST_SPEC

  • XCTEST_UI_TEST_SPEC

If you call CreateUpload with WEB_APP specified, AWS Device Farm throws an ArgumentException error.

Type: String

Valid Values: ANDROID_APP | IOS_APP | WEB_APP | EXTERNAL_DATA | APPIUM_JAVA_JUNIT_TEST_PACKAGE | APPIUM_JAVA_TESTNG_TEST_PACKAGE | APPIUM_PYTHON_TEST_PACKAGE | APPIUM_NODE_TEST_PACKAGE | APPIUM_RUBY_TEST_PACKAGE | APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE | APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE | APPIUM_WEB_PYTHON_TEST_PACKAGE | APPIUM_WEB_NODE_TEST_PACKAGE | APPIUM_WEB_RUBY_TEST_PACKAGE | CALABASH_TEST_PACKAGE | INSTRUMENTATION_TEST_PACKAGE | UIAUTOMATION_TEST_PACKAGE | UIAUTOMATOR_TEST_PACKAGE | XCTEST_TEST_PACKAGE | XCTEST_UI_TEST_PACKAGE | APPIUM_JAVA_JUNIT_TEST_SPEC | APPIUM_JAVA_TESTNG_TEST_SPEC | APPIUM_PYTHON_TEST_SPEC | APPIUM_NODE_TEST_SPEC | APPIUM_RUBY_TEST_SPEC | APPIUM_WEB_JAVA_JUNIT_TEST_SPEC | APPIUM_WEB_JAVA_TESTNG_TEST_SPEC | APPIUM_WEB_PYTHON_TEST_SPEC | APPIUM_WEB_NODE_TEST_SPEC | APPIUM_WEB_RUBY_TEST_SPEC | INSTRUMENTATION_TEST_SPEC | XCTEST_UI_TEST_SPEC

Required: Yes

Response Syntax

{ "upload": { "arn": "string", "category": "string", "contentType": "string", "created": number, "message": "string", "metadata": "string", "name": "string", "status": "string", "type": "string", "url": "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.

upload

The newly created upload.

Type: Upload object

Errors

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

ArgumentException

An invalid argument was specified.

HTTP Status Code: 400

LimitExceededException

A limit was exceeded.

HTTP Status Code: 400

NotFoundException

The specified entity was not found.

HTTP Status Code: 400

ServiceAccountException

There was a problem with the service account.

HTTP Status Code: 400

See Also

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