describe_events ( $opt )

Returns events related to DB Instances, DB Security Groups, DB Snapshots and DB Parameter Groups for the past 14 days. Events specific to a particular DB Instance, DB Security Group, database snapshot or DB Parameter Group can be obtained by providing the name as a parameter. By default, the past hour of events are returned.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • SourceIdentifier - string - Optional - The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response. Constraints:
    • If SourceIdentifier is supplied, SourceType must also be provided.
    • If the source type is DBInstance, then a DBInstanceIdentifier must be supplied.
    • If the source type is DBSecurityGroup, a DBSecurityGroupName must be supplied.
    • If the source type is DBParameterGroup, a DBParameterGroupName must be supplied.
    • If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied.
    • Cannot end with a hyphen or contain two consecutive hyphens.
  • SourceType - string - Optional - The event source to retrieve events for. If no value is specified, all events are returned. [Allowed values: db-instance, db-parameter-group, db-security-group, db-snapshot]
  • StartTime - string - Optional - The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the strtotime()ISO8601 Wikipedia page.strtotime() Example: 2009-07-08T18:00Z May be passed as a number of seconds since UNIX Epoch, or any string compatible with .
  • EndTime - string - Optional - The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the strtotime()ISO8601 Wikipedia page.strtotime() Example: 2009-07-08T18:00Z May be passed as a number of seconds since UNIX Epoch, or any string compatible with .
  • Duration - integer - Optional - The number of minutes to retrieve events for. Default: 60
  • EventCategories - string|array - Optional - Pass a string for a single value, or an indexed array for multiple values.
  • MaxRecords - integer - Optional - The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100
  • Marker - string - Optional - An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
  • 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

Describe a single database snapshot.

// Instantiate the class
$rds = new AmazonRDS();

$response = $rds->describe_db_snapshots();

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/rds.class.php | Toggle source view (27 lines) | View on GitHub

public function describe_events($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional DateTime
    if (isset($opt['StartTime']))
    {
        $opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
    }
    
    // Optional DateTime
    if (isset($opt['EndTime']))
    {
        $opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
    }

    // Optional list (non-map)
    if (isset($opt['EventCategories']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'EventCategories' => (is_array($opt['EventCategories']) ? $opt['EventCategories'] : array($opt['EventCategories']))
        ), 'member'));
        unset($opt['EventCategories']);
    }

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback