We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 21, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 21, 2026 by Pulumi
Resource Type definition for AWS::Lightsail::KeyPair
Create KeyPair Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KeyPair(name: string, args?: KeyPairArgs, opts?: CustomResourceOptions);@overload
def KeyPair(resource_name: str,
args: Optional[KeyPairArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def KeyPair(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_pair_name: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)func NewKeyPair(ctx *Context, name string, args *KeyPairArgs, opts ...ResourceOption) (*KeyPair, error)public KeyPair(string name, KeyPairArgs? args = null, CustomResourceOptions? opts = null)
public KeyPair(String name, KeyPairArgs args)
public KeyPair(String name, KeyPairArgs args, CustomResourceOptions options)
type: aws-native:lightsail:KeyPair
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws-native_lightsail_key_pair" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args KeyPairArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KeyPairArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KeyPairArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyPairArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyPairArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KeyPair Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KeyPair resource accepts the following input properties:
- Key
Pair stringName - The name of the key pair.
-
List<Pulumi.
Aws Native. Inputs. Tag> - The tag keys and optional values to add to the resource during create.
- Key
Pair stringName - The name of the key pair.
-
Tag
Args - The tag keys and optional values to add to the resource during create.
- key_
pair_ stringname - The name of the key pair.
- list(object)
- The tag keys and optional values to add to the resource during create.
- key
Pair StringName - The name of the key pair.
- List<Tag>
- The tag keys and optional values to add to the resource during create.
- key
Pair stringName - The name of the key pair.
- Tag[]
- The tag keys and optional values to add to the resource during create.
- key_
pair_ strname - The name of the key pair.
-
Sequence[Tag
Args] - The tag keys and optional values to add to the resource during create.
- key
Pair StringName - The name of the key pair.
- List<Property Map>
- The tag keys and optional values to add to the resource during create.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyPair resource produces the following output properties:
- Created
At string - The timestamp when the key pair was created.
- Fingerprint string
- The RSA fingerprint of the key pair.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Pair stringArn - The Amazon Resource Name (ARN) of the key pair.
- Location
Pulumi.
Aws Native. Lightsail. Outputs. Key Pair Resource Location - Resource
Type string - The Lightsail resource type (KeyPair).
- Support
Code string - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- Created
At string - The timestamp when the key pair was created.
- Fingerprint string
- The RSA fingerprint of the key pair.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Pair stringArn - The Amazon Resource Name (ARN) of the key pair.
- Location
Key
Pair Resource Location - Resource
Type string - The Lightsail resource type (KeyPair).
- Support
Code string - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- created_
at string - The timestamp when the key pair was created.
- fingerprint string
- The RSA fingerprint of the key pair.
- id string
- The provider-assigned unique ID for this managed resource.
- key_
pair_ stringarn - The Amazon Resource Name (ARN) of the key pair.
- location object
- resource_
type string - The Lightsail resource type (KeyPair).
- support_
code string - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- created
At String - The timestamp when the key pair was created.
- fingerprint String
- The RSA fingerprint of the key pair.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Pair StringArn - The Amazon Resource Name (ARN) of the key pair.
- location
Key
Pair Resource Location - resource
Type String - The Lightsail resource type (KeyPair).
- support
Code String - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- created
At string - The timestamp when the key pair was created.
- fingerprint string
- The RSA fingerprint of the key pair.
- id string
- The provider-assigned unique ID for this managed resource.
- key
Pair stringArn - The Amazon Resource Name (ARN) of the key pair.
- location
Key
Pair Resource Location - resource
Type string - The Lightsail resource type (KeyPair).
- support
Code string - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- created_
at str - The timestamp when the key pair was created.
- fingerprint str
- The RSA fingerprint of the key pair.
- id str
- The provider-assigned unique ID for this managed resource.
- key_
pair_ strarn - The Amazon Resource Name (ARN) of the key pair.
- location
Key
Pair Resource Location - resource_
type str - The Lightsail resource type (KeyPair).
- support_
code str - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
- created
At String - The timestamp when the key pair was created.
- fingerprint String
- The RSA fingerprint of the key pair.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Pair StringArn - The Amazon Resource Name (ARN) of the key pair.
- location Property Map
- resource
Type String - The Lightsail resource type (KeyPair).
- support
Code String - The support code. Include this code in your email to support when you have questions about a key pair in Lightsail.
Supporting Types
KeyPairResourceLocation, KeyPairResourceLocationArgs
- Availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- Region
Name string - The AWS Region name.
- Availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- Region
Name string - The AWS Region name.
- availability_
zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region_
name string - The AWS Region name.
- availability
Zone String - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name String - The AWS Region name.
- availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name string - The AWS Region name.
- availability_
zone str - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region_
name str - The AWS Region name.
- availability
Zone String - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name String - The AWS Region name.
Tag, TagArgs
A set of tags to apply to the resource.Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Sep 21, 2026 by Pulumi