get User Ssh Key
Use this data source to get information about a SSH public key associated with the specified IAM user.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetUserSshKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IamFunctions.getUserSshKey(GetUserSshKeyArgs.builder()
.encoding("SSH")
.sshPublicKeyId("APKARUZ32GUTKIGARLXE")
.username("test-user")
.build());
}
}Content copied to clipboard
Return
A collection of values returned by getUserSshKey.
Parameters
argument
A collection of arguments for invoking getUserSshKey.
suspend fun getUserSshKey(encoding: String, sshPublicKeyId: String, username: String): GetUserSshKeyResult
Return
A collection of values returned by getUserSshKey.
Parameters
encoding
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.
ssh Public Key Id
Unique identifier for the SSH public key.
username
Name of the IAM user associated with the SSH public key.
See also
suspend fun getUserSshKey(argument: suspend GetUserSshKeyPlainArgsBuilder.() -> Unit): GetUserSshKeyResult
Return
A collection of values returned by getUserSshKey.
Parameters
argument
Builder for com.pulumi.aws.iam.kotlin.inputs.GetUserSshKeyPlainArgs.