@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
181 lines (180 loc) • 5.05 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { output as outputs } from "../types";
/**
* Use this data source to get the details of a specified compute instance.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const ecsName = config.requireObject("ecsName");
* const demo = huaweicloud.Ecs.getInstance({
* name: ecsName,
* });
* ```
*/
export declare function getInstance(args?: GetInstanceArgs, opts?: pulumi.InvokeOptions): Promise<GetInstanceResult>;
/**
* A collection of arguments for invoking getInstance.
*/
export interface GetInstanceArgs {
/**
* Specifies the enterprise project id.
*/
enterpriseProjectId?: string;
/**
* Specifies the IPv4 addresses of the ECS.
*/
fixedIpV4?: string;
/**
* Specifies the flavor ID.
*/
flavorId?: string;
/**
* Specifies the ECS ID.
*/
instanceId?: string;
/**
* Specifies the ECS name, which can be queried with a regular expression.
*/
name?: string;
/**
* The region in which to obtain the instance.
* If omitted, the provider-level region will be used.
*/
region?: string;
/**
* Specifies the tags to qurey the instance.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getInstance.
*/
export interface GetInstanceResult {
/**
* The availability zone where the instance is located.
*/
readonly availabilityZone: string;
/**
* The charging mode of the instance. Valid values are **prePaid**, **postPaid** and **spot**.
*/
readonly chargingMode: string;
readonly enterpriseProjectId: string;
/**
* The expired time of prePaid instance, in UTC format.
*/
readonly expiredTime: string;
/**
* The fixed IPv4 address of the instance on this network.
*/
readonly fixedIpV4?: string;
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;
/**
* The image name of the instance.
*/
readonly imageName: string;
readonly instanceId?: string;
/**
* The key pair that is used to authenticate the instance.
*/
readonly keyPair: string;
readonly name: string;
/**
* An array of one or more networks to attach to the instance.
* The network object structure is documented below.
*/
readonly networks: outputs.Ecs.GetInstanceNetwork[];
/**
* The EIP address that is associated to the instance.
*/
readonly publicIp: string;
readonly region: string;
/**
* The scheduler with hints on how the instance should be launched.
* The scheduler hints structure is documented below.
*/
readonly schedulerHints: outputs.Ecs.GetInstanceSchedulerHint[];
/**
* An array of one or more security group IDs to associate with the instance.
*/
readonly securityGroupIds: string[];
/**
* An array of one or more security groups to associate with the instance.
*/
readonly securityGroups: string[];
/**
* The status of the instance.
*/
readonly status: string;
/**
* The system disk volume ID.
*/
readonly systemDiskId: string;
readonly tags?: {
[key: string]: string;
};
/**
* The user data (information after encoding) configured during instance creation.
*/
readonly userData: string;
/**
* An array of one or more disks to attach to the instance.
* The volume attached object structure is documented below.
*/
readonly volumeAttacheds: outputs.Ecs.GetInstanceVolumeAttached[];
}
export declare function getInstanceOutput(args?: GetInstanceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetInstanceResult>;
/**
* A collection of arguments for invoking getInstance.
*/
export interface GetInstanceOutputArgs {
/**
* 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 ECS ID.
*/
instanceId?: pulumi.Input<string>;
/**
* Specifies the ECS name, which can be queried with a regular expression.
*/
name?: pulumi.Input<string>;
/**
* The region in which to obtain the instance.
* If omitted, the provider-level region will be used.
*/
region?: pulumi.Input<string>;
/**
* Specifies the tags to qurey the instance.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}