Updates the origin access identity (OAI) configureation XML used in create_oai().
Access
public
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Required |
The source configuration XML to make updates to. Can be the |
|
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
|---|---|
|
XML document. |
Examples
Update the OAI configuration.
// Create a new CloudFront distribution from an S3 bucket.
$cdn = new AmazonCloudFront();
// Get the existing OAI configuration
$config = $cdn->get_oai_config('E3HV63EQPFPPOA');
// Was the request successful?
if ($config->isOK())
{
// Grab the ETag header
$etag = $config->header['etag'];
// Update the configuration. (Returns XML.)
$updated_xml = $cdn->update_oai_xml($config, array(
'Comment' => 'This is my updated comment.'
));
// Update the OAI configuration.
$response = $cdn->set_oai_config('E3HV63EQPFPPOA', $updated_xml, $etag);
// Success?
var_dump($response->isOK());
}
Result:
bool(true)
Related Methods
Source
Method defined in services/cloudfront.class.php | Toggle source view (26 lines) | View on GitHub

