Alibaba Cloud
getEcsStorageCapacityUnits
This data source provides the Ecs Storage Capacity Units of the current Alibaba Cloud user.
NOTE: Available in v1.155.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var ids = Output.Create(AliCloud.Ecs.GetEcsStorageCapacityUnits.InvokeAsync());
this.EcsStorageCapacityUnitId1 = ids.Apply(ids => ids.Units?[0]?.Id);
var nameRegex = Output.Create(AliCloud.Ecs.GetEcsStorageCapacityUnits.InvokeAsync(new AliCloud.Ecs.GetEcsStorageCapacityUnitsArgs
{
NameRegex = "^my-StorageCapacityUnit",
}));
this.EcsStorageCapacityUnitId2 = nameRegex.Apply(nameRegex => nameRegex.Units?[0]?.Id);
}
[Output("ecsStorageCapacityUnitId1")]
public Output<string> EcsStorageCapacityUnitId1 { get; set; }
[Output("ecsStorageCapacityUnitId2")]
public Output<string> EcsStorageCapacityUnitId2 { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ecs.GetEcsStorageCapacityUnits(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("ecsStorageCapacityUnitId1", ids.Units[0].Id)
nameRegex, err := ecs.GetEcsStorageCapacityUnits(ctx, &ecs.GetEcsStorageCapacityUnitsArgs{
NameRegex: pulumi.StringRef("^my-StorageCapacityUnit"),
}, nil)
if err != nil {
return err
}
ctx.Export("ecsStorageCapacityUnitId2", nameRegex.Units[0].Id)
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_ecs_storage_capacity_units()
pulumi.export("ecsStorageCapacityUnitId1", ids.units[0].id)
name_regex = alicloud.ecs.get_ecs_storage_capacity_units(name_regex="^my-StorageCapacityUnit")
pulumi.export("ecsStorageCapacityUnitId2", name_regex.units[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getEcsStorageCapacityUnits({});
export const ecsStorageCapacityUnitId1 = ids.then(ids => ids.units?[0]?.id);
const nameRegex = alicloud.ecs.getEcsStorageCapacityUnits({
nameRegex: "^my-StorageCapacityUnit",
});
export const ecsStorageCapacityUnitId2 = nameRegex.then(nameRegex => nameRegex.units?[0]?.id);
Coming soon!
Using getEcsStorageCapacityUnits
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 getEcsStorageCapacityUnits(args: GetEcsStorageCapacityUnitsArgs, opts?: InvokeOptions): Promise<GetEcsStorageCapacityUnitsResult>
function getEcsStorageCapacityUnitsOutput(args: GetEcsStorageCapacityUnitsOutputArgs, opts?: InvokeOptions): Output<GetEcsStorageCapacityUnitsResult>
def get_ecs_storage_capacity_units(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsStorageCapacityUnitsResult
def get_ecs_storage_capacity_units_output(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[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsStorageCapacityUnitsResult]
func GetEcsStorageCapacityUnits(ctx *Context, args *GetEcsStorageCapacityUnitsArgs, opts ...InvokeOption) (*GetEcsStorageCapacityUnitsResult, error)
func GetEcsStorageCapacityUnitsOutput(ctx *Context, args *GetEcsStorageCapacityUnitsOutputArgs, opts ...InvokeOption) GetEcsStorageCapacityUnitsResultOutput
> Note: This function is named GetEcsStorageCapacityUnits
in the Go SDK.
public static class GetEcsStorageCapacityUnits
{
public static Task<GetEcsStorageCapacityUnitsResult> InvokeAsync(GetEcsStorageCapacityUnitsArgs args, InvokeOptions? opts = null)
public static Output<GetEcsStorageCapacityUnitsResult> Invoke(GetEcsStorageCapacityUnitsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEcsStorageCapacityUnitsResult> getEcsStorageCapacityUnits(GetEcsStorageCapacityUnitsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: alicloud:ecs/getEcsStorageCapacityUnits:getEcsStorageCapacityUnits
Arguments:
# Arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Storage Capacity Unit IDs.
- Name
Regex string A regex string to filter results by Storage Capacity Unit name.
- Output
File string - Status string
The status of Storage Capacity Unit.
- Ids []string
A list of Storage Capacity Unit IDs.
- Name
Regex string A regex string to filter results by Storage Capacity Unit name.
- Output
File string - Status string
The status of Storage Capacity Unit.
- ids List<String>
A list of Storage Capacity Unit IDs.
- name
Regex String A regex string to filter results by Storage Capacity Unit name.
- output
File String - status String
The status of Storage Capacity Unit.
- ids string[]
A list of Storage Capacity Unit IDs.
- name
Regex string A regex string to filter results by Storage Capacity Unit name.
- output
File string - status string
The status of Storage Capacity Unit.
- ids Sequence[str]
A list of Storage Capacity Unit IDs.
- name_
regex str A regex string to filter results by Storage Capacity Unit name.
- output_
file str - status str
The status of Storage Capacity Unit.
- ids List<String>
A list of Storage Capacity Unit IDs.
- name
Regex String A regex string to filter results by Storage Capacity Unit name.
- output
File String - status String
The status of Storage Capacity Unit.
getEcsStorageCapacityUnits Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Units
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Ecs Storage Capacity Units Unit> - Name
Regex string - Output
File string - Status string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Units
[]Get
Ecs Storage Capacity Units Unit - Name
Regex string - Output
File string - Status string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- units
List<Get
Ecs Storage Capacity Units Unit> - name
Regex String - output
File String - status String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- units
Get
Ecs Storage Capacity Units Unit[] - name
Regex string - output
File string - status string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- units
Sequence[Get
Ecs Storage Capacity Units Unit] - name_
regex str - output_
file str - status str
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- units List<Property Map>
- name
Regex String - output
File String - status String
Supporting Types
GetEcsStorageCapacityUnitsUnit
- Allocation
Status string When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- Capacity int
The capacity of the Storage Capacity Unit.
- Create
Time string The time when the Storage Capacity Unit was created.
- Description string
The description of the Storage Capacity Unit.
- Expired
Time string The time when the Storage Capacity Unit expires.
- Id string
The ID of the Storage Capacity Unit.
- Start
Time string The effective time of the Storage Capacity Unit.
- Status string
The status of Storage Capacity Unit.
- Storage
Capacity stringUnit Id The ID of Storage Capacity Unit.
- Storage
Capacity stringUnit Name The name of the Storage Capacity Unit.
- Allocation
Status string When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- Capacity int
The capacity of the Storage Capacity Unit.
- Create
Time string The time when the Storage Capacity Unit was created.
- Description string
The description of the Storage Capacity Unit.
- Expired
Time string The time when the Storage Capacity Unit expires.
- Id string
The ID of the Storage Capacity Unit.
- Start
Time string The effective time of the Storage Capacity Unit.
- Status string
The status of Storage Capacity Unit.
- Storage
Capacity stringUnit Id The ID of Storage Capacity Unit.
- Storage
Capacity stringUnit Name The name of the Storage Capacity Unit.
- allocation
Status String When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- capacity Integer
The capacity of the Storage Capacity Unit.
- create
Time String The time when the Storage Capacity Unit was created.
- description String
The description of the Storage Capacity Unit.
- expired
Time String The time when the Storage Capacity Unit expires.
- id String
The ID of the Storage Capacity Unit.
- start
Time String The effective time of the Storage Capacity Unit.
- status String
The status of Storage Capacity Unit.
- storage
Capacity StringUnit Id The ID of Storage Capacity Unit.
- storage
Capacity StringUnit Name The name of the Storage Capacity Unit.
- allocation
Status string When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- capacity number
The capacity of the Storage Capacity Unit.
- create
Time string The time when the Storage Capacity Unit was created.
- description string
The description of the Storage Capacity Unit.
- expired
Time string The time when the Storage Capacity Unit expires.
- id string
The ID of the Storage Capacity Unit.
- start
Time string The effective time of the Storage Capacity Unit.
- status string
The status of Storage Capacity Unit.
- storage
Capacity stringUnit Id The ID of Storage Capacity Unit.
- storage
Capacity stringUnit Name The name of the Storage Capacity Unit.
- allocation_
status str When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- capacity int
The capacity of the Storage Capacity Unit.
- create_
time str The time when the Storage Capacity Unit was created.
- description str
The description of the Storage Capacity Unit.
- expired_
time str The time when the Storage Capacity Unit expires.
- id str
The ID of the Storage Capacity Unit.
- start_
time str The effective time of the Storage Capacity Unit.
- status str
The status of Storage Capacity Unit.
- storage_
capacity_ strunit_ id The ID of Storage Capacity Unit.
- storage_
capacity_ strunit_ name The name of the Storage Capacity Unit.
- allocation
Status String When the AllocationType value is Shared, this parameter indicates the allocation status of Storage Capacity Unit. Valid values:
allocated
,Ignored
.- capacity Number
The capacity of the Storage Capacity Unit.
- create
Time String The time when the Storage Capacity Unit was created.
- description String
The description of the Storage Capacity Unit.
- expired
Time String The time when the Storage Capacity Unit expires.
- id String
The ID of the Storage Capacity Unit.
- start
Time String The effective time of the Storage Capacity Unit.
- status String
The status of Storage Capacity Unit.
- storage
Capacity StringUnit Id The ID of Storage Capacity Unit.
- storage
Capacity StringUnit Name The name of the Storage Capacity Unit.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.