Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getReservedIp
Explore with Pulumi AI
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. Get Reserved Ip Filter> - Query parameters for finding reserved IP addresses.
- Filters
[]Get
Reserved Ip Filter - Query parameters for finding reserved IP addresses.
- filters
List<Get
Reserved Ip Filter> - Query parameters for finding reserved IP addresses.
- filters
Get
Reserved Ip Filter[] - Query parameters for finding reserved IP addresses.
- filters
Sequence[Get
Reserved Ip Filter] - 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.
- Instance
Id string - The ID of the VPS the reserved IP is attached to.
- Ip
Type 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.
- Subnet
Size int - The subnet size of the reserved IP.
- Filters
List<ediri.
Vultr. Outputs. Get Reserved Ip Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ID of the VPS the reserved IP is attached to.
- Ip
Type 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.
- Subnet
Size int - The subnet size of the reserved IP.
- Filters
[]Get
Reserved Ip Filter
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the VPS the reserved IP is attached to.
- ip
Type 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.
- subnet
Size Integer - The subnet size of the reserved IP.
- filters
List<Get
Reserved Ip Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The ID of the VPS the reserved IP is attached to.
- ip
Type 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.
- subnet
Size number - The subnet size of the reserved IP.
- filters
Get
Reserved Ip Filter[]
- 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[Get
Reserved Ip Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ID of the VPS the reserved IP is attached to.
- ip
Type 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.
- subnet
Size Number - The subnet size of the reserved IP.
- filters List<Property Map>
Supporting Types
GetReservedIpFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.