IAMRolesAnywhere / Client / get_profile

get_profile

IAMRolesAnywhere.Client.get_profile(**kwargs)

Gets a profile.

Required permissions: rolesanywhere:GetProfile.

See also: AWS API Documentation

Request Syntax

response = client.get_profile(
    profileId='string'
)
Parameters:

profileId (string) –

[REQUIRED]

The profile to act on. You can specify one of the following:

  • The profile ID.

  • The profile ARN.

  • The alias ARN of the profile.

An ARN must be for a profile in your account and Region.

Return type:

dict

Returns:

Response Syntax

{
    'profile': {
        'profileId': 'string',
        'profileArn': 'string',
        'name': 'string',
        'requireInstanceProperties': True|False,
        'enabled': True|False,
        'createdBy': 'string',
        'sessionPolicy': 'string',
        'roleArns': [
            'string',
        ],
        'managedPolicyArns': [
            'string',
        ],
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'durationSeconds': 123,
        'acceptRoleSessionName': True|False,
        'attributeMappings': [
            {
                'certificateField': 'x509Subject'|'x509Issuer'|'x509SAN',
                'mappingRules': [
                    {
                        'specifier': 'string'
                    },
                ]
            },
        ],
        'aliasName': 'string',
        'aliasArn': 'string',
        'previousAliasName': 'string'
    }
}

Response Structure

  • (dict) –

    • profile (dict) –

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

      • profileId (string) –

        The unique identifier of the profile.

      • profileArn (string) –

        The ARN of the profile.

      • name (string) –

        The name of the profile.

      • requireInstanceProperties (boolean) –

        Unused, saved for future use. Will likely specify whether instance properties are required in temporary credential requests with this profile.

      • enabled (boolean) –

        Indicates whether the profile is enabled.

      • createdBy (string) –

        The Amazon Web Services account that created the profile.

      • sessionPolicy (string) –

        A session policy that applies to the trust boundary of the vended session credentials.

      • roleArns (list) –

        A list of IAM roles that this profile can assume in a temporary credential request.

        • (string) –

      • managedPolicyArns (list) –

        A list of managed policy ARNs that apply to the vended session credentials.

        • (string) –

      • createdAt (datetime) –

        The ISO-8601 timestamp when the profile was created.

      • updatedAt (datetime) –

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

      • durationSeconds (integer) –

        Used to determine how long sessions vended using this profile are valid for. See the Expiration section of the CreateSession API documentation page for more details. In requests, if this value is not provided, the default value will be 3600.

      • acceptRoleSessionName (boolean) –

        Used to determine if a custom role session name will be accepted in a temporary credential request.

      • attributeMappings (list) –

        A mapping applied to the authenticating end-entity certificate.

        • (dict) –

          A mapping applied to the authenticating end-entity certificate.

          • certificateField (string) –

            Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.

          • mappingRules (list) –

            A list of mapping entries for every supported specifier or sub-field.

            • (dict) –

              A single mapping entry for each supported specifier or sub-field.

              • specifier (string) –

                Specifier within a certificate field, such as CN, OU, or UID from the Subject field.

      • aliasName (string) –

        The alias of the profile. Present only if the profile has an alias.

      • aliasArn (string) –

        The alias ARN of the profile, in the form ``arn:partition:rolesanywhere:region:account:alias/profile/alias-name ``. Present only if the profile has an alias.

        You can use the alias ARN in place of the resource ID or ARN in the request parameters whose descriptions say that they accept an alias ARN. Don’t use the alias ARN in Identity and Access Management (IAM) policies. A policy statement that names an alias ARN doesn’t apply to the resource that holds the alias. Write policies with the ARN that contains the resource ID instead.

      • previousAliasName (string) –

        The alias that the resource had before the update request. IAM Roles Anywhere returns this value only in the response to an update request that changed or removed an existing alias. It isn’t returned when the alias was unchanged, when the resource had no alias before the request, or by other operations.

Exceptions

  • IAMRolesAnywhere.Client.exceptions.ResourceNotFoundException

  • IAMRolesAnywhere.Client.exceptions.AccessDeniedException

  • IAMRolesAnywhere.Client.exceptions.ServiceUnavailableException