IAM / Client / list_service_specific_credentials

list_service_specific_credentials

IAM.Client.list_service_specific_credentials(**kwargs)

Returns information about the service-specific credentials associated with the specified IAM user. If none exists, the operation returns an empty list. The service-specific credentials returned by this operation are used only for authenticating the IAM user to a specific service. For more information about using service-specific credentials to authenticate to an Amazon Web Services service, see Set up service-specific credentials in the CodeCommit User Guide.

See also: AWS API Documentation

Request Syntax

response = client.list_service_specific_credentials(
    UserName='string',
    ServiceName='string',
    AllUsers=True|False,
    Marker='string',
    MaxItems=123
)
Parameters:
  • UserName (string) –

    The name of the user whose service-specific credentials you want information about. If this value is not specified, then the operation assumes the user whose credentials are used to call the operation.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

  • ServiceName (string) – Filters the returned results to only those for the specified Amazon Web Services service. If not specified, then Amazon Web Services returns service-specific credentials for all services.

  • AllUsers (boolean) – A flag indicating whether to list service specific credentials for all users. This parameter cannot be specified together with UserName. When true, returns all credentials associated with the specified service.

  • Marker (string) – Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker from the response that you received to indicate where the next call should start.

  • MaxItems (integer) – Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true.

Return type:

dict

Returns:

Response Syntax

{
    'ServiceSpecificCredentials': [
        {
            'UserName': 'string',
            'Status': 'Active'|'Inactive'|'Expired',
            'ServiceUserName': 'string',
            'ServiceCredentialAlias': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'ExpirationDate': datetime(2015, 1, 1),
            'ServiceSpecificCredentialId': 'string',
            'ServiceName': 'string'
        },
    ],
    'Marker': 'string',
    'IsTruncated': True|False
}

Response Structure

  • (dict) –

    • ServiceSpecificCredentials (list) –

      A list of structures that each contain details about a service-specific credential.

      • (dict) –

        Contains additional details about a service-specific credential.

        • UserName (string) –

          The name of the IAM user associated with the service-specific credential.

        • Status (string) –

          The status of the service-specific credential. Active means that the key is valid for API calls, while Inactive means it is not.

        • ServiceUserName (string) –

          The generated user name for the service-specific credential.

        • ServiceCredentialAlias (string) –

          For Bedrock API keys, this is the public portion of the credential that includes the IAM user name and a suffix containing version and creation information.

        • CreateDate (datetime) –

          The date and time, in ISO 8601 date-time format, when the service-specific credential were created.

        • ExpirationDate (datetime) –

          The date and time when the service specific credential expires. This field is only present for Bedrock API keys that were created with an expiration period.

        • ServiceSpecificCredentialId (string) –

          The unique identifier for the service-specific credential.

        • ServiceName (string) –

          The name of the service associated with the service-specific credential.

    • Marker (string) –

      When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    • IsTruncated (boolean) –

      A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.

Exceptions