upload_ssh_public_key¶
Operation¶
upload_ssh_public_key
async
¶
upload_ssh_public_key(request: UploadSSHPublicKeyInput | UploadSSHPublicKeyInputDict, /, *, plugins: list[Plugin] | None = None) -> UploadSSHPublicKeyOutput
upload_ssh_public_key(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[UploadSSHPublicKeyInputDict]) -> UploadSSHPublicKeyOutput
Uploads an SSH public key and associates it with the specified IAM user.
The SSH public key uploaded by this operation can be used only for authenticating the associated IAM user to an CodeCommit repository. For more information about using SSH keys to authenticate to an CodeCommit repository, see Set up CodeCommit for SSH connections in the CodeCommit User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
UploadSSHPublicKeyOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
UploadSSHPublicKeyInput
dataclass
¶
Bases: _SerdeShape
Dataclass for UploadSSHPublicKeyInput structure.
Attributes¶
ssh_public_key_body
class-attribute
instance-attribute
¶
ssh_public_key_body: str | None = ...
The SSH public key. The public key must be encoded in ssh-rsa format or PEM format. The minimum bit-length of the public key is 2048 bits. For example, you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long.
The regex pattern used to validate this parameter is a string of characters consisting of the following:
-
Any printable ASCII character ranging from the space character (
\u0020) through the end of the ASCII character range -
The printable characters in the Basic Latin and Latin-1 Supplement character set (through
\u00FF) -
The special characters tab (
\u0009), line feed (\u000A), and carriage return (\u000D)
user_name
class-attribute
instance-attribute
¶
user_name: str | None = ...
The name of the IAM user to associate the SSH public key with.
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: _+=,.@-
Dictionaries¶
UploadSSHPublicKeyInputDict
¶
Bases: TypedDict
Dictionary form of UploadSSHPublicKeyInput.
Attributes¶
ssh_public_key_body
instance-attribute
¶
The SSH public key. The public key must be encoded in ssh-rsa format or PEM format. The minimum bit-length of the public key is 2048 bits. For example, you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long.
The regex pattern used to validate this parameter is a string of characters consisting of the following:
-
Any printable ASCII character ranging from the space character (
\u0020) through the end of the ASCII character range -
The printable characters in the Basic Latin and Latin-1 Supplement character set (through
\u00FF) -
The special characters tab (
\u0009), line feed (\u000A), and carriage return (\u000D)
user_name
instance-attribute
¶
The name of the IAM user to associate the SSH public key with.
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: _+=,.@-
Output¶
UploadSSHPublicKeyOutput
dataclass
¶
Bases: _SerdeShape
Contains the response to a successful UploadSSHPublicKey request.
Attributes¶
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
ssh_public_key
class-attribute
instance-attribute
¶
ssh_public_key: SSHPublicKey | None = ...
Contains information about the SSH public key.