選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

CreateServiceSpecificCredential

焦點模式
CreateServiceSpecificCredential - AWS Identity and Access Management
此頁面尚未翻譯為您的語言。 請求翻譯

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.

You can create service-specific credentials for CodeCommit and Amazon Keyspaces (for Apache Cassandra).

You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential.

For more information about service-specific credentials, see Using IAM with CodeCommit: Git credentials, SSH keys, and AWS access keys in the IAM User Guide.

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.

Type: ServiceSpecificCredential object

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

Examples

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 .

Sample Request

https://iam.amazonaws.com/?Action=CreateServiceSpecificCredential &UserName=Anika &ServiceName=codecommit.amazonaws.com &Version=2010-05-08 &AUTHPARAMS

Sample Response

<CreateServiceSpecificCredentialResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <CreateServiceSpecificCredentialResult> <ServiceSpecificCredential> <ServicePassword>xTBAr/czp+D3EXAMPLE47lrJ6/43r2zqGwR3EXAMPLE=</ServicePassword> <ServiceName>codecommit.amazonaws.com</ServiceName> <UserName>anika</UserName> <ServiceUserName>anika+1-at-123456789012</ServiceUserName> <ServiceSpecificCredentialId>ACCA12345ABCDEXAMPLE</ServiceSpecificCredentialId> <Status>Active</Status> <CreateDate>2016-11-01T17:47:22.382Z</CreateDate> </ServiceSpecificCredential> </CreateServiceSpecificCredentialResult> <ResponseMetadata> <RequestId>EXAMPLE8-90ab-cdef-fedc-ba987EXAMPLE</RequestId> </ResponseMetadata> </CreateServiceSpecificCredentialResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。