konokenj.cdk-api-mcp-server 0.35.0__py3-none-any.whl → 0.37.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of konokenj.cdk-api-mcp-server might be problematic. Click here for more details.

Files changed (17) hide show
  1. cdk_api_mcp_server/__about__.py +1 -1
  2. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md +205 -0
  3. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-glue-alpha/README.md +30 -0
  4. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-s3tables-alpha/README.md +55 -2
  5. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-image.ts +1 -2
  6. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +34 -0
  7. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.blue-green-deployment-strategy.ts +14 -73
  8. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md +4 -1
  9. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.save-logs-insights-query-definition.ts +7 -2
  10. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-lookup.ts +77 -0
  11. {konokenj_cdk_api_mcp_server-0.35.0.dist-info → konokenj_cdk_api_mcp_server-0.37.0.dist-info}/METADATA +2 -2
  12. {konokenj_cdk_api_mcp_server-0.35.0.dist-info → konokenj_cdk_api_mcp_server-0.37.0.dist-info}/RECORD +15 -16
  13. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.expose-metric-with-dimensions.ts +0 -47
  14. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.d.ts +0 -1
  15. {konokenj_cdk_api_mcp_server-0.35.0.dist-info → konokenj_cdk_api_mcp_server-0.37.0.dist-info}/WHEEL +0 -0
  16. {konokenj_cdk_api_mcp_server-0.35.0.dist-info → konokenj_cdk_api_mcp_server-0.37.0.dist-info}/entry_points.txt +0 -0
  17. {konokenj_cdk_api_mcp_server-0.35.0.dist-info → konokenj_cdk_api_mcp_server-0.37.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Kenji Kono <konoken@amazon.co.jp>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.35.0"
4
+ __version__ = "0.37.0"
@@ -43,6 +43,12 @@ This construct library facilitates the deployment of Bedrock Agents, enabling yo
43
43
  - [Prompt Properties](#prompt-properties)
44
44
  - [Prompt Version](#prompt-version)
45
45
  - [Import Methods](#import-methods)
46
+ - [Inference Profiles](#inference-profiles)
47
+ - [Using Inference Profiles](#using-inference-profiles)
48
+ - [Types of Inference Profiles](#types-of-inference-profiles)
49
+ - [Prompt Routers](#prompt-routers)
50
+ - [Inference Profile Permissions](#inference-profile-permissions)
51
+ - [Inference Profiles Import Methods](#inference-profiles-import-methods)
46
52
 
47
53
  ## Agents
48
54
 
@@ -807,3 +813,202 @@ const importedPrompt = bedrock.Prompt.fromPromptAttributes(this, 'ImportedPrompt
807
813
  promptVersion: '1', // optional, defaults to 'DRAFT'
808
814
  });
809
815
  ```
816
+
817
+ ## Inference Profiles
818
+
819
+ Amazon Bedrock Inference Profiles provide a way to manage and optimize inference configurations for your foundation models. They allow you to define reusable configurations that can be applied across different prompts and agents.
820
+
821
+ ### Using Inference Profiles
822
+
823
+ Inference profiles can be used with prompts and agents to maintain consistent inference configurations across your application.
824
+
825
+ #### With Agents
826
+
827
+ ```ts fixture=default
828
+ // Create a cross-region inference profile
829
+ const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
830
+ geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
831
+ model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
832
+ });
833
+
834
+ // Use the cross-region profile with an agent
835
+ const agent = new bedrock.Agent(this, 'Agent', {
836
+ foundationModel: crossRegionProfile,
837
+ instruction: 'You are a helpful and friendly agent that answers questions about agriculture.',
838
+ });
839
+ ```
840
+
841
+ #### With Prompts
842
+
843
+ ```ts fixture=default
844
+ // Create a prompt router for intelligent model selection
845
+ const promptRouter = bedrock.PromptRouter.fromDefaultId(
846
+ bedrock.DefaultPromptRouterIdentifier.ANTHROPIC_CLAUDE_V1,
847
+ 'us-east-1'
848
+ );
849
+
850
+ // Use the prompt router with a prompt variant
851
+ const variant = bedrock.PromptVariant.text({
852
+ variantName: 'variant1',
853
+ promptText: 'What is the capital of France?',
854
+ model: promptRouter,
855
+ });
856
+
857
+ new bedrock.Prompt(this, 'Prompt', {
858
+ promptName: 'prompt-router-test',
859
+ variants: [variant],
860
+ });
861
+ ```
862
+
863
+ ### Types of Inference Profiles
864
+
865
+ Amazon Bedrock offers two types of inference profiles:
866
+
867
+ #### Application Inference Profiles
868
+
869
+ Application inference profiles are user-defined profiles that help you track costs and model usage. They can be created for a single region or for multiple regions using a cross-region inference profile.
870
+
871
+ ##### Single Region Application Profile
872
+
873
+ ```ts fixture=default
874
+ // Create an application inference profile for one Region
875
+ const appProfile = new bedrock.ApplicationInferenceProfile(this, 'MyApplicationProfile', {
876
+ applicationInferenceProfileName: 'claude-3-sonnet-v1',
877
+ modelSource: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_SONNET_V1_0,
878
+ description: 'Application profile for cost tracking',
879
+ tags: {
880
+ Environment: 'Production',
881
+ },
882
+ });
883
+ ```
884
+
885
+ ##### Multi-Region Application Profile
886
+
887
+ ```ts fixture=default
888
+ // Create a cross-region inference profile
889
+ const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
890
+ geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
891
+ model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V2_0,
892
+ });
893
+
894
+ // Create an application inference profile across regions
895
+ const appProfile = new bedrock.ApplicationInferenceProfile(this, 'MyMultiRegionProfile', {
896
+ applicationInferenceProfileName: 'claude-35-sonnet-v2-multi-region',
897
+ modelSource: crossRegionProfile,
898
+ description: 'Multi-region application profile for cost tracking',
899
+ });
900
+ ```
901
+
902
+ #### System Defined Inference Profiles
903
+
904
+ Cross-region inference enables you to seamlessly manage unplanned traffic bursts by utilizing compute across different AWS Regions. With cross-region inference, you can distribute traffic across multiple AWS Regions, enabling higher throughput and enhanced resilience during periods of peak demands.
905
+
906
+ Before using a CrossRegionInferenceProfile, ensure that you have access to the models and regions defined in the inference profiles. For instance, if you use the system defined inference profile "us.anthropic.claude-3-5-sonnet-20241022-v2:0", inference requests will be routed to US East (Virginia) us-east-1, US East (Ohio) us-east-2 and US West (Oregon) us-west-2. Thus, you need to have model access enabled in those regions for the model anthropic.claude-3-5-sonnet-20241022-v2:0.
907
+
908
+ ##### System Defined Profile Configuration
909
+
910
+ ```ts fixture=default
911
+ const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
912
+ geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
913
+ model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V2_0,
914
+ });
915
+ ```
916
+
917
+ ### Prompt Routers
918
+
919
+ Amazon Bedrock intelligent prompt routing provides a single serverless endpoint for efficiently routing requests between different foundational models within the same model family. It can help you optimize for response quality and cost. They offer a comprehensive solution for managing multiple AI models through a single serverless endpoint, simplifying the process for you. Intelligent prompt routing predicts the performance of each model for each request, and dynamically routes each request to the model that it predicts is most likely to give the desired response at the lowest cost.
920
+
921
+ #### Default and Custom Prompt Routers
922
+
923
+ ```ts fixture=default
924
+ // Use a default prompt router
925
+ const variant = bedrock.PromptVariant.text({
926
+ variantName: 'variant1',
927
+ promptText: 'What is the capital of France?',
928
+ model: bedrock.PromptRouter.fromDefaultId(
929
+ bedrock.DefaultPromptRouterIdentifier.ANTHROPIC_CLAUDE_V1,
930
+ 'us-east-1'
931
+ ),
932
+ });
933
+
934
+ new bedrock.Prompt(this, 'Prompt', {
935
+ promptName: 'prompt-router-test',
936
+ variants: [variant],
937
+ });
938
+ ```
939
+
940
+ ### Inference Profile Permissions
941
+
942
+ Use the `grantProfileUsage` method to grant appropriate permissions to resources that need to use the inference profile.
943
+
944
+ #### Granting Profile Usage Permissions
945
+
946
+ ```ts fixture=default
947
+ // Create an application inference profile
948
+ const profile = new bedrock.ApplicationInferenceProfile(this, 'MyProfile', {
949
+ applicationInferenceProfileName: 'my-profile',
950
+ modelSource: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
951
+ });
952
+
953
+ // Create a Lambda function
954
+ const lambdaFunction = new lambda.Function(this, 'MyFunction', {
955
+ runtime: lambda.Runtime.PYTHON_3_11,
956
+ handler: 'index.handler',
957
+ code: lambda.Code.fromInline('def handler(event, context): return "Hello"'),
958
+ });
959
+
960
+ // Grant the Lambda function permission to use the inference profile
961
+ profile.grantProfileUsage(lambdaFunction);
962
+
963
+ // Use a system defined inference profile
964
+ const crossRegionProfile = bedrock.CrossRegionInferenceProfile.fromConfig({
965
+ geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,
966
+ model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
967
+ });
968
+
969
+ // Grant permissions to use the cross-region inference profile
970
+ crossRegionProfile.grantProfileUsage(lambdaFunction);
971
+ ```
972
+
973
+ The `grantProfileUsage` method adds the necessary IAM permissions to the resource, allowing it to use the inference profile. This includes permissions to call `bedrock:GetInferenceProfile` and `bedrock:ListInferenceProfiles` actions on the inference profile resource.
974
+
975
+ ### Inference Profiles Import Methods
976
+
977
+ You can import existing application inference profiles using the following methods:
978
+
979
+ ```ts fixture=default
980
+ // Import an inference profile through attributes
981
+ const importedProfile = bedrock.ApplicationInferenceProfile.fromApplicationInferenceProfileAttributes(
982
+ this,
983
+ 'ImportedProfile',
984
+ {
985
+ inferenceProfileArn: 'arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/my-profile-id',
986
+ inferenceProfileIdentifier: 'my-profile-id',
987
+ }
988
+ );
989
+ ```
990
+
991
+ You can also import an application inference profile from an existing L1 CloudFormation construct:
992
+
993
+ ```ts fixture=default
994
+ // Create or reference an existing L1 CfnApplicationInferenceProfile
995
+ const cfnProfile = new aws_bedrock_cfn.CfnApplicationInferenceProfile(this, 'CfnProfile', {
996
+ inferenceProfileName: 'my-cfn-profile',
997
+ modelSource: {
998
+ copyFrom: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0.invokableArn,
999
+ },
1000
+ description: 'Profile created via L1 construct',
1001
+ });
1002
+
1003
+ // Import the L1 construct as an L2 ApplicationInferenceProfile
1004
+ const importedFromCfn = bedrock.ApplicationInferenceProfile.fromCfnApplicationInferenceProfile(cfnProfile);
1005
+
1006
+ // Grant permissions to use the imported profile
1007
+ const lambdaFunction = new lambda.Function(this, 'MyFunction', {
1008
+ runtime: lambda.Runtime.PYTHON_3_11,
1009
+ handler: 'index.handler',
1010
+ code: lambda.Code.fromInline('def handler(event, context): return "Hello"'),
1011
+ });
1012
+
1013
+ importedFromCfn.grantProfileUsage(lambdaFunction);
1014
+ ```
@@ -343,6 +343,36 @@ new glue.RayJob(stack, 'ImportedJob', {
343
343
  });
344
344
  ```
345
345
 
346
+ ### Metrics Control
347
+
348
+ By default, Glue jobs enable CloudWatch metrics (`--enable-metrics`) and observability metrics (`--enable-observability-metrics`) for monitoring and debugging. You can disable these metrics to reduce CloudWatch costs:
349
+
350
+ ```ts
351
+ import * as cdk from 'aws-cdk-lib';
352
+ import * as iam from 'aws-cdk-lib/aws-iam';
353
+ declare const stack: cdk.Stack;
354
+ declare const role: iam.IRole;
355
+ declare const script: glue.Code;
356
+
357
+ // Disable both metrics for cost optimization
358
+ new glue.PySparkEtlJob(stack, 'CostOptimizedJob', {
359
+ role,
360
+ script,
361
+ enableMetrics: false,
362
+ enableObservabilityMetrics: false,
363
+ });
364
+
365
+ // Selective control - keep observability, disable profiling
366
+ new glue.PySparkEtlJob(stack, 'SelectiveJob', {
367
+ role,
368
+ script,
369
+ enableMetrics: false,
370
+ // enableObservabilityMetrics defaults to true
371
+ });
372
+ ```
373
+
374
+ This feature is available for all Spark job types (ETL, Streaming, Flex) and Ray jobs.
375
+
346
376
  ### Enable Job Run Queuing
347
377
 
348
378
  AWS Glue job queuing monitors your account level quotas and limits. If quotas or limits are insufficient to start a Glue job run, AWS Glue will automatically queue the job and wait for limits to free up. Once limits become available, AWS Glue will retry the job run. Glue jobs will queue for limits like max concurrent job runs per account, max concurrent Data Processing Units (DPU), and resource unavailable due to IP address exhaustion in Amazon Virtual Private Cloud (Amazon VPC).
@@ -39,6 +39,59 @@ const sampleTableBucket = new TableBucket(scope, 'ExampleTableBucket', {
39
39
  });
40
40
  ```
41
41
 
42
+ ### Define an S3 Tables Namespace
43
+
44
+ ```ts
45
+ // Build a namespace
46
+ const sampleNamespace = new Namespace(scope, 'ExampleNamespace', {
47
+ namespaceName: 'example-namespace-1',
48
+ tableBucket: tableBucket,
49
+ });
50
+ ```
51
+
52
+ ### Define an S3 Table
53
+
54
+ ```ts
55
+ // Build a table
56
+ const sampleTable = new Table(scope, 'ExampleTable', {
57
+ tableName: 'example_table',
58
+ namespace: namespace,
59
+ openTableFormat: OpenTableFormat.ICEBERG,
60
+ withoutMetadata: true,
61
+ });
62
+
63
+ // Build a table with an Iceberg Schema
64
+ const sampleTableWithSchema = new Table(scope, 'ExampleSchemaTable', {
65
+ tableName: 'example_table_with_schema',
66
+ namespace: namespace,
67
+ openTableFormat: OpenTableFormat.ICEBERG,
68
+ icebergMetadata: {
69
+ icebergSchema: {
70
+ schemaFieldList: [
71
+ {
72
+ name: 'id',
73
+ type: 'int',
74
+ required: true,
75
+ },
76
+ {
77
+ name: 'name',
78
+ type: 'string',
79
+ },
80
+ ],
81
+ },
82
+ },
83
+ compaction: {
84
+ status: Status.ENABLED,
85
+ targetFileSizeMb: 128,
86
+ },
87
+ snapshotManagement: {
88
+ status: Status.ENABLED,
89
+ maxSnapshotAgeHours: 48,
90
+ minSnapshotsToKeep: 5,
91
+ },
92
+ });
93
+ ```
94
+
42
95
  Learn more about table buckets maintenance operations and default behavior from the [S3 Tables User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-table-buckets-maintenance.html)
43
96
 
44
97
  ### Controlling Table Bucket Permissions
@@ -110,5 +163,5 @@ const encryptedBucketAuto = new TableBucket(scope, 'EncryptedTableBucketAuto', {
110
163
 
111
164
  L2 Construct support for:
112
165
 
113
- - Namespaces
114
- - Tables
166
+ - Table Policy
167
+ - KMS encryption support for Tables
@@ -25,8 +25,7 @@ new IntegTest(app, 'integ-project-windows-images', {
25
25
  new ImageTestStack(app, 'WinCore2019-1', WindowsBuildImage.WIN_SERVER_CORE_2019_BASE),
26
26
  new ImageTestStack(app, 'WinCore2019-2', WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_2_0),
27
27
  new ImageTestStack(app, 'WinCore2019-3', WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0),
28
- // Windows 2022 images are not supported for on-demand build projects
29
- /* new ImageTestStack(app, 'WinCore2022-3', WindowsBuildImage.WIN_SERVER_CORE_2022_BASE_3_0), */
28
+ new ImageTestStack(app, 'WinCore2022-3', WindowsBuildImage.WIN_SERVER_CORE_2022_BASE_3_0),
30
29
  ],
31
30
  });
32
31
 
@@ -2076,6 +2076,40 @@ Amazon ECS supports native blue/green deployments that allow you to deploy new v
2076
2076
 
2077
2077
  [Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html)
2078
2078
 
2079
+ ### Using Fargate L2 constructs for Blue/Green Feature
2080
+
2081
+ ```ts
2082
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
2083
+
2084
+ declare const cluster: ecs.Cluster;
2085
+ declare const taskDefinition: ecs.TaskDefinition;
2086
+ declare const lambdaHook: lambda.Function;
2087
+ declare const blueTargetGroup: elbv2.ApplicationTargetGroup;
2088
+ declare const greenTargetGroup: elbv2.ApplicationTargetGroup;
2089
+ declare const prodListenerRule: elbv2.ApplicationListenerRule;
2090
+
2091
+ const service = new ecs.FargateService(this, 'Service', {
2092
+ cluster,
2093
+ taskDefinition,
2094
+ deploymentStrategy: ecs.DeploymentStrategy.BLUE_GREEN,
2095
+ });
2096
+
2097
+ service.addLifecycleHook(new ecs.DeploymentLifecycleLambdaTarget(lambdaHook, 'PreScaleHook', {
2098
+ lifecycleStages: [ecs.DeploymentLifecycleStage.PRE_SCALE_UP],
2099
+ }));
2100
+
2101
+ const target = service.loadBalancerTarget({
2102
+ containerName: 'nginx',
2103
+ containerPort: 80,
2104
+ protocol: ecs.Protocol.TCP,
2105
+ }, new ecs.AlternateTarget('AlternateTarget', {
2106
+ alternateTargetGroup: greenTargetGroup,
2107
+ productionListener: ecs.ListenerRuleConfiguration.applicationListenerRule(prodListenerRule),
2108
+ }));
2109
+
2110
+ target.attachToApplicationTargetGroup(blueTargetGroup);
2111
+ ```
2112
+
2079
2113
  ### Using Escape Hatches for Blue/Green Features
2080
2114
 
2081
2115
  The new blue/green deployment features are added to CloudFormation but not yet available in the CDK L2 constructs, you can use escape hatches to access them through the L1 (CfnService) construct.
@@ -1,6 +1,5 @@
1
1
  import * as ec2 from 'aws-cdk-lib/aws-ec2';
2
2
  import * as elbv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
3
- import * as iam from 'aws-cdk-lib/aws-iam';
4
3
  import * as lambda from 'aws-cdk-lib/aws-lambda';
5
4
  import * as cdk from 'aws-cdk-lib';
6
5
  import * as ecs from 'aws-cdk-lib/aws-ecs';
@@ -89,45 +88,6 @@ const prodListenerRule = new elbv2.ApplicationListenerRule(stack, 'ALBProduction
89
88
  ]),
90
89
  });
91
90
 
92
- // Create granular IAM roles
93
- const ecsTaskExecutionRole = new iam.Role(stack, 'EcsTaskExecutionRole', {
94
- assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'),
95
- managedPolicies: [
96
- iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AmazonECSTaskExecutionRolePolicy'),
97
- ],
98
- });
99
-
100
- // Create Blue/Green deployment service role
101
- const ecsServiceRole = new iam.Role(stack, 'ServiceRole', {
102
- assumedBy: new iam.CompositePrincipal(
103
- new iam.ServicePrincipal('ecs.amazonaws.com'),
104
- ),
105
- managedPolicies: [
106
- iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AmazonEC2ContainerServiceRole'),
107
- ],
108
- inlinePolicies: {
109
- LambdaInvokePolicy: new iam.PolicyDocument({
110
- statements: [
111
- new iam.PolicyStatement({
112
- actions: ['lambda:InvokeFunction'],
113
- resources: ['*'],
114
- }),
115
- ],
116
- }),
117
- ELBPolicy: new iam.PolicyDocument({
118
- statements: [
119
- new iam.PolicyStatement({
120
- actions: [
121
- 'elasticloadbalancing:ModifyRule',
122
- 'elasticloadbalancing:ModifyListener',
123
- ],
124
- resources: [prodListenerRule.listenerRuleArn],
125
- }),
126
- ],
127
- }),
128
- },
129
- });
130
-
131
91
  // Create Lambda hook
132
92
  const lambdaHook = new lambda.Function(stack, 'LambdaHook', {
133
93
  handler: 'index.handler',
@@ -138,13 +98,10 @@ const lambdaHook = new lambda.Function(stack, 'LambdaHook', {
138
98
  };`),
139
99
  });
