1. Packages
  2. Vultr
  3. API Docs
  4. getReservedIp
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

vultr.getReservedIp

Explore with Pulumi AI

vultr logo
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

    Get information about a Vultr reserved IP address.

    Example Usage

    Get the information for a reserved IP by label:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myReservedIp = vultr.getReservedIp({
        filters: [{
            name: "label",
            values: ["my-reserved-ip-label"],
        }],
    });
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_reserved_ip = vultr.get_reserved_ip(filters=[vultr.GetReservedIpFilterArgs(
        name="label",
        values=["my-reserved-ip-label"],
    )])
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.LookupReservedIp(ctx, &vultr.LookupReservedIpArgs{
    			Filters: []vultr.GetReservedIpFilter{
    				{
    					Name: "label",
    					Values: []string{
    						"my-reserved-ip-label",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myReservedIp = Vultr.GetReservedIp.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetReservedIpFilterInputArgs
                {
                    Name = "label",
                    Values = new[]
                    {
                        "my-reserved-ip-label",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.inputs.GetReservedIpArgs;
    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) {
            final var myReservedIp = VultrFunctions.getReservedIp(GetReservedIpArgs.builder()
                .filters(GetReservedIpFilterArgs.builder()
                    .name("label")
                    .values("my-reserved-ip-label")
                    .build())
                .build());
    
        }
    }
    
    variables:
      myReservedIp:
        fn::invoke:
          Function: vultr:getReservedIp
          Arguments:
            filters:
              - name: label
                values:
                  - my-reserved-ip-label
    

    Using getReservedIp

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReservedIp(args: GetReservedIpArgs, opts?: InvokeOptions): Promise<GetReservedIpResult>
    function getReservedIpOutput(args: GetReservedIpOutputArgs, opts?: InvokeOptions): Output<GetReservedIpResult>
    def get_reserved_ip(filters: Optional[Sequence[GetReservedIpFilter]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetReservedIpResult
    def get_reserved_ip_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetReservedIpFilterArgs]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetReservedIpResult]
    func LookupReservedIp(ctx *Context, args *LookupReservedIpArgs, opts ...InvokeOption) (*LookupReservedIpResult, error)
    func LookupReservedIpOutput(ctx *Context, args *LookupReservedIpOutputArgs, opts ...InvokeOption) LookupReservedIpResultOutput

    > Note: This function is named LookupReservedIp in the Go SDK.

    public static class GetReservedIp 
    {
        public static Task<GetReservedIpResult> InvokeAsync(GetReservedIpArgs args, InvokeOptions? opts = null)
        public static Output<GetReservedIpResult> Invoke(GetReservedIpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReservedIpResult> getReservedIp(GetReservedIpArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getReservedIp:getReservedIp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetReservedIpFilter>
    Query parameters for finding reserved IP addresses.
    Filters []GetReservedIpFilter
    Query parameters for finding reserved IP addresses.
    filters List<GetReservedIpFilter>
    Query parameters for finding reserved IP addresses.
    filters GetReservedIpFilter[]
    Query parameters for finding reserved IP addresses.
    filters Sequence[GetReservedIpFilter]
    Query parameters for finding reserved IP addresses.
    filters List<Property Map>
    Query parameters for finding reserved IP addresses.

    getReservedIp Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    The ID of the VPS the reserved IP is attached to.
    IpType string
    The IP type of the reserved IP.
    Label string
    The label of the reserved IP.
    Region string
    The ID of the region that the reserved IP is in.
    Subnet string
    The subnet of the reserved IP.
    SubnetSize int
    The subnet size of the reserved IP.
    Filters List<ediri.Vultr.Outputs.GetReservedIpFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    The ID of the VPS the reserved IP is attached to.
    IpType string
    The IP type of the reserved IP.
    Label string
    The label of the reserved IP.
    Region string
    The ID of the region that the reserved IP is in.
    Subnet string
    The subnet of the reserved IP.
    SubnetSize int
    The subnet size of the reserved IP.
    Filters []GetReservedIpFilter
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    The ID of the VPS the reserved IP is attached to.
    ipType String
    The IP type of the reserved IP.
    label String
    The label of the reserved IP.
    region String
    The ID of the region that the reserved IP is in.
    subnet String
    The subnet of the reserved IP.
    subnetSize Integer
    The subnet size of the reserved IP.
    filters List<GetReservedIpFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId string
    The ID of the VPS the reserved IP is attached to.
    ipType string
    The IP type of the reserved IP.
    label string
    The label of the reserved IP.
    region string
    The ID of the region that the reserved IP is in.
    subnet string
    The subnet of the reserved IP.
    subnetSize number
    The subnet size of the reserved IP.
    filters GetReservedIpFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id str
    The ID of the VPS the reserved IP is attached to.
    ip_type str
    The IP type of the reserved IP.
    label str
    The label of the reserved IP.
    region str
    The ID of the region that the reserved IP is in.
    subnet str
    The subnet of the reserved IP.
    subnet_size int
    The subnet size of the reserved IP.
    filters Sequence[GetReservedIpFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    The ID of the VPS the reserved IP is attached to.
    ipType String
    The IP type of the reserved IP.
    label String
    The label of the reserved IP.
    region String
    The ID of the region that the reserved IP is in.
    subnet String
    The subnet of the reserved IP.
    subnetSize Number
    The subnet size of the reserved IP.
    filters List<Property Map>

    Supporting Types

    GetReservedIpFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien