Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getBlockStorage
Explore with Pulumi AI
Get information about a Vultr block storage subscription.
Example Usage
Get the information for a block storage subscription by label
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myBlockStorage = vultr.getBlockStorage({
filters: [{
name: "label",
values: ["my-block-storage-label"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_block_storage = vultr.get_block_storage(filters=[vultr.GetBlockStorageFilterArgs(
name="label",
values=["my-block-storage-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.LookupBlockStorage(ctx, &vultr.LookupBlockStorageArgs{
Filters: []vultr.GetBlockStorageFilter{
{
Name: "label",
Values: []string{
"my-block-storage-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 myBlockStorage = Vultr.GetBlockStorage.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetBlockStorageFilterInputArgs
{
Name = "label",
Values = new[]
{
"my-block-storage-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.GetBlockStorageArgs;
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 myBlockStorage = VultrFunctions.getBlockStorage(GetBlockStorageArgs.builder()
.filters(GetBlockStorageFilterArgs.builder()
.name("label")
.values("my-block-storage-label")
.build())
.build());
}
}
variables:
myBlockStorage:
fn::invoke:
Function: vultr:getBlockStorage
Arguments:
filters:
- name: label
values:
- my-block-storage-label
Using getBlockStorage
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 getBlockStorage(args: GetBlockStorageArgs, opts?: InvokeOptions): Promise<GetBlockStorageResult>
function getBlockStorageOutput(args: GetBlockStorageOutputArgs, opts?: InvokeOptions): Output<GetBlockStorageResult>
def get_block_storage(filters: Optional[Sequence[GetBlockStorageFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetBlockStorageResult
def get_block_storage_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetBlockStorageFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBlockStorageResult]
func LookupBlockStorage(ctx *Context, args *LookupBlockStorageArgs, opts ...InvokeOption) (*LookupBlockStorageResult, error)
func LookupBlockStorageOutput(ctx *Context, args *LookupBlockStorageOutputArgs, opts ...InvokeOption) LookupBlockStorageResultOutput
> Note: This function is named LookupBlockStorage
in the Go SDK.
public static class GetBlockStorage
{
public static Task<GetBlockStorageResult> InvokeAsync(GetBlockStorageArgs args, InvokeOptions? opts = null)
public static Output<GetBlockStorageResult> Invoke(GetBlockStorageInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBlockStorageResult> getBlockStorage(GetBlockStorageArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vultr:index/getBlockStorage:getBlockStorage
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Block Storage Filter> - Query parameters for finding block storage subscriptions.
- Filters
[]Get
Block Storage Filter - Query parameters for finding block storage subscriptions.
- filters
List<Get
Block Storage Filter> - Query parameters for finding block storage subscriptions.
- filters
Get
Block Storage Filter[] - Query parameters for finding block storage subscriptions.
- filters
Sequence[Get
Block Storage Filter] - Query parameters for finding block storage subscriptions.
- filters List<Property Map>
- Query parameters for finding block storage subscriptions.
getBlockStorage Result
The following output properties are available:
- Attached
To stringInstance - The ID of the VPS the block storage subscription is attached to.
- Block
Type string - The type of block storage volume.
- Cost int
- The cost per month of the block storage subscription in USD.
- Date
Created string - The date the block storage subscription was added to your Vultr account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label string
- The label of the block storage subscription.
- Mount
Id string - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- Region string
- The region ID of the block storage subscription.
- Size
Gb int - The size of the block storage subscription in GB.
- Status string
- The status of the block storage subscription.
- Filters
List<ediri.
Vultr. Outputs. Get Block Storage Filter>
- Attached
To stringInstance - The ID of the VPS the block storage subscription is attached to.
- Block
Type string - The type of block storage volume.
- Cost int
- The cost per month of the block storage subscription in USD.
- Date
Created string - The date the block storage subscription was added to your Vultr account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label string
- The label of the block storage subscription.
- Mount
Id string - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- Region string
- The region ID of the block storage subscription.
- Size
Gb int - The size of the block storage subscription in GB.
- Status string
- The status of the block storage subscription.
- Filters
[]Get
Block Storage Filter
- attached
To StringInstance - The ID of the VPS the block storage subscription is attached to.
- block
Type String - The type of block storage volume.
- cost Integer
- The cost per month of the block storage subscription in USD.
- date
Created String - The date the block storage subscription was added to your Vultr account.
- id String
- The provider-assigned unique ID for this managed resource.
- label String
- The label of the block storage subscription.
- mount
Id String - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- region String
- The region ID of the block storage subscription.
- size
Gb Integer - The size of the block storage subscription in GB.
- status String
- The status of the block storage subscription.
- filters
List<Get
Block Storage Filter>
- attached
To stringInstance - The ID of the VPS the block storage subscription is attached to.
- block
Type string - The type of block storage volume.
- cost number
- The cost per month of the block storage subscription in USD.
- date
Created string - The date the block storage subscription was added to your Vultr account.
- id string
- The provider-assigned unique ID for this managed resource.
- label string
- The label of the block storage subscription.
- mount
Id string - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- region string
- The region ID of the block storage subscription.
- size
Gb number - The size of the block storage subscription in GB.
- status string
- The status of the block storage subscription.
- filters
Get
Block Storage Filter[]
- attached_
to_ strinstance - The ID of the VPS the block storage subscription is attached to.
- block_
type str - The type of block storage volume.
- cost int
- The cost per month of the block storage subscription in USD.
- date_
created str - The date the block storage subscription was added to your Vultr account.
- id str
- The provider-assigned unique ID for this managed resource.
- label str
- The label of the block storage subscription.
- mount_
id str - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- region str
- The region ID of the block storage subscription.
- size_
gb int - The size of the block storage subscription in GB.
- status str
- The status of the block storage subscription.
- filters
Sequence[Get
Block Storage Filter]
- attached
To StringInstance - The ID of the VPS the block storage subscription is attached to.
- block
Type String - The type of block storage volume.
- cost Number
- The cost per month of the block storage subscription in USD.
- date
Created String - The date the block storage subscription was added to your Vultr account.
- id String
- The provider-assigned unique ID for this managed resource.
- label String
- The label of the block storage subscription.
- mount
Id String - An ID associated with the instance, when mounted the ID can be found in /dev/disk/by-id prefixed with virtio.
- region String
- The region ID of the block storage subscription.
- size
Gb Number - The size of the block storage subscription in GB.
- status String
- The status of the block storage subscription.
- filters List<Property Map>
Supporting Types
GetBlockStorageFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.