@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
147 lines (146 loc) • 4.46 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { output as outputs } from "../types";
/**
* Use this data source to get the available Compute Flavors.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const flavors = huaweicloud.Ecs.getFlavors({
* availabilityZone: "cn-north-1a",
* performanceType: "normal",
* cpuCoreCount: 2,
* memorySize: 4,
* });
* // Create ECS instance with the first matched flavor
* const instance = new huaweicloud.ecs.Instance("instance", {flavorId: flavors.then(flavors => flavors.ids?[0])});
* // Other properties...
* ```
*/
export declare function getFlavors(args?: GetFlavorsArgs, opts?: pulumi.InvokeOptions): Promise<GetFlavorsResult>;
/**
* A collection of arguments for invoking getFlavors.
*/
export interface GetFlavorsArgs {
/**
* Specifies the AZ name.
*/
availabilityZone?: string;
/**
* Specifies the number of vCPUs in the ECS flavor.
*/
cpuCoreCount?: number;
/**
* Specifies the generation of an ECS type. For example, **s3** indicates
* the general-purpose third-generation ECSs. For details, see
* [ECS Specifications](https://support.huaweicloud.com/intl/en-us/productdesc-ecs/ecs_01_0014.html).
*/
generation?: string;
/**
* Specifies the memory size(GB) in the ECS flavor.
*/
memorySize?: number;
/**
* Specifies the ECS flavor type. Possible values are as follows:
* + **normal**: General computing
* + **computingv3**: General computing-plus
* + **highmem**: Memory-optimized
* + **saphana**: Large-memory HANA ECS
* + **diskintensive**: Disk-intensive
*/
performanceType?: string;
/**
* The region in which to obtain the flavors.
* If omitted, the provider-level region will be used.
*/
region?: string;
/**
* Specifies the storage type.
*/
storageType?: string;
}
/**
* A collection of values returned by getFlavors.
*/
export interface GetFlavorsResult {
readonly availabilityZone?: string;
/**
* The number of vCPUs.
*/
readonly cpuCoreCount?: number;
/**
* List of ECS flavors details. The object structure of each flavor is documented below.
*/
readonly flavors: outputs.Ecs.GetFlavorsFlavor[];
/**
* The generation of the flavor.
*/
readonly generation?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* A list of flavor IDs.
*/
readonly ids: string[];
/**
* The memory size in GB.
*/
readonly memorySize?: number;
/**
* The performance type of the flavor.
*/
readonly performanceType?: string;
readonly region: string;
/**
* The storage type of the flavor.
*/
readonly storageType?: string;
}
export declare function getFlavorsOutput(args?: GetFlavorsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetFlavorsResult>;
/**
* A collection of arguments for invoking getFlavors.
*/
export interface GetFlavorsOutputArgs {
/**
* Specifies the AZ name.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Specifies the number of vCPUs in the ECS flavor.
*/
cpuCoreCount?: pulumi.Input<number>;
/**
* Specifies the generation of an ECS type. For example, **s3** indicates
* the general-purpose third-generation ECSs. For details, see
* [ECS Specifications](https://support.huaweicloud.com/intl/en-us/productdesc-ecs/ecs_01_0014.html).
*/
generation?: pulumi.Input<string>;
/**
* Specifies the memory size(GB) in the ECS flavor.
*/
memorySize?: pulumi.Input<number>;
/**
* Specifies the ECS flavor type. Possible values are as follows:
* + **normal**: General computing
* + **computingv3**: General computing-plus
* + **highmem**: Memory-optimized
* + **saphana**: Large-memory HANA ECS
* + **diskintensive**: Disk-intensive
*/
performanceType?: pulumi.Input<string>;
/**
* The region in which to obtain the flavors.
* If omitted, the provider-level region will be used.
*/
region?: pulumi.Input<string>;
/**
* Specifies the storage type.
*/
storageType?: pulumi.Input<string>;
}