Skip to content

Commit aeeb0ef

Browse files
authored
chore(appconfig): fix some awslint errors, explicitly exempt others (#28671)
Auditing awslint errors. Reasons for keeping current list of exemptions: * "no-unused-type:@aws-cdk/aws-appconfig-alpha.PredefinedDeploymentStrategyId" - will be fixed in a separate PR. * "props-physical-name:@aws-cdk/aws-appconfig-alpha.ApplicationProps" "props-physical-name:@aws-cdk/aws-appconfig-alpha.DeploymentStrategyProps" "props-physical-name:@aws-cdk/aws-appconfig-alpha.EnvironmentProps" "props-physical-name:@aws-cdk/aws-appconfig-alpha.ExtensionProps" - will be fixed in a separate PR. * "events-method-signature" - exempting because appconfig handles their events without cloudwatch events * "events-generic" - exempting because appconfig handles their events without cloudwatch events Closes #27894 alongside #28742 and #28743 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 03c08b0 commit aeeb0ef

File tree

2 files changed

+109
-6
lines changed

2 files changed

+109
-6
lines changed

packages/@aws-cdk/aws-appconfig-alpha/awslint.json

+29-5
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,34 @@
2525
"docs-public-apis:@aws-cdk/aws-appconfig-alpha.IConfiguration",
2626
"docs-public-apis:@aws-cdk/aws-appconfig-alpha.IApplication",
2727

28-
"ref-via-interface:@aws-cdk/aws-appconfig-alpha.Application.addAgentToEcs.taskDef",
29-
"events-in-interface",
30-
"events-method-signature",
31-
"events-generic",
32-
"from-signature:@aws-cdk/aws-appconfig-alpha.DeploymentStrategy.fromDeploymentStrategyId.params[2]"
28+
"from-signature:@aws-cdk/aws-appconfig-alpha.DeploymentStrategy.fromDeploymentStrategyId.params[2]",
29+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.on",
30+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentBaking*",
31+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentComplete*",
32+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentRolledBack*",
33+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentStart*",
34+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Application.onDeploymentStep*",
35+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.on",
36+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentBaking*",
37+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentComplete*",
38+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentRolledBack*",
39+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentStart*",
40+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.Environment.onDeploymentStep*",
41+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.on",
42+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentBaking*",
43+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentComplete*",
44+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentRolledBack*",
45+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentStart*",
46+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.HostedConfiguration.onDeploymentStep*",
47+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.on",
48+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentBaking*",
49+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentComplete*",
50+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentRolledBack*",
51+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentStart*",
52+
"events-method-signature:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration.onDeploymentStep*",
53+
"events-generic:@aws-cdk/aws-appconfig-alpha.Application",
54+
"events-generic:@aws-cdk/aws-appconfig-alpha.Environment",
55+
"events-generic:@aws-cdk/aws-appconfig-alpha.HostedConfiguration",
56+
"events-generic:@aws-cdk/aws-appconfig-alpha.SourcedConfiguration"
3357
]
3458
}

packages/@aws-cdk/aws-appconfig-alpha/lib/application.ts

+80-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,85 @@ export interface IApplication extends cdk.IResource {
7373
* Returns the list of associated environments.
7474
*/
7575
get environments(): IEnvironment[];
76+
77+
/**
78+
* Adds an extension defined by the action point and event destination
79+
* and also creates an extension association to an application.
80+
*
81+
* @param actionPoint The action point which triggers the event
82+
* @param eventDestination The event that occurs during the extension
83+
* @param options Options for the extension
84+
*/
85+
on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void;
86+
87+
/**
88+
* Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the
89+
* provided event destination and also creates an extension association to an application.
90+
*
91+
* @param eventDestination The event that occurs during the extension
92+
* @param options Options for the extension
93+
*/
94+
preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void;
95+
96+
/**
97+
* Adds a PRE_START_DEPLOYMENT extension with the provided event destination and
98+
* also creates an extension association to an application.
99+
*
100+
* @param eventDestination The event that occurs during the extension
101+
* @param options Options for the extension
102+
*/
103+
preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void;
104+
/**
105+
* Adds an ON_DEPLOYMENT_START extension with the provided event destination and
106+
* also creates an extension association to an application.
107+
*
108+
* @param eventDestination The event that occurs during the extension
109+
* @param options Options for the extension
110+
*/
111+
onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void;
112+
113+
/**
114+
* Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and
115+
* also creates an extension association to an application.
116+
*
117+
* @param eventDestination The event that occurs during the extension
118+
* @param options Options for the extension
119+
*/
120+
onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void;
121+
122+
/**
123+
* Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and
124+
* also creates an extension association to an application.
125+
*
126+
* @param eventDestination The event that occurs during the extension
127+
* @param options Options for the extension
128+
*/
129+
onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void;
130+
131+
/**
132+
* Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and
133+
* also creates an extension association to an application.
134+
*
135+
* @param eventDestination The event that occurs during the extension
136+
* @param options Options for the extension
137+
*/
138+
onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void;
139+
140+
/**
141+
* Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and
142+
* also creates an extension association to an application.
143+
*
144+
* @param eventDestination The event that occurs during the extension
145+
* @param options Options for the extension
146+
*/
147+
onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void;
148+
149+
/**
150+
* Adds an extension association to the application.
151+
*
152+
* @param extension The extension to create an association for
153+
*/
154+
addExtension(extension: IExtension): void;
76155
}
77156

78157
/**
@@ -296,7 +375,7 @@ export class Application extends ApplicationBase {
296375
/**
297376
* Adds the AWS AppConfig Agent as a container to the provided ECS task definition.
298377
*
299-
* @param taskDef The ECS task definition
378+
* @param taskDef The ECS task definition [disable-awslint:ref-via-interface]
300379
*/
301380
public static addAgentToEcs(taskDef: ecs.TaskDefinition) {
302381
taskDef.addContainer('AppConfigAgentContainer', {

0 commit comments

Comments
 (0)