| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.S3.GetBucketCors
Description
Returns the Cross-Origin Resource Sharing (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 fails with the HTTP status code
403 Forbidden (access denied).
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 fails with the HTTP status code
403 Forbidden (access denied).
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:
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.