pub struct NaiveArn<'a> {
pub partition: &'a str,
pub service: &'a str,
pub region: Option<&'a str>,
pub account_id: Option<&'a str>,
pub resource: &'a str,
}
arn:partition:service:region:account-id:resource
formatted ARN
use arn::naive::NaiveArn;
let arn = NaiveArn::parse("arn:aws:ec2:us-east-1:123456789012:vpc/vpc-fd580e98").unwrap();
The partition that the resource is in. For standard AWS regions, the partition is "aws". If you have resources in
other partitions, the partition is "aws-partitionname". For example, the partition for resources in the China
(Beijing) region is "aws-cn".
The region the resource resides in. Note that the ARNs for some resources do not require a region, so this
component might be omitted.
The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. Note that the
ARNs for some resources don't require an account number, so this component might be omitted.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more