| 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 |
Amazonka.S3.GetBucketCors
Description
Returns the cors configuration information set for the bucket.
To use this operation, you must have permission to perform the s3:GetBucketCORS action. By default, the bucket owner has this permission and can grant it to others.
For more information about cors, see Enabling Cross-Origin Resource Sharing.
The following operations are related to GetBucketCors:
Synopsis
- data GetBucketCors = GetBucketCors' {}
- newGetBucketCors :: BucketName -> GetBucketCors
- getBucketCors_expectedBucketOwner :: Lens' GetBucketCors (Maybe Text)
- getBucketCors_bucket :: Lens' GetBucketCors BucketName
- data GetBucketCorsResponse = GetBucketCorsResponse' {
- cORSRules :: Maybe [CORSRule]
- httpStatus :: Int
- newGetBucketCorsResponse :: Int -> GetBucketCorsResponse
- getBucketCorsResponse_cORSRules :: Lens' GetBucketCorsResponse (Maybe [CORSRule])
- getBucketCorsResponse_httpStatus :: Lens' GetBucketCorsResponse Int
Creating a Request
data GetBucketCors Source #
See: newGetBucketCors smart constructor.
Constructors
| GetBucketCors' | |
Fields
| |
Instances
Arguments
| :: BucketName | |
| -> GetBucketCors |
Create a value of GetBucketCors 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:expectedBucketOwner:GetBucketCors', getBucketCors_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:GetBucketCors', getBucketCors_bucket - The bucket name for which to get the cors configuration.
Request Lenses
getBucketCors_expectedBucketOwner :: Lens' GetBucketCors (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.
getBucketCors_bucket :: Lens' GetBucketCors BucketName Source #
The bucket name for which to get the cors configuration.
Destructuring the Response
data GetBucketCorsResponse Source #
See: newGetBucketCorsResponse smart constructor.
Constructors
| GetBucketCorsResponse' | |
Fields
| |
Instances
newGetBucketCorsResponse Source #
Create a value of GetBucketCorsResponse 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:cORSRules:GetBucketCorsResponse', getBucketCorsResponse_cORSRules - A set of origins and methods (cross-origin access that you want to
allow). You can add up to 100 rules to the configuration.
$sel:httpStatus:GetBucketCorsResponse', getBucketCorsResponse_httpStatus - The response's http status code.
Response Lenses
getBucketCorsResponse_cORSRules :: Lens' GetBucketCorsResponse (Maybe [CORSRule]) Source #
A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.
getBucketCorsResponse_httpStatus :: Lens' GetBucketCorsResponse Int Source #
The response's http status code.