Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getInstanceIpv4
Explore with Pulumi AI
Get information about a Vultr instance IPv4.
Example Usage
Get the information for an IPv4 address by instance_id
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myInstanceIpv4 = vultr.getInstanceIpv4({
filters: [{
name: "ip",
values: ["123.123.123.123"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_instance_ipv4 = vultr.get_instance_ipv4(filters=[vultr.GetInstanceIpv4FilterArgs(
name="ip",
values=["123.123.123.123"],
)])
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.LookupInstanceIpv4(ctx, &vultr.LookupInstanceIpv4Args{
Filters: []vultr.GetInstanceIpv4Filter{
{
Name: "ip",
Values: []string{
"123.123.123.123",
},
},
},
}, 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 myInstanceIpv4 = Vultr.GetInstanceIpv4.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetInstanceIpv4FilterInputArgs
{
Name = "ip",
Values = new[]
{
"123.123.123.123",
},
},
},
});
});
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.GetInstanceIpv4Args;
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 myInstanceIpv4 = VultrFunctions.getInstanceIpv4(GetInstanceIpv4Args.builder()
.filters(GetInstanceIpv4FilterArgs.builder()
.name("ip")
.values("123.123.123.123")
.build())
.build());
}
}
variables:
myInstanceIpv4:
fn::invoke:
Function: vultr:getInstanceIpv4
Arguments:
filters:
- name: ip
values:
- 123.123.123.123
Using getInstanceIpv4
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 getInstanceIpv4(args: GetInstanceIpv4Args, opts?: InvokeOptions): Promise<GetInstanceIpv4Result>
function getInstanceIpv4Output(args: GetInstanceIpv4OutputArgs, opts?: InvokeOptions): Output<GetInstanceIpv4Result>
def get_instance_ipv4(filters: Optional[Sequence[GetInstanceIpv4Filter]] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceIpv4Result
def get_instance_ipv4_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInstanceIpv4FilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceIpv4Result]
func LookupInstanceIpv4(ctx *Context, args *LookupInstanceIpv4Args, opts ...InvokeOption) (*LookupInstanceIpv4Result, error)
func LookupInstanceIpv4Output(ctx *Context, args *LookupInstanceIpv4OutputArgs, opts ...InvokeOption) LookupInstanceIpv4ResultOutput
> Note: This function is named LookupInstanceIpv4
in the Go SDK.
public static class GetInstanceIpv4
{
public static Task<GetInstanceIpv4Result> InvokeAsync(GetInstanceIpv4Args args, InvokeOptions? opts = null)
public static Output<GetInstanceIpv4Result> Invoke(GetInstanceIpv4InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceIpv4Result> getInstanceIpv4(GetInstanceIpv4Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vultr:index/getInstanceIpv4:getInstanceIpv4
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Instance Ipv4Filter> - Query parameters for finding IPv4 address.
- Filters
[]Get
Instance Ipv4Filter - Query parameters for finding IPv4 address.
- filters
List<Get
Instance Ipv4Filter> - Query parameters for finding IPv4 address.
- filters
Get
Instance Ipv4Filter[] - Query parameters for finding IPv4 address.
- filters
Sequence[Get
Instance Ipv4Filter] - Query parameters for finding IPv4 address.
- filters List<Property Map>
- Query parameters for finding IPv4 address.
getInstanceIpv4 Result
The following output properties are available:
- Gateway string
- The gateway IP address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of the instance the IPv4 address.
- Ip string
- The IPv4 address in canonical format.
- Netmask string
- The IPv4 netmask in dot-decimal notation.
- Reverse string
- The reverse DNS information for this IP address.
- Filters
List<ediri.
Vultr. Outputs. Get Instance Ipv4Filter>
- Gateway string
- The gateway IP address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of the instance the IPv4 address.
- Ip string
- The IPv4 address in canonical format.
- Netmask string
- The IPv4 netmask in dot-decimal notation.
- Reverse string
- The reverse DNS information for this IP address.
- Filters
[]Get
Instance Ipv4Filter
- gateway String
- The gateway IP address.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the instance the IPv4 address.
- ip String
- The IPv4 address in canonical format.
- netmask String
- The IPv4 netmask in dot-decimal notation.
- reverse String
- The reverse DNS information for this IP address.
- filters
List<Get
Instance Ipv4Filter>
- gateway string
- The gateway IP address.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The ID of the instance the IPv4 address.
- ip string
- The IPv4 address in canonical format.
- netmask string
- The IPv4 netmask in dot-decimal notation.
- reverse string
- The reverse DNS information for this IP address.
- filters
Get
Instance Ipv4Filter[]
- gateway str
- The gateway IP address.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - The ID of the instance the IPv4 address.
- ip str
- The IPv4 address in canonical format.
- netmask str
- The IPv4 netmask in dot-decimal notation.
- reverse str
- The reverse DNS information for this IP address.
- filters
Sequence[Get
Instance Ipv4Filter]
- gateway String
- The gateway IP address.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the instance the IPv4 address.
- ip String
- The IPv4 address in canonical format.
- netmask String
- The IPv4 netmask in dot-decimal notation.
- reverse String
- The reverse DNS information for this IP address.
- filters List<Property Map>
Supporting Types
GetInstanceIpv4Filter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.