[][src]Struct arn::naive::NaiveArn

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

Example

use arn::naive::NaiveArn;

let arn = NaiveArn::parse("arn:aws:ec2:us-east-1:123456789012:vpc/vpc-fd580e98").unwrap();

Fields

partition: &'a str

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".

service: &'a str

The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS). For a list of namespaces, see http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces.

region: Option<&'a str>

The region the resource resides in. Note that the ARNs for some resources do not require a region, so this component might be omitted.

account_id: Option<&'a str>

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.

resource: &'a str

The content of this part of the ARN varies by service. It often includes an indicator of the type of resource — for example, an IAM user or Amazon RDS database - followed by a slash (/) or a colon (:), followed by the resource name itself. Some services allows paths for resource names, as described in http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-paths.

Methods

impl<'a> NaiveArn<'a>
[src]

pub fn parse(s: &'a str) -> Result<Self, ParseNaiveArnError>
[src]

Trait Implementations

impl<'a> PartialEq<NaiveArn<'a>> for NaiveArn<'a>
[src]

impl<'a> Display for NaiveArn<'a>
[src]

impl<'a> Debug for NaiveArn<'a>
[src]

Auto Trait Implementations

impl<'a> Send for NaiveArn<'a>

impl<'a> Sync for NaiveArn<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]