edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center
edgecenter.getVolume
Explore with Pulumi AI
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center
A volume is a detachable block storage device akin to a USB hard drive or SSD, but located remotely in the cloud. Volumes can be attached to a virtual machine and manipulated like a physical hard drive.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const pr = edgecenter.getProject({
    name: "test",
});
const rg = edgecenter.getRegion({
    name: "ED-10 Preprod",
});
const tv = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getVolume({
    name: "test-hd",
    regionId: rg.id,
    projectId: pr.id,
}));
export const view = tv;
import pulumi
import pulumi_edgecenter as edgecenter
pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
tv = edgecenter.get_volume(name="test-hd",
    region_id=rg.id,
    project_id=pr.id)
pulumi.export("view", tv)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
			Name: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
			Name: "ED-10 Preprod",
		}, nil)
		if err != nil {
			return err
		}
		tv, err := edgecenter.LookupVolume(ctx, &edgecenter.LookupVolumeArgs{
			Name:      "test-hd",
			RegionId:  pulumi.Float64Ref(rg.Id),
			ProjectId: pulumi.Float64Ref(pr.Id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", tv)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() => 
{
    var pr = Edgecenter.GetProject.Invoke(new()
    {
        Name = "test",
    });
    var rg = Edgecenter.GetRegion.Invoke(new()
    {
        Name = "ED-10 Preprod",
    });
    var tv = Edgecenter.GetVolume.Invoke(new()
    {
        Name = "test-hd",
        RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
    });
    return new Dictionary<string, object?>
    {
        ["view"] = tv,
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.inputs.GetVolumeArgs;
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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
            .name("test")
            .build());
        final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
            .name("ED-10 Preprod")
            .build());
        final var tv = EdgecenterFunctions.getVolume(GetVolumeArgs.builder()
            .name("test-hd")
            .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
            .build());
        ctx.export("view", tv.applyValue(getVolumeResult -> getVolumeResult));
    }
}
variables:
  pr:
    fn::invoke:
      function: edgecenter:getProject
      arguments:
        name: test
  rg:
    fn::invoke:
      function: edgecenter:getRegion
      arguments:
        name: ED-10 Preprod
  tv:
    fn::invoke:
      function: edgecenter:getVolume
      arguments:
        name: test-hd
        regionId: ${rg.id}
        projectId: ${pr.id}
outputs:
  view: ${tv}
Using getVolume
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 getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>
function getVolumeOutput(args: GetVolumeOutputArgs, opts?: InvokeOptions): Output<GetVolumeResult>def get_volume(id: Optional[str] = None,
               metadata_k: Optional[str] = None,
               metadata_kv: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None,
               project_id: Optional[float] = None,
               project_name: Optional[str] = None,
               region_id: Optional[float] = None,
               region_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetVolumeResult
def get_volume_output(id: Optional[pulumi.Input[str]] = None,
               metadata_k: Optional[pulumi.Input[str]] = None,
               metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
               name: Optional[pulumi.Input[str]] = None,
               project_id: Optional[pulumi.Input[float]] = None,
               project_name: Optional[pulumi.Input[str]] = None,
               region_id: Optional[pulumi.Input[float]] = None,
               region_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetVolumeResult]func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)
func LookupVolumeOutput(ctx *Context, args *LookupVolumeOutputArgs, opts ...InvokeOption) LookupVolumeResultOutput> Note: This function is named LookupVolume in the Go SDK.
public static class GetVolume 
{
    public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
    public static Output<GetVolumeResult> Invoke(GetVolumeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
public static Output<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
fn::invoke:
  function: edgecenter:index/getVolume:getVolume
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - The name of the volume.
 - Id string
 - The ID of this resource.
 - Metadata
K string - Filtration query opts (only key).
 - Metadata
Kv Dictionary<string, string> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- Name string
 - The name of the volume.
 - Id string
 - The ID of this resource.
 - Metadata
K string - Filtration query opts (only key).
 - Metadata
Kv map[string]string - Filtration query opts, for example, {offset = "10", limit = "10"}
 - Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- name String
 - The name of the volume.
 - id String
 - The ID of this resource.
 - metadata
K String - Filtration query opts (only key).
 - metadata
Kv Map<String,String> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- name string
 - The name of the volume.
 - id string
 - The ID of this resource.
 - metadata
K string - Filtration query opts (only key).
 - metadata
Kv {[key: string]: string} - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- name str
 - The name of the volume.
 - id str
 - The ID of this resource.
 - metadata_
k str - Filtration query opts (only key).
 - metadata_
kv Mapping[str, str] - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- name String
 - The name of the volume.
 - id String
 - The ID of this resource.
 - metadata
K String - Filtration query opts (only key).
 - metadata
Kv Map<String> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
getVolume Result
The following output properties are available:
- Id string
 - The ID of this resource.
 - Metadata
Read List<GetOnlies Volume Metadata Read Only>  - A list of read-only metadata items, e.g. tags.
 - Name string
 - The name of the volume.
 - Size double
 - The size of the volume, specified in gigabytes (GB).
 - Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - Metadata
K string - Filtration query opts (only key).
 - Metadata
Kv Dictionary<string, string> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- Id string
 - The ID of this resource.
 - Metadata
Read []GetOnlies Volume Metadata Read Only  - A list of read-only metadata items, e.g. tags.
 - Name string
 - The name of the volume.
 - Size float64
 - The size of the volume, specified in gigabytes (GB).
 - Type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - Metadata
K string - Filtration query opts (only key).
 - Metadata
Kv map[string]string - Filtration query opts, for example, {offset = "10", limit = "10"}
 - Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- id String
 - The ID of this resource.
 - metadata
Read List<GetOnlies Volume Metadata Read Only>  - A list of read-only metadata items, e.g. tags.
 - name String
 - The name of the volume.
 - size Double
 - The size of the volume, specified in gigabytes (GB).
 - type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - metadata
K String - Filtration query opts (only key).
 - metadata
Kv Map<String,String> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- id string
 - The ID of this resource.
 - metadata
Read GetOnlies Volume Metadata Read Only[]  - A list of read-only metadata items, e.g. tags.
 - name string
 - The name of the volume.
 - size number
 - The size of the volume, specified in gigabytes (GB).
 - type
Name string - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - metadata
K string - Filtration query opts (only key).
 - metadata
Kv {[key: string]: string} - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- id str
 - The ID of this resource.
 - metadata_
read_ Sequence[Getonlies Volume Metadata Read Only]  - A list of read-only metadata items, e.g. tags.
 - name str
 - The name of the volume.
 - size float
 - The size of the volume, specified in gigabytes (GB).
 - type_
name str - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - metadata_
k str - Filtration query opts (only key).
 - metadata_
kv Mapping[str, str] - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
- id String
 - The ID of this resource.
 - metadata
Read List<Property Map>Onlies  - A list of read-only metadata items, e.g. tags.
 - name String
 - The name of the volume.
 - size Number
 - The size of the volume, specified in gigabytes (GB).
 - type
Name String - The type of volume to create. Valid values are 'ssd_hiiops', 'standard', 'cold', and 'ultra'. Defaults to 'standard'.
 - metadata
K String - Filtration query opts (only key).
 - metadata
Kv Map<String> - Filtration query opts, for example, {offset = "10", limit = "10"}
 - project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
 - project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
 - region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
 - region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
 
Supporting Types
GetVolumeMetadataReadOnly    
Package Details
- Repository
 - edgecenter edge-center/terraform-provider-edgecenter
 - License
 - Notes
 - This Pulumi package is based on the 
edgecenterTerraform Provider. 
edgecenter 0.7.34 published on Monday, Apr 14, 2025 by edge-center