get_oai ( $identity_id, $opt )

Gets information about an origin access identity (OAI).

Access

public

Parameters

Parameter

Type

Required

Description

$identity_id

string

Required

The Identity ID for an existing OAI.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Get an OAI.

// Create a new CloudFront distribution from an S3 bucket.
$cdn = new AmazonCloudFront();

$response = $cdn->get_oai('E3HV63EQPFPPOA');

// 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

public function get_oai($identity_id, $opt = null)
{
    if (!$opt) $opt = array();

    $path = '/origin-access-identity/cloudfront/' . $identity_id;

    $opt = array_merge($opt, array('path' => $path));

    return $this->authenticate('GET', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback