How do you determine the ARN of a Redshift cluster via the AWS API?
Asked Answered
S

2

14

I'm trying to add tags to a Redshift cluster using CreateTags, http://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateTags.html and you'll notice it requires an ARN for the resource.

But when you call DescribeClusters, http://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusters.html no ARN is returned.

Is there some other API call to retrieve the ARN or do I have to construct it manually?

Sample answered 6/10, 2017 at 19:21 Comment(1)
#44805271Taster
S
22

The ARN format is documented here. Specifically for a Redshift cluster the ARN format is:

arn:aws:redshift:region:account-id:cluster:cluster-name

If you know the region, account-id and cluster-name then you can construct the ARN.

Scutiform answered 6/10, 2017 at 19:32 Comment(6)
Is the implication that you have to assemble this one manually? The other AWS services return fully constructed ARNs for resources.Sample
The implication is that you can easily construct them manually.Scutiform
Shouldn't this be displayed in the AWS console when viewing the cluster? I cannot find it.Weep
@MatthewJamesBriggs Yes, it should be displayed, yet here we are 3 years later and it still doesn't appear to be visible in the AWS Console.Cineaste
I don't see it in my console! every single resource beside redshift displays an arn.Wagstaff
So annoying AWS doesn't display the ARN. It's the little things like these that make me doubt the modern IT industry :)Roorback
S
1

The cluster ARN is now displayed within the Management Console's General Information pane (Amazon Redshift -> Clusters -> 'cluster-name'), and includes an identifier for the cluster's namespace:

arn:aws:redshift:region:<account_number>:namespace:<cluster_namespace_id>
Struma answered 3/8, 2023 at 18:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.