AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

getDedicatedHost

Use this data source to get information about an EC2 Dedicated Host.

Example Usage

Filter Example

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.Ec2.GetDedicatedHost.InvokeAsync(new Aws.Ec2.GetDedicatedHostArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetDedicatedHostFilterArgs
                {
                    Name = "instance-type",
                    Values = 
                    {
                        "c5.18xlarge",
                    },
                },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.LookupDedicatedHost(ctx, &ec2.LookupDedicatedHostArgs{
			Filters: []ec2.GetDedicatedHostFilter{
				ec2.GetDedicatedHostFilter{
					Name: "instance-type",
					Values: []string{
						"c5.18xlarge",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(Ec2Functions.getDedicatedHost(GetDedicatedHostArgs.builder()
            .filters(GetDedicatedHostFilter.builder()
                .name("instance-type")
                .values("c5.18xlarge")
                .build())
            .build()));

        }
}
import pulumi
import pulumi_aws as aws

test = aws.ec2.get_dedicated_host(filters=[aws.ec2.GetDedicatedHostFilterArgs(
    name="instance-type",
    values=["c5.18xlarge"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = pulumi.output(aws.ec2.getDedicatedHost({
    filters: [{
        name: "instance-type",
        values: ["c5.18xlarge"],
    }],
}));
variables:
  test:
    Fn::Invoke:
      Function: aws:ec2:getDedicatedHost
      Arguments:
        filters:
          - name: instance-type
            values:
              - c5.18xlarge

Using getDedicatedHost

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 getDedicatedHost(args: GetDedicatedHostArgs, opts?: InvokeOptions): Promise<GetDedicatedHostResult>
function getDedicatedHostOutput(args: GetDedicatedHostOutputArgs, opts?: InvokeOptions): Output<GetDedicatedHostResult>
def get_dedicated_host(filters: Optional[Sequence[GetDedicatedHostFilter]] = None,
                       host_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDedicatedHostResult
def get_dedicated_host_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDedicatedHostFilterArgs]]]] = None,
                       host_id: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedHostResult]
func LookupDedicatedHost(ctx *Context, args *LookupDedicatedHostArgs, opts ...InvokeOption) (*LookupDedicatedHostResult, error)
func LookupDedicatedHostOutput(ctx *Context, args *LookupDedicatedHostOutputArgs, opts ...InvokeOption) LookupDedicatedHostResultOutput

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

public static class GetDedicatedHost 
{
    public static Task<GetDedicatedHostResult> InvokeAsync(GetDedicatedHostArgs args, InvokeOptions? opts = null)
    public static Output<GetDedicatedHostResult> Invoke(GetDedicatedHostInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDedicatedHostResult> getDedicatedHost(GetDedicatedHostArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2/getDedicatedHost:getDedicatedHost
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<Pulumi.Aws.Ec2.Inputs.GetDedicatedHostFilter>

Configuration block. Detailed below.

HostId string

The ID of the Dedicated Host.

Tags Dictionary<string, string>
Filters []GetDedicatedHostFilter

Configuration block. Detailed below.

HostId string

The ID of the Dedicated Host.

Tags map[string]string
filters ListDedicatedHostFilter>

Configuration block. Detailed below.

hostId String

The ID of the Dedicated Host.

tags Map
filters GetDedicatedHostFilter[]

Configuration block. Detailed below.

hostId string

The ID of the Dedicated Host.

tags {[key: string]: string}
filters Sequence[GetDedicatedHostFilter]

Configuration block. Detailed below.

host_id str

The ID of the Dedicated Host.

tags Mapping[str, str]
filters List

Configuration block. Detailed below.

hostId String

The ID of the Dedicated Host.

tags Map

getDedicatedHost Result

The following output properties are available:

Arn string

The ARN of the Dedicated Host.

AutoPlacement string

Whether auto-placement is on or off.

AvailabilityZone string

The Availability Zone of the Dedicated Host.

Cores int

The number of cores on the Dedicated Host.

HostId string
HostRecovery string

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

Id string

The provider-assigned unique ID for this managed resource.

InstanceFamily string

The instance family supported by the Dedicated Host. For example, "m5".

InstanceType string

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

OwnerId string

The ID of the AWS account that owns the Dedicated Host.

Sockets int

The number of sockets on the Dedicated Host.

Tags Dictionary<string, string>
TotalVcpus int

The total number of vCPUs on the Dedicated Host.

Filters List<Pulumi.Aws.Ec2.Outputs.GetDedicatedHostFilter>
Arn string

The ARN of the Dedicated Host.

AutoPlacement string

Whether auto-placement is on or off.

AvailabilityZone string

The Availability Zone of the Dedicated Host.

Cores int

The number of cores on the Dedicated Host.

HostId string
HostRecovery string

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

Id string

The provider-assigned unique ID for this managed resource.

InstanceFamily string

The instance family supported by the Dedicated Host. For example, "m5".

InstanceType string

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

OwnerId string

The ID of the AWS account that owns the Dedicated Host.

Sockets int

The number of sockets on the Dedicated Host.

Tags map[string]string
TotalVcpus int

The total number of vCPUs on the Dedicated Host.

Filters []GetDedicatedHostFilter
arn String

The ARN of the Dedicated Host.

autoPlacement String

Whether auto-placement is on or off.

availabilityZone String

The Availability Zone of the Dedicated Host.

cores Integer

The number of cores on the Dedicated Host.

hostId String
hostRecovery String

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

id String

The provider-assigned unique ID for this managed resource.

instanceFamily String

The instance family supported by the Dedicated Host. For example, "m5".

instanceType String

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

ownerId String

The ID of the AWS account that owns the Dedicated Host.

sockets Integer

The number of sockets on the Dedicated Host.

tags Map
totalVcpus Integer

The total number of vCPUs on the Dedicated Host.

filters ListDedicatedHostFilter>
arn string

The ARN of the Dedicated Host.

autoPlacement string

Whether auto-placement is on or off.

availabilityZone string

The Availability Zone of the Dedicated Host.

cores number

The number of cores on the Dedicated Host.

hostId string
hostRecovery string

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

id string

The provider-assigned unique ID for this managed resource.

instanceFamily string

The instance family supported by the Dedicated Host. For example, "m5".

instanceType string

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

ownerId string

The ID of the AWS account that owns the Dedicated Host.

sockets number

The number of sockets on the Dedicated Host.

tags {[key: string]: string}
totalVcpus number

The total number of vCPUs on the Dedicated Host.

filters GetDedicatedHostFilter[]
arn str

The ARN of the Dedicated Host.

auto_placement str

Whether auto-placement is on or off.

availability_zone str

The Availability Zone of the Dedicated Host.

cores int

The number of cores on the Dedicated Host.

host_id str
host_recovery str

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

id str

The provider-assigned unique ID for this managed resource.

instance_family str

The instance family supported by the Dedicated Host. For example, "m5".

instance_type str

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

owner_id str

The ID of the AWS account that owns the Dedicated Host.

sockets int

The number of sockets on the Dedicated Host.

tags Mapping[str, str]
total_vcpus int

The total number of vCPUs on the Dedicated Host.

filters Sequence[GetDedicatedHostFilter]
arn String

The ARN of the Dedicated Host.

autoPlacement String

Whether auto-placement is on or off.

availabilityZone String

The Availability Zone of the Dedicated Host.

cores Number

The number of cores on the Dedicated Host.

hostId String
hostRecovery String

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

id String

The provider-assigned unique ID for this managed resource.

instanceFamily String

The instance family supported by the Dedicated Host. For example, "m5".

instanceType String

The instance type supported by the Dedicated Host. For example, "m5.large". If the host supports multiple instance types, no instanceType is returned.

ownerId String

The ID of the AWS account that owns the Dedicated Host.

sockets Number

The number of sockets on the Dedicated Host.

tags Map
totalVcpus Number

The total number of vCPUs on the Dedicated Host.

filters List

Supporting Types

GetDedicatedHostFilter

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values List<string>

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values []string

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

name String

The name of the field to filter by, as defined by the underlying AWS API.

values List

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

name string

The name of the field to filter by, as defined by the underlying AWS API.

values string[]

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

name str

The name of the field to filter by, as defined by the underlying AWS API.

values Sequence[str]

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

name String

The name of the field to filter by, as defined by the underlying AWS API.

values List

Set of values that are accepted for the given field. A host will be selected if any one of the given values matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.