Class S3ObjectResource
- java.lang.Object
-
- software.amazon.awssdk.services.s3.internal.resource.S3ObjectResource
-
- All Implemented Interfaces:
AwsResource,S3Resource
public final class S3ObjectResource extends Object implements S3Resource
AnS3Resourcethat represents an S3 object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classS3ObjectResource.BuilderA builder forS3ObjectResourceobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>accountId()Gets the AWS account ID associated with the S3 object if it has been specified.static S3ObjectResource.Builderbuilder()Get a new builder for this class.booleanequals(Object o)inthashCode()Stringkey()Gets the key of the S3 object.Optional<S3Resource>parentS3Resource()Gets the optional parent resource.Optional<String>partition()Gets the AWS partition name associated with the S3 object (e.g.: 'aws').Optional<String>region()Gets the AWS region name associated with the S3 object (e.g.: 'us-east-1').Stringtype()Gets the resource type for this S3 object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.s3.internal.resource.S3Resource
overrideSigner
-
-
-
-
Method Detail
-
builder
public static S3ObjectResource.Builder builder()
Get a new builder for this class.- Returns:
- A newly initialized instance of a builder.
-
type
public String type()
Gets the resource type for this S3 object.- Specified by:
typein interfaceS3Resource- Returns:
- This will always return "object".
-
partition
public Optional<String> partition()
Gets the AWS partition name associated with the S3 object (e.g.: 'aws').- Specified by:
partitionin interfaceAwsResource- Returns:
- the name of the partition.
-
region
public Optional<String> region()
Gets the AWS region name associated with the S3 object (e.g.: 'us-east-1').- Specified by:
regionin interfaceAwsResource- Returns:
- the name of the region or null if the region has not been specified (e.g. the resource is in the global namespace).
-
accountId
public Optional<String> accountId()
Gets the AWS account ID associated with the S3 object if it has been specified.- Specified by:
accountIdin interfaceAwsResource- Returns:
- the optional AWS account ID or empty if the account ID has not been specified.
-
key
public String key()
Gets the key of the S3 object.- Returns:
- the key of the S3 object.
-
parentS3Resource
public Optional<S3Resource> parentS3Resource()
Description copied from interface:S3ResourceGets the optional parent resource.- Specified by:
parentS3Resourcein interfaceS3Resource- Returns:
- the optional parent resource.
-
-