Queries the list of all AccessKey pairs that belong to a RAM user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAccessKeys

The operation that you want to perform. Set the value to ListAccessKeys.

UserName String No zhangq****

The name of the RAM user. If a RAM user calls this operation and does not specify this parameter, the AccessKey pairs of the RAM user are returned.

Response parameters

Parameter Type Example Description
AccessKeys Array

The list of AccessKey pairs that belong to the RAM user.

AccessKey

The information of an AccessKey pair.

AccessKeyId String 0wNEpMMlzy7s****

The AccessKey ID.

CreateDate String 2015-01-23T12:33:18Z

The time when the AccessKey pair was created.

Status String Active

The status of the AccessKey pair. Valid values: Active and Inactive.

RequestId String 4B450CA1-36E8-4AA2-8461-86B42BF4CC4E

The ID of the request.

Examples

Sample requests


https://ram.aliyuncs.com/?Action=ListAccessKeys
&<Common request parameters>

Sample success responses

XML format

<RequestId>4B450CA1-36E8-4AA2-8461-86B42BF4CC4E</RequestId>
<AccessKeys>
    <AccessKey>
        <AccessKeyId>0wNEpMMlzy7s****</AccessKeyId>
        <Status>Active</Status>
        <CreateDate>2015-01-23T12:33:18Z</CreateDate>
    </AccessKey>
    <AccessKey>
        <AccessKeyId>WnIWUruvfaDT****</AccessKeyId>
        <Status>Inactive</Status>
        <CreateDate>2015-03-24T21:12:21Z</CreateDate>
    </AccessKey>
</AccessKeys>

JSON format

{
	"RequestId":"4B450CA1-36E8-4AA2-8461-86B42BF4CC4E",
	"AccessKeys":{
		"AccessKey":[
			{
				"Status":"Active",
				"AccessKeyId":"0wNEpMMlzy7s****",
				"CreateDate":"2015-01-23T12:33:18Z"
			},
			{
				"Status":"Inactive",
				"AccessKeyId":"WnIWUruvfaDT****",
				"CreateDate":"2015-03-24T21:12:21Z"
			}
		]
	}
}

Error codes

For a list of error codes, visit the API Error Center.