Creates a new Amazon CloudFront origin access identity (OAI). You can create up to 100 OAIs per AWS account. For more information, see the Amazon CloudFront Developer Guide.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
A unique identifier for the request. A timestamp-appended string is recommended. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Create a new Origin Access Identity.
// Create a new CloudFront distribution from an S3 bucket. $cdn = new AmazonCloudFront(); $response = $cdn->create_oai('my-identity-' . time(), array( 'Comment' => 'This is a test distribution.' )); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
See Also
Source
Method defined in services/cloudfront.class.php | Toggle source view (11 lines) | View on GitHub