Package software.amazon.awssdk.arns
Class ArnResource
java.lang.Object
software.amazon.awssdk.arns.ArnResource
- All Implemented Interfaces:
ToCopyableBuilder<ArnResource.Builder,
ArnResource>
public final class ArnResource
extends Object
implements ToCopyableBuilder<ArnResource.Builder,ArnResource>
An additional model within
Arn
that provides the Resource Type, Resource, and
Resource Qualifier of an AWS Arn when those values are present and correctly formatted
within an Arn.
If resourceType
is not present, resource
will return the entire resource
as a string the same as Arn.resource()
.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArnResource.Builder
builder()
boolean
static ArnResource
fromString
(String resource) Parses a string containing either a resource, resource type and resource or resource type, resource and qualifier into anArnResource
.int
hashCode()
resource()
Take this object and create a builder that contains all of the current property values of this object.toString()
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
resourceType
- Returns:
- the optional resource type
-
resource
- Returns:
- the entire resource as a string
-
qualifier
- Returns:
- the optional resource qualifier
-
builder
- Returns:
- a builder for
ArnResource
.
-
fromString
Parses a string containing either a resource, resource type and resource or resource type, resource and qualifier into anArnResource
.Supports fields separated by either ":" or "/".
For legacy AWS Arns not following the resourceType:resource:qualifier pattern, the qualifier field will contain everything after the first two sections separated by either ":" or "/".
- Parameters:
resource
- - The resource string to parse.- Returns:
ArnResource
-
toString
-
equals
-
hashCode
public int hashCode() -
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ArnResource.Builder,
ArnResource> - Returns:
- a builder for type T
-