list_service_specific_credentials

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'
)
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.
Return type

dict

Returns

Response Syntax

{
    'ServiceSpecificCredentials': [
        {
            'UserName': 'string',
            'Status': 'Active'|'Inactive',
            'ServiceUserName': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'ServiceSpecificCredentialId': 'string',
            'ServiceName': 'string'
        },
    ]
}

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.

        • CreateDate (datetime) --

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

        • ServiceSpecificCredentialId (string) --

          The unique identifier for the service-specific credential.

        • ServiceName (string) --

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

Exceptions

  • IAM.Client.exceptions.NoSuchEntityException
  • IAM.Client.exceptions.ServiceNotSupportedException