Application
The Application resource allows you to create and manage AWS CodeDeploy Applications for deploying applications to various compute platforms.
Minimal Example
Section titled “Minimal Example”Create a basic CodeDeploy application with a specified name and compute platform.
import AWS from "alchemy/aws/control";
const codeDeployApplication = await AWS.CodeDeploy.Application("myCodeDeployApp", { ApplicationName: "MyAwesomeApp", ComputePlatform: "Server"});
Advanced Configuration
Section titled “Advanced Configuration”Configure a CodeDeploy application with tags for better resource management.
const taggedCodeDeployApplication = await AWS.CodeDeploy.Application("myTaggedApp", { ApplicationName: "MyAwesomeAppWithTags", ComputePlatform: "Lambda", Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Team", Value: "DevOps" } ]});
Resource Adoption
Section titled “Resource Adoption”Create a CodeDeploy application while adopting an existing resource if it already exists.
const adoptExistingApplication = await AWS.CodeDeploy.Application("myAdoptedApp", { ApplicationName: "MyExistingApp", ComputePlatform: "ECS", adopt: true});
Full Metadata
Section titled “Full Metadata”Create a CodeDeploy application and retrieve its metadata, including ARN and timestamps.
const fullMetadataApplication = await AWS.CodeDeploy.Application("myFullMetadataApp", { ApplicationName: "MyFullMetadataApp", ComputePlatform: "Server", Tags: [ { Key: "Environment", Value: "Staging" } ]});
// Access application metadataconsole.log(`Application ARN: ${fullMetadataApplication.Arn}`);console.log(`Created Time: ${fullMetadataApplication.CreationTime}`);console.log(`Last Updated Time: ${fullMetadataApplication.LastUpdateTime}`);