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

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

Creating a Request

data GetBucketCors Source #

See: newGetBucketCors smart constructor.

Constructors

GetBucketCors' 

Fields

  • expectedBucketOwner :: Maybe Text

    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.

  • bucket :: BucketName

    The bucket name for which to get the cors configuration.

Instances

Instances details
Eq GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Read GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Show GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Generic GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Associated Types

type Rep GetBucketCors :: Type -> Type #

NFData GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Methods

rnf :: GetBucketCors -> () #

Hashable GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

AWSRequest GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Associated Types

type AWSResponse GetBucketCors #

ToHeaders GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

ToPath GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

ToQuery GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

type Rep GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

type Rep GetBucketCors = D1 ('MetaData "GetBucketCors" "Amazonka.S3.GetBucketCors" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetBucketCors'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))
type AWSResponse GetBucketCors Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

newGetBucketCors Source #

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

  • cORSRules :: Maybe [CORSRule]

    A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Read GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Show GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Generic GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Associated Types

type Rep GetBucketCorsResponse :: Type -> Type #

NFData GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

Methods

rnf :: GetBucketCorsResponse -> () #

type Rep GetBucketCorsResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketCors

type Rep GetBucketCorsResponse = D1 ('MetaData "GetBucketCorsResponse" "Amazonka.S3.GetBucketCors" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetBucketCorsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "cORSRules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CORSRule])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.