CreateApplicationCommand

Creates an application.

Example Syntax

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

import { CodeDeployClient, CreateApplicationCommand } from "@aws-sdk/client-codedeploy"; // ES Modules import
// const { CodeDeployClient, CreateApplicationCommand } = require("@aws-sdk/client-codedeploy"); // CommonJS import
const client = new CodeDeployClient(config);
const input = { // CreateApplicationInput
  applicationName: "STRING_VALUE", // required
  computePlatform: "Server" || "Lambda" || "ECS",
  tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE",
      Value: "STRING_VALUE",
    },
  ],
};
const command = new CreateApplicationCommand(input);
const response = await client.send(command);
// { // CreateApplicationOutput
//   applicationId: "STRING_VALUE",
// };

CreateApplicationCommand Input

See CreateApplicationCommandInput for more details

Parameter
Type
Description
applicationName
Required
string | undefined

The name of the application. This name must be unique with the applicable user or Amazon Web Services account.

computePlatform
ComputePlatform | undefined

The destination platform type for the deployment (Lambda, Server, or ECS).

tags
Tag[] | undefined

The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.

CreateApplicationCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
applicationId
string | undefined

A unique application ID.

Throws

Name
Fault
Details
ApplicationAlreadyExistsException
client

An application with the specified name with the user or Amazon Web Services account already exists.

ApplicationLimitExceededException
client

More applications were attempted to be created than are allowed.

ApplicationNameRequiredException
client

The minimum number of required application names was not specified.

InvalidApplicationNameException
client

The application name was specified in an invalid format.

InvalidComputePlatformException
client

The computePlatform is invalid. The computePlatform should be Lambda, Server, or ECS.

InvalidTagsToAddException
client

The specified tags are not valid.

CodeDeployServiceException
Base exception class for all service exceptions from CodeDeploy service.