Show / Hide Table of Contents

Class Instance

Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See What is Amazon Lightsail? for more information.

Note: Lightsail is currently only supported in a limited number of AWS Regions, please see "Regions and Availability Zones in Amazon Lightsail" for more details

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    // Create a new GitLab Lightsail Instance
    var gitlabTest = new Aws.LightSail.Instance("gitlabTest", new Aws.LightSail.InstanceArgs
    {
        AvailabilityZone = "us-east-1b",
        BlueprintId = "string",
        BundleId = "string",
        KeyPairName = "some_key_name",
        Tags = 
        {
            { "foo", "bar" },
        },
    });
}

}

Availability Zones

Lightsail currently supports the following Availability Zones (e.g. us-east-1a):

  • ap-northeast-1{a,c,d}
  • ap-northeast-2{a,c}
  • ap-south-1{a,b}
  • ap-southeast-1{a,b,c}
  • ap-southeast-2{a,b,c}
  • ca-central-1{a,b}
  • eu-central-1{a,b,c}
  • eu-west-1{a,b,c}
  • eu-west-2{a,b,c}
  • eu-west-3{a,b,c}
  • us-east-1{a,b,c,d,e,f}
  • us-east-2{a,b,c}
  • us-west-2{a,b,c}

Blueprints

Lightsail currently supports the following Blueprint IDs:

OS Only

  • amazon_linux_2018_03_0_2
  • centos_7_1901_01
  • debian_8_7
  • debian_9_5
  • freebsd_11_1
  • opensuse_42_2
  • ubuntu_16_04_2
  • ubuntu_18_04

Apps and OS

  • drupal_8_5_6
  • gitlab_11_1_4_1
  • joomla_3_8_11
  • lamp_5_6_37_2
  • lamp_7_1_20_1
  • magento_2_2_5
  • mean_4_0_1
  • nginx_1_14_0_1
  • nodejs_10_8_0
  • plesk_ubuntu_17_8_11_1
  • redmine_3_4_6
  • wordpress_4_9_8
  • wordpress_multisite_4_9_8

Bundles

Lightsail currently supports the following Bundle IDs (e.g. an instance in ap-northeast-1 would use small_2_0):

Prefix

A Bundle ID starts with one of the below size prefixes:

  • nano_
  • micro_
  • small_
  • medium_
  • large_
  • xlarge_
  • 2xlarge_

Suffix

A Bundle ID ends with one of the following suffixes depending on Availability Zone:

  • ap-northeast-1: 2_0
  • ap-northeast-2: 2_0
  • ap-south-1: 2_1
  • ap-southeast-1: 2_0
  • ap-southeast-2: 2_2
  • ca-central-1: 2_0
  • eu-central-1: 2_0
  • eu-west-1: 2_0
  • eu-west-2: 2_0
  • eu-west-3: 2_0
  • us-east-1: 2_0
  • us-east-2: 2_0
  • us-west-2: 2_0
Inheritance
System.Object
Resource
CustomResource
Instance
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.LightSail
Assembly: Pulumi.Aws.dll
Syntax
public class Instance : CustomResource

Constructors

View Source

Instance(String, InstanceArgs, CustomResourceOptions)

Create a Instance resource with the given unique name, arguments, and options.

Declaration
public Instance(string name, InstanceArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InstanceArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN of the Lightsail instance (matches id).

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

AvailabilityZone

The Availability Zone in which to create your instance (see list below)

Declaration
public Output<string> AvailabilityZone { get; }
Property Value
Type Description
Output<System.String>
View Source

BlueprintId

The ID for a virtual private server image (see list below)

Declaration
public Output<string> BlueprintId { get; }
Property Value
Type Description
Output<System.String>
View Source

BundleId

The bundle of specification information (see list below)

Declaration
public Output<string> BundleId { get; }
Property Value
Type Description
Output<System.String>
View Source

CpuCount

Declaration
public Output<int> CpuCount { get; }
Property Value
Type Description
Output<System.Int32>
View Source

CreatedAt

The timestamp when the instance was created.

  • availability_zone
  • blueprint_id
  • bundle_id
  • key_pair_name
  • user_data
Declaration
public Output<string> CreatedAt { get; }
Property Value
Type Description
Output<System.String>
View Source

Ipv6Address

Declaration
public Output<string> Ipv6Address { get; }
Property Value
Type Description
Output<System.String>
View Source

IsStaticIp

Declaration
public Output<bool> IsStaticIp { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

KeyPairName

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

Declaration
public Output<string> KeyPairName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIpAddress

Declaration
public Output<string> PrivateIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

PublicIpAddress

Declaration
public Output<string> PublicIpAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

RamSize

Declaration
public Output<int> RamSize { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

UserData

launch script to configure server with additional user data

Declaration
public Output<string> UserData { get; }
Property Value
Type Description
Output<System.String>
View Source

Username

Declaration
public Output<string> Username { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, InstanceState, CustomResourceOptions)

Get an existing Instance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Instance Get(string name, Input<string> id, InstanceState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InstanceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Instance
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.