EventBridge / Client / list_archives
list_archives#
- EventBridge.Client.list_archives(**kwargs)#
Lists your archives. You can either list all the archives or you can provide a prefix to match to the archive names. Filter parameters are exclusive.
See also: AWS API Documentation
Request Syntax
response = client.list_archives( NamePrefix='string', EventSourceArn='string', State='ENABLED'|'DISABLED'|'CREATING'|'UPDATING'|'CREATE_FAILED'|'UPDATE_FAILED', NextToken='string', Limit=123 )
- Parameters:
NamePrefix (string) – A name prefix to filter the archives returned. Only archives with name that match the prefix are returned.
EventSourceArn (string) – The ARN of the event source associated with the archive.
State (string) – The state of the archive.
NextToken (string) –
The token returned by a previous call, which you can use to retrieve the next set of results.
The value of
nextToken
is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.Using an expired pagination token results in an
HTTP 400 InvalidToken
error.Limit (integer) – The maximum number of results to return.
- Return type:
dict
- Returns:
Response Syntax
{ 'Archives': [ { 'ArchiveName': 'string', 'EventSourceArn': 'string', 'State': 'ENABLED'|'DISABLED'|'CREATING'|'UPDATING'|'CREATE_FAILED'|'UPDATE_FAILED', 'StateReason': 'string', 'RetentionDays': 123, 'SizeBytes': 123, 'EventCount': 123, 'CreationTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Archives (list) –
An array of
Archive
objects that include details about an archive.(dict) –
An
Archive
object that contains details about an archive.ArchiveName (string) –
The name of the archive.
EventSourceArn (string) –
The ARN of the event bus associated with the archive. Only events from this event bus are sent to the archive.
State (string) –
The current state of the archive.
StateReason (string) –
A description for the reason that the archive is in the current state.
RetentionDays (integer) –
The number of days to retain events in the archive before they are deleted.
SizeBytes (integer) –
The size of the archive, in bytes.
EventCount (integer) –
The number of events in the archive.
CreationTime (datetime) –
The time stamp for the time that the archive was created.
NextToken (string) –
A token indicating there are more results available. If there are no more results, no token is included in the response.
The value of
nextToken
is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.Using an expired pagination token results in an
HTTP 400 InvalidToken
error.
Exceptions