Get target group arn from aws cli

0 votes

I'm attempting to obtain the arn of a target group whose name contains the word "test" or the value assigned to "value," but I'm having trouble because I keep getting this problem.

value=test
aws elbv2 describe-target-groups --query "TargetGroups[?starts_with(TargetGroupName, '${value}') == `true`].[TargetGroupArn]"
Bad value for --query TargetGroups[?starts_with(TargetGroupName, 'test') == ].[TargetGroupArn]: invalid token: Parse error at column 59, token "]" (RBRACKET), for expression:
"TargetGroups[?starts_with(TargetGroupName, 'test') == ].[TargetGroupArn]"
                                                       ^

I am using bash on windows

Jan 24, 2023 in AWS by Tejashwini
• 3,820 points
962 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 58,020 points
5,645 views
0 votes
1 answer

Quick way to get AWS Account number from the cli tools?

Via "Secure Token Service" using the following ...READ MORE

answered Jul 12, 2018 in AWS by Priyaj
• 58,020 points
1,795 views
0 votes
1 answer

How to remove a rule from a security group from AWS CLI?

Hi@akhtar, You can remove the ingress rule from ...READ MORE

answered Jul 7, 2020 in AWS by MD
• 95,460 points
5,612 views
0 votes
0 answers

Get ARN of S3 Bucket with aws cli

Is it possible to get the ARN ...READ MORE

Apr 21, 2022 in AWS by Rahul
• 9,680 points
903 views
0 votes
1 answer
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,020 points
5,958 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,020 points
5,204 views
0 votes
2 answers
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP