amazonka-s3-1.6.1: Amazon Simple Storage Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.S3.PutObject

Contents

Description

Adds an object to a bucket.

Synopsis

Creating a Request

putObject Source #

Creates a value of PutObject with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • poContentLength - Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
  • poExpires - The date and time at which the object is no longer cacheable.
  • poGrantReadACP - Allows grantee to read the object ACL.
  • poSSECustomerAlgorithm - Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  • poSSECustomerKey - Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm header.
  • poRequestPayer - Undocumented member.
  • poGrantWriteACP - Allows grantee to write the ACL for the applicable object.
  • poWebsiteRedirectLocation - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
  • poGrantRead - Allows grantee to read the object data and its metadata.
  • poStorageClass - The type of storage to use for the object. Defaults to STANDARD.
  • poSSECustomerKeyMD5 - Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.
  • poSSEKMSKeyId - Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  • poGrantFullControl - Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  • poContentEncoding - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
  • poTagging - The tag-set for the object. The tag-set must be encoded as URL Query parameters
  • poContentMD5 - The base64-encoded 128-bit MD5 digest of the part data.
  • poMetadata - A map of metadata to store with the object in S3.
  • poCacheControl - Specifies caching behavior along the request/reply chain.
  • poContentLanguage - The language the content is in.
  • poACL - The canned ACL to apply to the object.
  • poContentDisposition - Specifies presentational information for the object.
  • poServerSideEncryption - The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
  • poContentType - A standard MIME type describing the format of the object data.
  • poBucket - Name of the bucket to which the PUT operation was initiated.
  • poKey - Object key for which the PUT operation was initiated.
  • poBody - Object data.

data PutObject Source #

See: putObject smart constructor.

Instances
Show PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Generic PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Associated Types

type Rep PutObject :: Type -> Type #

AWSRequest PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Associated Types

type Rs PutObject :: Type #

ToBody PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Methods

toBody :: PutObject -> RqBody #

ToHeaders PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Methods

toHeaders :: PutObject -> [Header] #

ToPath PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

ToQuery PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

type Rep PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

type Rep PutObject = D1 (MetaData "PutObject" "Network.AWS.S3.PutObject" "amazonka-s3-1.6.1-I7VsiKive605KPmKsVgrUz" False) (C1 (MetaCons "PutObject'" PrefixI True) ((((S1 (MetaSel (Just "_poContentLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 (MetaSel (Just "_poExpires") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822)) :*: S1 (MetaSel (Just "_poGrantReadACP") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_poSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_poSSECustomerKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 (MetaSel (Just "_poRequestPayer") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RequestPayer))))) :*: ((S1 (MetaSel (Just "_poGrantWriteACP") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_poWebsiteRedirectLocation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_poGrantRead") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_poStorageClass") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe StorageClass)) :*: S1 (MetaSel (Just "_poSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_poSSEKMSKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 (MetaSel (Just "_poGrantFullControl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) :*: (((S1 (MetaSel (Just "_poContentEncoding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_poTagging") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_poContentMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_poMetadata") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Map Text Text)) :*: (S1 (MetaSel (Just "_poCacheControl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_poContentLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 (MetaSel (Just "_poACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectCannedACL)) :*: (S1 (MetaSel (Just "_poContentDisposition") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_poServerSideEncryption") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ServerSideEncryption)))) :*: ((S1 (MetaSel (Just "_poContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_poBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BucketName)) :*: (S1 (MetaSel (Just "_poKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ObjectKey) :*: S1 (MetaSel (Just "_poBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 RqBody)))))))
type Rs PutObject Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Request Lenses

poContentLength :: Lens' PutObject (Maybe Integer) Source #

Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.

poExpires :: Lens' PutObject (Maybe UTCTime) Source #

The date and time at which the object is no longer cacheable.

poGrantReadACP :: Lens' PutObject (Maybe Text) Source #

Allows grantee to read the object ACL.

poSSECustomerAlgorithm :: Lens' PutObject (Maybe Text) Source #

Specifies the algorithm to use to when encrypting the object (e.g., AES256).

poSSECustomerKey :: Lens' PutObject (Maybe Text) Source #

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm header.

poGrantWriteACP :: Lens' PutObject (Maybe Text) Source #

Allows grantee to write the ACL for the applicable object.

poWebsiteRedirectLocation :: Lens' PutObject (Maybe Text) Source #

If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.

poGrantRead :: Lens' PutObject (Maybe Text) Source #

Allows grantee to read the object data and its metadata.

poStorageClass :: Lens' PutObject (Maybe StorageClass) Source #

The type of storage to use for the object. Defaults to STANDARD.

poSSECustomerKeyMD5 :: Lens' PutObject (Maybe Text) Source #

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.

poSSEKMSKeyId :: Lens' PutObject (Maybe Text) Source #

Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version

poGrantFullControl :: Lens' PutObject (Maybe Text) Source #

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

poContentEncoding :: Lens' PutObject (Maybe Text) Source #

Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

poTagging :: Lens' PutObject (Maybe Text) Source #

The tag-set for the object. The tag-set must be encoded as URL Query parameters

poContentMD5 :: Lens' PutObject (Maybe Text) Source #

The base64-encoded 128-bit MD5 digest of the part data.

poMetadata :: Lens' PutObject (HashMap Text Text) Source #

A map of metadata to store with the object in S3.

poCacheControl :: Lens' PutObject (Maybe Text) Source #

Specifies caching behavior along the request/reply chain.

poContentLanguage :: Lens' PutObject (Maybe Text) Source #

The language the content is in.

poACL :: Lens' PutObject (Maybe ObjectCannedACL) Source #

The canned ACL to apply to the object.

poContentDisposition :: Lens' PutObject (Maybe Text) Source #

Specifies presentational information for the object.

poServerSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption) Source #

The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).

