2015/07/09 - AWS Identity and Access Management - 5 new api methods
Sets the status of the specified SSH public key to active or inactive. SSH public keys that are inactive cannot be used for authentication. This action can be used to disable a user's SSH public key as part of a key rotation work flow.
The SSH public key affected by this action is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see Set up AWS CodeCommit for SSH Connections in the AWS CodeCommit User Guide.
Request Syntax
client.update_ssh_public_key( UserName='string', SSHPublicKeyId='string', Status='Active'|'Inactive' )
string
[REQUIRED]
The name of the IAM user associated with the SSH public key.
string
[REQUIRED]
The unique identifier for the SSH public key.
string
[REQUIRED]
The status to assign to the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used.
None
Deletes the specified SSH public key.
The SSH public key deleted by this action is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see Set up AWS CodeCommit for SSH Connections in the AWS CodeCommit User Guide.
Request Syntax
client.delete_ssh_public_key( UserName='string', SSHPublicKeyId='string' )
string
[REQUIRED]
The name of the IAM user associated with the SSH public key.
string
[REQUIRED]
The unique identifier for the SSH public key.
None
Uploads an SSH public key and associates it with the specified IAM user.
The SSH public key uploaded by this action can be used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see Set up AWS CodeCommit for SSH Connections in the AWS CodeCommit User Guide.
Request Syntax
client.upload_ssh_public_key( UserName='string', SSHPublicKeyBody='string' )
string
[REQUIRED]
The name of the IAM user to associate the SSH public key with.
string
[REQUIRED]
The SSH public key. The public key must be encoded in ssh-rsa format or PEM format.
dict
Response Syntax
{ 'SSHPublicKey': { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Fingerprint': 'string', 'SSHPublicKeyBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful UploadSSHPublicKey request.
SSHPublicKey (dict) --
Contains information about the SSH public key.
UserName (string) --
The name of the IAM user associated with the SSH public key.
SSHPublicKeyId (string) --
The unique identifier for the SSH public key.
Fingerprint (string) --
The MD5 message digest of the SSH public key.
SSHPublicKeyBody (string) --
The SSH public key.
Status (string) --
The status of the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used.
UploadDate (datetime) --
The date and time, in ISO 8601 date-time format, when the SSH public key was uploaded.
Returns information about the SSH public keys associated with the specified IAM user. If there are none, the action returns an empty list.
The SSH public keys returned by this action are used only for authenticating the IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see Set up AWS CodeCommit for SSH Connections in the AWS CodeCommit User Guide.
Although each user is limited to a small number of keys, you can still paginate the results using the MaxItems and Marker parameters.
Request Syntax
client.list_ssh_public_keys( UserName='string', Marker='string', MaxItems=123 )
string
The name of the IAM user to list SSH public keys for. If none is specified, the UserName field is determined implicitly based on the AWS access key used to sign the request.
string
Use this parameter only when paginating results and only after you have received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.
integer
Use this only when paginating results to indicate the maximum number of items you want in the response. If there are additional items beyond the maximum you specify, the IsTruncated response element is true.
This parameter is optional. If you do not include it, it defaults to 100.
dict
Response Syntax
{ 'SSHPublicKeys': [ { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) }, ], 'IsTruncated': True|False, 'Marker': 'string' }
Response Structure
(dict) --
Contains the response to a successful ListSSHPublicKeys request.
SSHPublicKeys (list) --
A list of SSH public keys.
(dict) --
Contains information about an SSH public key, without the key's body or fingerprint.
This data type is used as a response element in the ListSSHPublicKeys action.
UserName (string) --
The name of the IAM user associated with the SSH public key.
SSHPublicKeyId (string) --
The unique identifier for the SSH public key.
Status (string) --
The status of the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used.
UploadDate (datetime) --
The date and time, in ISO 8601 date-time format, when the SSH public key was uploaded.
IsTruncated (boolean) --
A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.
Marker (string) --
When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
Retrieves the specified SSH public key, including metadata about the key.
The SSH public key retrieved by this action is used only for authenticating the associated IAM user to an AWS CodeCommit repository. For more information about using SSH keys to authenticate to an AWS CodeCommit repository, see Set up AWS CodeCommit for SSH Connections in the AWS CodeCommit User Guide.
Request Syntax
client.get_ssh_public_key( UserName='string', SSHPublicKeyId='string', Encoding='SSH'|'PEM' )
string
[REQUIRED]
The name of the IAM user associated with the SSH public key.
string
[REQUIRED]
The unique identifier for the SSH public key.
string
[REQUIRED]
Specifies the public key encoding format to use in the response. To retrieve the public key in ssh-rsa format, use SSH. To retrieve the public key in PEM format, use PEM.
dict
Response Syntax
{ 'SSHPublicKey': { 'UserName': 'string', 'SSHPublicKeyId': 'string', 'Fingerprint': 'string', 'SSHPublicKeyBody': 'string', 'Status': 'Active'|'Inactive', 'UploadDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
Contains the response to a successful GetSSHPublicKey request.
SSHPublicKey (dict) --
Information about the SSH public key.
UserName (string) --
The name of the IAM user associated with the SSH public key.
SSHPublicKeyId (string) --
The unique identifier for the SSH public key.
Fingerprint (string) --
The MD5 message digest of the SSH public key.
SSHPublicKeyBody (string) --
The SSH public key.
Status (string) --
The status of the SSH public key. Active means the key can be used for authentication with an AWS CodeCommit repository. Inactive means the key cannot be used.
UploadDate (datetime) --
The date and time, in ISO 8601 date-time format, when the SSH public key was uploaded.