import * as pulumi from "@pulumi/pulumi"; /** * Provides a AWS Transfer User SSH Key resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * import * as tls from "@pulumi/tls"; * * const examplePrivateKey = new tls.PrivateKey("example", { * algorithm: "RSA", * rsaBits: 4096, * }); * const exampleServer = new aws.transfer.Server("example", { * identityProviderType: "SERVICE_MANAGED", * tags: { * NAME: "tf-acc-test-transfer-server", * }, * }); * const assumeRole = aws.iam.getPolicyDocument({ * statements: [{ * principals: [{ * type: "Service", * identifiers: ["transfer.amazonaws.com"], * }], * effect: "Allow", * actions: ["sts:AssumeRole"], * }], * }); * const exampleRole = new aws.iam.Role("example", { * name: "tf-test-transfer-user-iam-role", * assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json), * }); * const exampleUser = new aws.transfer.User("example", { * serverId: exampleServer.id, * userName: "tftestuser", * role: exampleRole.arn, * tags: { * NAME: "tftestuser", * }, * }); * const exampleSshKey = new aws.transfer.SshKey("example", { * serverId: exampleServer.id, * userName: exampleUser.userName, * body: std.trimspaceOutput({ * input: examplePrivateKey.publicKeyOpenssh, * }).result, * }); * const example = aws.iam.getPolicyDocument({ * statements: [{ * sid: "AllowFullAccesstoS3", * effect: "Allow", * actions: ["s3:*"], * resources: ["*"], * }], * }); * const exampleRolePolicy = new aws.iam.RolePolicy("example", { * name: "tf-test-transfer-user-iam-policy", * role: exampleRole.id, * policy: example.then(example => example.json), * }); * ``` * * ## Import * * Using `pulumi import`, import Transfer SSH Public Key using the `serverId` and `userName` and `sshPublicKeyId` separated by `/`. For example: * * ```sh * $ pulumi import aws:transfer/sshKey:SshKey bar s-12345678/test-username/key-12345 * ``` */ export declare class SshKey extends pulumi.CustomResource { /** * Get an existing SshKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SshKeyState, opts?: pulumi.CustomResourceOptions): SshKey; /** * Returns true if the given object is an instance of SshKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SshKey; /** * Public key portion of an SSH key pair. */ readonly body: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Server ID of the Transfer Server (e.g., `s-12345678`) */ readonly serverId: pulumi.Output; /** * ID of the SSH public key. */ readonly sshKeyId: pulumi.Output; /** * Name of the user account that is assigned to one or more servers. */ readonly userName: pulumi.Output; /** * Create a SshKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SshKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SshKey resources. */ export interface SshKeyState { /** * Public key portion of an SSH key pair. */ body?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Server ID of the Transfer Server (e.g., `s-12345678`) */ serverId?: pulumi.Input; /** * ID of the SSH public key. */ sshKeyId?: pulumi.Input; /** * Name of the user account that is assigned to one or more servers. */ userName?: pulumi.Input; } /** * The set of arguments for constructing a SshKey resource. */ export interface SshKeyArgs { /** * Public key portion of an SSH key pair. */ body: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Server ID of the Transfer Server (e.g., `s-12345678`) */ serverId: pulumi.Input; /** * Name of the user account that is assigned to one or more servers. */ userName: pulumi.Input; } //# sourceMappingURL=sshKey.d.ts.map