alicloud.cloudstoragegateway.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
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.CloudStorageGateway.GetGatewayBlockVolumes.Invoke(new()
{
GatewayId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
var nameRegex = AliCloud.CloudStorageGateway.GetGatewayBlockVolumes.Invoke(new()
{
GatewayId = "example_value",
NameRegex = "^my-GatewayBlockVolume",
});
return new Dictionary<string, object?>
{
["cloudStorageGatewayGatewayBlockVolumeId1"] = ids.Apply(getGatewayBlockVolumesResult => getGatewayBlockVolumesResult.Volumes[0]?.Id),
["cloudStorageGatewayGatewayBlockVolumeId2"] = nameRegex.Apply(getGatewayBlockVolumesResult => getGatewayBlockVolumesResult.Volumes[0]?.Id),
};
});
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:
- Gateway
Id string The Gateway ID.
- Ids List<string>
A list of Gateway Block Volume IDs.
- Name
Regex string A regex string to filter results by Gateway Block Volume name.
- Output
File string - Status int
The status of volume.
- Gateway
Id string The Gateway ID.
- Ids []string
A list of Gateway Block Volume IDs.
- Name
Regex string A regex string to filter results by Gateway Block Volume name.
- Output
File string - Status int
The status of volume.
- gateway
Id String The Gateway ID.
- ids List<String>
A list of Gateway Block Volume IDs.
- name
Regex String A regex string to filter results by Gateway Block Volume name.
- output
File String - status Integer
The status of volume.
- gateway
Id string The Gateway ID.
- ids string[]
A list of Gateway Block Volume IDs.
- name
Regex string A regex string to filter results by Gateway Block Volume name.
- output
File 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.
- gateway
Id String The Gateway ID.
- ids List<String>
A list of Gateway Block Volume IDs.
- name
Regex String A regex string to filter results by Gateway Block Volume name.
- output
File String - status Number
The status of volume.
getGatewayBlockVolumes Result
The following output properties are available:
- Gateway
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Volumes
List<Pulumi.
Ali Cloud. Cloud Storage Gateway. Outputs. Get Gateway Block Volumes Volume> - Name
Regex string - Output
File string - Status int
- Gateway
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Volumes
[]Get
Gateway Block Volumes Volume - Name
Regex string - Output
File string - Status int
- gateway
Id String - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- volumes
List<Get
Gateway Block Volumes Volume> - name
Regex String - output
File String - status Integer
- gateway
Id string - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- volumes
Get
Gateway Block Volumes Volume[] - name
Regex string - output
File 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[Get
Gateway Block Volumes Volume] - name_
regex str - output_
file str - status int
- gateway
Id String - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- volumes List<Property Map>
- name
Regex String - output
File String - status Number
Supporting Types
GetGatewayBlockVolumesVolume
- Address string
The IP ADDRESS.
- Cache
Mode string 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 stringUser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_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 string The cache disk ID.
- Disk
Type string The cache disk type.
- Enabled bool
Whether to enable Volume.
- Gateway
Block stringVolume Name The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.
- Gateway
Id string The Gateway ID.
- Id string
The ID of the Gateway Block Volume. The value formats as
<gateway_id>:<index_id>
.- Index
Id string The ID of the index.
- Local
Path string CThe Cache disk to local path. NOTE: When the
cache_mode
isCache
is,Thechap_in_password
is valid.- Lun
Id int The Lun identifier.
- Oss
Bucket stringName The name of the OSS Bucket.
- Oss
Bucket boolSsl Whether to enable SSL access your OSS Buckets. Default value:
true
.- Oss
Endpoint 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.
- 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.
- Cache
Mode string 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 stringUser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_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 string The cache disk ID.
- Disk
Type string The cache disk type.
- Enabled bool
Whether to enable Volume.
- Gateway
Block stringVolume Name The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.
- Gateway
Id string The Gateway ID.
- Id string
The ID of the Gateway Block Volume. The value formats as
<gateway_id>:<index_id>
.- Index
Id string The ID of the index.
- Local
Path string CThe Cache disk to local path. NOTE: When the
cache_mode
isCache
is,Thechap_in_password
is valid.- Lun
Id int The Lun identifier.
- Oss
Bucket stringName The name of the OSS Bucket.
- Oss
Bucket boolSsl Whether to enable SSL access your OSS Buckets. Default value:
true
.- Oss
Endpoint 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.
- 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.
- cache
Mode String The Block volume set mode to cache mode. Valid values:
Cache
,WriteThrough
.- chap
Enabled Boolean Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value:
false
.- chap
In StringUser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_in_password
is valid.- chunk
Size Integer The Block volume storage allocation unit. Valid values:
8192
,16384
,32768
,65536
,131072
. Default value:32768
. Unit:Byte
.- disk
Id String The cache disk ID.
- disk
Type String The cache disk type.
- enabled Boolean
Whether to enable Volume.
- gateway
Block StringVolume Name The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.
- gateway
Id String The Gateway ID.
- id String
The ID of the Gateway Block Volume. The value formats as
<gateway_id>:<index_id>
.- index
Id String The ID of the index.
- local
Path String CThe Cache disk to local path. NOTE: When the
cache_mode
isCache
is,Thechap_in_password
is valid.- lun
Id Integer The Lun identifier.
- oss
Bucket StringName The name of the OSS Bucket.
- oss
Bucket BooleanSsl Whether to enable SSL access your OSS Buckets. Default value:
true
.- oss
Endpoint 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.
- total
Download Integer The total amount of downloaded data. Unit:
B
.- total
Upload Integer The total amount of uploaded data. Unit:
B
.- volume
State Integer
- address string
The IP ADDRESS.
- cache
Mode string The Block volume set mode to cache mode. Valid values:
Cache
,WriteThrough
.- chap
Enabled boolean Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value:
false
.- chap
In stringUser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_in_password
is valid.- chunk
Size number The Block volume storage allocation unit. Valid values:
8192
,16384
,32768
,65536
,131072
. Default value:32768
. Unit:Byte
.- disk
Id string The cache disk ID.
- disk
Type string The cache disk type.
- enabled boolean
Whether to enable Volume.
- gateway
Block stringVolume Name The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.
- gateway
Id string The Gateway ID.
- id string
The ID of the Gateway Block Volume. The value formats as
<gateway_id>:<index_id>
.- index
Id string The ID of the index.
- local
Path string CThe Cache disk to local path. NOTE: When the
cache_mode
isCache
is,Thechap_in_password
is valid.- lun
Id number The Lun identifier.
- oss
Bucket stringName The name of the OSS Bucket.
- oss
Bucket booleanSsl Whether to enable SSL access your OSS Buckets. Default value:
true
.- oss
Endpoint 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.
- total
Download number The total amount of downloaded data. Unit:
B
.- total
Upload number The total amount of uploaded data. Unit:
B
.- volume
State 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_ struser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_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_ strvolume_ name 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
isCache
is,Thechap_in_password
is valid.- lun_
id int The Lun identifier.
- oss_
bucket_ strname The name of the OSS Bucket.
- oss_
bucket_ boolssl 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.
- cache
Mode String The Block volume set mode to cache mode. Valid values:
Cache
,WriteThrough
.- chap
Enabled Boolean Whether to enable iSCSI access of CHAP authentication, which currently supports both CHAP inbound authentication. Default value:
false
.- chap
In StringUser The Inbound CHAP user.NOTE: When the
chap_enabled
istrue
is,Thechap_in_password
is valid.- chunk
Size Number The Block volume storage allocation unit. Valid values:
8192
,16384
,32768
,65536
,131072
. Default value:32768
. Unit:Byte
.- disk
Id String The cache disk ID.
- disk
Type String The cache disk type.
- enabled Boolean
Whether to enable Volume.
- gateway
Block StringVolume Name The Block volume name. The name must be 1 to 32 characters in length, and can contain lowercase letters, numbers.
- gateway
Id String The Gateway ID.
- id String
The ID of the Gateway Block Volume. The value formats as
<gateway_id>:<index_id>
.- index
Id String The ID of the index.
- local
Path String CThe Cache disk to local path. NOTE: When the
cache_mode
isCache
is,Thechap_in_password
is valid.- lun
Id Number The Lun identifier.
- oss
Bucket StringName The name of the OSS Bucket.
- oss
Bucket BooleanSsl Whether to enable SSL access your OSS Buckets. Default value:
true
.- oss
Endpoint 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.
- total
Download Number The total amount of downloaded data. Unit:
B
.- total
Upload Number The total amount of uploaded data. Unit:
B
.- volume
State Number
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.