class Application (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppConfig.Application |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#Application |
![]() | software.amazon.awscdk.services.appconfig.Application |
![]() | aws_cdk.aws_appconfig.Application |
![]() | aws-cdk-lib » aws_appconfig » Application |
Implements
IConstruct
, IDependable
, IResource
, IApplication
, IExtensible
An AWS AppConfig application.
Example
const app = new appconfig.Application(this, 'MyApp');
const env = new appconfig.Environment(this, 'MyEnv', {
application: app,
});
new appconfig.HostedConfiguration(this, 'MyHostedConfig', {
application: app,
deployTo: [env],
content: appconfig.ConfigurationContent.fromInlineText('This is my configuration content.'),
});
Initializer
new Application(scope: Construct, id: string, props?: ApplicationProps)
Parameters
- scope
Construct
- id
string
- props
Application
Props
Construct Props
Name | Type | Description |
---|---|---|
application | string | The name of the application. |
description? | string | The description for the application. |
applicationName?
Type:
string
(optional, default: A name is generated.)
The name of the application.
description?
Type:
string
(optional, default: No description.)
The description for the application.
Properties
Name | Type | Description |
---|---|---|
application | string | The Amazon Resource Name (ARN) of the application. |
application | string | The ID of the application. |
env | Resource | The environment this resource belongs to. |
extensible | Extensible | |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
description? | string | The description of the application. |
name? | string | The name of the application. |
applicationArn
Type:
string
The Amazon Resource Name (ARN) of the application.
applicationId
Type:
string
The ID of the application.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
extensible
Type:
Extensible
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
description?
Type:
string
(optional)
The description of the application.
name?
Type:
string
(optional)
The name of the application.
Methods
Name | Description |
---|---|
add | Adds an environment. |
add | Adds an existing environment. |
add | Adds an extension association to the application. |
add | Adds a hosted configuration. |
add | Adds a sourced configuration. |
apply | Apply the given removal policy to this resource. |
at | Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application. |
environments() | Returns the list of associated environments. |
on(actionPoint, eventDestination, options?) | Adds an extension defined by the action point and event destination and also creates an extension association to an application. |
on | Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to an application. |
on | Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to an application. |
on | Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to an application. |
on | Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to an application. |
on | Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to an application. |
pre | Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to an application. |
pre | Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to an application. |
to | Returns a string representation of this construct. |
static add | Adds the AWS AppConfig Agent as a container to the provided ECS task definition. |
static from | Imports an AWS AppConfig application into the CDK using its Amazon Resource Name (ARN). |
static from | Imports an AWS AppConfig application into the CDK using its ID. |
static get | Retrieves the Lambda layer version Amazon Resource Name (ARN) for the AWS AppConfig Lambda extension. |
addEnvironment(id, options?)
public addEnvironment(id: string, options?: EnvironmentOptions): IEnvironment
Parameters
- id
string
- options
Environment
Options
Returns
Adds an environment.
addExistingEnvironment(environment)
public addExistingEnvironment(environment: IEnvironment): void
Parameters
- environment
IEnvironment
Adds an existing environment.
addExtension(extension)
public addExtension(extension: IExtension): void
Parameters
- extension
IExtension
— The extension to create an association for.
Adds an extension association to the application.
addHostedConfiguration(id, options)
public addHostedConfiguration(id: string, options: HostedConfigurationOptions): HostedConfiguration
Parameters
- id
string
- options
Hosted
Configuration Options
Returns
Adds a hosted configuration.
addSourcedConfiguration(id, options)
public addSourcedConfiguration(id: string, options: SourcedConfigurationOptions): SourcedConfiguration
Parameters
- id
string
- options
Sourced
Configuration Options
Returns
Adds a sourced configuration.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
atDeploymentTick(eventDestination, options?)
public atDeploymentTick(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.
environments()
public environments(): IEnvironment[]
Returns
Returns the list of associated environments.
on(actionPoint, eventDestination, options?)
public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- actionPoint
Action
— The action point which triggers the event.Point - eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an extension defined by the action point and event destination and also creates an extension association to an application.
onDeploymentBaking(eventDestination, options?)
public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to an application.
onDeploymentComplete(eventDestination, options?)
public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to an application.
onDeploymentRolledBack(eventDestination, options?)
public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to an application.
onDeploymentStart(eventDestination, options?)
public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to an application.
onDeploymentStep(eventDestination, options?)
public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to an application.
preCreateHostedConfigurationVersion(eventDestination, options?)
public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to an application.
preStartDeployment(eventDestination, options?)
public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to an application.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static addAgentToEcs(taskDef)
public static addAgentToEcs(taskDef: TaskDefinition): void
Parameters
- taskDef
Task
— The ECS task definition [disable-awslint:ref-via-interface].Definition
Adds the AWS AppConfig Agent as a container to the provided ECS task definition.
static fromApplicationArn(scope, id, applicationArn)
public static fromApplicationArn(scope: Construct, id: string, applicationArn: string): IApplication
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the application construct. - applicationArn
string
— The Amazon Resource Name (ARN) of the application.
Returns
Imports an AWS AppConfig application into the CDK using its Amazon Resource Name (ARN).
static fromApplicationId(scope, id, applicationId)
public static fromApplicationId(scope: Construct, id: string, applicationId: string): IApplication
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the application construct. - applicationId
string
— The ID of the application.
Returns
Imports an AWS AppConfig application into the CDK using its ID.
static getLambdaLayerVersionArn(region, platform?)
public static getLambdaLayerVersionArn(region: string, platform?: Platform): string
Parameters
- region
string
— The region for the Lambda layer (for example, 'us-east-1'). - platform
Platform
— The platform for the Lambda layer (default is Platform.X86_64).
Returns
string
Retrieves the Lambda layer version Amazon Resource Name (ARN) for the AWS AppConfig Lambda extension.