[][src]Struct aws_arn::ARN

pub struct ARN {
    pub partition: Option<String>,
    pub service: String,
    pub region: Option<String>,
    pub account_id: Option<String>,
    pub resource: Resource,

Amazon Resource Names (ARNs) uniquely identify AWS resources. We require an ARN when you need to specify a resource unambiguously across all of AWS, such as in IAM policies, Amazon Relational Database Service (Amazon RDS) tags, and API calls.

The following are the general formats for ARNs; the specific components and values used depend on the AWS service.


From ARN Format


partition: Option<String>

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: String

The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS).

region: Option<String>

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

account_id: Option<String>

The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. The ARNs for some resources don't require an account number, so this component might be omitted.

resource: Resource

The content of this part of the ARN varies by service. A resource identifier can be the name or ID of the resource (for example, user/Bob or instance/i-1234567890abcdef0) or a resource path. For example, some resource identifiers include a parent resource (sub-resource-type/parent-resource/sub-resource) or a qualifier such as a version (resource-type:resource-name:qualifier).


impl ARN[src]

pub fn validate(&self) -> Result<(), ArnError>[src]

Validate this ARN, if provided the validators struct will be used to also provide any service-specific validation.

Trait Implementations

impl Clone for ARN[src]

impl Display for ARN[src]

impl Debug for ARN[src]

impl FromStr for ARN[src]

type Err = ArnError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]


  • arn:partition:service:region:account-id: | resource part |

Auto Trait Implementations

impl Send for ARN

impl Sync for ARN

impl Unpin for ARN

impl UnwindSafe for ARN

impl RefUnwindSafe for ARN

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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