Gets the configuration of the origin access identity (OAI) for the specified identity ID.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Required |
An Identity ID for an existing OAI. |
|
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
|---|---|
|
A |
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
See Also
Source
Method defined in services/cloudfront.class.php | Toggle source view (10 lines) | View on GitHub

