Struct aws_sdk_rust::aws::s3::s3client::S3Client
[−]
[src]
pub struct S3Client<P, D> where
P: AwsCredentialsProvider,
D: DispatchSignedRequest, { /* fields omitted */ }
S3Client - Base client all Virtual Hosting S3 docs - http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
Methods
impl<P> S3Client<P, Client> where
P: AwsCredentialsProvider,
[src]
P: AwsCredentialsProvider,
fn new(credentials_provider: P, endpoint: Endpoint) -> Self
Entry point for S3Client. Must provide a Provider to the S3Client. Example:
let provider = DefaultCredentialsProvider::new(None).unwrap();
impl<P, D> S3Client<P, D> where
P: AwsCredentialsProvider,
D: DispatchSignedRequest,
[src]
P: AwsCredentialsProvider,
D: DispatchSignedRequest,
fn with_request_dispatcher(
request_dispatcher: D,
credentials_provider: P,
endpoint: Endpoint
) -> Self
request_dispatcher: D,
credentials_provider: P,
endpoint: Endpoint
) -> Self
Creator of the S3Client object.
fn endpoint(&self) -> &Endpoint
Returns the current Endpoint of the S3Client.
fn create_bucket(
&self,
input: &CreateBucketRequest
) -> Result<CreateBucketOutput, S3Error>
&self,
input: &CreateBucketRequest
) -> Result<CreateBucketOutput, S3Error>
Creates a new bucket. All requests go to the us-east-1/us-standard endpoint, but can create buckets anywhere.
fn head_bucket(&self, input: &HeadBucketRequest) -> Result<(), S3Error>
head_bucket is good for seeing if a bucket exists and you have permission to access it. AWS will return 200 if it found it and you have permission. It will return 404 or 403 if the bucket is not found or you don't have permission.
head_bucket returns Ok(()) if found and you have permission else error.
fn list_buckets(&self) -> Result<ListBucketsOutput, S3Error>
Returns a list of all buckets owned by the authenticated sender of the request.
fn put_bucket_lifecycle(
&self,
input: &PutBucketLifecycleRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketLifecycleRequest
) -> Result<(), S3Error>
Sets lifecycle configuration for your bucket. If a lifecycle configuration exists, it replaces it.
fn put_bucket_acl(&self, input: &PutBucketAclRequest) -> Result<(), S3Error>
Sets the bucket ACLs
fn put_bucket_policy(
&self,
input: &PutBucketPolicyRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketPolicyRequest
) -> Result<(), S3Error>
Replaces a policy on a bucket. If the bucket already has a policy, the one in this request completely replaces it.
fn put_bucket_website(
&self,
input: &PutBucketWebsiteRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketWebsiteRequest
) -> Result<(), S3Error>
Set the website configuration for a bucket.
fn put_bucket_logging(
&self,
input: &PutBucketLoggingRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketLoggingRequest
) -> Result<(), S3Error>
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. To set the logging status of a bucket, you must be the bucket owner.
fn put_bucket_replication(
&self,
input: &PutBucketReplicationRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketReplicationRequest
) -> Result<(), S3Error>
Creates a new replication configuration (or replaces an existing one, if present).
fn put_bucket_versioning(
&self,
input: &PutBucketVersioningRequest
) -> Result<(), S3Error>
&self,
input: &PutBucketVersioningRequest
) -> Result<(), S3Error>
Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.
fn delete_bucket(&self, input: &DeleteBucketRequest) -> Result<(), S3Error>
Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
fn delete_bucket_tagging(
&self,
input: &DeleteBucketTaggingRequest
) -> Result<(), S3Error>
&self,
input: &DeleteBucketTaggingRequest
) -> Result<(), S3Error>
Deletes the tags from the bucket.
fn delete_bucket_cors(
&self,
input: &DeleteBucketCorsRequest
) -> Result<(), S3Error>
&self,
input: &DeleteBucketCorsRequest
) -> Result<(), S3Error>
Deletes the cors configuration information set for the bucket.
fn delete_bucket_website(
&self,
input: &DeleteBucketWebsiteRequest
) -> Result<(), S3Error>
&self,
input: &DeleteBucketWebsiteRequest
) -> Result<(), S3Error>
This operation removes the website configuration from the bucket.
fn delete_bucket_policy(
&self,
input: &DeleteBucketPolicyRequest
) -> Result<(), S3Error>
&self,
input: &DeleteBucketPolicyRequest
) -> Result<(), S3Error>
Deletes the policy from the bucket.
fn delete_bucket_replication(
&self,
input: &DeleteBucketReplicationRequest
) -> Result<(), S3Error>
&self,
input: &DeleteBucketReplicationRequest
) -> Result<(), S3Error>
Deletes bucket replication.
fn get_bucket_cors(
&self,
input: &GetBucketCorsRequest
) -> Result<GetBucketCorsOutput, S3Error>
&self,
input: &GetBucketCorsRequest
) -> Result<GetBucketCorsOutput, S3Error>
Returns the cors configuration for the bucket.
fn get_bucket_acl(
&self,
input: &GetBucketAclRequest
) -> Result<AccessControlPolicy, S3Error>
&self,
input: &GetBucketAclRequest
) -> Result<AccessControlPolicy, S3Error>
Gets the access control policy for the bucket.
fn get_bucket_logging(
&self,
input: &GetBucketLoggingRequest
) -> Result<GetBucketLoggingOutput, S3Error>
&self,
input: &GetBucketLoggingRequest
) -> Result<GetBucketLoggingOutput, S3Error>
Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.
fn get_bucket_notification_configuration(
&self,
input: &GetBucketNotificationConfigurationRequest
) -> Result<NotificationConfiguration, S3Error>
&self,
input: &GetBucketNotificationConfigurationRequest
) -> Result<NotificationConfiguration, S3Error>
Returns the notification configuration of a bucket.
fn get_bucket_versioning(
&self,
input: &GetBucketVersioningRequest
) -> Result<GetBucketVersioningOutput, S3Error>
&self,
input: &GetBucketVersioningRequest
) -> Result<GetBucketVersioningOutput, S3Error>
Returns the bucket versioning output object if versioning is enabled.
fn list_objects(
&self,
input: &ListObjectsRequest
) -> Result<ListObjectsOutput, S3Error>
&self,
input: &ListObjectsRequest
) -> Result<ListObjectsOutput, S3Error>
Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
fn head_object(
&self,
input: &HeadObjectRequest
) -> Result<HeadObjectOutput, S3Error>
&self,
input: &HeadObjectRequest
) -> Result<HeadObjectOutput, S3Error>
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
fn get_object(
&self,
input: &GetObjectRequest,
operation: Option<&mut Operation>
) -> Result<GetObjectOutput, S3Error>
&self,
input: &GetObjectRequest,
operation: Option<&mut Operation>
) -> Result<GetObjectOutput, S3Error>
Retrieves objects from Amazon S3.
Keep in mind way to increase performance: http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html
AWS S3 recommends any GET operations that exceed 300 per second should open a support ticket to increase the rate. See the link above more details.
fn get_object_acl(
&self,
input: &GetObjectAclRequest
) -> Result<AccessControlPolicy, S3Error>
&self,
input: &GetObjectAclRequest
) -> Result<AccessControlPolicy, S3Error>
Returns the access control list (ACL) of an object.
fn get_value_for_header(
header_name: String,
response: &HttpResponse
) -> Result<String, S3Error>
header_name: String,
response: &HttpResponse
) -> Result<String, S3Error>
Returns a value for a requested header.
fn head_object_from_response(
response: &mut HttpResponse
) -> Result<HeadObjectOutput, S3Error>
response: &mut HttpResponse
) -> Result<HeadObjectOutput, S3Error>
fn get_object_from_response(
response: &mut HttpResponse
) -> Result<GetObjectOutput, S3Error>
response: &mut HttpResponse
) -> Result<GetObjectOutput, S3Error>
Use the Hyper response to populate the GetObjectOutput
fn copy_object(
&self,
input: &CopyObjectRequest
) -> Result<CopyObjectOutput, S3Error>
&self,
input: &CopyObjectRequest
) -> Result<CopyObjectOutput, S3Error>
Creates a copy of an object that is already stored in Amazon S3.
fn delete_objects(
&self,
input: &DeleteObjectsRequest
) -> Result<DeleteObjectsOutput, S3Error>
&self,
input: &DeleteObjectsRequest
) -> Result<DeleteObjectsOutput, S3Error>
This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.
fn delete_object(
&self,
input: &DeleteObjectRequest,
operation: Option<&mut Operation>
) -> Result<DeleteObjectOutput, S3Error>
&self,
input: &DeleteObjectRequest,
operation: Option<&mut Operation>
) -> Result<DeleteObjectOutput, S3Error>
Deletes a given object from the bucket.
fn multipart_upload_create(
&self,
input: &MultipartUploadCreateRequest
) -> Result<MultipartUploadCreateOutput, S3Error>
&self,
input: &MultipartUploadCreateRequest
) -> Result<MultipartUploadCreateOutput, S3Error>
Initiates a multipart upload and returns an upload ID. Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
Keep in mind ways to help performance: http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html
fn multipart_upload_part(
&self,
input: &MultipartUploadPartRequest
) -> Result<String, S3Error>
&self,
input: &MultipartUploadPartRequest
) -> Result<String, S3Error>
Uploads a part in a multipart upload. Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
fn multipart_upload_complete(
&self,
input: &MultipartUploadCompleteRequest
) -> Result<MultipartUploadCompleteOutput, S3Error>
&self,
input: &MultipartUploadCompleteRequest
) -> Result<MultipartUploadCompleteOutput, S3Error>
Completes a multipart upload by assembling previously uploaded parts.
fn multipart_upload_list(
&self,
input: &MultipartUploadListRequest
) -> Result<MultipartUploadListOutput, S3Error>
&self,
input: &MultipartUploadListRequest
) -> Result<MultipartUploadListOutput, S3Error>
This operation lists in-progress multipart uploads.
fn multipart_upload_list_parts(
&self,
input: &MultipartUploadListPartsRequest
) -> Result<MultipartUploadListPartsOutput, S3Error>
&self,
input: &MultipartUploadListPartsRequest
) -> Result<MultipartUploadListPartsOutput, S3Error>
Lists the parts that have been uploaded for a specific multipart upload.
fn multipart_upload_abort(
&self,
input: &MultipartUploadAbortRequest
) -> Result<MultipartUploadAbortOutput, S3Error>
&self,
input: &MultipartUploadAbortRequest
) -> Result<MultipartUploadAbortOutput, S3Error>
Aborts a multipart upload. To verify that all parts have been removed, so you don't get charged for the part storage, you should call the List Parts operation and ensure the parts list is empty.
fn restore_object(
&self,
input: &RestoreObjectRequest
) -> Result<RestoreObjectOutput, S3Error>
&self,
input: &RestoreObjectRequest
) -> Result<RestoreObjectOutput, S3Error>
Restores an archived copy of an object back into Amazon S3
fn put_object(
&self,
input: &PutObjectRequest,
operation: Option<&mut Operation>
) -> Result<PutObjectOutput, S3Error>
&self,
input: &PutObjectRequest,
operation: Option<&mut Operation>
) -> Result<PutObjectOutput, S3Error>
Adds an object to a bucket.
Keep in mind ways to increase performance: http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html
AWS S3 recommends any PUT/LIST/DELETE operations that exceed 100 per second should open a support ticket to increase the rate. See the link above more details.
fn put_object_acl(&self, input: &PutObjectAclRequest) -> Result<(), S3Error>
uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket
fn list_object_versions(
&self,
input: &ListObjectVersionsRequest
) -> Result<ListVersionsResult, S3Error>
&self,
input: &ListObjectVersionsRequest
) -> Result<ListVersionsResult, S3Error>
Returns metadata about all of the versions of objects in a bucket.
fn admin(&self, input: &AdminRequest) -> Result<AdminOutput, S3Error>
This method is for Ceph RGW Admin requests only. It performs the base Admin operations found in radosgw-admin but from a library.
Trait Implementations
impl<P: Debug, D: Debug> Debug for S3Client<P, D> where
P: AwsCredentialsProvider,
D: DispatchSignedRequest,
[src]
P: AwsCredentialsProvider,
D: DispatchSignedRequest,