1. Packages
  2. AWS Classic
  3. API Docs
  4. lightsail
  5. StaticIp

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.lightsail.StaticIp

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Allocates a static IP address.

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.lightsail.StaticIp("test", {name: "example"});
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.lightsail.StaticIp("test", name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lightsail.NewStaticIp(ctx, "test", &lightsail.StaticIpArgs{
    			Name: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.LightSail.StaticIp("test", new()
        {
            Name = "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.List;
    import java.util.ArrayList;
    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 test = new StaticIp("test", StaticIpArgs.builder()
                .name("example")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:lightsail:StaticIp
        properties:
          name: example
    

    Create StaticIp Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StaticIp(name: string, args?: StaticIpArgs, opts?: CustomResourceOptions);
    @overload
    def StaticIp(resource_name: str,
                 args: Optional[StaticIpArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def StaticIp(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 name: Optional[str] = None)
    func NewStaticIp(ctx *Context, name string, args *StaticIpArgs, opts ...ResourceOption) (*StaticIp, error)
    public StaticIp(string name, StaticIpArgs? args = null, CustomResourceOptions? opts = null)
    public StaticIp(String name, StaticIpArgs args)
    public StaticIp(String name, StaticIpArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:StaticIp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args StaticIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args StaticIpArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args StaticIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StaticIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StaticIpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var staticIpResource = new Aws.LightSail.StaticIp("staticIpResource", new()
    {
        Name = "string",
    });
    
    example, err := lightsail.NewStaticIp(ctx, "staticIpResource", &lightsail.StaticIpArgs{
    	Name: pulumi.String("string"),
    })
    
    var staticIpResource = new StaticIp("staticIpResource", StaticIpArgs.builder()
        .name("string")
        .build());
    
    static_ip_resource = aws.lightsail.StaticIp("staticIpResource", name="string")
    
    const staticIpResource = new aws.lightsail.StaticIp("staticIpResource", {name: "string"});
    
    type: aws:lightsail:StaticIp
    properties:
        name: string
    

    StaticIp Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The StaticIp resource accepts the following input properties:

    Name string
    The name for the allocated static IP
    Name string
    The name for the allocated static IP
    name String
    The name for the allocated static IP
    name string
    The name for the allocated static IP
    name str
    The name for the allocated static IP
    name String
    The name for the allocated static IP

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StaticIp resource produces the following output properties:

    Arn string
    The ARN of the Lightsail static IP
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The allocated static IP address
    SupportCode string
    The support code.
    Arn string
    The ARN of the Lightsail static IP
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    The allocated static IP address
    SupportCode string
    The support code.
    arn String
    The ARN of the Lightsail static IP
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The allocated static IP address
    supportCode String
    The support code.
    arn string
    The ARN of the Lightsail static IP
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    The allocated static IP address
    supportCode string
    The support code.
    arn str
    The ARN of the Lightsail static IP
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    The allocated static IP address
    support_code str
    The support code.
    arn String
    The ARN of the Lightsail static IP
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    The allocated static IP address
    supportCode String
    The support code.

    Look up Existing StaticIp Resource

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

    public static get(name: string, id: Input<ID>, state?: StaticIpState, opts?: CustomResourceOptions): StaticIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            ip_address: Optional[str] = None,
            name: Optional[str] = None,
            support_code: Optional[str] = None) -> StaticIp
    func GetStaticIp(ctx *Context, name string, id IDInput, state *StaticIpState, opts ...ResourceOption) (*StaticIp, error)
    public static StaticIp Get(string name, Input<string> id, StaticIpState? state, CustomResourceOptions? opts = null)
    public static StaticIp get(String name, Output<String> id, StaticIpState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the Lightsail static IP
    IpAddress string
    The allocated static IP address
    Name string
    The name for the allocated static IP
    SupportCode string
    The support code.
    Arn string
    The ARN of the Lightsail static IP
    IpAddress string
    The allocated static IP address
    Name string
    The name for the allocated static IP
    SupportCode string
    The support code.
    arn String
    The ARN of the Lightsail static IP
    ipAddress String
    The allocated static IP address
    name String
    The name for the allocated static IP
    supportCode String
    The support code.
    arn string
    The ARN of the Lightsail static IP
    ipAddress string
    The allocated static IP address
    name string
    The name for the allocated static IP
    supportCode string
    The support code.
    arn str
    The ARN of the Lightsail static IP
    ip_address str
    The allocated static IP address
    name str
    The name for the allocated static IP
    support_code str
    The support code.
    arn String
    The ARN of the Lightsail static IP
    ipAddress String
    The allocated static IP address
    name String
    The name for the allocated static IP
    supportCode String
    The support code.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi