AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the RenameObject operation. Renames an object or directory (prefix with delimiter) as an atomic operation in a directory bucket.
Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public class RenameObjectRequest : AmazonWebServiceRequest IAmazonWebServiceRequest
The RenameObjectRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
RenameObjectRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
BucketName | System.String |
Gets and sets the property BucketName. The name of the bucket in which the object or directory will be renamed. |
![]() |
ClientToken | System.String |
Gets and sets the property ClientToken. A token to ensure that the rename request is idempotent. It's suitable to use the same client token across multiple requests when you're retrying a failed operation. |
![]() |
DestinationIfMatch | System.String |
Gets and sets the property DestinationIfMatch. If the specified entity tag (ETag) matches the destination object's ETag, Amazon S3 will process the request. |
![]() |
DestinationIfModifiedSince | System.DateTime |
Gets and sets the property DestinationIfModifiedSince. If the destination object was modified after the specified time, Amazon S3 will process the request. |
![]() |
DestinationIfNoneMatch | System.String |
Gets and sets the property DestinationIfNoneMatch. If the specified entity tag (ETag) does not match the destination object's ETag, Amazon S3 will process the request. |
![]() |
DestinationIfUnmodifiedSince | System.DateTime |
Gets and sets the property DestinationIfUnmodifiedSince. If the destination object was not modified after the specified time, Amazon S3 will process the request. |
![]() |
Key | System.String |
Gets and sets the property Key. The new key name (full path) for the object or directory. |
![]() |
RenameSource | System.String |
Gets and sets the property RenameSource. The key name (full path) of the source object or directory to be renamed. It must be URL-encoded. Format: /bucket-name/object-key |
![]() |
SourceIfMatch | System.String |
Gets and sets the property SourceIfMatch. If the specified entity tag (ETag) matches the source object's ETag, Amazon S3 will process the request. |
![]() |
SourceIfModifiedSince | System.DateTime |
Gets and sets the property SourceIfModifiedSince. If the source object was modified after the specified time, Amazon S3 will process the request. |
![]() |
SourceIfNoneMatch | System.String |
Gets and sets the property SourceIfNoneMatch. If the specified entity tag (ETag) does not match the source object's ETag, Amazon S3 will process the request. |
![]() |
SourceIfUnmodifiedSince | System.DateTime |
Gets and sets the property SourceIfUnmodifiedSince. If the source object was not modified after the specified time, Amazon S3 will process the request. |
This operation is only supported for directory buckets.
To rename an object or directory, you must have permissions to perform both the s3:GetObject
and s3:PutObject
actions.
If a directory is specified in the rename request, all objects with the specified prefix are atomically renamed. However, existing objects that are encrypted with customer-provided encryption keys (SSE-C) won't be renamed.
The following operations are related to RenameObject
:
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer