alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.ecs.getElasticityAssurances

Explore with Pulumi AI

This data source provides Ecs Elasticity Assurance available to the user.

NOTE: Available in 1.196.0+

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Ecs.GetElasticityAssurances.Invoke(new()
    {
        Ids = new[]
        {
            alicloud_ecs_elasticity_assurance.Default.Id,
        },
    });

    return new Dictionary<string, object?>
    {
        ["alicloudEcsElasticityAssuranceExampleId"] = @default.Apply(@default => @default.Apply(getElasticityAssurancesResult => getElasticityAssurancesResult.Assurances[0]?.Id)),
    };
});

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetElasticityAssurancesArgs;
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 default = EcsFunctions.getElasticityAssurances(GetElasticityAssurancesArgs.builder()
            .ids(alicloud_ecs_elasticity_assurance.default().id())
            .build());

        ctx.export("alicloudEcsElasticityAssuranceExampleId", default_.assurances()[0].id());
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecs.get_elasticity_assurances(ids=[alicloud_ecs_elasticity_assurance["default"]["id"]])
pulumi.export("alicloudEcsElasticityAssuranceExampleId", default.assurances[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const default = alicloud.ecs.getElasticityAssurances({
    ids: [alicloud_ecs_elasticity_assurance["default"].id],
});
export const alicloudEcsElasticityAssuranceExampleId = _default.then(_default => _default.assurances?.[0]?.id);
variables:
  default:
    fn::invoke:
      Function: alicloud:ecs:getElasticityAssurances
      Arguments:
        ids:
          - ${alicloud_ecs_elasticity_assurance.default.id}
outputs:
  alicloudEcsElasticityAssuranceExampleId: ${default.assurances[0].id}

Using getElasticityAssurances

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 getElasticityAssurances(args: GetElasticityAssurancesArgs, opts?: InvokeOptions): Promise<GetElasticityAssurancesResult>
function getElasticityAssurancesOutput(args: GetElasticityAssurancesOutputArgs, opts?: InvokeOptions): Output<GetElasticityAssurancesResult>
def get_elasticity_assurances(ids: Optional[Sequence[str]] = None,
                              output_file: Optional[str] = None,
                              private_pool_options_ids: Optional[Sequence[str]] = None,
                              resource_group_id: Optional[str] = None,
                              status: Optional[str] = None,
                              tags: Optional[Mapping[str, Any]] = None,
                              opts: Optional[InvokeOptions] = None) -> GetElasticityAssurancesResult
def get_elasticity_assurances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              private_pool_options_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              resource_group_id: Optional[pulumi.Input[str]] = None,
                              status: Optional[pulumi.Input[str]] = None,
                              tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetElasticityAssurancesResult]
func GetElasticityAssurances(ctx *Context, args *GetElasticityAssurancesArgs, opts ...InvokeOption) (*GetElasticityAssurancesResult, error)
func GetElasticityAssurancesOutput(ctx *Context, args *GetElasticityAssurancesOutputArgs, opts ...InvokeOption) GetElasticityAssurancesResultOutput

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

public static class GetElasticityAssurances 
{
    public static Task<GetElasticityAssurancesResult> InvokeAsync(GetElasticityAssurancesArgs args, InvokeOptions? opts = null)
    public static Output<GetElasticityAssurancesResult> Invoke(GetElasticityAssurancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetElasticityAssurancesResult> getElasticityAssurances(GetElasticityAssurancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ecs/getElasticityAssurances:getElasticityAssurances
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Elasticity Assurance IDs.

OutputFile string

File name where to save data source results (after running pulumi preview).

PrivatePoolOptionsIds List<string>

The ID of the elastic protection service.

ResourceGroupId string

The ID of the resource group.

Status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

Tags Dictionary<string, object>

The tag key-value pair information bound by the elastic guarantee service.

Ids []string

A list of Elasticity Assurance IDs.

OutputFile string

File name where to save data source results (after running pulumi preview).

PrivatePoolOptionsIds []string

The ID of the elastic protection service.

ResourceGroupId string

The ID of the resource group.

Status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

Tags map[string]interface{}

The tag key-value pair information bound by the elastic guarantee service.

ids List<String>

A list of Elasticity Assurance IDs.

outputFile String

File name where to save data source results (after running pulumi preview).

privatePoolOptionsIds List<String>

The ID of the elastic protection service.

resourceGroupId String

The ID of the resource group.

status String

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

tags Map<String,Object>

The tag key-value pair information bound by the elastic guarantee service.

ids string[]

A list of Elasticity Assurance IDs.

outputFile string

File name where to save data source results (after running pulumi preview).

privatePoolOptionsIds string[]

The ID of the elastic protection service.

resourceGroupId string

The ID of the resource group.

status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

tags {[key: string]: any}

The tag key-value pair information bound by the elastic guarantee service.

ids Sequence[str]

A list of Elasticity Assurance IDs.

output_file str

File name where to save data source results (after running pulumi preview).

private_pool_options_ids Sequence[str]

The ID of the elastic protection service.

resource_group_id str

The ID of the resource group.

status str

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

tags Mapping[str, Any]

The tag key-value pair information bound by the elastic guarantee service.

ids List<String>

A list of Elasticity Assurance IDs.

outputFile String

File name where to save data source results (after running pulumi preview).

privatePoolOptionsIds List<String>

The ID of the elastic protection service.

resourceGroupId String

The ID of the resource group.

status String

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

tags Map<Any>

The tag key-value pair information bound by the elastic guarantee service.

getElasticityAssurances Result

The following output properties are available:

Assurances List<Pulumi.AliCloud.Ecs.Outputs.GetElasticityAssurancesAssurance>

A list of Elasticity Assurance Entries. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of Elasticity Assurance IDs.

OutputFile string
PrivatePoolOptionsIds List<string>
ResourceGroupId string

The ID of the resource group.

Status string

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

Tags Dictionary<string, object>

A mapping of tags to assign to the Capacity Reservation.

Assurances []GetElasticityAssurancesAssurance

A list of Elasticity Assurance Entries. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of Elasticity Assurance IDs.

OutputFile string
PrivatePoolOptionsIds []string
ResourceGroupId string

The ID of the resource group.

Status string

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

Tags map[string]interface{}

A mapping of tags to assign to the Capacity Reservation.

assurances List<GetElasticityAssurancesAssurance>

A list of Elasticity Assurance Entries. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of Elasticity Assurance IDs.

outputFile String
privatePoolOptionsIds List<String>
resourceGroupId String

The ID of the resource group.

status String

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

tags Map<String,Object>

A mapping of tags to assign to the Capacity Reservation.

assurances GetElasticityAssurancesAssurance[]

A list of Elasticity Assurance Entries. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of Elasticity Assurance IDs.

outputFile string
privatePoolOptionsIds string[]
resourceGroupId string

The ID of the resource group.

status string

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

tags {[key: string]: any}

A mapping of tags to assign to the Capacity Reservation.

assurances Sequence[GetElasticityAssurancesAssurance]

A list of Elasticity Assurance Entries. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of Elasticity Assurance IDs.

output_file str
private_pool_options_ids Sequence[str]
resource_group_id str

The ID of the resource group.

status str

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

tags Mapping[str, Any]

A mapping of tags to assign to the Capacity Reservation.

assurances List<Property Map>

A list of Elasticity Assurance Entries. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of Elasticity Assurance IDs.

outputFile String
privatePoolOptionsIds List<String>
resourceGroupId String

The ID of the resource group.

status String

The status of flexible guarantee services. Possible values:-Preparing: in preparation.-Prepared: to take effect.-Active: in effect.-Released: Released.

tags Map<Any>

A mapping of tags to assign to the Capacity Reservation.

Supporting Types

GetElasticityAssurancesAssurance

AllocatedResources List<Pulumi.AliCloud.Ecs.Inputs.GetElasticityAssurancesAssuranceAllocatedResource>

Details of resource allocation.

Description string

Description of flexible guarantee service.

ElasticityAssuranceId string

The first ID of the resource

EndTime string

Flexible guarantee service failure time.

Id string

ID of flexible guarantee service.

InstanceChargeType string

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

PrivatePoolOptionsId string

The ID of the elasticity assurance.

PrivatePoolOptionsMatchCriteria string

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

PrivatePoolOptionsName string

The name of the elasticity assurance.

ResourceGroupId string

The ID of the resource group.

StartTime string

Flexible guarantee service effective time.

StartTimeType string

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

TotalAssuranceTimes string

The total number of flexible guarantee services.

UsedAssuranceTimes int

This parameter is not yet available.

Tags Dictionary<string, object>

The tag key-value pair information bound by the elastic guarantee service.

AllocatedResources []GetElasticityAssurancesAssuranceAllocatedResource

Details of resource allocation.

Description string

Description of flexible guarantee service.

ElasticityAssuranceId string

The first ID of the resource

EndTime string

Flexible guarantee service failure time.

Id string

ID of flexible guarantee service.

InstanceChargeType string

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

PrivatePoolOptionsId string

The ID of the elasticity assurance.

PrivatePoolOptionsMatchCriteria string

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

PrivatePoolOptionsName string

The name of the elasticity assurance.

ResourceGroupId string

The ID of the resource group.

StartTime string

Flexible guarantee service effective time.

StartTimeType string

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

Status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

TotalAssuranceTimes string

The total number of flexible guarantee services.

UsedAssuranceTimes int

This parameter is not yet available.

Tags map[string]interface{}

The tag key-value pair information bound by the elastic guarantee service.

allocatedResources List<GetElasticityAssurancesAssuranceAllocatedResource>

Details of resource allocation.

description String

Description of flexible guarantee service.

elasticityAssuranceId String

The first ID of the resource

endTime String

Flexible guarantee service failure time.

id String

ID of flexible guarantee service.

instanceChargeType String

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

privatePoolOptionsId String

The ID of the elasticity assurance.

privatePoolOptionsMatchCriteria String

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

privatePoolOptionsName String

The name of the elasticity assurance.

resourceGroupId String

The ID of the resource group.

startTime String

Flexible guarantee service effective time.

startTimeType String

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

totalAssuranceTimes String

The total number of flexible guarantee services.

usedAssuranceTimes Integer

This parameter is not yet available.

tags Map<String,Object>

The tag key-value pair information bound by the elastic guarantee service.

allocatedResources GetElasticityAssurancesAssuranceAllocatedResource[]

Details of resource allocation.

description string

Description of flexible guarantee service.

elasticityAssuranceId string

The first ID of the resource

endTime string

Flexible guarantee service failure time.

id string

ID of flexible guarantee service.

instanceChargeType string

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

privatePoolOptionsId string

The ID of the elasticity assurance.

privatePoolOptionsMatchCriteria string

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

privatePoolOptionsName string

The name of the elasticity assurance.

resourceGroupId string

The ID of the resource group.

startTime string

Flexible guarantee service effective time.

startTimeType string

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status string

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

totalAssuranceTimes string

The total number of flexible guarantee services.

usedAssuranceTimes number

This parameter is not yet available.

tags {[key: string]: any}

The tag key-value pair information bound by the elastic guarantee service.

allocated_resources Sequence[GetElasticityAssurancesAssuranceAllocatedResource]

Details of resource allocation.

description str

Description of flexible guarantee service.

elasticity_assurance_id str

The first ID of the resource

end_time str

Flexible guarantee service failure time.

id str

ID of flexible guarantee service.

instance_charge_type str

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

private_pool_options_id str

The ID of the elasticity assurance.

private_pool_options_match_criteria str

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

private_pool_options_name str

The name of the elasticity assurance.

resource_group_id str

The ID of the resource group.

start_time str

Flexible guarantee service effective time.

start_time_type str

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status str

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

total_assurance_times str

The total number of flexible guarantee services.

used_assurance_times int

This parameter is not yet available.

tags Mapping[str, Any]

The tag key-value pair information bound by the elastic guarantee service.

allocatedResources List<Property Map>

Details of resource allocation.

description String

Description of flexible guarantee service.

elasticityAssuranceId String

The first ID of the resource

endTime String

Flexible guarantee service failure time.

id String

ID of flexible guarantee service.

instanceChargeType String

The billing method of the instance. Possible value: PostPaid. Currently, only pay-as-you-go is supported.

privatePoolOptionsId String

The ID of the elasticity assurance.

privatePoolOptionsMatchCriteria String

The matching mode of flexible guarantee service. Possible values:-Open: flexible guarantee service for Open mode.-Target: specifies the flexible guarantee service of the mode.

privatePoolOptionsName String

The name of the elasticity assurance.

resourceGroupId String

The ID of the resource group.

startTime String

Flexible guarantee service effective time.

startTimeType String

Flexible guarantee effective way. Possible values:-Now: Effective immediately.-Later: the specified time takes effect.

status String

The status of flexible guarantee services. Possible values: All, Preparing, Prepared, Active, Released.

totalAssuranceTimes String

The total number of flexible guarantee services.

usedAssuranceTimes Number

This parameter is not yet available.

tags Map<Any>

The tag key-value pair information bound by the elastic guarantee service.

GetElasticityAssurancesAssuranceAllocatedResource

InstanceType string

Instance type.

TotalAmount int

The total number of instances that need to be reserved within an instance type.

UsedAmount int

The number of instances that have been used.

ZoneId string

The zone ID.

InstanceType string

Instance type.

TotalAmount int

The total number of instances that need to be reserved within an instance type.

UsedAmount int

The number of instances that have been used.

ZoneId string

The zone ID.

instanceType String

Instance type.

totalAmount Integer

The total number of instances that need to be reserved within an instance type.

usedAmount Integer

The number of instances that have been used.

zoneId String

The zone ID.

instanceType string

Instance type.

totalAmount number

The total number of instances that need to be reserved within an instance type.

usedAmount number

The number of instances that have been used.

zoneId string

The zone ID.

instance_type str

Instance type.

total_amount int

The total number of instances that need to be reserved within an instance type.

used_amount int

The number of instances that have been used.

zone_id str

The zone ID.

instanceType String

Instance type.

totalAmount Number

The total number of instances that need to be reserved within an instance type.

usedAmount Number

The number of instances that have been used.

zoneId String

The zone ID.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.