/AWS1/CL_LSABUCKETCORSRULE¶
Describes a cross-origin resource sharing (CORS) rule for a Lightsail bucket. CORS rules specify which origins are allowed to access the bucket, which HTTP methods are allowed, and other access control information. For more information, see Configuring cross-origin resource sharing (CORS).
CONSTRUCTOR¶
IMPORTING¶
Required arguments:¶
it_allowedmethods TYPE /AWS1/CL_LSABKTCORSALWDMETHS_W=>TT_BUCKETCORSALLOWEDMETHODS TT_BUCKETCORSALLOWEDMETHODS¶
The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.
You can use the following HTTP methods:
GET- Retrieves data from the server, such as downloading files or viewing content.
PUT- Uploads or replaces data on the server, such as uploading new files.
POST- Sends data to the server for processing, such as submitting forms or creating new resources.
DELETE- Removes data from the server, such as deleting files or resources.
HEAD- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
it_allowedorigins TYPE /AWS1/CL_LSABKTCORSALWDORIGI00=>TT_BUCKETCORSALLOWEDORIGINS TT_BUCKETCORSALLOWEDORIGINS¶
One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.
Optional arguments:¶
iv_id TYPE /AWS1/LSABUCKETCORSRULEID /AWS1/LSABUCKETCORSRULEID¶
A unique identifier for the CORS rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
it_allowedheaders TYPE /AWS1/CL_LSABKTCORSALWDHEADE00=>TT_BUCKETCORSALLOWEDHEADERS TT_BUCKETCORSALLOWEDHEADERS¶
Headers that are specified in the
Access-Control-Request-Headersheader. These headers are allowed in a preflightOPTIONSrequest. In response to any preflightOPTIONSrequest, Amazon S3 returns any requested headers that are allowed.
it_exposeheaders TYPE /AWS1/CL_LSABKTCORSEXPOSEHEA00=>TT_BUCKETCORSEXPOSEHEADERS TT_BUCKETCORSEXPOSEHEADERS¶
One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript
XMLHttpRequestobject).
iv_maxageseconds TYPE /AWS1/LSAINTEGER /AWS1/LSAINTEGER¶
The time in seconds that your browser is to cache the preflight response for the specified resource. A CORS rule can have only one
maxAgeSecondselement.
Queryable Attributes¶
id¶
A unique identifier for the CORS rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ID() |
Getter for ID, with configurable default |
ASK_ID() |
Getter for ID w/ exceptions if field has no value |
HAS_ID() |
Determine if ID has a value |
allowedMethods¶
The HTTP methods that are allowed when accessing the bucket from the specified origin. Each CORS rule must identify at least one origin and one method.
You can use the following HTTP methods:
GET- Retrieves data from the server, such as downloading files or viewing content.
PUT- Uploads or replaces data on the server, such as uploading new files.
POST- Sends data to the server for processing, such as submitting forms or creating new resources.
DELETE- Removes data from the server, such as deleting files or resources.
HEAD- Retrieves only the headers from the server without the actual content, useful for checking if a resource exists.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ALLOWEDMETHODS() |
Getter for ALLOWEDMETHODS, with configurable default |
ASK_ALLOWEDMETHODS() |
Getter for ALLOWEDMETHODS w/ exceptions if field has no valu |
HAS_ALLOWEDMETHODS() |
Determine if ALLOWEDMETHODS has a value |
allowedOrigins¶
One or more origins you want customers to be able to access the bucket from. Each CORS rule must identify at least one origin and one method.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ALLOWEDORIGINS() |
Getter for ALLOWEDORIGINS, with configurable default |
ASK_ALLOWEDORIGINS() |
Getter for ALLOWEDORIGINS w/ exceptions if field has no valu |
HAS_ALLOWEDORIGINS() |
Determine if ALLOWEDORIGINS has a value |
allowedHeaders¶
Headers that are specified in the
Access-Control-Request-Headersheader. These headers are allowed in a preflightOPTIONSrequest. In response to any preflightOPTIONSrequest, Amazon S3 returns any requested headers that are allowed.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_ALLOWEDHEADERS() |
Getter for ALLOWEDHEADERS, with configurable default |
ASK_ALLOWEDHEADERS() |
Getter for ALLOWEDHEADERS w/ exceptions if field has no valu |
HAS_ALLOWEDHEADERS() |
Determine if ALLOWEDHEADERS has a value |
exposeHeaders¶
One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript
XMLHttpRequestobject).
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_EXPOSEHEADERS() |
Getter for EXPOSEHEADERS, with configurable default |
ASK_EXPOSEHEADERS() |
Getter for EXPOSEHEADERS w/ exceptions if field has no value |
HAS_EXPOSEHEADERS() |
Determine if EXPOSEHEADERS has a value |
maxAgeSeconds¶
The time in seconds that your browser is to cache the preflight response for the specified resource. A CORS rule can have only one
maxAgeSecondselement.
Accessible with the following methods¶
| Method | Description |
|---|---|
GET_MAXAGESECONDS() |
Getter for MAXAGESECONDS, with configurable default |
ASK_MAXAGESECONDS() |
Getter for MAXAGESECONDS w/ exceptions if field has no value |
HAS_MAXAGESECONDS() |
Determine if MAXAGESECONDS has a value |
Public Local Types In This Class¶
Internal table types, representing arrays and maps of this class, are defined as local types:
TT_BUCKETCORSRULES¶
TYPES TT_BUCKETCORSRULES TYPE STANDARD TABLE OF REF TO /AWS1/CL_LSABUCKETCORSRULE WITH DEFAULT KEY
.