From 040845db792007ba3062210f9ed740fa2c3f8626 Mon Sep 17 00:00:00 2001 From: Eugene Cheung <81188333+echeung-amzn@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:55:13 -0400 Subject: [PATCH] fix(sqs): update console URL (#503) Fixes #502 --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ --- lib/common/url/AwsConsoleUrlFactory.ts | 2 +- test/common/url/AwsConsoleUrlFactory.test.ts | 2 +- .../__snapshots__/MonitoringAspect.test.ts.snap | 4 ++-- .../__snapshots__/SqsQueueMonitoring.test.ts.snap | 12 ++++++------ .../SqsQueueMonitoringWithDlq.test.ts.snap | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/common/url/AwsConsoleUrlFactory.ts b/lib/common/url/AwsConsoleUrlFactory.ts index bf9d825b..ace99f6e 100644 --- a/lib/common/url/AwsConsoleUrlFactory.ts +++ b/lib/common/url/AwsConsoleUrlFactory.ts @@ -145,7 +145,7 @@ export class AwsConsoleUrlFactory { getSqsQueueUrl(queueUrl: string): string | undefined { const region = this.awsAccountRegion; - const destinationUrl = `https://${region}.console.aws.amazon.com/sqs/v2/home?region=${region}#/queues/${queueUrl}`; + const destinationUrl = `https://${region}.console.aws.amazon.com/sqs/v3/home?region=${region}#/queues/${queueUrl}`; return this.getAwsConsoleUrl(destinationUrl); } diff --git a/test/common/url/AwsConsoleUrlFactory.test.ts b/test/common/url/AwsConsoleUrlFactory.test.ts index d67c8097..fa5dad90 100644 --- a/test/common/url/AwsConsoleUrlFactory.test.ts +++ b/test/common/url/AwsConsoleUrlFactory.test.ts @@ -78,7 +78,7 @@ test("getSqsQueueUrl", () => { const factory = new AwsConsoleUrlFactory({ awsAccountId, awsAccountRegion }); const expected = - "https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/DummyQueueUrl"; + "https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/DummyQueueUrl"; expect(stack.resolve(factory.getSqsQueueUrl("DummyQueueUrl"))).toEqual( expected diff --git a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap index 7c824eef..4099d57d 100644 --- a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap +++ b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap @@ -8405,7 +8405,7 @@ Object { Object { "Ref": "AWS::Region", }, - ".console.aws.amazon.com/sqs/v2/home?region=", + ".console.aws.amazon.com/sqs/v3/home?region=", Object { "Ref": "AWS::Region", }, @@ -8514,7 +8514,7 @@ Object { Object { "Ref": "AWS::Region", }, - ".console.aws.amazon.com/sqs/v2/home?region=", + ".console.aws.amazon.com/sqs/v3/home?region=", Object { "Ref": "AWS::Region", }, diff --git a/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoring.test.ts.snap b/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoring.test.ts.snap index 78a1bf0e..ee7c76f9 100644 --- a/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoring.test.ts.snap +++ b/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoring.test.ts.snap @@ -103,7 +103,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -490,7 +490,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -634,7 +634,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -734,7 +734,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -878,7 +878,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueueRef](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/https://sqs.us-east-2.", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueueRef](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/https://sqs.us-east-2.", Object { "Ref": "AWS::URLSuffix", }, @@ -915,7 +915,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueueRef](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/https://sqs.us-east-2.", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueueRef](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/https://sqs.us-east-2.", Object { "Ref": "AWS::URLSuffix", }, diff --git a/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoringWithDlq.test.ts.snap b/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoringWithDlq.test.ts.snap index 06088dd1..846f5a12 100644 --- a/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoringWithDlq.test.ts.snap +++ b/test/monitoring/aws-sqs/__snapshots__/SqsQueueMonitoringWithDlq.test.ts.snap @@ -100,7 +100,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -187,7 +187,7 @@ Object { "QueueName", ], }, - "\\",{\\"label\\":\\"Deleted\\",\\"stat\\":\\"Sum\\",\\"visible\\":false,\\"id\\":\\"consumptionVolume\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"sec\\",\\"showUnits\\":false}}}},{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":11,\\"properties\\":{\\"markdown\\":\\"### SQS Dead-Letter Queue **[DummyQueue-DLQ](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "\\",{\\"label\\":\\"Deleted\\",\\"stat\\":\\"Sum\\",\\"visible\\":false,\\"id\\":\\"consumptionVolume\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"sec\\",\\"showUnits\\":false}}}},{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":11,\\"properties\\":{\\"markdown\\":\\"### SQS Dead-Letter Queue **[DummyQueue-DLQ](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "DeadLetterQueue9F481546", }, @@ -428,7 +428,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -580,7 +580,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", }, @@ -667,7 +667,7 @@ Object { "QueueName", ], }, - "\\",{\\"label\\":\\"Deleted\\",\\"stat\\":\\"Sum\\",\\"visible\\":false,\\"id\\":\\"consumptionVolume\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"sec\\",\\"showUnits\\":false}}}},{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":11,\\"properties\\":{\\"markdown\\":\\"### SQS Dead-Letter Queue **[DummyQueue-DLQ](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "\\",{\\"label\\":\\"Deleted\\",\\"stat\\":\\"Sum\\",\\"visible\\":false,\\"id\\":\\"consumptionVolume\\"}]],\\"yAxis\\":{\\"left\\":{\\"min\\":0,\\"label\\":\\"sec\\",\\"showUnits\\":false}}}},{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":11,\\"properties\\":{\\"markdown\\":\\"### SQS Dead-Letter Queue **[DummyQueue-DLQ](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "DeadLetterQueue9F481546", }, @@ -713,7 +713,7 @@ Object { "Fn::Join": Array [ "", Array [ - "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v2/home?region=eu-west-1#/queues/", + "{\\"widgets\\":[{\\"type\\":\\"text\\",\\"width\\":24,\\"height\\":1,\\"x\\":0,\\"y\\":0,\\"properties\\":{\\"markdown\\":\\"### SQS Queue **[DummyQueue](https://eu-west-1.console.aws.amazon.com/sqs/v3/home?region=eu-west-1#/queues/", Object { "Ref": "Queue4A7E3555", },