IAMRolesAnywhere / Client / get_subject

get_subject#

IAMRolesAnywhere.Client.get_subject(**kwargs)#

Gets a subject, which associates a certificate identity with authentication attempts. The subject stores auditing information such as the status of the last authentication attempt, the certificate data used in the attempt, and the last time the associated identity attempted authentication.

Required permissions: rolesanywhere:GetSubject.

See also: AWS API Documentation

Request Syntax

response = client.get_subject(
    subjectId='string'
)
Parameters:

subjectId (string) –

[REQUIRED]

The unique identifier of the subject.

Return type:

dict

Returns:

Response Syntax

{
    'subject': {
        'createdAt': datetime(2015, 1, 1),
        'credentials': [
            {
                'enabled': True|False,
                'failed': True|False,
                'issuer': 'string',
                'seenAt': datetime(2015, 1, 1),
                'serialNumber': 'string',
                'x509CertificateData': 'string'
            },
        ],
        'enabled': True|False,
        'instanceProperties': [
            {
                'failed': True|False,
                'properties': {
                    'string': 'string'
                },
                'seenAt': datetime(2015, 1, 1)
            },
        ],
        'lastSeenAt': datetime(2015, 1, 1),
        'subjectArn': 'string',
        'subjectId': 'string',
        'updatedAt': datetime(2015, 1, 1),
        'x509Subject': 'string'
    }
}

Response Structure

  • (dict) –

    • subject (dict) –

      The state of the subject after a read or write operation.

      • createdAt (datetime) –

        The ISO-8601 timestamp when the subject was created.

      • credentials (list) –

        The temporary session credentials vended at the last authenticating call with this subject.

        • (dict) –

          A record of a presented X509 credential from a temporary credential request.

          • enabled (boolean) –

            Indicates whether the credential is enabled.

          • failed (boolean) –

            Indicates whether the temporary credential request was successful.

          • issuer (string) –

            The fully qualified domain name of the issuing certificate for the presented end-entity certificate.

          • seenAt (datetime) –

            The ISO-8601 time stamp of when the certificate was last used in a temporary credential request.

          • serialNumber (string) –

            The serial number of the certificate.

          • x509CertificateData (string) –

            The PEM-encoded data of the certificate.

      • enabled (boolean) –

        The enabled status of the subject.

      • instanceProperties (list) –

        The specified instance properties associated with the request.

        • (dict) –

          A key-value pair you set that identifies a property of the authenticating instance.

          • failed (boolean) –

            Indicates whether the temporary credential request was successful.

          • properties (dict) –

            A list of instanceProperty objects.

            • (string) –

              • (string) –

          • seenAt (datetime) –

            The ISO-8601 time stamp of when the certificate was last used in a temporary credential request.

      • lastSeenAt (datetime) –

        The ISO-8601 timestamp of the last time this subject requested temporary session credentials.

      • subjectArn (string) –

        The ARN of the resource.

      • subjectId (string) –

        The id of the resource

      • updatedAt (datetime) –

        The ISO-8601 timestamp when the subject was last updated.

      • x509Subject (string) –

        The x509 principal identifier of the authenticating certificate.

Exceptions