APIPortal / Client / get_managed_api

get_managed_api

APIPortal.Client.get_managed_api(**kwargs)

Returns a Managed API, including its security posture findings.

See also: AWS API Documentation

Request Syntax

response = client.get_managed_api(
    managedApiId='string'
)
Parameters:

managedApiId (string) –

[REQUIRED]

The identifier of the Managed API.

Return type:

dict

Returns:

Response Syntax

{
    'managedApiId': 'string',
    'managedApiArn': 'string',
    'apiSignature': {
        'resourceArn': 'string',
        'method': 'GET'|'POST'|'PUT'|'DELETE'|'PATCH'|'ANY'|'HEAD'|'OPTIONS',
        'hostname': 'string',
        'port': 123,
        'path': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1),
    'findings': [
        {
            'postureId': 'string',
            'postureStatus': 'TRUE'|'FALSE'|'NOT_APPLICABLE'|'INSUFFICIENT_DATA',
            'reason': 'AUTHENTICATION_NOT_CONFIGURED'|'REQUEST_VALIDATION_NOT_ENABLED'|'API_KEY_NOT_CONFIGURED'|'THROTTLING_NOT_ENABLED'|'THROTTLING_RATE_LIMIT_NOT_SET'|'THROTTLING_BURST_LIMIT_NOT_SET'|'RESPONSE_CACHING_NOT_ENABLED'|'STAGE_WAF_NOT_ASSOCIATED'|'STAGE_ACCESS_LOGGING_NOT_ENABLED'|'PRIVATE_API_RESOURCE_POLICY_MISSING'|'REST_API_TLS_BELOW_1_2'|'LOAD_BALANCER_WAF_NOT_ASSOCIATED'|'LISTENER_TLS_BELOW_1_2'|'DISTRIBUTION_TLS_BELOW_1_2'|'DISTRIBUTION_WAF_NOT_ASSOCIATED'|'DISTRIBUTION_SERVES_PLAINTEXT_HTTP'|'DISTRIBUTION_ACCESS_LOGGING_NOT_ENABLED'|'GEO_RESTRICTION_NOT_CONFIGURED'|'UNKNOWN',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    • managedApiId (string) –

      The identifier of the Managed API.

    • managedApiArn (string) –

      The ARN of the Managed API.

    • apiSignature (dict) –

      The attributes that identify the API.

      • resourceArn (string) –

        The ARN of the resource that serves the API.

      • method (string) –

        The HTTP method of the API.

      • hostname (string) –

        The host name the API is served on.

      • port (integer) –

        The port the API listens on, from 0 to 65535.

      • path (string) –

        The request path of the API.

    • createdAt (datetime) –

      When the resource was created.

    • updatedAt (datetime) –

      When the resource was last updated.

    • findings (list) –

      The security posture findings for the API, up to 100.

      • (dict) –

        Security posture finding attached to this API. Shape mirrors the inventory’s Finding sub-document.

        • postureId (string) –

          The identifier of the posture check that produced the finding.

        • postureStatus (string) –

          Values are spelled exactly as the inventory document stores them, so the same string means the same thing at both layers and no second translation sits between the index and the wire.

        • reason (string) –

          Why a posture is not satisfied, or why no verdict was reached. Present only when postureStatus is FALSE or INSUFFICIENT_DATA. New reasons may be added over time, so clients MUST treat any unrecognized value as UNKNOWN and fall back to generic handling.

        • updatedAt (datetime) –

          When the finding was last updated.

    • tags (dict) –

      Up to 50 tags per request, matching API Gateway’s limit of 50 tags per resource.

      • (string) –

        A tag key of 1-128 Unicode characters, per the AWS tagging limits.

        • (string) –

          A tag value of 0-256 Unicode characters, per the AWS tagging limits; an empty value is valid.

Exceptions