@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
200 lines (199 loc) • 5.71 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { output as outputs } from "../types";
/**
* Use this data source to get the list of the compute instances.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const nameRegex = config.requireObject("nameRegex");
* const test = huaweicloud.Ecs.getInstances({
* name: nameRegex,
* });
* ```
*/
export declare function getInstances(args?: GetInstancesArgs, opts?: pulumi.InvokeOptions): Promise<GetInstancesResult>;
/**
* A collection of arguments for invoking getInstances.
*/
export interface GetInstancesArgs {
/**
* Specifies the availability zone where the instance is located.
* Please following [reference](https://developer.huaweicloud.com/intl/en-us/endpoint?ECS) for this argument.
*/
availabilityZone?: string;
/**
* Specifies the enterprise project ID.
*/
enterpriseProjectId?: string;
/**
* Specifies the IPv4 addresses of the ECS.
*/
fixedIpV4?: string;
/**
* Specifies the flavor ID.
*/
flavorId?: string;
/**
* Specifies the flavor name of the instance.
*/
flavorName?: string;
/**
* Specifies the image ID of the instance.
*/
imageId?: string;
/**
* Specifies the ECS ID.
*/
instanceId?: string;
/**
* Specifies the key pair that is used to authenticate the instance.
*/
keyPair?: string;
/**
* Specifies the instance name, which can be queried with a regular expression.
* The instance name supports fuzzy matching query too.
*/
name?: string;
/**
* Specifies the region in which to obtain the instances.
* If omitted, the provider-level region will be used.
*/
region?: string;
/**
* Specifies the status of the instance. The valid values are as follows:
* + **ACTIVE**: The instance is running properly.
* + **SHUTOFF**: The instance has been properly stopped.
* + **ERROR**: An error has occurred on the instance.
*/
status?: string;
/**
* Specifies the tags to qurey the instances.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getInstances.
*/
export interface GetInstancesResult {
/**
* The availability zone where the instance is located.
*/
readonly availabilityZone?: string;
/**
* The enterprise project ID.
*/
readonly enterpriseProjectId?: string;
/**
* The fixed IPv4 address of the instance on this network.
*/
readonly fixedIpV4?: string;
/**
* The flavor ID.
*/
readonly flavorId?: string;
/**
* The flavor name of the instance.
*/
readonly flavorName?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The image ID of the instance.
*/
readonly imageId?: string;
readonly instanceId?: string;
/**
* List of ECS instance details. The object structure of each ECS instance is documented below.
*/
readonly instances: outputs.Ecs.GetInstancesInstance[];
/**
* The key pair that is used to authenticate the instance.
*/
readonly keyPair?: string;
/**
* The instance name.
*/
readonly name?: string;
readonly region?: string;
/**
* The instance status.
*/
readonly status?: string;
/**
* The key/value pairs to associate with the instance.
*/
readonly tags?: {
[key: string]: string;
};
}
export declare function getInstancesOutput(args?: GetInstancesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetInstancesResult>;
/**
* A collection of arguments for invoking getInstances.
*/
export interface GetInstancesOutputArgs {
/**
* Specifies the availability zone where the instance is located.
* Please following [reference](https://developer.huaweicloud.com/intl/en-us/endpoint?ECS) for this argument.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the IPv4 addresses of the ECS.
*/
fixedIpV4?: pulumi.Input<string>;
/**
* Specifies the flavor ID.
*/
flavorId?: pulumi.Input<string>;
/**
* Specifies the flavor name of the instance.
*/
flavorName?: pulumi.Input<string>;
/**
* Specifies the image ID of the instance.
*/
imageId?: pulumi.Input<string>;
/**
* Specifies the ECS ID.
*/
instanceId?: pulumi.Input<string>;
/**
* Specifies the key pair that is used to authenticate the instance.
*/
keyPair?: pulumi.Input<string>;
/**
* Specifies the instance name, which can be queried with a regular expression.
* The instance name supports fuzzy matching query too.
*/
name?: pulumi.Input<string>;
/**
* Specifies the region in which to obtain the instances.
* If omitted, the provider-level region will be used.
*/
region?: pulumi.Input<string>;
/**
* Specifies the status of the instance. The valid values are as follows:
* + **ACTIVE**: The instance is running properly.
* + **SHUTOFF**: The instance has been properly stopped.
* + **ERROR**: An error has occurred on the instance.
*/
status?: pulumi.Input<string>;
/**
* Specifies the tags to qurey the instances.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}