Expand description
Converts ARNs to direct links to the AWS console.
§Simple example
use link2aws::arn_to_link;
// https://s3.console.aws.amazon.com/s3/buckets/abc123
println!("{}", arn_to_link("arn:aws:s3:::abc123").unwrap());§Advanced usage
The library consists of an ARN parser, and a console link generator. These two parts may be used separately.
- See
Arnfor an example of how to just parse an ARN. - See
ArnPartsfor an example of how to generate a link, or build an ARN, from your own struct.
§Command line tool
$ cargo install link2aws
$ link2aws arn:aws:s3:::abc123
https://s3.console.aws.amazon.com/s3/buckets/abc123Structs§
- Arn
- Represents an ARN, separated into its component parts: partition, service, region, account, resource type, resource id, and resource revision.
- ArnOwned
- Like
Arn, but with ownedStrings instead of borrowed&strs.
Enums§
- Error
- Error returned by link2aws when parsing failed, or a link could not be generated.
Traits§
- ArnParts
- Provides methods to build an AWS console link or rebuild the ARN for any struct that has the required getters for the ARN parts.
Functions§
- arn_
to_ link - Converts an ARN string to an AWS Console link.