140
100
 
141
- lambdaHook.grantInvoke(ecsServiceRole);
142
-
143
101
  // Create task definition
144
102
  const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef', {
145
103
  memoryLimitMiB: 512,
146
104
  cpu: 256,
147
- executionRole: ecsTaskExecutionRole,
148
105
  });
149
106
 
150
107
  // Add container to task definition
@@ -163,39 +120,23 @@ const service = new ecs.FargateService(stack, 'Service', {
163
120
  cluster,
164
121
  taskDefinition,
165
122
  securityGroups: [ecsSecurityGroup],
123
+ deploymentStrategy: ecs.DeploymentStrategy.BLUE_GREEN,
166
124
  });
167
125
 
168
- service.attachToApplicationTargetGroup(blueTargetGroup);
126
+ service.addLifecycleHook(new ecs.DeploymentLifecycleLambdaTarget(lambdaHook, 'PreScaleUp', {
127
+ lifecycleStages: [ecs.DeploymentLifecycleStage.PRE_SCALE_UP],
128
+ }));
169
129
 
170
- // Use escape hatching to set B/G deployment properties
171
- const cfnService = service.node.defaultChild as ecs.CfnService;
172
- cfnService.addPropertyOverride('DeploymentController', {
173
- Type: 'ECS',
174
- });
175
-
176
- cfnService.addPropertyOverride('DeploymentConfiguration', {
177
- DeploymentCircuitBreaker: {
178
- Enable: false,
179
- Rollback: false,
180
- },
181
- MaximumPercent: 200,
182
- MinimumHealthyPercent: 100,
183
- Strategy: 'BLUE_GREEN',
184
- BakeTimeInMinutes: 0,
185
- LifecycleHooks: [{
186
- HookTargetArn: lambdaHook.functionArn,
187
- RoleArn: ecsServiceRole.roleArn,
188
- LifecycleStages: ['POST_TEST_TRAFFIC_SHIFT'],
189
- }],
190
- });
191
-
192
- cfnService.addPropertyOverride('LoadBalancers.0', {
193
- AdvancedConfiguration: {
194
- AlternateTargetGroupArn: greenTargetGroup.targetGroupArn,
195
- RoleArn: ecsServiceRole.roleArn,
196
- ProductionListenerRule: prodListenerRule.listenerRuleArn,
197
- },
198
- });
130
+ const target = service.loadBalancerTarget({
131
+ containerName: 'nginx',
132
+ containerPort: 80,
133
+ protocol: ecs.Protocol.TCP,
134
+ }, new ecs.AlternateTarget('LBAlternateOptions', {
135
+ alternateTargetGroup: greenTargetGroup,
136
+ productionListener: ecs.ListenerRuleConfiguration.applicationListenerRule(prodListenerRule),
137
+ }));
138
+
139
+ target.attachToApplicationTargetGroup(blueTargetGroup);
199
140
 
