Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class ListServiceSpecificCredentialsCommandProtected

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.

Example

Use a bare-bones client and the command you need to make an API call.

import { IAMClient, ListServiceSpecificCredentialsCommand } from "@aws-sdk/client-iam"; // ES Modules import
// const { IAMClient, ListServiceSpecificCredentialsCommand } = require("@aws-sdk/client-iam"); // CommonJS import
const client = new IAMClient(config);
const input = { // ListServiceSpecificCredentialsRequest
UserName: "STRING_VALUE",
ServiceName: "STRING_VALUE",
};
const command = new ListServiceSpecificCredentialsCommand(input);
const response = await client.send(command);
// { // ListServiceSpecificCredentialsResponse
// ServiceSpecificCredentials: [ // ServiceSpecificCredentialsListType
// { // ServiceSpecificCredentialMetadata
// UserName: "STRING_VALUE", // required
// Status: "Active" || "Inactive", // required
// ServiceUserName: "STRING_VALUE", // required
// CreateDate: new Date("TIMESTAMP"), // required
// ServiceSpecificCredentialId: "STRING_VALUE", // required
// ServiceName: "STRING_VALUE", // required
// },
// ],
// };

Param

ListServiceSpecificCredentialsCommandInput

Returns

ListServiceSpecificCredentialsCommandOutput

See

Throws

NoSuchEntityException (client fault)

The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

Throws

ServiceNotSupportedException (client fault)

The specified service does not support service-specific credentials.

Throws

IAMServiceException

Base exception class for all service exceptions from IAM service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods