Class StaticIpAttachment
Provides a static IP address attachment - relationship between a Lightsail static IP & Lightsail instance.
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()
{
var testStaticIp = new Aws.LightSail.StaticIp("testStaticIp", new Aws.LightSail.StaticIpArgs
{
});
var testInstance = new Aws.LightSail.Instance("testInstance", new Aws.LightSail.InstanceArgs
{
AvailabilityZone = "us-east-1b",
BlueprintId = "string",
BundleId = "string",
KeyPairName = "some_key_name",
});
var testStaticIpAttachment = new Aws.LightSail.StaticIpAttachment("testStaticIpAttachment", new Aws.LightSail.StaticIpAttachmentArgs
{
InstanceName = testInstance.Id,
StaticIpName = testStaticIp.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.LightSail
Assembly: Pulumi.Aws.dll
Syntax
public class StaticIpAttachment : CustomResource
Constructors
View SourceStaticIpAttachment(String, StaticIpAttachmentArgs, CustomResourceOptions)
Create a StaticIpAttachment resource with the given unique name, arguments, and options.
Declaration
public StaticIpAttachment(string name, StaticIpAttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| StaticIpAttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceInstanceName
The name of the Lightsail instance to attach the IP to
Declaration
public Output<string> InstanceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IpAddress
The allocated static IP address
Declaration
public Output<string> IpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StaticIpName
The name of the allocated static IP
Declaration
public Output<string> StaticIpName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, StaticIpAttachmentState, CustomResourceOptions)
Get an existing StaticIpAttachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static StaticIpAttachment Get(string name, Input<string> id, StaticIpAttachmentState 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. |
| StaticIpAttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| StaticIpAttachment |