Skip to content
v2.278.0

KeyPairReference Struct ​

A reference to a KeyPair resource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lightsail as interfaces_lightsail } from 'aws-cdk-lib/interfaces';
const keyPairReference: interfaces_lightsail.KeyPairReference = {
  keyPairArn: 'keyPairArn',
  keyPairName: 'keyPairName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.interfaces import aws_lightsail as interfaces_lightsail

key_pair_reference = interfaces_lightsail.KeyPairReference(
    key_pair_arn="keyPairArn",
    key_pair_name="keyPairName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.interfaces.lightsail.*;

KeyPairReference keyPairReference = KeyPairReference.builder()
        .keyPairArn("keyPairArn")
        .keyPairName("keyPairName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Interfaces.Lightsail;

var keyPairReference = new KeyPairReference {
    KeyPairArn = "keyPairArn",
    KeyPairName = "keyPairName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

keyPairReference := &KeyPairReference{
	KeyPairArn: jsii.String("keyPairArn"),
	KeyPairName: jsii.String("keyPairName"),
}

Properties ​

keyPairArnstringkey_pair_arnstrkeyPairArnStringKeyPairArnstringKeyPairArn*string required #
The ARN of the KeyPair resource.
keyPairNamestringkey_pair_namestrkeyPairNameStringKeyPairNamestringKeyPairName*string required #
The KeyPairName of the KeyPair resource.