ExAws.S3.Client behaviour

The purpose of this module is to surface the ExAws.S3 API tied to a single configuration chosen, such that it does not need passed in with every request.

Usage:

defmodule MyApp.S3 do
  use ExAws.S3.Client, otp_app: :my_otp_app
end

In your config

config :my_otp_app, ExAws,
  s3: [], # S3 config goes here

You can now use MyApp.S3 as the root module for the S3 api without needing to pass in a particular configuration. This enables different otp apps to configure their AWS configuration separately.

The alignment with a particular OTP app while convenient is however entirely optional. The following also works:

defmodule MyApp.S3 do
  use ExAws.S3.Client

  def config_root do
    Application.get_all_env(:my_aws_config_root)
  end
end

ExAws now expects the config for that S3 client to live under

config :my_aws_config_root
  s3: [] # S3 config goes here

This is in fact how the functions in ExAws.S3 that do not require a config work. Default config values can be found in ExAws.Config. The default configuration is always used, and then the configuration of a particular client is merged in and overrides the defaults.

Source

Callbacks

abort_multipart_upload/3

Specs:

  • abort_multipart_upload(bucket :: binary, object :: binary, upload_id :: binary) :: ExAws.Request.response_t

Abort a multipart upload

Source
complete_multipart_upload/4

Specs:

  • complete_multipart_upload(bucket :: binary, object :: binary, upload_id :: binary, parts :: %{}) :: ExAws.Request.response_t

Complete a multipart upload

Source
config/0

Specs:

Returns the canonical configuration for this service

Source
config_root/0

Specs:

Retrieves the root AWS config for this client

Source
delete_bucket/1

