Struct aws_arn::ResourceName
source · [−]pub struct ResourceName {
pub partition: Option<Identifier>,
pub service: Identifier,
pub region: Option<Identifier>,
pub account_id: Option<AccountIdentifier>,
pub resource: ResourceIdentifier,
}Expand description
Amazon Resource Names (ResourceNames) uniquely identify AWS resources. We require an ResourceName 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 ResourceNames; the specific components and values used depend on the AWS service.
arn:partition:service:region:account-id:resource-id
arn:partition:service:region:account-id:resource-type/resource-id
arn:partition:service:region:account-id:resource-type:resource-idFrom ResourceName Format
Fields
partition: Option<Identifier>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 partition is aws-cn. The module
known::partition provides common values as constants (if the known feature is
enabled).
service: IdentifierThe service namespace that identifies the AWS. The module known::service provides
region: Option<Identifier>The Region that the resource resides in. The ResourceNames for some resources do not require
a Region, so this component might be omitted. The module known::region provides
common values as constants (if the known feature is enabled).
account_id: Option<AccountIdentifier>The ID of the AWS account that owns the resource, without the hyphens. For example,
123456789012. The ResourceNames for some resources don’t require an account number, so this
component may be omitted.
resource: ResourceIdentifierThe content of this part of the ResourceName 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).
Implementations
sourceimpl ResourceName
impl ResourceName
sourcepub fn new(service: Identifier, resource: ResourceIdentifier) -> Self
pub fn new(service: Identifier, resource: ResourceIdentifier) -> Self
Construct a minimal ResourceName value with simply a service and resource.
sourcepub fn aws(service: Identifier, resource: ResourceIdentifier) -> Self
pub fn aws(service: Identifier, resource: ResourceIdentifier) -> Self
Construct a minimal ResourceName value with simply a service and resource in the aws partition.
sourcepub fn has_variables(&self) -> bool
pub fn has_variables(&self) -> bool
Return true if the identifier contains variables of the form
${name}, else false.
Trait Implementations
sourceimpl Clone for ResourceName
impl Clone for ResourceName
sourcefn clone(&self) -> ResourceName
fn clone(&self) -> ResourceName
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ResourceName
impl Debug for ResourceName
sourceimpl<'de> Deserialize<'de> for ResourceName
impl<'de> Deserialize<'de> for ResourceName
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for ResourceName
impl Display for ResourceName
sourceimpl From<&mut ArnBuilder> for ResourceName
impl From<&mut ArnBuilder> for ResourceName
sourcefn from(v: &mut ArnBuilder) -> Self
fn from(v: &mut ArnBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<AccountIdentifier> for ResourceName
impl From<AccountIdentifier> for ResourceName
sourcefn from(account: AccountIdentifier) -> Self
fn from(account: AccountIdentifier) -> Self
Converts to this type from the input type.
sourceimpl From<ArnBuilder> for ResourceName
impl From<ArnBuilder> for ResourceName
sourcefn from(v: ArnBuilder) -> Self
fn from(v: ArnBuilder) -> Self
Converts to this type from the input type.
sourceimpl FromStr for ResourceName
impl FromStr for ResourceName
sourceimpl PartialEq<ResourceName> for ResourceName
impl PartialEq<ResourceName> for ResourceName
sourcefn eq(&self, other: &ResourceName) -> bool
fn eq(&self, other: &ResourceName) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ResourceName) -> bool
fn ne(&self, other: &ResourceName) -> bool
This method tests for !=.
sourceimpl Serialize for ResourceName
impl Serialize for ResourceName
impl StructuralPartialEq for ResourceName
Auto Trait Implementations
impl RefUnwindSafe for ResourceName
impl Send for ResourceName
impl Sync for ResourceName
impl Unpin for ResourceName
impl UnwindSafe for ResourceName
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more