Deletes an Amazon CloudFront origin access identity (OAI). To delete an OAI, the identity must first
be disassociated from all distributions (by updating each distribution’s configuration to omit the
OriginAccessIdentity
element). Wait until each distribution’s state is Deployed
before deleting the OAI.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
An Identity ID for an existing OAI. |
|
|
Required |
The |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Delete an OAI.
// Create a new CloudFront distribution from an S3 bucket. $cdn = new AmazonCloudFront(); $oai = $cdn->get_oai('E3HV63EQPFPPOA'); // Was the request successful? if ($oai->isOK()) { $etag = $oai->header['etag']; $response = $cdn->delete_oai('E3HV63EQPFPPOA', $etag); // Success? var_dump($response->isOK()); }Result:
bool(true)
Related Methods
See Also
Source
Method defined in services/cloudfront.class.php | Toggle source view (10 lines) | View on GitHub