# AWSSamples::S3BucketLoggingEnabled::Hook ## Activation To activate a hook in your account, use the following JSON as the `Configuration` request parameter for [`SetTypeConfiguration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html) API request. ### Configuration
{
"CloudFormationConfiguration": {
"HookConfiguration": {
"TargetStacks": "ALL" | "NONE",
"FailureMode": "FAIL" | "WARN" ,
"Properties" : {
"DestinationBucketName" : String,
"LogFilePrefix" : String
}
}
}
}
## Properties
#### DestinationBucketName
The name of the bucket where Amazon S3 should store server access log files.
_Required_: No
_Type_: String
#### LogFilePrefix
A prefix for all log object keys. Use "%BUCKET_NAME%" to represent the source bucket name, using "%BUCKET_NAME%" will require the resource's BucketName property is defined.
_Required_: No
_Type_: String
---
## Targets
* `AWS::S3::Bucket`
---
Please note that the enum values for TargetStacks and FailureMode might go out of date, please refer to their official documentation page for up-to-date values.