Show / Hide Table of Contents

Class CfnInstance

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnInstance
Implements
IInspectable
ITaggable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnInstance : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnInstance Inherits CfnResource Implements IInspectable, ITaggable
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

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 cfnInstance = new CfnInstance(this, "MyCfnInstance", 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 = new MonthlyTransferProperty {
                         GbPerMonthAllocated = "gbPerMonthAllocated"
                     }
                 },
                 State = new StateProperty {
                     Code = 123,
                     Name = "name"
                 },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 UserData = "userData"
             });

Synopsis

Constructors

CfnInstance(Construct, string, ICfnInstanceProps)

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

Properties

AddOns

An array of add-ons for the instance.

AttrHardwareCpuCount

The number of vCPUs the instance has.

AttrHardwareRamSizeInGb

The amount of RAM in GB on the instance (for example, 1.0 ).

AttrInstanceArn

The Amazon Resource Name (ARN) of the instance (for example, arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ).

AttrIpv6Addresses

The IPv6 addresses of the instance.

AttrIsStaticIp

A Boolean value indicating whether the instance has a static IP assigned to it.

AttrLocationAvailabilityZone

The AWS Region and Availability Zone where the instance is located.

AttrLocationRegionName

The AWS Region of the instance.

AttrNetworkingMonthlyTransferGbPerMonthAllocated

The amount of allocated monthly data transfer (in GB) for an instance.

AttrPrivateIpAddress

The private IP address of the instance.

AttrPublicIpAddress

The public IP address of the instance.

AttrResourceType

The resource type of the instance (for example, Instance ).

AttrSshKeyName

The name of the SSH key pair used by the instance.

AttrStateCode

The status code of the instance.

AttrStateName

The state of the instance (for example, running or pending ).

AttrSupportCode

The support code of the instance.

AttrUserName

The user name for connecting to the instance (for example, ec2-user ).

AvailabilityZone

The Availability Zone for the instance.

BlueprintId

The blueprint ID for the instance (for example, os_amlinux_2016_03 ).

BundleId

The bundle ID for the instance (for example, micro_1_0 ).

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

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, running ) of the instance.

Tags

Tag Manager which manages the tags for this resource.

TagsRaw

An array of key-value pairs to apply to this resource.

UserData

The optional launch script for the instance.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

Constructors

CfnInstance(Construct, string, ICfnInstanceProps)

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

public CfnInstance(Construct scope, string id, ICfnInstanceProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnInstanceProps

Resource properties.

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Properties

AddOns

An array of add-ons for the instance.

public virtual object? AddOns { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

AttrHardwareCpuCount

The number of vCPUs the instance has.

public virtual double AttrHardwareCpuCount { get; }
Property Value

double

Remarks

CloudformationAttribute: Hardware.CpuCount

AttrHardwareRamSizeInGb

The amount of RAM in GB on the instance (for example, 1.0 ).

public virtual double AttrHardwareRamSizeInGb { get; }
Property Value

double

Remarks

CloudformationAttribute: Hardware.RamSizeInGb

AttrInstanceArn

The Amazon Resource Name (ARN) of the instance (for example, arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE ).

public virtual string AttrInstanceArn { get; }
Property Value

string

Remarks

CloudformationAttribute: InstanceArn

AttrIpv6Addresses

The IPv6 addresses of the instance.

public virtual string[] AttrIpv6Addresses { get; }
Property Value

string[]

Remarks

CloudformationAttribute: Ipv6Addresses

AttrIsStaticIp

A Boolean value indicating whether the instance has a static IP assigned to it.

public virtual IResolvable AttrIsStaticIp { get; }
Property Value

IResolvable

Remarks

CloudformationAttribute: IsStaticIp

AttrLocationAvailabilityZone

The AWS Region and Availability Zone where the instance is located.

public virtual string AttrLocationAvailabilityZone { get; }
Property Value

string

Remarks

CloudformationAttribute: Location.AvailabilityZone

AttrLocationRegionName

The AWS Region of the instance.

public virtual string AttrLocationRegionName { get; }
Property Value

string

Remarks

CloudformationAttribute: Location.RegionName

AttrNetworkingMonthlyTransferGbPerMonthAllocated

The amount of allocated monthly data transfer (in GB) for an instance.

public virtual string AttrNetworkingMonthlyTransferGbPerMonthAllocated { get; }
Property Value

string

Remarks

CloudformationAttribute: Networking.MonthlyTransfer.GbPerMonthAllocated

AttrPrivateIpAddress

The private IP address of the instance.

public virtual string AttrPrivateIpAddress { get; }
Property Value

string

Remarks

CloudformationAttribute: PrivateIpAddress

AttrPublicIpAddress

The public IP address of the instance.

public virtual string AttrPublicIpAddress { get; }
Property Value

string

Remarks

CloudformationAttribute: PublicIpAddress

AttrResourceType

The resource type of the instance (for example, Instance ).

public virtual string AttrResourceType { get; }
Property Value

string

Remarks

CloudformationAttribute: ResourceType

AttrSshKeyName

The name of the SSH key pair used by the instance.

public virtual string AttrSshKeyName { get; }
Property Value

string

Remarks

CloudformationAttribute: SshKeyName

AttrStateCode

The status code of the instance.

public virtual double AttrStateCode { get; }
Property Value

double

Remarks

CloudformationAttribute: State.Code

AttrStateName

The state of the instance (for example, running or pending ).

public virtual string AttrStateName { get; }
Property Value

string

Remarks

CloudformationAttribute: State.Name

AttrSupportCode

The support code of the instance.

public virtual string AttrSupportCode { get; }
Property Value

string

Remarks

Include this code in your email to support when you have questions about an instance or another resource in Lightsail . This code helps our support team to look up your Lightsail information.

CloudformationAttribute: SupportCode

AttrUserName

The user name for connecting to the instance (for example, ec2-user ).

public virtual string AttrUserName { get; }
Property Value

string

Remarks

CloudformationAttribute: UserName

AvailabilityZone

The Availability Zone for the instance.

public virtual string? AvailabilityZone { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

BlueprintId

The blueprint ID for the instance (for example, os_amlinux_2016_03 ).

public virtual string BlueprintId { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

BundleId

The bundle ID for the instance (for example, micro_1_0 ).

public virtual string BundleId { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

CfnProperties

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Hardware

The hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.

public virtual object? Hardware { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

InstanceName

The name of the instance.

public virtual string InstanceName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

KeyPairName

The name of the key pair to use for the instance.

public virtual string? KeyPairName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Location

The location for the instance, such as the AWS Region and Availability Zone.

public virtual object? Location { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Networking

The public ports and the monthly amount of data transfer allocated for the instance.

public virtual object? Networking { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

State

The status code and the state (for example, running ) of the instance.

public virtual object? State { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Tags

Tag Manager which manages the tags for this resource.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

TagsRaw

An array of key-value pairs to apply to this resource.

public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value

ICfnTag[]

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

UserData

The optional launch script for the instance.

public virtual string? UserData { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource: AWS::Lightsail::Instance

ExampleMetadata: fixture=_generated

Implements

IInspectable
ITaggable
Back to top Generated by DocFX