Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as the source bucket. To set the logging status of a bucket, you must be the bucket owner.
The bucket owner is automatically granted FULL_CONTROL to all logs. You
use the Grantee
request element to grant access to other people. The
Permissions
request element specifies the kind of access the grantee
has to the logs.
Grantee Values
You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways:
By the person's ID:
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> </Grantee>
DisplayName is optional and ignored in the request.
By Email address:
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee>
The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.
By URI:
<Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee>
To enable logging, you use LoggingEnabled and its children request elements. To disable logging, you use an empty BucketLoggingStatus request element:
<BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />
For more information about server access logging, see Server Access Logging.
For more information about creating a bucket, see CreateBucket. For more information about returning the logging status of a bucket, see GetBucketLogging.
The following operations are related to PutBucketLogging
:
Synopsis
- data PutBucketLogging = PutBucketLogging' {}
- newPutBucketLogging :: BucketName -> BucketLoggingStatus -> PutBucketLogging
- putBucketLogging_contentMD5 :: Lens' PutBucketLogging (Maybe Text)
- putBucketLogging_expectedBucketOwner :: Lens' PutBucketLogging (Maybe Text)
- putBucketLogging_bucket :: Lens' PutBucketLogging BucketName
- putBucketLogging_bucketLoggingStatus :: Lens' PutBucketLogging BucketLoggingStatus
- data PutBucketLoggingResponse = PutBucketLoggingResponse' {
- newPutBucketLoggingResponse :: PutBucketLoggingResponse
Creating a Request
data PutBucketLogging Source #
See: newPutBucketLogging
smart constructor.
PutBucketLogging' | |
|
Instances
Create a value of PutBucketLogging
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:contentMD5:PutBucketLogging'
, putBucketLogging_contentMD5
- The MD5 hash of the PutBucketLogging
request body.
For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
$sel:expectedBucketOwner:PutBucketLogging'
, putBucketLogging_expectedBucketOwner
- The account ID of the expected bucket owner. If the bucket is owned by a
different account, the request will fail with an HTTP
403 (Access Denied)
error.
$sel:bucket:PutBucketLogging'
, putBucketLogging_bucket
- The name of the bucket for which to set the logging parameters.
$sel:bucketLoggingStatus:PutBucketLogging'
, putBucketLogging_bucketLoggingStatus
- Container for logging status information.
Request Lenses
putBucketLogging_contentMD5 :: Lens' PutBucketLogging (Maybe Text) Source #
The MD5 hash of the PutBucketLogging
request body.
For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
putBucketLogging_expectedBucketOwner :: Lens' PutBucketLogging (Maybe Text) Source #
The account ID of the expected bucket owner. If the bucket is owned by a
different account, the request will fail with an HTTP
403 (Access Denied)
error.
putBucketLogging_bucket :: Lens' PutBucketLogging BucketName Source #
The name of the bucket for which to set the logging parameters.
putBucketLogging_bucketLoggingStatus :: Lens' PutBucketLogging BucketLoggingStatus Source #
Container for logging status information.
Destructuring the Response
data PutBucketLoggingResponse Source #
See: newPutBucketLoggingResponse
smart constructor.
Instances
Eq PutBucketLoggingResponse Source # | |
Defined in Amazonka.S3.PutBucketLogging | |
Read PutBucketLoggingResponse Source # | |
Show PutBucketLoggingResponse Source # | |
Defined in Amazonka.S3.PutBucketLogging showsPrec :: Int -> PutBucketLoggingResponse -> ShowS # show :: PutBucketLoggingResponse -> String # showList :: [PutBucketLoggingResponse] -> ShowS # | |
Generic PutBucketLoggingResponse Source # | |
Defined in Amazonka.S3.PutBucketLogging type Rep PutBucketLoggingResponse :: Type -> Type # | |
NFData PutBucketLoggingResponse Source # | |
Defined in Amazonka.S3.PutBucketLogging rnf :: PutBucketLoggingResponse -> () # | |
type Rep PutBucketLoggingResponse Source # | |
newPutBucketLoggingResponse :: PutBucketLoggingResponse Source #
Create a value of PutBucketLoggingResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.