Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine
volcengine.ecs.getAvailableResources
Explore with Pulumi AI
Use this data source to query detailed information of ecs available resources
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
const foo = volcengine.ecs.getAvailableResources({
destinationResource: "InstanceType",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.ecs.get_available_resources(destination_resource="InstanceType")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.GetAvailableResources(ctx, &ecs.GetAvailableResourcesArgs{
DestinationResource: "InstanceType",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = Volcengine.Ecs.GetAvailableResources.Invoke(new()
{
DestinationResource = "InstanceType",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetAvailableResourcesArgs;
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 foo = EcsFunctions.getAvailableResources(GetAvailableResourcesArgs.builder()
.destinationResource("InstanceType")
.build());
}
}
variables:
foo:
fn::invoke:
Function: volcengine:ecs:getAvailableResources
Arguments:
destinationResource: InstanceType
Using getAvailableResources
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 getAvailableResources(args: GetAvailableResourcesArgs, opts?: InvokeOptions): Promise<GetAvailableResourcesResult>
function getAvailableResourcesOutput(args: GetAvailableResourcesOutputArgs, opts?: InvokeOptions): Output<GetAvailableResourcesResult>
def get_available_resources(destination_resource: Optional[str] = None,
instance_charge_type: Optional[str] = None,
instance_type_id: Optional[str] = None,
output_file: Optional[str] = None,
spot_strategy: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAvailableResourcesResult
def get_available_resources_output(destination_resource: Optional[pulumi.Input[str]] = None,
instance_charge_type: Optional[pulumi.Input[str]] = None,
instance_type_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
spot_strategy: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAvailableResourcesResult]
func GetAvailableResources(ctx *Context, args *GetAvailableResourcesArgs, opts ...InvokeOption) (*GetAvailableResourcesResult, error)
func GetAvailableResourcesOutput(ctx *Context, args *GetAvailableResourcesOutputArgs, opts ...InvokeOption) GetAvailableResourcesResultOutput
> Note: This function is named GetAvailableResources
in the Go SDK.
public static class GetAvailableResources
{
public static Task<GetAvailableResourcesResult> InvokeAsync(GetAvailableResourcesArgs args, InvokeOptions? opts = null)
public static Output<GetAvailableResourcesResult> Invoke(GetAvailableResourcesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAvailableResourcesResult> getAvailableResources(GetAvailableResourcesArgs args, InvokeOptions options)
public static Output<GetAvailableResourcesResult> getAvailableResources(GetAvailableResourcesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:ecs/getAvailableResources:getAvailableResources
arguments:
# arguments dictionary
The following arguments are supported:
- Destination
Resource string - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - Instance
Charge stringType - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - Instance
Type stringId - The id of instance type.
- Output
File string - File name where to save data source results.
- Spot
Strategy string - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - Zone
Id string - The id of available zone.
- Destination
Resource string - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - Instance
Charge stringType - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - Instance
Type stringId - The id of instance type.
- Output
File string - File name where to save data source results.
- Spot
Strategy string - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - Zone
Id string - The id of available zone.
- destination
Resource String - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - instance
Charge StringType - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - instance
Type StringId - The id of instance type.
- output
File String - File name where to save data source results.
- spot
Strategy String - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - zone
Id String - The id of available zone.
- destination
Resource string - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - instance
Charge stringType - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - instance
Type stringId - The id of instance type.
- output
File string - File name where to save data source results.
- spot
Strategy string - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - zone
Id string - The id of available zone.
- destination_
resource str - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - instance_
charge_ strtype - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - instance_
type_ strid - The id of instance type.
- output_
file str - File name where to save data source results.
- spot_
strategy str - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - zone_
id str - The id of available zone.
- destination
Resource String - The type of resource to query. Valid values:
InstanceType
,DedicatedHost
. - instance
Charge StringType - The charge type of instance. Valid values:
PostPaid
,PrePaid
,ReservedInstance
. Default isPostPaid
. - instance
Type StringId - The id of instance type.
- output
File String - File name where to save data source results.
- spot
Strategy String - The spot strategy of PostPaid instance. Valid values:
NoSpot
,SpotAsPriceGo
. Default isNoSpot
. - zone
Id String - The id of available zone.
getAvailableResources Result
The following output properties are available:
- Available
Zones List<GetAvailable Resources Available Zone> - The collection of query.
- Destination
Resource string - Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Instance
Charge stringType - Instance
Type stringId - Output
File string - Spot
Strategy string - Zone
Id string - The id of the available zone.
- Available
Zones []GetAvailable Resources Available Zone - The collection of query.
- Destination
Resource string - Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Instance
Charge stringType - Instance
Type stringId - Output
File string - Spot
Strategy string - Zone
Id string - The id of the available zone.
- available
Zones List<GetAvailable Resources Available Zone> - The collection of query.
- destination
Resource String - id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- instance
Charge StringType - instance
Type StringId - output
File String - spot
Strategy String - zone
Id String - The id of the available zone.
- available
Zones GetAvailable Resources Available Zone[] - The collection of query.
- destination
Resource string - id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- instance
Charge stringType - instance
Type stringId - output
File string - spot
Strategy string - zone
Id string - The id of the available zone.
- available_
zones Sequence[GetAvailable Resources Available Zone] - The collection of query.
- destination_
resource str - id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- instance_
charge_ strtype - instance_
type_ strid - output_
file str - spot_
strategy str - zone_
id str - The id of the available zone.
- available
Zones List<Property Map> - The collection of query.
- destination
Resource String - id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- instance
Charge StringType - instance
Type StringId - output
File String - spot
Strategy String - zone
Id String - The id of the available zone.
Supporting Types
GetAvailableResourcesAvailableZone
- Available
Resources List<GetAvailable Resources Available Zone Available Resource> - The resource information of the available zone.
- Region
Id string - The id of the region.
- Status string
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - Zone
Id string - The id of available zone.
- Available
Resources []GetAvailable Resources Available Zone Available Resource - The resource information of the available zone.
- Region
Id string - The id of the region.
- Status string
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - Zone
Id string - The id of available zone.
- available
Resources List<GetAvailable Resources Available Zone Available Resource> - The resource information of the available zone.
- region
Id String - The id of the region.
- status String
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - zone
Id String - The id of available zone.
- available
Resources GetAvailable Resources Available Zone Available Resource[] - The resource information of the available zone.
- region
Id string - The id of the region.
- status string
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - zone
Id string - The id of available zone.
- available_
resources Sequence[GetAvailable Resources Available Zone Available Resource] - The resource information of the available zone.
- region_
id str - The id of the region.
- status str
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - zone_
id str - The id of available zone.
- available
Resources List<Property Map> - The resource information of the available zone.
- region
Id String - The id of the region.
- status String
- The resource status of the available zone. Valid values:
Available
,SoldOut
. - zone
Id String - The id of available zone.
GetAvailableResourcesAvailableZoneAvailableResource
- Supported
Resources List<GetAvailable Resources Available Zone Available Resource Supported Resource> - The supported resource information.
- Type string
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
- Supported
Resources []GetAvailable Resources Available Zone Available Resource Supported Resource - The supported resource information.
- Type string
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
- supported
Resources List<GetAvailable Resources Available Zone Available Resource Supported Resource> - The supported resource information.
- type String
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
- supported
Resources GetAvailable Resources Available Zone Available Resource Supported Resource[] - The supported resource information.
- type string
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
- supported_
resources Sequence[GetAvailable Resources Available Zone Available Resource Supported Resource] - The supported resource information.
- type str
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
- supported
Resources List<Property Map> - The supported resource information.
- type String
- The type of resource. Valid values:
InstanceType
,DedicatedHost
.
GetAvailableResourcesAvailableZoneAvailableResourceSupportedResource
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.