Package com.pulumi.aws.lightsail
Class StaticIp
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.lightsail.StaticIp
-
public class StaticIp extends com.pulumi.resources.CustomResourceManages a static IP address. Use this resource to allocate a static IP address that can be attached to Lightsail instances to provide a consistent public IP address that persists across instance restarts. > **Note:** Lightsail is currently only supported in a limited number of AWS Regions, please see ["Regions and Availability Zones in Amazon Lightsail"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details. ## Example Usage
## Import Using `pulumi import`, import `aws.lightsail.StaticIp` using the name attribute. For example: ```sh $ pulumi import aws:lightsail/staticIp:StaticIp example example ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.lightsail.StaticIp; import com.pulumi.aws.lightsail.StaticIpArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new StaticIp("example", StaticIpArgs.builder() .name("example") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description StaticIp(java.lang.String name)StaticIp(java.lang.String name, StaticIpArgs args)StaticIp(java.lang.String name, StaticIpArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()static StaticIpget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, StaticIpState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>ipAddress()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>supportCode()
-
-
-
Constructor Detail
-
StaticIp
public StaticIp(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
StaticIp
public StaticIp(java.lang.String name, @Nullable StaticIpArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
StaticIp
public StaticIp(java.lang.String name, @Nullable StaticIpArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the Lightsail static IP.
-
ipAddress
public com.pulumi.core.Output<java.lang.String> ipAddress()
- Returns:
- Allocated static IP address.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name for the allocated static IP. The following arguments are optional:
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
supportCode
public com.pulumi.core.Output<java.lang.String> supportCode()
- Returns:
- Support code for the static IP. Include this code in your email to support when you have questions about a static IP in Lightsail. This code enables our support team to look up your Lightsail information more easily.
-
get
public static StaticIp get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable StaticIpState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-