CreateProjectCommand

Creates a project.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DeviceFarmClient, CreateProjectCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, CreateProjectCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // CreateProjectRequest
  name: "STRING_VALUE", // required
  defaultJobTimeoutMinutes: Number("int"),
  vpcConfig: { // VpcConfig
    securityGroupIds: [ // VpcSecurityGroupIds // required
      "STRING_VALUE",
    ],
    subnetIds: [ // VpcSubnetIds // required
      "STRING_VALUE",
    ],
    vpcId: "STRING_VALUE", // required
  },
};
const command = new CreateProjectCommand(input);
const response = await client.send(command);
// { // CreateProjectResult
//   project: { // Project
//     arn: "STRING_VALUE",
//     name: "STRING_VALUE",
//     defaultJobTimeoutMinutes: Number("int"),
//     created: new Date("TIMESTAMP"),
//     vpcConfig: { // VpcConfig
//       securityGroupIds: [ // VpcSecurityGroupIds // required
//         "STRING_VALUE",
//       ],
//       subnetIds: [ // VpcSubnetIds // required
//         "STRING_VALUE",
//       ],
//       vpcId: "STRING_VALUE", // required
//     },
//   },
// };

Example Usage

 Loading code editor

CreateProjectCommand Input

See CreateProjectCommandInput for more details

Parameter
Type
Description
name
Required
string | undefined

The project's name.

defaultJobTimeoutMinutes
number | undefined

Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.

vpcConfig
VpcConfig | undefined

The VPC security groups and subnets that are attached to a project.

CreateProjectCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
project
Project | undefined

The newly created project.

Throws

Name
Fault
Details
ArgumentException
client

An invalid argument was specified.

LimitExceededException
client

A limit was exceeded.

NotFoundException
client

The specified entity was not found.

ServiceAccountException
client

There was a problem with the service account.

TagOperationException
client

The operation was not successful. Try again.

DeviceFarmServiceException
Base exception class for all service exceptions from DeviceFarm service.