Interface ICfnInstanceProps
Properties for defining a CfnInstance
.
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.AWS.Lightsail.dll
Syntax (csharp)
public interface ICfnInstanceProps
Syntax (vb)
Public Interface ICfnInstanceProps
Remarks
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var cfnInstanceProps = new CfnInstanceProps {
BlueprintId = "blueprintId",
BundleId = "bundleId",
InstanceName = "instanceName",
// the properties below are optional
AddOns = new [] { new AddOnProperty {
AddOnType = "addOnType",
// the properties below are optional
AutoSnapshotAddOnRequest = new AutoSnapshotAddOnProperty {
SnapshotTimeOfDay = "snapshotTimeOfDay"
},
Status = "status"
} },
AvailabilityZone = "availabilityZone",
Hardware = new HardwareProperty {
CpuCount = 123,
Disks = new [] { new DiskProperty {
DiskName = "diskName",
Path = "path",
// the properties below are optional
AttachedTo = "attachedTo",
AttachmentState = "attachmentState",
Iops = 123,
IsSystemDisk = false,
SizeInGb = "sizeInGb"
} },
RamSizeInGb = 123
},
KeyPairName = "keyPairName",
Location = new LocationProperty {
AvailabilityZone = "availabilityZone",
RegionName = "regionName"
},
Networking = new NetworkingProperty {
Ports = new [] { new PortProperty {
AccessDirection = "accessDirection",
AccessFrom = "accessFrom",
AccessType = "accessType",
CidrListAliases = new [] { "cidrListAliases" },
Cidrs = new [] { "cidrs" },
CommonName = "commonName",
FromPort = 123,
Ipv6Cidrs = new [] { "ipv6Cidrs" },
Protocol = "protocol",
ToPort = 123
} },
// the properties below are optional
MonthlyTransfer = 123
},
State = new StateProperty {
Code = 123,
Name = "name"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
UserData = "userData"
};
Synopsis
Properties
AddOns | An array of add-ons for the instance. |
AvailabilityZone | The Availability Zone for the instance. |
BlueprintId | The blueprint ID for the instance (for example, |
BundleId | The bundle ID for the instance (for example, |
Hardware | The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM. |
InstanceName | The name of the instance. |
KeyPairName | The name of the key pair to use for the instance. |
Location | The location for the instance, such as the AWS Region and Availability Zone. |
Networking | The public ports and the monthly amount of data transfer allocated for the instance. |
State | The status code and the state (for example, |
Tags | An array of key-value pairs to apply to this resource. |
UserData | The optional launch script for the instance. |
Properties
AddOns
An array of add-ons for the instance.
virtual object AddOns { get; }
Property Value
System.Object
Remarks
If the instance has an add-on enabled when performing a delete instance request, the add-on is automatically disabled before the instance is deleted.
AvailabilityZone
The Availability Zone for the instance.
virtual string AvailabilityZone { get; }
Property Value
System.String
Remarks
BlueprintId
The blueprint ID for the instance (for example, os_amlinux_2016_03
).
string BlueprintId { get; }
Property Value
System.String
Remarks
BundleId
The bundle ID for the instance (for example, micro_1_0
).
string BundleId { get; }
Property Value
System.String
Remarks
Hardware
The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.
virtual object Hardware { get; }
Property Value
System.Object
Remarks
The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.
InstanceName
The name of the instance.
string InstanceName { get; }
Property Value
System.String
Remarks
KeyPairName
The name of the key pair to use for the instance.
virtual string KeyPairName { get; }
Property Value
System.String
Remarks
If no key pair name is specified, the Regional Lightsail default key pair is used.
Location
The location for the instance, such as the AWS Region and Availability Zone.
virtual object Location { get; }
Property Value
System.Object
Remarks
The Location
property is read-only and should not be specified in a create instance or update instance request.
Networking
The public ports and the monthly amount of data transfer allocated for the instance.
virtual object Networking { get; }
Property Value
System.Object
Remarks
State
The status code and the state (for example, running
) of the instance.
virtual object State { get; }
Property Value
System.Object
Remarks
The State
property is read-only and should not be specified in a create instance or update instance request.
Tags
An array of key-value pairs to apply to this resource.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]
Remarks
For more information, see Tag in the AWS CloudFormation User Guide .
The Value
of Tags
is optional for Lightsail resources.
UserData
The optional launch script for the instance.
virtual string UserData { get; }
Property Value
System.String
Remarks
Specify a launch script to configure an instance with additional user data. For example, you might want to specify apt-get -y update
as a launch script.
Depending on the blueprint of your instance, the command to get software on your instance varies. Amazon Linux and CentOS use yum
, Debian and Ubuntu use apt-get
, and FreeBSD uses pkg
.