Learn R Programming

paws (version 0.4.0)

s3: Amazon Simple Storage Service

Description

Amazon Simple Storage Service

Usage

s3(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

    • endpoint: The complete URL to use for the constructed client.

    • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Service syntax

svc <- s3(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

abort_multipart_uploadThis action aborts a multipart upload
complete_multipart_uploadCompletes a multipart upload by assembling previously uploaded parts
copy_objectCreates a copy of an object that is already stored in Amazon S3
create_bucketCreates a new S3 bucket
create_multipart_uploadThis action initiates a multipart upload and returns an upload ID
delete_bucketDeletes the S3 bucket
delete_bucket_analytics_configurationDeletes an analytics configuration for the bucket (specified by the analytics configuration ID)
delete_bucket_corsDeletes the cors configuration information set for the bucket
delete_bucket_encryptionThis implementation of the DELETE action resets the default encryption for the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3)
delete_bucket_intelligent_tiering_configurationDeletes the S3 Intelligent-Tiering configuration from the specified bucket
delete_bucket_inventory_configurationDeletes an inventory configuration (identified by the inventory ID) from the bucket
delete_bucket_lifecycleDeletes the lifecycle configuration from the specified bucket
delete_bucket_metrics_configurationDeletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the metrics configuration ID) from the bucket
delete_bucket_ownership_controlsRemoves OwnershipControls for an Amazon S3 bucket
delete_bucket_policyThis implementation of the DELETE action uses the policy subresource to delete the policy of a specified bucket
delete_bucket_replicationDeletes the replication configuration from the bucket
delete_bucket_taggingDeletes the tags from the bucket
delete_bucket_websiteThis action removes the website configuration for a bucket
delete_objectRemoves the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object
delete_objectsThis action enables you to delete multiple objects from a bucket using a single HTTP request
delete_object_taggingRemoves the entire tag set from the specified object
delete_public_access_blockRemoves the PublicAccessBlock configuration for an Amazon S3 bucket
download_fileDownload a file from S3 and store it at a specified file location
generate_presigned_url@title Generate a presigned url given a client, its method, and arguments
get_bucket_accelerate_configurationThis implementation of the GET action uses the accelerate subresource to return the Transfer Acceleration state of a bucket, which is either Enabled or Suspended
get_bucket_aclThis implementation of the GET action uses the acl subresource to return the access control list (ACL) of a bucket
get_bucket_analytics_configurationThis implementation of the GET action returns an analytics configuration (identified by the analytics configuration ID) from the bucket
get_bucket_corsReturns the Cross-Origin Resource Sharing (CORS) configuration information set for the bucket
get_bucket_encryptionReturns the default encryption configuration for an Amazon S3 bucket
get_bucket_intelligent_tiering_configurationGets the S3 Intelligent-Tiering configuration from the specified bucket
get_bucket_inventory_configurationReturns an inventory configuration (identified by the inventory configuration ID) from the bucket
get_bucket_lifecycleFor an updated version of this API, see GetBucketLifecycleConfiguration
get_bucket_lifecycle_configurationBucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, or a combination of both
get_bucket_locationReturns the Region the bucket resides in
get_bucket_loggingReturns the logging status of a bucket and the permissions users have to view and modify that status
get_bucket_metrics_configurationGets a metrics configuration (specified by the metrics configuration ID) from the bucket
get_bucket_notificationNo longer used, see GetBucketNotificationConfiguration
get_bucket_notification_configurationReturns the notification configuration of a bucket
get_bucket_ownership_controlsRetrieves OwnershipControls for an Amazon S3 bucket
get_bucket_policyReturns the policy of a specified bucket
get_bucket_policy_statusRetrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public
get_bucket_replicationReturns the replication configuration of a bucket
get_bucket_request_paymentReturns the request payment configuration of a bucket
get_bucket_taggingReturns the tag set associated with the bucket
get_bucket_versioningReturns the versioning state of a bucket
get_bucket_websiteReturns the website configuration for a bucket
get_objectRetrieves objects from Amazon S3
get_object_aclReturns the access control list (ACL) of an object
get_object_attributesRetrieves all the metadata from an object without returning the object itself
get_object_legal_holdGets an object's current legal hold status
get_object_lock_configurationGets the Object Lock configuration for a bucket
get_object_retentionRetrieves an object's retention settings
get_object_taggingReturns the tag-set of an object
get_object_torrentReturns torrent files from a bucket
get_public_access_blockRetrieves the PublicAccessBlock configuration for an Amazon S3 bucket
head_bucketThis action is useful to determine if a bucket exists and you have permission to access it
head_objectThe HEAD action retrieves metadata from an object without returning the object itself
list_bucket_analytics_configurationsLists the analytics configurations for the bucket
list_bucket_intelligent_tiering_configurationsLists the S3 Intelligent-Tiering configuration from the specified bucket
list_bucket_inventory_configurationsReturns a list of inventory configurations for the bucket
list_bucket_metrics_configurationsLists the metrics configurations for the bucket
list_bucketsReturns a list of all buckets owned by the authenticated sender of the request
list_multipart_uploadsThis action lists in-progress multipart uploads
list_objectsReturns some or all (up to 1,000) of the objects in a bucket
list_objects_v2Returns some or all (up to 1,000) of the objects in a bucket with each request
list_object_versionsReturns metadata about all versions of the objects in a bucket
list_partsLists the parts that have been uploaded for a specific multipart upload
put_bucket_accelerate_configurationSets the accelerate configuration of an existing bucket
put_bucket_aclSets the permissions on an existing bucket using access control lists (ACL)
put_bucket_analytics_configurationSets an analytics configuration for the bucket (specified by the analytics configuration ID)
put_bucket_corsSets the cors configuration for your bucket
put_bucket_encryptionThis action uses the encryption subresource to configure default encryption and Amazon S3 Bucket Keys for an existing bucket
put_bucket_intelligent_tiering_configurationPuts a S3 Intelligent-Tiering configuration to the specified bucket
put_bucket_inventory_configurationThis implementation of the PUT action adds an inventory configuration (identified by the inventory ID) to the bucket
put_bucket_lifecycleFor an updated version of this API, see PutBucketLifecycleConfiguration
put_bucket_lifecycle_configurationCreates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration
put_bucket_loggingSet the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters
put_bucket_metrics_configurationSets a metrics configuration (specified by the metrics configuration ID) for the bucket
put_bucket_notificationNo longer used, see the PutBucketNotificationConfiguration operation
put_bucket_notification_configurationEnables notifications of specified events for a bucket
put_bucket_ownership_controlsCreates or modifies OwnershipControls for an Amazon S3 bucket
put_bucket_policyApplies an Amazon S3 bucket policy to an Amazon S3 bucket
put_bucket_replicationCreates a replication configuration or replaces an existing one
put_bucket_request_paymentSets the request payment configuration for a bucket
put_bucket_taggingSets the tags for a bucket
put_bucket_versioningSets the versioning state of an existing bucket
put_bucket_websiteSets the configuration of the website that is specified in the website subresource
put_objectAdds an object to a bucket
put_object_aclUses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket
put_object_legal_holdApplies a legal hold configuration to the specified object
put_object_lock_configurationPlaces an Object Lock configuration on the specified bucket
put_object_retentionPlaces an Object Retention configuration on an object
put_object_taggingSets the supplied tag-set to an object that already exists in a bucket
put_public_access_blockCreates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket
restore_objectRestores an archived copy of an object back into Amazon S3
select_object_contentThis action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement
upload_partUploads a part in a multipart upload
upload_part_copyUploads a part by copying data from an existing object as data source
write_get_object_responsePasses transformed objects to a GetObject operation when using Object Lambda access points

Examples

Run this code
if (FALSE) {
svc <- s3()
# The following example aborts a multipart upload.
svc$abort_multipart_upload(
  Bucket = "examplebucket",
  Key = "bigobject",
  UploadId = "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LA..."
)
}

Run the code above in your browser using DataLab