Skip to content

Commit a5cddd4

Browse files
committed
chore(deprecation): add deprecation message
1 parent a3268f7 commit a5cddd4

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import * as path from 'path';
15-
import { Duration, Aws } from 'aws-cdk-lib';
15+
import { Duration, Aws, Annotations } from 'aws-cdk-lib';
1616
import * as appsync from 'aws-cdk-lib/aws-appsync';
1717
import * as cognito from 'aws-cdk-lib/aws-cognito';
1818
import * as ec2 from 'aws-cdk-lib/aws-ec2';
@@ -159,6 +159,9 @@ export class ContentGenerationAppSyncLambda extends BaseClass {
159159
constructor(scope: Construct, id: string, props: ContentGenerationAppSyncLambdaProps) {
160160
super(scope, id);
161161

162+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:ContentGenerationAppSyncLambda.deprecation',
163+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
164+
162165
const baseProps: BaseClassProps = {
163166
stage: props.stage,
164167
constructName: ConstructName.AWSCONTENTGENAPPSYNCLAMBDA,

src/patterns/gen-ai/aws-llama-index-data-loader/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import { join } from 'node:path';
15-
import { Duration, RemovalPolicy, Stack } from 'aws-cdk-lib';
15+
import { Annotations, Duration, RemovalPolicy, Stack } from 'aws-cdk-lib';
1616
import { FlowLogDestination, IVpc } from 'aws-cdk-lib/aws-ec2';
1717
import { DockerImageAsset, Platform } from 'aws-cdk-lib/aws-ecr-assets';
1818
import { Cluster, ContainerImage, CpuArchitecture, OperatingSystemFamily } from 'aws-cdk-lib/aws-ecs';
@@ -92,6 +92,9 @@ export class LlamaIndexDataLoader extends BaseClass {
9292
constructor(scope: Construct, id: string, props: LlamaIndexDataLoaderProps) {
9393
super(scope, id);
9494

95+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:LlamaIndexDataLoader.deprecation',
96+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
97+
9598
const baseProps: BaseClassProps = {
9699
stage: props.stage,
97100
constructName: ConstructName.AWSLLAMAINDEXDATALOADER,

src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import * as path from 'path';
15-
import { Duration, Aws } from 'aws-cdk-lib';
15+
import { Duration, Aws, Annotations } from 'aws-cdk-lib';
1616
import * as appsync from 'aws-cdk-lib/aws-appsync';
1717
import * as cognito from 'aws-cdk-lib/aws-cognito';
1818
import * as ec2 from 'aws-cdk-lib/aws-ec2';
@@ -192,6 +192,9 @@ export class QaAppsyncOpensearch extends BaseClass {
192192
constructor(scope: Construct, id: string, props: QaAppsyncOpensearchProps) {
193193
super(scope, id);
194194

195+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:QaAppsyncOpensearch.deprecation',
196+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
197+
195198
const baseProps: BaseClassProps = {
196199
stage: props.stage,
197200
constructName: ConstructName.AWSQAAPPSYNCOPENSEARCH,

src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import * as path from 'path';
15-
import { Duration, Aws, Stack } from 'aws-cdk-lib';
15+
import { Duration, Aws, Stack, Annotations } from 'aws-cdk-lib';
1616
import * as appsync from 'aws-cdk-lib/aws-appsync';
1717
import * as cognito from 'aws-cdk-lib/aws-cognito';
1818
import * as ec2 from 'aws-cdk-lib/aws-ec2';
@@ -233,6 +233,9 @@ export class RagAppsyncStepfnOpensearch extends BaseClass {
233233
constructor(scope: Construct, id: string, props: RagAppsyncStepfnOpensearchProps) {
234234
super(scope, id);
235235

236+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:RagAppsyncStepfnOpensearch.deprecation',
237+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
238+
236239

237240
const baseProps: BaseClassProps = {
238241
stage: props.stage,

src/patterns/gen-ai/aws-summarization-appsync-stepfn/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
import * as path from 'path';
15-
import { Duration, Aws, RemovalPolicy } from 'aws-cdk-lib';
15+
import { Duration, Aws, RemovalPolicy, Annotations } from 'aws-cdk-lib';
1616
import * as appsync from 'aws-cdk-lib/aws-appsync';
1717
import * as cognito from 'aws-cdk-lib/aws-cognito';
1818
import * as ec2 from 'aws-cdk-lib/aws-ec2';
@@ -244,6 +244,9 @@ export class SummarizationAppsyncStepfn extends BaseClass {
244244
constructor(scope: Construct, id: string, props: SummarizationAppsyncStepfnProps) {
245245
super(scope, id);
246246

247+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:SummarizationAppsyncStepfn.deprecation',
248+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
249+
247250
const baseProps: BaseClassProps = {
248251
stage: props.stage,
249252
constructName: ConstructName.AWSSUMMARIZATIONAPPSYNCSTEPFN,

src/patterns/gen-ai/aws-text-to-sql/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import * as path from 'path';
1515
import * as cdk from 'aws-cdk-lib';
16-
import { Aws, Duration, aws_events_targets as eventsTarget } from 'aws-cdk-lib';
16+
import { Annotations, Aws, Duration, aws_events_targets as eventsTarget } from 'aws-cdk-lib';
1717
import * as ec2 from 'aws-cdk-lib/aws-ec2';
1818
import * as events from 'aws-cdk-lib/aws-events';
1919
import * as iam from 'aws-cdk-lib/aws-iam';
@@ -251,6 +251,9 @@ export class TextToSql extends BaseClass {
251251
constructor(scope: Construct, id: string, props: TextToSqlProps) {
252252
super(scope, id);
253253

254+
Annotations.of(scope).addWarningV2('@cdklabs/generative-ai-cdk-constructs:TextToSql.deprecation',
255+
'This construct is deprecated and will not receive further support. It will be removed in the next release of the library.');
256+
254257
const baseProps: BaseClassProps = {
255258
stage: props.stage,
256259
constructName: ConstructName.AWSTEXTTOSQL,

0 commit comments

Comments
 (0)