Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getGatewayBlockVolumes

This data source provides the Cloud Storage Gateway Gateway Block Volumes of the current Alibaba Cloud user.

NOTE: Available in v1.144.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.CloudStorageGateway.GetGatewayBlockVolumes.InvokeAsync(new AliCloud.CloudStorageGateway.GetGatewayBlockVolumesArgs
        {
            GatewayId = "example_value",
            Ids = 
            {
                "example_value-1",
                "example_value-2",
            },
        }));
        this.CloudStorageGatewayGatewayBlockVolumeId1 = ids.Apply(ids => ids.Volumes?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.CloudStorageGateway.GetGatewayBlockVolumes.InvokeAsync(new AliCloud.CloudStorageGateway.GetGatewayBlockVolumesArgs
        {
            GatewayId = "example_value",
            NameRegex = "^my-GatewayBlockVolume",
        }));
        this.CloudStorageGatewayGatewayBlockVolumeId2 = nameRegex.Apply(nameRegex => nameRegex.Volumes?[0]?.Id);
    }

    [Output("cloudStorageGatewayGatewayBlockVolumeId1")]
    public Output<string> CloudStorageGatewayGatewayBlockVolumeId1 { get; set; }
    [Output("cloudStorageGatewayGatewayBlockVolumeId2")]
    public Output<string> CloudStorageGatewayGatewayBlockVolumeId2 { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudstoragegateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := cloudstoragegateway.GetGatewayBlockVolumes(ctx, &cloudstoragegateway.GetGatewayBlockVolumesArgs{
			GatewayId: "example_value",
			Ids: []string{
				"example_value-1",
				"example_value-2",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudStorageGatewayGatewayBlockVolumeId1", ids.Volumes[0].Id)
		nameRegex, err := cloudstoragegateway.GetGatewayBlockVolumes(ctx, &cloudstoragegateway.GetGatewayBlockVolumesArgs{
			GatewayId: "example_value",
			NameRegex: pulumi.StringRef("^my-GatewayBlockVolume"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("cloudStorageGatewayGatewayBlockVolumeId2", nameRegex.Volumes[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudstoragegateway.CloudstoragegatewayFunctions;
import com.pulumi.alicloud.cloudstoragegateway.inputs.GetGatewayBlockVolumesArgs;
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 ids = CloudstoragegatewayFunctions.getGatewayBlockVolumes(GetGatewayBlockVolumesArgs.builder()
            .gatewayId("example_value")
            .ids(            
                "example_value-1",
                "example_value-2")
            .build());

        ctx.export("cloudStorageGatewayGatewayBlockVolumeId1", ids.applyValue(getGatewayBlockVolumesResult -> getGatewayBlockVolumesResult.volumes()[0].id()));
        final var nameRegex = CloudstoragegatewayFunctions.getGatewayBlockVolumes(GetGatewayBlockVolumesArgs.builder()
            .gatewayId("example_value")
            .nameRegex("^my-GatewayBlockVolume")
            .build());

        ctx.export("cloudStorageGatewayGatewayBlockVolumeId2", nameRegex.applyValue(getGatewayBlockVolumesResult -> getGatewayBlockVolumesResult.volumes()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.cloudstoragegateway.get_gateway_block_volumes(gateway_id="example_value",
    ids=[
        "example_value-1",
        "example_value-2",
    ])
pulumi.export("cloudStorageGatewayGatewayBlockVolumeId1", ids.volumes[0].id)
name_regex = alicloud.cloudstoragegateway.get_gateway_block_volumes(gateway_id="example_value",
    name_regex="^my-GatewayBlockVolume")
pulumi.export("cloudStorageGatewayGatewayBlockVolumeId2", name_regex.volumes[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.cloudstoragegateway.getGatewayBlockVolumes({
    gatewayId: "example_value",
    ids: [
        "example_value-1",
        "example_value-2",
    ],
});
export const cloudStorageGatewayGatewayBlockVolumeId1 = ids.then(ids => ids.volumes?[0]?.id);
const nameRegex = alicloud.cloudstoragegateway.getGatewayBlockVolumes({
    gatewayId: "example_value",
    nameRegex: "^my-GatewayBlockVolume",
});
export const cloudStorageGatewayGatewayBlockVolumeId2 = nameRegex.then(nameRegex => nameRegex.volumes?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:cloudstoragegateway:getGatewayBlockVolumes
      Arguments:
        gatewayId: example_value
        ids:
          - example_value-1
          - example_value-2
  nameRegex:
    Fn::Invoke:
      Function: alicloud:cloudstoragegateway:getGatewayBlockVolumes
      Arguments:
        gatewayId: example_value
        nameRegex: ^my-GatewayBlockVolume
outputs:
  cloudStorageGatewayGatewayBlockVolumeId1: ${ids.volumes[0].id}
  cloudStorageGatewayGatewayBlockVolumeId2: ${nameRegex.volumes[0].id}

Using getGatewayBlockVolumes

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 getGatewayBlockVolumes(args: GetGatewayBlockVolumesArgs, opts?: InvokeOptions): Promise<GetGatewayBlockVolumesResult>
function getGatewayBlockVolumesOutput(args: GetGatewayBlockVolumesOutputArgs, opts?: InvokeOptions): Output<GetGatewayBlockVolumesResult>
def get_gateway_block_volumes(gateway_id: Optional[str] = None,
                              ids: Optional[Sequence[str]] = None,
                              name_regex: Optional[str] = None,
                              output_file: Optional[str] = None,
                              status: Optional[int] = None,
                              opts: Optional[InvokeOptions] = None) -> GetGatewayBlockVolumesResult
def get_gateway_block_volumes_output(gateway_id: Optional[pulumi.Input[str]] = None,
                              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              name_regex: Optional[pulumi.Input[str]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              status: Optional[pulumi.Input[int]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetGatewayBlockVolumesResult]
func GetGatewayBlockVolumes(ctx *Context, args *GetGatewayBlockVolumesArgs, opts ...InvokeOption) (*GetGatewayBlockVolumesResult, error)
func GetGatewayBlockVolumesOutput(ctx *Context, args *GetGatewayBlockVolumesOutputArgs, opts ...InvokeOption) GetGatewayBlockVolumesResultOutput

> Note: This function is named GetGatewayBlockVolumes in the Go SDK.

public static class GetGatewayBlockVolumes 
{
    public static Task<GetGatewayBlockVolumesResult> InvokeAsync(GetGatewayBlockVolumesArgs args, InvokeOptions? opts = null)
    public static Output<GetGatewayBlockVolumesResult> Invoke(GetGatewayBlockVolumesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewayBlockVolumesResult> getGatewayBlockVolumes(GetGatewayBlockVolumesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:cloudstoragegateway/getGatewayBlockVolumes:getGatewayBlockVolumes
  Arguments:
    # Arguments dictionary

The following arguments are supported:

GatewayId string

The Gateway ID.

Ids List<string>

A list of Gateway Block Volume IDs.

NameRegex string

A regex string to filter results by Gateway Block Volume name.

OutputFile string
Status int

The status of volume.

GatewayId string

The Gateway ID.

Ids []string

A list of Gateway Block Volume IDs.

NameRegex string

A regex string to filter results by Gateway Block Volume name.

OutputFile string
Status int

The status of volume.

gatewayId String

The Gateway ID.

ids List<String>

A list of Gateway Block Volume IDs.

nameRegex String

A regex string to filter results by Gateway Block Volume name.

outputFile String
status Integer

The status of volume.

gatewayId string

The Gateway ID.

ids string[]

A list of Gateway Block Volume IDs.

nameRegex string

A regex string to filter results by Gateway Block Volume name.

outputFile string
status number

The status of volume.

gateway_id str

The Gateway ID.

ids Sequence[str]

A list of Gateway Block Volume IDs.

name_regex str

A regex string to filter results by Gateway Block Volume name.

output_file str
status int

The status of volume.

gatewayId String

The Gateway ID.

ids List<String>

A list of Gateway Block Volume IDs.

nameRegex String

A regex string to filter results by Gateway Block Volume name.

outputFile String
status Number

The status of volume.

getGatewayBlockVolumes Result

The following output properties are available:

GatewayId string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
Volumes List<Pulumi.AliCloud.CloudStorageGateway.Outputs.GetGatewayBlockVolumesVolume>
NameRegex string
OutputFile string
Status int
GatewayId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
Volumes []GetGatewayBlockVolumesVolume
NameRegex string
OutputFile string
Status int
gatewayId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
volumes List<GetGatewayBlockVolumesVolume>
nameRegex String
outputFile String
status Integer
gatewayId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
volumes GetGatewayBlockVolumesVolume[]
nameRegex string
outputFile string
status number
gateway_id str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
volumes Sequence[GetGatewayBlockVolumesVolume]
name_regex str
output_file str
status int
gatewayId String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
volumes List<Property Map>
nameRegex String
outputFile String
status Number

Supporting Types

GetGatewayBlockVolumesVolume

Address string

The IP ADDRESS.

CacheMode string

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

ChapEnabled bool

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

ChapInUser string

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

ChunkSize int

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

DiskId string

The cache disk ID.

DiskType string

The cache disk type.

Enabled bool

Whether to enable Volume.

GatewayBlockVolumeName string

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

GatewayId string

The Gateway ID.

Id string

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

IndexId string

The ID of the index.

LocalPath string

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

LunId int

The Lun identifier.

OssBucketName string

The name of the OSS Bucket.

OssBucketSsl bool

Whether to enable SSL access your OSS Buckets. Default value: true.

OssEndpoint string

The endpoint of the OSS Bucket.

Port int

The Port.

Protocol string

The Protocol.

Size int

The Volume size.

State string

The Buffer status.

Status int

The status of volume.

Target string

The target.

TotalDownload int

The total amount of downloaded data. Unit: B.

TotalUpload int

The total amount of uploaded data. Unit: B.

VolumeState int
Address string

The IP ADDRESS.

CacheMode string

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

ChapEnabled bool

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

ChapInUser string

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

ChunkSize int

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

DiskId string

The cache disk ID.

DiskType string

The cache disk type.

Enabled bool

Whether to enable Volume.

GatewayBlockVolumeName string

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

GatewayId string

The Gateway ID.

Id string

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

IndexId string

The ID of the index.

LocalPath string

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

LunId int

The Lun identifier.

OssBucketName string

The name of the OSS Bucket.

OssBucketSsl bool

Whether to enable SSL access your OSS Buckets. Default value: true.

OssEndpoint string

The endpoint of the OSS Bucket.

Port int

The Port.

Protocol string

The Protocol.

Size int

The Volume size.

State string

The Buffer status.

Status int

The status of volume.

Target string

The target.

TotalDownload int

The total amount of downloaded data. Unit: B.

TotalUpload int

The total amount of uploaded data. Unit: B.

VolumeState int
address String

The IP ADDRESS.

cacheMode String

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

chapEnabled Boolean

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

chapInUser String

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

chunkSize Integer

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

diskId String

The cache disk ID.

diskType String

The cache disk type.

enabled Boolean

Whether to enable Volume.

gatewayBlockVolumeName String

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

gatewayId String

The Gateway ID.

id String

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

indexId String

The ID of the index.

localPath String

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

lunId Integer

The Lun identifier.

ossBucketName String

The name of the OSS Bucket.

ossBucketSsl Boolean

Whether to enable SSL access your OSS Buckets. Default value: true.

ossEndpoint String

The endpoint of the OSS Bucket.

port Integer

The Port.

protocol String

The Protocol.

size Integer

The Volume size.

state String

The Buffer status.

status Integer

The status of volume.

target String

The target.

totalDownload Integer

The total amount of downloaded data. Unit: B.

totalUpload Integer

The total amount of uploaded data. Unit: B.

volumeState Integer
address string

The IP ADDRESS.

cacheMode string

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

chapEnabled boolean

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

chapInUser string

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

chunkSize number

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

diskId string

The cache disk ID.

diskType string

The cache disk type.

enabled boolean

Whether to enable Volume.

gatewayBlockVolumeName string

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

gatewayId string

The Gateway ID.

id string

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

indexId string

The ID of the index.

localPath string

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

lunId number

The Lun identifier.

ossBucketName string

The name of the OSS Bucket.

ossBucketSsl boolean

Whether to enable SSL access your OSS Buckets. Default value: true.

ossEndpoint string

The endpoint of the OSS Bucket.

port number

The Port.

protocol string

The Protocol.

size number

The Volume size.

state string

The Buffer status.

status number

The status of volume.

target string

The target.

totalDownload number

The total amount of downloaded data. Unit: B.

totalUpload number

The total amount of uploaded data. Unit: B.

volumeState number
address str

The IP ADDRESS.

cache_mode str

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

chap_enabled bool

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

chap_in_user str

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

chunk_size int

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

disk_id str

The cache disk ID.

disk_type str

The cache disk type.

enabled bool

Whether to enable Volume.

gateway_block_volume_name str

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

gateway_id str

The Gateway ID.

id str

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

index_id str

The ID of the index.

local_path str

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

lun_id int

The Lun identifier.

oss_bucket_name str

The name of the OSS Bucket.

oss_bucket_ssl bool

Whether to enable SSL access your OSS Buckets. Default value: true.

oss_endpoint str

The endpoint of the OSS Bucket.

port int

The Port.

protocol str

The Protocol.

size int

The Volume size.

state str

The Buffer status.

status int

The status of volume.

target str

The target.

total_download int

The total amount of downloaded data. Unit: B.

total_upload int

The total amount of uploaded data. Unit: B.

volume_state int
address String

The IP ADDRESS.

cacheMode String

The Block volume set mode to cache mode. Valid values: Cache, WriteThrough.

chapEnabled Boolean

Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value: false.

chapInUser String

The Inbound CHAP user.NOTE: When the chap_enabled is true is,The chap_in_password is valid.

chunkSize Number

The Block volume storage allocation unit. Valid values: 8192, 16384, 32768, 65536, 131072. Default value: 32768. Unit: Byte.

diskId String

The cache disk ID.

diskType String

The cache disk type.

enabled Boolean

Whether to enable Volume.

gatewayBlockVolumeName String

The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.

gatewayId String

The Gateway ID.

id String

The ID of the Gateway Block Volume. The value formats as <gateway_id>:<index_id>.

indexId String

The ID of the index.

localPath String

CThe Cache disk to local path. NOTE: When the cache_mode is Cache is,The chap_in_password is valid.

lunId Number

The Lun identifier.

ossBucketName String

The name of the OSS Bucket.

ossBucketSsl Boolean

Whether to enable SSL access your OSS Buckets. Default value: true.

ossEndpoint String

The endpoint of the OSS Bucket.

port Number

The Port.

protocol String

The Protocol.

size Number

The Volume size.

state String

The Buffer status.

status Number

The status of volume.

target String

The target.

totalDownload Number

The total amount of downloaded data. Unit: B.

totalUpload Number

The total amount of uploaded data. Unit: B.

volumeState Number

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.