pub struct Arn {
pub partition: String,
pub service: String,
pub region: String,
pub account_id: String,
pub resource: String,
}Expand description
An Amazon Resource Name.
Format: arn:partition:service:region:account-id:resource
Fields§
§partition: String§service: String§region: String§account_id: String§resource: StringImplementations§
Source§impl Arn
impl Arn
pub fn new( service: &str, region: &str, account_id: &str, resource: &str, ) -> Self
Sourcepub fn global(service: &str, account_id: &str, resource: &str) -> Self
pub fn global(service: &str, account_id: &str, resource: &str) -> Self
Create an ARN with no region (global services like IAM).
Sourcepub fn s3(resource: &str) -> Self
pub fn s3(resource: &str) -> Self
Create an S3 ARN — no region, no account.
Format: arn:aws:s3:::resource.
Sourcepub fn s3_access_point(region: &str, account_id: &str, name: &str) -> Self
pub fn s3_access_point(region: &str, account_id: &str, name: &str) -> Self
Create an S3 Access Point ARN.
Format: arn:aws:s3:<region>:<account-id>:accesspoint/<name>.
Sourcepub fn with_partition(self, partition: &str) -> Self
pub fn with_partition(self, partition: &str) -> Self
Override the partition (default aws). Use for aws-cn / aws-us-gov.
Trait Implementations§
impl Eq for Arn
impl StructuralPartialEq for Arn
Auto Trait Implementations§
impl Freeze for Arn
impl RefUnwindSafe for Arn
impl Send for Arn
impl Sync for Arn
impl Unpin for Arn
impl UnsafeUnpin for Arn
impl UnwindSafe for Arn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more