200
141
  // Create integration test
201
142
  new integ.IntegTest(app, 'aws-ecs-blue-green', {
@@ -199,7 +199,6 @@ the name `Namespace/MetricName`.
199
199
 
200
200
  You can expose a metric on a metric filter by calling the `MetricFilter.metric()` API.
201
201
  This has a default of `statistic = 'avg'` if the statistic is not set in the `props`.
202
- Additionally, if the metric filter was created with a dimension map, those dimensions will be included in the metric.
203
202
 
204
203
  ```ts
205
204
  declare const logGroup: logs.LogGroup;
@@ -403,6 +402,10 @@ new logs.QueryDefinition(this, 'QueryDefinition', {
403
402
  'loggingType = "ERROR"',
404
403
  'loggingMessage = "A very strange error occurred!"',
405
404
  ],
405
+ statsStatements: [
406
+ 'count(loggingMessage) as loggingErrors',
407
+ 'count(differentLoggingMessage) as differentLoggingErrors',
408
+ ],
406
409
  sort: '@timestamp desc',
407
410
  limit: 20,
408
411
  }),
@@ -11,13 +11,14 @@ class LogsInsightsQueryDefinitionIntegStack extends Stack {
11
11
  removalPolicy: RemovalPolicy.DESTROY,
12
12
  });
13
13
 
14
- // Test query creation with single parse and filter statements
14
+ // Test query creation with single parse, filter, and sort statements
15
15
  new QueryDefinition(this, 'QueryDefinition', {
16
16
  queryDefinitionName: 'QueryDefinition',
17
17
  queryString: new QueryString({
18
18
  fields: ['@timestamp', '@message'],
19
19
  parse: '@message "[*] *" as loggingType, loggingMessage',
20
20
  filter: 'loggingType = "ERROR"',
21
+ stats: 'count(loggingMessage) as loggingErrors',
21
22
  sort: '@timestamp desc',
22
23
  limit: 20,
23
24
  display: 'loggingMessage',
@@ -25,7 +26,7 @@ class LogsInsightsQueryDefinitionIntegStack extends Stack {
25
26
  logGroups: [logGroup],
26
27
  });
27
28
 
28
- // Test query creation with multiple parse and filter statements
29
+ // Test query creation with multiple parse, filter, and stats statements
29
30
  new QueryDefinition(this, 'QueryDefinitionWithMultipleStatements', {
30
31
  queryDefinitionName: 'QueryDefinitionWithMultipleStatements',
31
32
  queryString: new QueryString({
@@ -38,6 +39,10 @@ class LogsInsightsQueryDefinitionIntegStack extends Stack {
38
39
  'loggingType = "ERROR"',
39
40
  'loggingMessage = "A very strange error occurred!"',
40
41
  ],
42
+ statsStatements: [
43
+ 'count(loggingMessage) as loggingErrors',
44
+ 'count(differentLoggingMessage) as differentLoggingErrors',
45
+ ],
41
46
  sort: '@timestamp desc',
42
47
  limit: 20,
43
48
  display: 'loggingMessage',
@@ -0,0 +1,77 @@
1
+ import { IntegTest } from '@aws-cdk/integ-tests-alpha';
2
+ import { App, CfnOutput, Stack } from 'aws-cdk-lib';
3
+ import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
4
+ import * as iam from 'aws-cdk-lib/aws-iam';
5
+ import * as rds from 'aws-cdk-lib/aws-rds';
6
+
7
+ const app = new App();
8
+ const instanceIdentifier = 'test-instance-lookup';
9
+
10
+ const stackLookup = new Stack(app, 'aws-cdk-rds-instance-lookup', {
11
+ env: {
12
+ account: process.env.CDK_INTEG_ACCOUNT ?? process.env.CDK_DEFAULT_ACCOUNT,
13
+ region: process.env.CDK_INTEG_REGION ?? process.env.CDK_DEFAULT_REGION,
14
+ },
15
+ });
16
+
17
+ const lookedUpInstance = rds.DatabaseInstance.fromLookup(stackLookup, 'LookedUpInstance', {
18
+ instanceIdentifier,
19
+ });
20
+
21
+ new CfnOutput(stackLookup, 'LookedUpInstanceEndpoint', {
22
+ value: lookedUpInstance.instanceEndpoint.socketAddress,
23
+ });
24
+
25
+ new CfnOutput(stackLookup, 'LookedUpInstanceIdentifier', {
26
+ value: lookedUpInstance.instanceIdentifier,
27
+ });
28
+
29
+ new CfnOutput(stackLookup, 'LookedUpInstanceResourceIdentifier', {
30
+ value: lookedUpInstance.instanceResourceId ?? 'undefined',
31
+ });
32
+
33
+ new CfnOutput(stackLookup, 'LookedUpInstanceArn', {
34
+ value: lookedUpInstance.instanceArn,
35
+ });
36
+
37
+ new CfnOutput(stackLookup, 'SecurityGroupIds', {
38
+ value: lookedUpInstance.connections.securityGroups.map(sg => sg.securityGroupId).join(','),
39
+ });
40
+
41
+ // test grant
42
+ const dbAccessRole = new iam.Role(stackLookup, 'DbAccessRole', {
43
+ assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
44
+ description: 'Role for accessing the RDS instance via IAM authentication',
45
+ });
46
+
47
+ lookedUpInstance.grantConnect(dbAccessRole, 'admin');
48
+
49
+ // test metric
50
+ lookedUpInstance.metricCPUUtilization().createAlarm(stackLookup, 'HighCPUAlarm', {
51
+ threshold: 90,
52
+ evaluationPeriods: 3,
53
+ alarmDescription: 'Database CPU utilization is high',
54
+ comparisonOperator: cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
55
+ });
56
+
57
+ lookedUpInstance.metricFreeableMemory().createAlarm(stackLookup, 'LowMemoryAlarm', {
58
+ threshold: 100 * 1024 * 1024,
59
+ evaluationPeriods: 3,
60
+ alarmDescription: 'Database is running low on memory',
61
+ comparisonOperator: cloudwatch.ComparisonOperator.LESS_THAN_THRESHOLD,
62
+ });
63
+
64
+ new IntegTest(app, 'integ-rds-instance-from-lookup', {
65
+ testCases: [stackLookup],
66
+ enableLookups: true,
67
+ stackUpdateWorkflow: false,
68
+ hooks: {
69
+ preDeploy: [
70
+ `aws rds create-db-instance --db-instance-identifier ${instanceIdentifier} --engine mysql --engine-version 8.0.42 --master-username admin --master-user-password Admin1234 --allocated-storage 20 --db-instance-class db.t3.micro --enable-iam-database-authentication`,
71
+ `aws rds wait db-instance-available --db-instance-identifier ${instanceIdentifier}`,
72
+ ],
73
+ postDeploy: [
74
+ `aws rds delete-db-instance --db-instance-identifier ${instanceIdentifier} --skip-final-snapshot`,
75
+ ],
76
+ },
77
+ });
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: konokenj.cdk-api-mcp-server
3
- Version: 0.35.0
3
+ Version: 0.37.0
4
4
  Summary: An MCP server provides AWS CDK API Reference
5
5
  Project-URL: Documentation, https://github.com/konokenj/cdk-api-mcp-server#readme
6
6
  Project-URL: Issues, https://github.com/konokenj/cdk-api-mcp-server/issues
@@ -26,7 +26,7 @@ Description-Content-Type: text/markdown
26
26
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/konokenj.cdk-api-mcp-server.svg)](https://pypi.org/project/konokenj.cdk-api-mcp-server)
27
27
 
28
28
  <!-- DEP-VERSIONS-START -->
29
- [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.206.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
29
+ [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.208.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
30
30
  <!-- DEP-VERSIONS-END -->
31
31
 
32
32
  ---
@@ -1,4 +1,4 @@
1
- cdk_api_mcp_server/__about__.py,sha256=7QtQT0ToG9XhOWu3Nd0qj2ea8zQZsZ3U2_JwnwsX04U,129
1
+ cdk_api_mcp_server/__about__.py,sha256=ne_5yOT80PVDyYEccxrb0PGw4M6mNobC-7hdBV9tgrg,129
2
2
  cdk_api_mcp_server/__init__.py,sha256=yJA6yIEhJviC-qNlB-nC6UR1JblQci_d84i-viHZkc0,187
3
3
  cdk_api_mcp_server/models.py,sha256=cMS1Hi29M41YjuBxqqrzNrNvyG3MgnUBb1SqYpMCJ30,692
4
4
  cdk_api_mcp_server/resources.py,sha256=R7LVwn29I4BJzU5XAwKbX8j6uy-3ZxcB1b0HzZ_Z2PI,6689
@@ -9,7 +9,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/app-staging-synthesizer
9
9
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-amplify-alpha/README.md,sha256=gwkmgfklAjRLDG8uegSV68kxNKvG9YW1Ym8ZH5V9ezE,12236
10
10
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-applicationsignals-alpha/README.md,sha256=6nqc-WbHB1iFE3vXDr6hyQs8tYS6wwnWutXePY4EF4w,10873
11
11
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-apprunner-alpha/README.md,sha256=Jtm3RbnP4jQy8BYXwHvaRbMKizUjr4SqvimVMYhu6WQ,11982
12
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md,sha256=RGOW5Z03zqi95lnM5IUjmXlRnJNz0YIo1htyCaaLrww,34529
12
+ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md,sha256=tdL-L6z9Wa2BTNmm93mty06UtQdnvvSh8tTlOdQv14M,42946
13
13
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-cloud9-alpha/README.md,sha256=0N8kldvHAKsNQHKtsj8PaQywiDUVrd6rEwVNQV0equY,7718
14
14
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-codestar-alpha/README.md,sha256=J-c-thqWwZFQT3Exjr_AY95BBgTA14Wb9aJ32gmEizQ,1509
15
15
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-custom-resource-sdk-adapter/README.md,sha256=FepYs6-FkeqX8jOohrPByOvzecIOBjd1c1AegNpRYNc,6310
@@ -17,7 +17,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-ec2-alpha/README.md
17
17
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/MANUAL_TEST.md,sha256=uObwqDllAUYBGkoNEAQGioL6JuKqh5ScVbq9KC3x89Q,1862
18
18
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md,sha256=rxkSXRabzVa3Q6A0KGRGbVRmqfmidN5mcOgnyqA2MXY,42058
19
19
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-gamelift-alpha/README.md,sha256=pZqlGXpIekT05CmRYo99QPI-7S1iGtKoNESGryLQFxQ,28324
20
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-glue-alpha/README.md,sha256=gJzL3y2QVT9r0LwZ9b_vFFLtDNa2wZeKz-_H2I0heOE,31322
20
+ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-glue-alpha/README.md,sha256=pz2aSA-7tDnnDhiTvpik3wnrFEwV7x5iv2tTOdjVjSg,32224
21
21
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-iot-actions-alpha/README.md,sha256=R6vkGxu-JjfB1IfGVquiD6Gcn4RQQpgbGo36njBdJe4,11947
22
22
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-iot-alpha/README.md,sha256=SNJKBHDT3O6Xq-G0MHBzjkaUIsYFhA4g3bUU_LXX0AA,6909
23
23
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-iotevents-actions-alpha/README.md,sha256=0Al2K5gHcEce_cH07YM1GuFFrJ0mrr85ZWGVrj2cs9s,4477
@@ -36,7 +36,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-pipes-targets-alpha
36
36
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-redshift-alpha/README.md,sha256=OcyQ0PVPYgVB8GrtINMmZdzIvWmI4v2aHOMFEl2f-Eg,27154
37
37
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-route53resolver-alpha/README.md,sha256=ceGv5PyLGU4OqdgW09YJtg_TQvjGbB31bV3z2JX1BoA,4086
38
38
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-s3objectlambda-alpha/README.md,sha256=GKYukniYNvgF14rUBtsKKsdzoJKi7uEhzZxw40YZRWA,3653
39
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-s3tables-alpha/README.md,sha256=vel4U1cWC_MknQvjRCOlcDnIndxJ2lBUeMSitea2-A8,4188
39
+ cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-s3tables-alpha/README.md,sha256=7HHlKa9MOnwNuh8ISLETOi8F2ykiKgmLwVsybXPtlnk,5439
40
40
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-sagemaker-alpha/README.md,sha256=BQdCUpvxYNtLdbaHqcZ1RXwFGv3iN8TQcBcPRRuYXKA,9936
41
41
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-servicecatalogappregistry-alpha/README.md,sha256=HmOM14_-P6x_e0UoI1HQ1IbY375T1Pj-xS4rEL1zmdg,13655
42
42
  cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/cfnspec/README.md,sha256=nnoF99zdHuBLVTMCVB9k3-eLiqjS6XTETxnIi5hW0Y8,164
@@ -353,7 +353,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.
353
353
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-vpc.ts,sha256=hS3xZfyqXnSOB59Nm2mVYJsUmXz437dTKmk49U0Ys8s,834
354
354
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-2019-fleet.ts,sha256=oiys2Fjf_r2QFS8eZVgteqva9X9EIRv_7sPuAP_kJ3g,1972
355
355
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-2022-fleet.ts,sha256=OokPynoxGM8UelyRZQw9GFemsgmllbGguiInFLR8Ccg,1972
356
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-image.ts,sha256=H4REVcs5T5Di9YyC5nVCtdiZjr5mQaDGsVpjRnCkZ1c,1159
356
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.project-windows-image.ts,sha256=VNUI7-BACXeQT_qG3VKdY08tBVKlF92s7RCeOQ-_itU,1079
357
357
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.report-group-delete-reports.ts,sha256=q1l0vd1RGbzeZnFAuOAxCQHrRBMlWHaY7hlPcu0_8tI,1056
358
358
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/integ.report-group.ts,sha256=bfOu4QB_r5a_zWPdrwz54-i7Y8Ev2a6-zX2djIpUHa4,1302
359
359
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codecommit/README.md,sha256=rN-DE-Hf97kcxmePL67XIU25AdEo09mXeMbof7o9qgc,3317
@@ -573,13 +573,13 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr-assets/integ
573
573
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr-assets/integ.assets-tarball.ts,sha256=pSbNMWSorKT7lUTXxnzkxpcRumKPYWUmcbqRSwwWOgI,937
574
574
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr-assets/integ.nested-stacks-docker.ts,sha256=4hDobse34oIG2r0mjbYXzsEXXLEqv077jUh3pjoYmcc,981
575
575
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/CONTRIBUTING.md,sha256=TlNwpeYemLdYq4jdo24v7nwDIj3RmZ7u2j_LCQiQR74,2634
576
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md,sha256=d7VyFe8b29capdMf8zgAMHSkmdBxgYBpUdoDysRrKUM,76745
576
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md,sha256=VsIyyRdjrTQY1lkwA0ETq9g77PAGvjarsvuqPQoDtqw,77861
577
577
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.add-docker-label.ts,sha256=avHktilCBVPuVelquVaY2ylRkSLraWn7vUIIIFPsbyI,1375
578
578
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.add-environment-variable.ts,sha256=sIdwJl7LYh5wlv_EDLPSGCavC2OF6W8IBwZ_hMOnCfw,1143
579
579
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.app-mesh-proxy-config.ts,sha256=vWr45An7W7lgW9Ws_yPFhapf9DXyJP-D0fhTNg5fZC0,1717
580
580
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.availability-zone-rebalancing.ts,sha256=2rO7qkkCZx48az2nZ4hoQ4iSsWY2UJtPyaOgCOonlgE,1142
581
581
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.awslogs-driver.ts,sha256=js3ZnGoPKDVQl5NhZqF-acS5BTNeRkKWBjHUYVJkV0Q,1322
582
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.blue-green-deployment-strategy.ts,sha256=A-zek2dkUOB3yoEOr3rN9FRWYgaA7W-Ww0nPFHlARko,5802
582
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.blue-green-deployment-strategy.ts,sha256=XUZUZKQoMD-g-O_4OwZ8odyeTw97VdlWCHqMNsVVsPk,4197
583
583
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.bottlerocket.ts,sha256=pio8vLSNlFeokyocKepVUq1ZJXhhrC7iH2ZVJiJxatg,728
584
584
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.capacity-provider-managed-draining.ts,sha256=pfy9F4i_-hgJYzN48HTEx0KOKLmKuMFSqtaVZb_V7Z4,2028
585
585
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.capacity-provider.ts,sha256=k02McTBE0sFY8A2rxK6HSen6JjCVKpTD1Om9JBunfR0,1635
@@ -935,8 +935,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/in
935
935
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.modules.ts,sha256=etsjdg80JJb_gag1tC0I2DgOcARVOCrRZsQYr46sQv0,2323
936
936
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.nodejs.build.images.ts,sha256=ws9WjuRf3nTKpTnZXNRheCwkQTDjf_UV9KwinnOHzVw,1742
937
937
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.specifycode.ts,sha256=JdlBTKpPf5xlQlfTYlXUMbMVwGD0a-heEYPx0ZNFO9U,1938
938
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md,sha256=74h2Zqr1b3HxYRFRch3KNJXezJvahic0sWwXNZWcgpc,24293
939
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.expose-metric-with-dimensions.ts,sha256=zqTcmUokT9JEUxcJkTKsAfxN9Nph-7Xwv7xACXZXyxg,1348
938
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md,sha256=FzQOveAjIxAfW0neEE2NrKSRNLTX5uYx4pYfAKycfWc,24319
940
939
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.expose-metric.ts,sha256=nHHNSRyq2eGVZkZe1_UWwdr7vWnBDqdMWoiArzJleHI,1256
941
940
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.log-group-metrics.ts,sha256=3t37idu5s4B6dxhZWD_7pNeue7eJCume6MdEgtc1TTs,707
942
941
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.log-group.ts,sha256=ffml_7GAfXAFSr_qqzrBZ08eG_ZhLS1T-8d-hdsxNf4,1312
@@ -949,7 +948,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.loggr
949
948
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.metricfilter-dimensions.ts,sha256=XAqWm-eyYcmifgZnB4soQEYFBIAbPpkzvnm1Uzng828,913
950
949
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.metricfilter-unit.ts,sha256=1g5XU59COeVHj4kL8GuNGnse_Kx0gMHboew4RGR1zyM,983
951
950
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.metricfilter.lit.ts,sha256=fH_QY-X6Qs3nuNbhaiqM-4DbMm2G1AE8I-1a5QWO_OY,896
952
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.save-logs-insights-query-definition.ts,sha256=Kl3AfL3Dui8zFHEjYJJpF8FS1wZA2TqmdK9rHJD66AA,1930
951
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.save-logs-insights-query-definition.ts,sha256=Y7y_sR9ERLoSLna7rtMchbiUvpbfY4tkEL1cqHZN5_Q,2162
953
952
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter-distribution.ts,sha256=bJuViz_6LEdWKFmZd5_Bt_tz3ecJOoFcnZ-LX_GfFpE,1048
954
953
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter.ts,sha256=59XLDCR4RhlW15aBhK4wFoOycBPfAQSgEhk277kyUEQ,1164
955
954
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.transformer.ts,sha256=8XEyt5s-yyGwL152EB_1xapUG44MWoMPv_Wtm86iYF0,874
@@ -1019,6 +1018,7 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instan
1019
1018
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-io2.ts,sha256=NFgyH2HJeFl8gynGcbbOWA7D_0nXY3CN4Ft6RBfwXYA,922
1020
1019
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-kerberos-without-domainRole.ts,sha256=2ujctrOCd8wIhmMqQC7uI0Ol_lBu7L3f9xr_eJP4A5E,1008
1021
1020
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-kerberos.ts,sha256=OY5j56NvTStqKp5etrQbzg4Gu4KxvfMX-nX2pV4R-Go,1413
1021
+ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-lookup.ts,sha256=VbY1FQl8mZXx46mdusPdj71rXeYAVun2qR44zwddsPM,2799
1022
1022
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-s3-postgres.ts,sha256=OMVDs5-JUk1izC8A000kb7yTC0HjW03Bqm7NfPe-5cA,974
1023
1023
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-s3.ts,sha256=kocQImMZnYceChUy9vydtvPwMTrxWsiQMZyHA-SJdqo,957
1024
1024
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.instance-with-metric.ts,sha256=oQJbFQH5yFC9X3MHr8wu2O6vvBBcHcJS0AW51q9BBrQ,1330
@@ -1114,7 +1114,6 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/in
1114
1114
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-deployed-bucket.ts,sha256=Ungrlfwdl5cSb7fd-lTqZoekkXL3M0KGMY6dvD4Kv_A,1383
1115
1115
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-large-file.ts,sha256=x5QZTMytSGxd2s65AWI3PVNN9fMWkEDEH91NGR_HXWs,8835
1116
1116
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-loggroup.ts,sha256=yGteHgbEF-EudhxLc0O5stH7rCQN-KKLKXSNybWIBZU,1412
1117
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.d.ts,sha256=jmCbtxwguFjHfw6fkLsTGduEd7E_n5ZfGh4YUkv1CIE,11
1118
1117
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.ts,sha256=hzIOMnjVDh04OHQc37Gm82-w6bajVJ6jlOjIhCl3s3Q,2210
1119
1118
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-destination-key.ts,sha256=G4YZ01yfYqsKgf7xxQn0FrbMHmoMoGE4enPyoBPGT7U,2173
1120
1119
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-role.ts,sha256=NgSrDsca6p7o4H9WKIclL9tqQ34N23rYDtYA-v9eDQ0,947
@@ -1389,8 +1388,8 @@ cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/pipelines/integ.pipe
1389
1388
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/region-info/README.md,sha256=vewWkV3ds9o9iyyYaJBNTkaKJ2XA6K2yF17tAxUnujg,2718
1390
1389
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/triggers/README.md,sha256=hYIx7DbG_7p4LYLUfxDwgIQjw9UNdz1GLrqDe8_Dbko,4132
1391
1390
  cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/triggers/integ.triggers.ts,sha256=4OHplMoBOgHGkktAzoU-TuNmJQS5wGAUvBfj5bGSe_Y,2807
1392
- konokenj_cdk_api_mcp_server-0.35.0.dist-info/METADATA,sha256=GL44k9fsFeZCcJJPgTIIUJIXQFA1WBln1P3iu_e410Q,2646
1393
- konokenj_cdk_api_mcp_server-0.35.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1394
- konokenj_cdk_api_mcp_server-0.35.0.dist-info/entry_points.txt,sha256=bVDhMdyCC1WNMPOMbmB82jvWII2CIrwTZDygdCf0cYQ,79
1395
- konokenj_cdk_api_mcp_server-0.35.0.dist-info/licenses/LICENSE.txt,sha256=5OIAASeg1HM22mVZ1enz9bgZ7TlsGfWXnj02P9OgFyk,1098
1396
- konokenj_cdk_api_mcp_server-0.35.0.dist-info/RECORD,,
1391
+ konokenj_cdk_api_mcp_server-0.37.0.dist-info/METADATA,sha256=Y1M6pYYLgIMujO3W2Gdtz0evKJFHY5DH9rYTfz5o4fg,2646
1392
+ konokenj_cdk_api_mcp_server-0.37.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1393
+ konokenj_cdk_api_mcp_server-0.37.0.dist-info/entry_points.txt,sha256=bVDhMdyCC1WNMPOMbmB82jvWII2CIrwTZDygdCf0cYQ,79
1394
+ konokenj_cdk_api_mcp_server-0.37.0.dist-info/licenses/LICENSE.txt,sha256=5OIAASeg1HM22mVZ1enz9bgZ7TlsGfWXnj02P9OgFyk,1098
1395
+ konokenj_cdk_api_mcp_server-0.37.0.dist-info/RECORD,,
@@ -1,47 +0,0 @@
1
- import { App, Stack, StackProps } from 'aws-cdk-lib';
2
- import { FilterPattern, LogGroup, MetricFilter } from 'aws-cdk-lib/aws-logs';
3
- import { Dashboard, GraphWidget } from 'aws-cdk-lib/aws-cloudwatch';
4
- import { IntegTest } from '@aws-cdk/integ-tests-alpha';
5
-
6
- class ExposeMetricWithDimensions extends Stack {
7
- constructor(scope: App, id: string, props?: StackProps) {
8
- super(scope, id, props);
9
-
10
- const logGroup = new LogGroup(this, 'LogGroup');
11
-
12
- // Create a metric filter with dimensions
13
- const mf = new MetricFilter(this, 'MetricFilter', {
14
- logGroup,
15
- metricName: 'testName',
16
- metricNamespace: 'testNamespace',
17
- filterPattern: FilterPattern.exists('$.latency'),
18
- metricValue: '$.latency',
19
- dimensions: {
20
- Foo: 'Bar',
21
- Bar: 'Baz',
22
- },
23
- });
24
-
25
- // Expose the metric with dimensions
26
- const metric = mf.metric();
27
-
28
- new Dashboard(this, 'Dashboard', {
29
- dashboardName: 'ExposeMetricWithDimensionsDashboard',
30
- widgets: [[
31
- new GraphWidget({
32
- title: 'Latency with Dimensions',
33
- left: [metric],
34
- }),
35
- ]],
36
- });
37
- }
38
- }
39
-
40
- const app = new App();
41
- const stack = new ExposeMetricWithDimensions(app, 'aws-cdk-expose-metric-with-dimensions-integ');
42
-
43
- new IntegTest(stack, 'ExposeMetricWithDimensionsTest', {
44
- testCases: [stack],
45
- });
46
-
47
- app.synth();