CreateServiceSpecificCredential

Generates a set of credentials consisting of a user name and password that can be
used
to access the service specified in the request. These credentials are generated by
IAM,
and can be used only for the specified service.

You can have a maximum of two sets of service-specific credentials for each supported
service per user.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ServiceName

The name of the AWS service that is to be associated with the credentials. The service
you specify here is the only service that can be accessed using these credentials.

Type: String

Required: Yes

UserName

The name of the IAM user that is to be associated with the credentials. The new
service-specific credentials have the same permissions as the associated user except
that
they can be used only to access the specified service.

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: _+=,.@-

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\w+=,.@-]+

Required: Yes

Response Elements

The following element is returned by the service.

ServiceSpecificCredential

A structure that contains information about the newly created service-specific
credential.

Important

This is the only time that the password for this credential set is available. It
cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential.

Errors

For information about the errors that are common to all actions, see Common Errors.

LimitExceeded

The request was rejected because it attempted to create resources beyond the current
AWS account limits. The error message describes the limit exceeded.

HTTP Status Code: 409

NoSuchEntity

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

HTTP Status Code: 404

NotSupportedService

The specified service does not support service-specific credentials.

HTTP Status Code: 404

Example

In the following example, the caller creates service-specific credentials for the
IAM user named Anika in account 123456789012. The
credentials can be used only with the AWS service associated with the service
endpoint at codecommit.amazonaws.com .