Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse
scaleway.getBlockVolume
Explore with Pulumi AI
Gets information about a Block Volume.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const myVolume = scaleway.getBlockVolume({
volumeId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
my_volume = scaleway.get_block_volume(volume_id="11111111-1111-1111-1111-111111111111")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupBlockVolume(ctx, &scaleway.LookupBlockVolumeArgs{
VolumeId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var myVolume = Scaleway.GetBlockVolume.Invoke(new()
{
VolumeId = "11111111-1111-1111-1111-111111111111",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetBlockVolumeArgs;
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 myVolume = ScalewayFunctions.getBlockVolume(GetBlockVolumeArgs.builder()
.volumeId("11111111-1111-1111-1111-111111111111")
.build());
}
}
variables:
myVolume:
fn::invoke:
Function: scaleway:getBlockVolume
Arguments:
volumeId: 11111111-1111-1111-1111-111111111111
Using getBlockVolume
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 getBlockVolume(args: GetBlockVolumeArgs, opts?: InvokeOptions): Promise<GetBlockVolumeResult>
function getBlockVolumeOutput(args: GetBlockVolumeOutputArgs, opts?: InvokeOptions): Output<GetBlockVolumeResult>
def get_block_volume(name: Optional[str] = None,
project_id: Optional[str] = None,
volume_id: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBlockVolumeResult
def get_block_volume_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
volume_id: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBlockVolumeResult]
func LookupBlockVolume(ctx *Context, args *LookupBlockVolumeArgs, opts ...InvokeOption) (*LookupBlockVolumeResult, error)
func LookupBlockVolumeOutput(ctx *Context, args *LookupBlockVolumeOutputArgs, opts ...InvokeOption) LookupBlockVolumeResultOutput
> Note: This function is named LookupBlockVolume
in the Go SDK.
public static class GetBlockVolume
{
public static Task<GetBlockVolumeResult> InvokeAsync(GetBlockVolumeArgs args, InvokeOptions? opts = null)
public static Output<GetBlockVolumeResult> Invoke(GetBlockVolumeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBlockVolumeResult> getBlockVolume(GetBlockVolumeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getBlockVolume:getBlockVolume
arguments:
# arguments dictionary
The following arguments are supported:
- name str
- The name of the volume. Only one of
name
andvolume_id
should be specified. - project_
id str - The ID of the project the volume is associated with.
- volume_
id str - The ID of the volume. Only one of
name
andvolume_id
should be specified. - zone str
zone
) The zone in which the volume exists.
getBlockVolume Result
The following output properties are available:
- id str
- The provider-assigned unique ID for this managed resource.
- iops int
- size_
in_ intgb - snapshot_
id str - Sequence[str]
- name str
- project_
id str - volume_
id str - zone str
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.