get_logs_retention_period

LogsRetentionPeriodApi.get_logs_retention_period(role_id=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get system logs retention period

Returns the SSM logs retention period as a string. No role permission is required. role_id is still required (AUTH-1001).

Parameters:
  • role_id (str) – Amorphic role ID recorded in audit logs. Missing this header returns AUTH-1001. Not used for a permission check.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

GetLogsRetentionPeriodResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /logs-retention-period

Success (HTTP 200)

Current retention period from SSM.

Request / response example

{
  "LogsRetentionPeriod": "60"
}

Errors

Documented error codes: AUTH-1001, AUTH-1030, RTE-1001.

HTTP 400

Authorization or backend failure mapped to 400. Body is {“Message”: “<CODE> - <text>”}. Codes: AUTH-1001 (missing role_id). GenericFailureException is also 400 on this lambda. This GET does not return AUTH-1030.

role_id header missing

{
  "Message": "AUTH-1001 - Missing role information in event header"
}

HTTP 500

InconsistentMetadataException uses {“Message”: “<CODE> - <text>”}. Other uncaught errors use {“Message”: “RTE-1001 - <text>.”}.

Uncaught handler failure

{
  "Message": "RTE-1001 - An error occurred (ParameterNotFound) when calling the GetParameter operation."
}