poContentType :: Lens' PutObject (Maybe Text) Source #

A standard MIME type describing the format of the object data.

poBucket :: Lens' PutObject BucketName Source #

Name of the bucket to which the PUT operation was initiated.

poKey :: Lens' PutObject ObjectKey Source #

Object key for which the PUT operation was initiated.

Destructuring the Response

putObjectResponse Source #

Creates a value of PutObjectResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • porsRequestCharged - Undocumented member.
  • porsETag - Entity tag for the uploaded object.
  • porsVersionId - Version of the object.
  • porsExpiration - If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  • porsSSECustomerAlgorithm - If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
  • porsSSECustomerKeyMD5 - If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
  • porsSSEKMSKeyId - If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
  • porsServerSideEncryption - The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
  • porsResponseStatus - -- | The response status code.

data PutObjectResponse Source #

See: putObjectResponse smart constructor.

Instances
Eq PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Data PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutObjectResponse -> c PutObjectResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutObjectResponse #

toConstr :: PutObjectResponse -> Constr #

dataTypeOf :: PutObjectResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PutObjectResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutObjectResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutObjectResponse -> PutObjectResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutObjectResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutObjectResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutObjectResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutObjectResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutObjectResponse -> m PutObjectResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutObjectResponse -> m PutObjectResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutObjectResponse -> m PutObjectResponse #

Show PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Generic PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Associated Types

type Rep PutObjectResponse :: Type -> Type #

NFData PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Methods

rnf :: PutObjectResponse -> () #

type Rep PutObjectResponse Source # 
Instance details

Defined in Network.AWS.S3.PutObject

Response Lenses

porsETag :: Lens' PutObjectResponse (Maybe ETag) Source #

Entity tag for the uploaded object.

porsExpiration :: Lens' PutObjectResponse (Maybe Text) Source #

If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.

porsSSECustomerAlgorithm :: Lens' PutObjectResponse (Maybe Text) Source #

If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

porsSSECustomerKeyMD5 :: Lens' PutObjectResponse (Maybe Text) Source #

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.

porsSSEKMSKeyId :: Lens' PutObjectResponse (Maybe Text) Source #

If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.

porsServerSideEncryption :: Lens' PutObjectResponse (Maybe ServerSideEncryption) Source #

The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).

porsResponseStatus :: Lens' PutObjectResponse Int Source #

  • - | The response status code.