alicloud.cloudstoragegateway.getGatewayCacheDisks
This data source provides the Cloud Storage Gateway Gateway Cache Disks 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.GetGatewayCacheDisks.Invoke(new()
{
GatewayId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
var status = AliCloud.CloudStorageGateway.GetGatewayCacheDisks.Invoke(new()
{
GatewayId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
Status = 0,
});
return new Dictionary<string, object?>
{
["cloudStorageGatewayGatewayCacheDiskId1"] = ids.Apply(getGatewayCacheDisksResult => getGatewayCacheDisksResult.Disks[0]?.Id),
["cloudStorageGatewayGatewayCacheDiskId2"] = status.Apply(getGatewayCacheDisksResult => getGatewayCacheDisksResult.Disks[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.GetGatewayCacheDisks(ctx, &cloudstoragegateway.GetGatewayCacheDisksArgs{
GatewayId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("cloudStorageGatewayGatewayCacheDiskId1", ids.Disks[0].Id)
status, err := cloudstoragegateway.GetGatewayCacheDisks(ctx, &cloudstoragegateway.GetGatewayCacheDisksArgs{
GatewayId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
Status: pulumi.IntRef(0),
}, nil)
if err != nil {
return err
}
ctx.Export("cloudStorageGatewayGatewayCacheDiskId2", status.Disks[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.GetGatewayCacheDisksArgs;
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.getGatewayCacheDisks(GetGatewayCacheDisksArgs.builder()
.gatewayId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("cloudStorageGatewayGatewayCacheDiskId1", ids.applyValue(getGatewayCacheDisksResult -> getGatewayCacheDisksResult.disks()[0].id()));
final var status = CloudstoragegatewayFunctions.getGatewayCacheDisks(GetGatewayCacheDisksArgs.builder()
.gatewayId("example_value")
.ids(
"example_value-1",
"example_value-2")
.status("0")
.build());
ctx.export("cloudStorageGatewayGatewayCacheDiskId2", status.applyValue(getGatewayCacheDisksResult -> getGatewayCacheDisksResult.disks()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cloudstoragegateway.get_gateway_cache_disks(gateway_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("cloudStorageGatewayGatewayCacheDiskId1", ids.disks[0].id)
status = alicloud.cloudstoragegateway.get_gateway_cache_disks(gateway_id="example_value",
ids=[
"example_value-1",
"example_value-2",
],
status=0)
pulumi.export("cloudStorageGatewayGatewayCacheDiskId2", status.disks[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cloudstoragegateway.getGatewayCacheDisks({
gatewayId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const cloudStorageGatewayGatewayCacheDiskId1 = ids.then(ids => ids.disks?.[0]?.id);
const status = alicloud.cloudstoragegateway.getGatewayCacheDisks({
gatewayId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
status: 0,
});
export const cloudStorageGatewayGatewayCacheDiskId2 = status.then(status => status.disks?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:cloudstoragegateway:getGatewayCacheDisks
Arguments:
gatewayId: example_value
ids:
- example_value-1
- example_value-2
status:
fn::invoke:
Function: alicloud:cloudstoragegateway:getGatewayCacheDisks
Arguments:
gatewayId: example_value
ids:
- example_value-1
- example_value-2
status: '0'
outputs:
cloudStorageGatewayGatewayCacheDiskId1: ${ids.disks[0].id}
cloudStorageGatewayGatewayCacheDiskId2: ${status.disks[0].id}
Using getGatewayCacheDisks
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 getGatewayCacheDisks(args: GetGatewayCacheDisksArgs, opts?: InvokeOptions): Promise<GetGatewayCacheDisksResult>
function getGatewayCacheDisksOutput(args: GetGatewayCacheDisksOutputArgs, opts?: InvokeOptions): Output<GetGatewayCacheDisksResult>
def get_gateway_cache_disks(gateway_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
status: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetGatewayCacheDisksResult
def get_gateway_cache_disks_output(gateway_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGatewayCacheDisksResult]
func GetGatewayCacheDisks(ctx *Context, args *GetGatewayCacheDisksArgs, opts ...InvokeOption) (*GetGatewayCacheDisksResult, error)
func GetGatewayCacheDisksOutput(ctx *Context, args *GetGatewayCacheDisksOutputArgs, opts ...InvokeOption) GetGatewayCacheDisksResultOutput
> Note: This function is named GetGatewayCacheDisks
in the Go SDK.
public static class GetGatewayCacheDisks
{
public static Task<GetGatewayCacheDisksResult> InvokeAsync(GetGatewayCacheDisksArgs args, InvokeOptions? opts = null)
public static Output<GetGatewayCacheDisksResult> Invoke(GetGatewayCacheDisksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewayCacheDisksResult> getGatewayCacheDisks(GetGatewayCacheDisksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cloudstoragegateway/getGatewayCacheDisks:getGatewayCacheDisks
arguments:
# arguments dictionary
The following arguments are supported:
- Gateway
Id string The ID of the gateway.
- Ids List<string>
A list of Gateway Cache Disk IDs.
- Output
File string - Status int
The status of the resource.
- Gateway
Id string The ID of the gateway.
- Ids []string
A list of Gateway Cache Disk IDs.
- Output
File string - Status int
The status of the resource.
- gateway
Id String The ID of the gateway.
- ids List<String>
A list of Gateway Cache Disk IDs.
- output
File String - status Integer
The status of the resource.
- gateway
Id string The ID of the gateway.
- ids string[]
A list of Gateway Cache Disk IDs.
- output
File string - status number
The status of the resource.
- gateway_
id str The ID of the gateway.
- ids Sequence[str]
A list of Gateway Cache Disk IDs.
- output_
file str - status int
The status of the resource.
- gateway
Id String The ID of the gateway.
- ids List<String>
A list of Gateway Cache Disk IDs.
- output
File String - status Number
The status of the resource.
getGatewayCacheDisks Result
The following output properties are available:
- Disks
List<Pulumi.
Ali Cloud. Cloud Storage Gateway. Outputs. Get Gateway Cache Disks Disk> - Gateway
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Output
File string - Status int
- Disks
[]Get
Gateway Cache Disks Disk - Gateway
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Output
File string - Status int
- disks
List<Get
Gateway Cache Disks Disk> - gateway
Id String - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status Integer
- disks
Get
Gateway Cache Disks Disk[] - gateway
Id string - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- output
File string - status number
- disks
Sequence[Get
Gateway Cache Disks Disk] - gateway_
id str - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- output_
file str - status int
- disks List<Property Map>
- gateway
Id String - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status Number
Supporting Types
GetGatewayCacheDisksDisk
- Cache
Disk stringCategory The category of eht cache disk.
- Cache
Disk intSize In Gb The size of the cache disk.
- Cache
Id string The ID of the cache disk.
- Expired
Time int The expiration time. Time stamp in seconds (s).
- Gateway
Id string The ID of the gateway.
- Id string
The ID of the Gateway Cache Disk.
- Iops int
Per second of the input output.
- Is
Used bool Whether it is used.
- Local
File stringPath The cache disk inside the device name.
- Renew
Url string A renewal link of the cache disk.
- Status int
The status of the resource.
- Cache
Disk stringCategory The category of eht cache disk.
- Cache
Disk intSize In Gb The size of the cache disk.
- Cache
Id string The ID of the cache disk.
- Expired
Time int The expiration time. Time stamp in seconds (s).
- Gateway
Id string The ID of the gateway.
- Id string
The ID of the Gateway Cache Disk.
- Iops int
Per second of the input output.
- Is
Used bool Whether it is used.
- Local
File stringPath The cache disk inside the device name.
- Renew
Url string A renewal link of the cache disk.
- Status int
The status of the resource.
- cache
Disk StringCategory The category of eht cache disk.
- cache
Disk IntegerSize In Gb The size of the cache disk.
- cache
Id String The ID of the cache disk.
- expired
Time Integer The expiration time. Time stamp in seconds (s).
- gateway
Id String The ID of the gateway.
- id String
The ID of the Gateway Cache Disk.
- iops Integer
Per second of the input output.
- is
Used Boolean Whether it is used.
- local
File StringPath The cache disk inside the device name.
- renew
Url String A renewal link of the cache disk.
- status Integer
The status of the resource.
- cache
Disk stringCategory The category of eht cache disk.
- cache
Disk numberSize In Gb The size of the cache disk.
- cache
Id string The ID of the cache disk.
- expired
Time number The expiration time. Time stamp in seconds (s).
- gateway
Id string The ID of the gateway.
- id string
The ID of the Gateway Cache Disk.
- iops number
Per second of the input output.
- is
Used boolean Whether it is used.
- local
File stringPath The cache disk inside the device name.
- renew
Url string A renewal link of the cache disk.
- status number
The status of the resource.
- cache_
disk_ strcategory The category of eht cache disk.
- cache_
disk_ intsize_ in_ gb The size of the cache disk.
- cache_
id str The ID of the cache disk.
- expired_
time int The expiration time. Time stamp in seconds (s).
- gateway_
id str The ID of the gateway.
- id str
The ID of the Gateway Cache Disk.
- iops int
Per second of the input output.
- is_
used bool Whether it is used.
- local_
file_ strpath The cache disk inside the device name.
- renew_
url str A renewal link of the cache disk.
- status int
The status of the resource.
- cache
Disk StringCategory The category of eht cache disk.
- cache
Disk NumberSize In Gb The size of the cache disk.
- cache
Id String The ID of the cache disk.
- expired
Time Number The expiration time. Time stamp in seconds (s).
- gateway
Id String The ID of the gateway.
- id String
The ID of the Gateway Cache Disk.
- iops Number
Per second of the input output.
- is
Used Boolean Whether it is used.
- local
File StringPath The cache disk inside the device name.
- renew
Url String A renewal link of the cache disk.
- status Number
The status of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.