get_system_information

ManagementApi.get_system_information(role_id=None, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get deployment identity

Returns Version, Environment, ProjectName, ProjectShortname, AWSRegion, and AWSAccountId from Lambda environment variables. Any valid authenticated user may call this; there is no extra permission. role_id is recorded in audit logs. Invalid user returns GE-1060.

Parameters:
  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs.

  • projection_expression (str) – Comma-separated field names to return. Omit or send empty to return all six fields. Split is not trimmed, so spaces in names do not match. Unknown names are ignored. If none of the names match, the body is {}.

  • _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:

SystemInformation

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /system-information

Success (HTTP 200)

All six fields when projectionExpression is omitted or empty. Otherwise only the names that match. Fields are not required because projection can omit them.

No projectionExpression

{
  "Version": "2.6.0",
  "Environment": "dev",
  "ProjectName": "Amorphic",
  "ProjectShortname": "cw",
  "AWSRegion": "us-east-1",
  "AWSAccountId": "123456789012"
}

projectionExpression=Version,AWSRegion

{
  "Version": "2.6.0",
  "AWSRegion": "us-east-1"
}

Errors

Documented error codes: GE-1060, GE-1010, RTE-1001, EMF-1001.

HTTP 400

GE-1060 invalid user. GE-1010 if a method other than GET reaches the handler.

Invalid user

{
  "Message": "GE-1060 - User jdoe is not valid user."
}

Unsupported method

{
  "Message": "GE-1010 - Invalid http method - PUT or api resource - /system-information, please recheck"
}

HTTP 500

ClientError body is the raw boto string. Uncaught Exception is RTE-1001 via EMF-1001.

Uncaught Exception

{
  "Message": "RTE-1001 - Internal error."
}