Specs:

  • delete_bucket(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket

Source
delete_bucket_cors/1

Specs:

  • delete_bucket_cors(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket cors

Source
delete_bucket_lifecycle/1

Specs:

  • delete_bucket_lifecycle(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket lifecycle

Source
delete_bucket_policy/1

Specs:

  • delete_bucket_policy(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket policy

Source
delete_bucket_replication/1

Specs:

  • delete_bucket_replication(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket replication

Source
delete_bucket_tagging/1

Specs:

  • delete_bucket_tagging(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket tagging

Source
delete_bucket_website/1

Specs:

  • delete_bucket_website(bucket :: binary) :: ExAws.Request.response_t

Delete a bucket website

Source
delete_multiple_objects/2

Specs:

  • delete_multiple_objects(bucket :: binary, objects :: [binary | {binary, binary}, ...]) :: ExAws.Request.response_t

Delete multiple objects within a bucket

Source
delete_object/2

Specs:

  • delete_object(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Delete object object in bucket

Source
get_bucket_acl/1

Specs:

  • get_bucket_acl(bucket :: binary) :: ExAws.Request.response_t

Get bucket acl

Source
get_bucket_cors/1

Specs:

  • get_bucket_cors(bucket :: binary) :: ExAws.Request.response_t

Get bucket cors

Source
get_bucket_lifecycle/1

Specs:

  • get_bucket_lifecycle(bucket :: binary) :: ExAws.Request.response_t

Get bucket lifecycle

Source
get_bucket_location/1

Specs:

  • get_bucket_location(bucket :: binary) :: ExAws.Request.response_t

Get bucket location

Source
get_bucket_logging/1

Specs:

  • get_bucket_logging(bucket :: binary) :: ExAws.Request.response_t

Get bucket logging

Source
get_bucket_notification/1

Specs:

  • get_bucket_notification(bucket :: binary) :: ExAws.Request.response_t

Get bucket notification

Source
get_bucket_object_versions/1

Specs:

  • get_bucket_object_versions(bucket :: binary) :: ExAws.Request.response_t

Get bucket object versions

Source
get_bucket_object_versions/2

Specs:

  • get_bucket_object_versions(bucket :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
get_bucket_policy/1

Specs:

  • get_bucket_policy(bucket :: binary) :: ExAws.Request.response_t

Get bucket policy

Source
get_bucket_replication/1

Specs:

  • get_bucket_replication(bucket :: binary) :: ExAws.Request.response_t

Get bucket replication

Source
get_bucket_request_payment/1

Specs:

  • get_bucket_request_payment(bucket :: binary) :: ExAws.Request.response_t

Get bucket payment configuration

Source
get_bucket_tagging/1

Specs:

  • get_bucket_tagging(bucket :: binary) :: ExAws.Request.response_t

Get bucket tagging

Source
get_bucket_versioning/1

Specs:

  • get_bucket_versioning(bucket :: binary) :: ExAws.Request.response_t

Get bucket versioning

Source
get_bucket_website/1

Specs:

  • get_bucket_website(bucket :: binary) :: ExAws.Request.response_t

Get bucket website

Source
get_object/2

Specs:

  • get_object(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Get an object from a bucket

Source
get_object/3

Specs:

  • get_object(bucket :: binary, object :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
get_object_acl/2

Specs:

  • get_object_acl(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Get an object’s access control policy

Source
get_object_acl/3

Specs:

  • get_object_acl(bucket :: binary, object :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
get_object_torrent/2

Specs:

  • get_object_torrent(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Get a torrent for a bucket

Source
head_bucket/1

Specs:

  • head_bucket(bucket :: binary) :: ExAws.Request.response_t

Determine if a bucket exists

Source
head_object/2

Specs:

  • head_object(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Determine of an object exists

Source
head_object/3

Specs:

  • head_object(bucket :: binary, object :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
initiate_multipart_upload/2

Specs:

  • initiate_multipart_upload(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Initiate a multipart upload

Source
initiate_multipart_upload/3

Specs:

  • initiate_multipart_upload(bucket :: binary, object :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
list_buckets/0

Specs:

  • list_buckets :: ExAws.Request.response_t

List buckets

Source
list_buckets/1

Specs:

  • list_buckets(opts :: Keyword.t) :: ExAws.Request.response_t
Source
list_multipart_uploads/1

Specs:

  • list_multipart_uploads(bucket :: binary) :: ExAws.Request.response_t

List multipart uploads for a bucket

Source
list_multipart_uploads/2

Specs:

  • list_multipart_uploads(bucket :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
list_objects/1

Specs:

  • list_objects(bucket :: binary) :: ExAws.Request.response_t

List objects in bucket

Source
list_parts/3

Specs:

  • list_parts(bucket :: binary, object :: binary, upload_id :: binary) :: ExAws.Request.response_t

List the parts of a multipart upload

Source
list_parts/4

Specs:

  • list_parts(bucket :: binary, object :: binary, upload_id :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
options_object/4

Specs:

  • options_object(bucket :: binary, object :: binary, origin :: binary, request_method :: atom) :: ExAws.Request.response_t

Determine the CORS configuration for an object

Source
options_object/5

Specs:

  • options_object(bucket :: binary, object :: binary, origin :: binary, request_method :: atom, request_headers :: [binary, ...]) :: ExAws.Request.response_t
Source
post_object/2

Specs:

  • post_object(bucket :: binary, object :: binary) :: ExAws.Request.response_t

Create an object within a bucket.

Generally speaking put_object ought to be used. AWS POST object exists to support the AWS UI.

Source
post_object/3

Specs:

  • post_object(bucket :: binary, object :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
post_object_restore/4

Specs:

  • post_object_restore(bucket :: binary, object :: binary, version_id :: binary, number_of_days :: pos_integer) :: ExAws.Request.response_t

Restore an object to a particular version FIXME

Source
put_bucket/2

Specs:

  • put_bucket(bucket :: binary, region :: binary) :: ExAws.Request.response_t

Creates a bucket. Same as create_bucket/2

Source
put_bucket_acl/4

Specs:

  • put_bucket_acl(bucket :: binary, owner_id :: binary, owner_email :: binary, grants :: %{}) :: ExAws.Request.response_t

Update or create a bucket bucket access control

Source
put_bucket_cors/2

Specs:

  • put_bucket_cors(bucket :: binary, cors_config :: %{}) :: ExAws.Request.response_t

Update or create a bucket CORS policy

Source
put_bucket_lifecycle/2

Specs:

  • put_bucket_lifecycle(bucket :: binary, lifecycle_config :: %{}) :: ExAws.Request.response_t

Update or create a bucket lifecycle configuration

Source
put_bucket_logging/2

Specs:

  • put_bucket_logging(bucket :: binary, logging_config :: %{}) :: ExAws.Request.response_t

Update or create a bucket logging configuration

Source
put_bucket_notification/2

Specs:

  • put_bucket_notification(bucket :: binary, notification_config :: %{}) :: ExAws.Request.response_t

Update or create a bucket notification configuration

Source
put_bucket_policy/2

Specs:

  • put_bucket_policy(bucket :: binary, policy :: %{}) :: ExAws.Request.response_t

Update or create a bucket policy configuration

Source
put_bucket_replication/2

Specs:

  • put_bucket_replication(bucket :: binary, replication_config :: %{}) :: ExAws.Request.response_t

Update or create a bucket replication configuration

Source
put_bucket_requestpayment/2

Specs:

  • put_bucket_requestpayment(bucket :: binary, payer :: :requester | :bucket_owner) :: ExAws.Request.response_t

Update or create a bucket requestpayment configuration

Source
put_bucket_tagging/2

Specs:

  • put_bucket_tagging(bucket :: binary, tags :: %{}) :: ExAws.Request.response_t

Update or create a bucket tagging configuration

Source
put_bucket_versioning/2

Specs:

  • put_bucket_versioning(bucket :: binary, version_config :: binary) :: ExAws.Request.response_t

Update or create a bucket versioning configuration

Source
put_bucket_website/2

Specs:

  • put_bucket_website(bucket :: binary, website_config :: binary) :: ExAws.Request.response_t

Update or create a bucket website configuration

Source
put_object/3

Specs:

  • put_object(bucket :: binary, object :: binary, body :: binary) :: ExAws.Request.response_t

Create an object within a bucket

Source
put_object/4

Specs:

  • put_object(bucket :: binary, object :: binary, body :: binary, opts :: Keyword.t) :: ExAws.Request.response_t
Source
put_object_acl/3

Specs:

  • put_object_acl(bucket :: binary, object :: binary, acl :: %{}) :: ExAws.Request.response_t

Create or update an object’s access control FIXME

Source
put_object_copy/4

Specs:

  • put_object_copy(dest_bucket :: binary, dest_object :: binary, src_bucket :: binary, src_object :: binary) :: ExAws.Request.response_t

Copy an object

Source
put_object_copy/5

Specs:

  • put_object_copy(dest_bucket :: binary, dest_object :: binary, src_bucket :: binary, src_object :: binary, opts :: %{}) :: ExAws.Request.response_t
Source
request/3

Specs:

  • request(http_method :: atom, bucket :: binary, path :: binary) :: ExAws.Request.response_t

Enables custom request handling.

By default this just forwards the request to the ExAws.S3.Request.request/4. However, this can be overriden in your client to provide pre-request adjustments to headers, params, etc.

Source
request/4

Specs:

  • request(http_method :: atom, bucket :: binary, path :: binary, data :: Keyword.t) :: ExAws.Request.response_t
Source
service/0

Specs:

  • service :: atom

Service

Source
upload_part/4

Specs:

  • upload_part(bucket :: binary, object :: binary, upload_id :: binary, part_number :: pos_integer) :: ExAws.Request.response_t

Upload a part for a multipart upload

Source
upload_part_copy/4

Specs:

  • upload_part_copy(dest_bucket :: binary, dest_object :: binary, src_bucket :: binary, src_object :: binary) :: ExAws.Request.response_t

Upload a part for a multipart copy

Source
upload_part_copy/5

Specs:

  • upload_part_copy(dest_bucket :: binary, dest_object :: binary, src_bucket :: binary, src_object :: binary, opts :: %{}) :: ExAws.Request.response_t
Source