feat(ecs): Implement method in ECS cluster to retrieve task ARN#28381
feat(ecs): Implement method in ECS cluster to retrieve task ARN#28381mergify[bot] merged 7 commits intoaws:mainfrom
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
b714c68 to
d8864ff
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
c2c87dd to
ea5d1b8
Compare
ca540a3 to
5b3d2a5
Compare
kaizencc
left a comment
There was a problem hiding this comment.
Hi @badmintoncryer, a few comments on this PR. 1 is related to how you've implemented the arn, and the second is that the integ tests don't seem related. If you are interested in adding additional ecs integ tests, I would love that, but that should be part of a separate PR.
| * @param keyPattern Task id pattern | ||
| */ | ||
| public arnForTasks(keyPattern: string): string { | ||
| return `arn:${Stack.of(this).partition}:ecs:${Stack.of(this).region}:${Stack.of(this).account}:task/${this.clusterName}/${keyPattern}`; |
There was a problem hiding this comment.
We should use our standard way of generating arns here. Something like this:
This means that many of the options we can just use the default (it automatically assumes that the partition/region/account will come from the stack)
There was a problem hiding this comment.
Thank you very much. I have learned a lot.
There was a problem hiding this comment.
I don't see how this integ test is related to the feature added.
5b3d2a5 to
94a6cc5
Compare
Pull request has been modified.
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
|
Exemption Request @kaizencc |
kaizencc
left a comment
There was a problem hiding this comment.
Thanks @badmintoncryer!
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…28381) This pull request introduces a new method within the Cluster class, designed to retrieve the Amazon Resource Names (ARNs) of tasks that are part of a given ECS cluster. Example of how to get task ARN ```ts declare cluster: Cluster; // arn:aws:ecs:{region}:{regionId}:task/{clusterName}/* const taskArnPattern = cluster.arnForTasks("*"); ``` Closes aws#26232 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This pull request introduces a new method within the Cluster class, designed to retrieve the Amazon Resource Names (ARNs) of tasks that are part of a given ECS cluster.
Example of how to get task ARN
Closes #26232
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license