import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a list of EC2 Dedicated Host IDs matching the provided filters. More information about Dedicated Hosts can be found in the [EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html). * * ## Example Usage * * ### Filter by instance type * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getHosts({ * filters: [ * { * name: "instance-type", * values: ["c5.large"], * }, * { * name: "state", * values: ["available"], * }, * ], * }); * ``` * * ### Filter by Outpost ARN * * The `outpostArn` argument applies a client-side filter because the `DescribeHosts` API does not support `outpost-arn` as a server-side filter. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const outpost = aws.ec2.getHosts({ * filters: [{ * name: "state", * values: ["available"], * }], * outpostArn: example.arn, * }); * ``` */ export declare function getHosts(args?: GetHostsArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getHosts. */ export interface GetHostsArgs { /** * One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeHosts.html) for supported filters. Detailed below. */ filters?: inputs.ec2.GetHostsFilter[]; /** * ARN of the AWS Outpost. Filters results client-side to only include hosts allocated on this Outpost. */ outpostArn?: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; /** * Key-value map of resource tags, each pair of which must exactly match a pair on the desired Dedicated Hosts. */ tags?: { [key: string]: string; }; } /** * A collection of values returned by getHosts. */ export interface GetHostsResult { readonly filters?: outputs.ec2.GetHostsFilter[]; /** * List of EC2 Dedicated Host identifiers. */ readonly ids: string[]; readonly outpostArn?: string; readonly region: string; readonly tags?: { [key: string]: string; }; } /** * Provides a list of EC2 Dedicated Host IDs matching the provided filters. More information about Dedicated Hosts can be found in the [EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html). * * ## Example Usage * * ### Filter by instance type * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getHosts({ * filters: [ * { * name: "instance-type", * values: ["c5.large"], * }, * { * name: "state", * values: ["available"], * }, * ], * }); * ``` * * ### Filter by Outpost ARN * * The `outpostArn` argument applies a client-side filter because the `DescribeHosts` API does not support `outpost-arn` as a server-side filter. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const outpost = aws.ec2.getHosts({ * filters: [{ * name: "state", * values: ["available"], * }], * outpostArn: example.arn, * }); * ``` */ export declare function getHostsOutput(args?: GetHostsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getHosts. */ export interface GetHostsOutputArgs { /** * One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeHosts.html) for supported filters. Detailed below. */ filters?: pulumi.Input[] | undefined>; /** * ARN of the AWS Outpost. Filters results client-side to only include hosts allocated on this Outpost. */ outpostArn?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Key-value map of resource tags, each pair of which must exactly match a pair on the desired Dedicated Hosts. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=getHosts.d.ts.map