getAssets

Information about hardware assets in an Outpost.

Example Usage

Basic

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Outposts.GetAssets.Invoke(new()
    {
        Arn = data.Aws_outposts_outpost.Example.Arn,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = outposts.GetAssets(ctx, &outposts.GetAssetsArgs{
			Arn: data.Aws_outposts_outpost.Example.Arn,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.outposts.OutpostsFunctions;
import com.pulumi.aws.outposts.inputs.GetAssetsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

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

    public static void stack(Context ctx) {
        final var example = OutpostsFunctions.getAssets(GetAssetsArgs.builder()
            .arn(data.aws_outposts_outpost().example().arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.outposts.get_assets(arn=data["aws_outposts_outpost"]["example"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.outposts.getAssets({
    arn: data.aws_outposts_outpost.example.arn,
});
variables:
  example:
    fn::invoke:
      Function: aws:outposts:getAssets
      Arguments:
        arn: ${data.aws_outposts_outpost.example.arn}

With Host ID Filter

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Outposts.GetAssets.Invoke(new()
    {
        Arn = data.Aws_outposts_outpost.Example.Arn,
        HostIdFilters = new[]
        {
            "h-x38g5n0yd2a0ueb61",
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = outposts.GetAssets(ctx, &outposts.GetAssetsArgs{
			Arn: data.Aws_outposts_outpost.Example.Arn,
			HostIdFilters: []string{
				"h-x38g5n0yd2a0ueb61",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.outposts.OutpostsFunctions;
import com.pulumi.aws.outposts.inputs.GetAssetsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

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

    public static void stack(Context ctx) {
        final var example = OutpostsFunctions.getAssets(GetAssetsArgs.builder()
            .arn(data.aws_outposts_outpost().example().arn())
            .hostIdFilters("h-x38g5n0yd2a0ueb61")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.outposts.get_assets(arn=data["aws_outposts_outpost"]["example"]["arn"],
    host_id_filters=["h-x38g5n0yd2a0ueb61"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.outposts.getAssets({
    arn: data.aws_outposts_outpost.example.arn,
    hostIdFilters: ["h-x38g5n0yd2a0ueb61"],
});
variables:
  example:
    fn::invoke:
      Function: aws:outposts:getAssets
      Arguments:
        arn: ${data.aws_outposts_outpost.example.arn}
        hostIdFilters:
          - h-x38g5n0yd2a0ueb61

With Status ID Filter

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Outposts.GetAssets.Invoke(new()
    {
        Arn = data.Aws_outposts_outpost.Example.Arn,
        StatusIdFilters = new[]
        {
            "ACTIVE",
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = outposts.GetAssets(ctx, &outposts.GetAssetsArgs{
			Arn: data.Aws_outposts_outpost.Example.Arn,
			StatusIdFilters: []string{
				"ACTIVE",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.outposts.OutpostsFunctions;
import com.pulumi.aws.outposts.inputs.GetAssetsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

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

    public static void stack(Context ctx) {
        final var example = OutpostsFunctions.getAssets(GetAssetsArgs.builder()
            .arn(data.aws_outposts_outpost().example().arn())
            .statusIdFilters("ACTIVE")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.outposts.get_assets(arn=data["aws_outposts_outpost"]["example"]["arn"],
    status_id_filters=["ACTIVE"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.outposts.getAssets({
    arn: data.aws_outposts_outpost.example.arn,
    statusIdFilters: ["ACTIVE"],
});
variables:
  example:
    fn::invoke:
      Function: aws:outposts:getAssets
      Arguments:
        arn: ${data.aws_outposts_outpost.example.arn}
        statusIdFilters:
          - ACTIVE

Using getAssets

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 getAssets(args: GetAssetsArgs, opts?: InvokeOptions): Promise<GetAssetsResult>
function getAssetsOutput(args: GetAssetsOutputArgs, opts?: InvokeOptions): Output<GetAssetsResult>
def get_assets(arn: Optional[str] = None,
               host_id_filters: Optional[Sequence[str]] = None,
               status_id_filters: Optional[Sequence[str]] = None,
               opts: Optional[InvokeOptions] = None) -> GetAssetsResult
def get_assets_output(arn: Optional[pulumi.Input[str]] = None,
               host_id_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               status_id_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetAssetsResult]
func GetAssets(ctx *Context, args *GetAssetsArgs, opts ...InvokeOption) (*GetAssetsResult, error)
func GetAssetsOutput(ctx *Context, args *GetAssetsOutputArgs, opts ...InvokeOption) GetAssetsResultOutput

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

public static class GetAssets 
{
    public static Task<GetAssetsResult> InvokeAsync(GetAssetsArgs args, InvokeOptions? opts = null)
    public static Output<GetAssetsResult> Invoke(GetAssetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAssetsResult> getAssets(GetAssetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:outposts/getAssets:getAssets
  arguments:
    # arguments dictionary

The following arguments are supported:

Arn string

Outpost ARN.

HostIdFilters List<string>

Filters by list of Host IDs of a Dedicated Host.

StatusIdFilters List<string>

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

Arn string

Outpost ARN.

HostIdFilters []string

Filters by list of Host IDs of a Dedicated Host.

StatusIdFilters []string

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

arn String

Outpost ARN.

hostIdFilters List<String>

Filters by list of Host IDs of a Dedicated Host.

statusIdFilters List<String>

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

arn string

Outpost ARN.

hostIdFilters string[]

Filters by list of Host IDs of a Dedicated Host.

statusIdFilters string[]

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

arn str

Outpost ARN.

host_id_filters Sequence[str]

Filters by list of Host IDs of a Dedicated Host.

status_id_filters Sequence[str]

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

arn String

Outpost ARN.

hostIdFilters List<String>

Filters by list of Host IDs of a Dedicated Host.

statusIdFilters List<String>

Filters by list of state status. Valid values: "ACTIVE", "RETIRING".

getAssets Result

The following output properties are available:

Arn string
AssetIds List<string>

List of all the asset ids found. This data source will fail if none are found.

Id string

The provider-assigned unique ID for this managed resource.

HostIdFilters List<string>
StatusIdFilters List<string>
Arn string
AssetIds []string

List of all the asset ids found. This data source will fail if none are found.

Id string

The provider-assigned unique ID for this managed resource.

HostIdFilters []string
StatusIdFilters []string
arn String
assetIds List<String>

List of all the asset ids found. This data source will fail if none are found.

id String

The provider-assigned unique ID for this managed resource.

hostIdFilters List<String>
statusIdFilters List<String>
arn string
assetIds string[]

List of all the asset ids found. This data source will fail if none are found.

id string

The provider-assigned unique ID for this managed resource.

hostIdFilters string[]
statusIdFilters string[]
arn str
asset_ids Sequence[str]

List of all the asset ids found. This data source will fail if none are found.

id str

The provider-assigned unique ID for this managed resource.

host_id_filters Sequence[str]
status_id_filters Sequence[str]
arn String
assetIds List<String>

List of all the asset ids found. This data source will fail if none are found.

id String

The provider-assigned unique ID for this managed resource.

hostIdFilters List<String>
statusIdFilters List<String>

Package Details

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

This Pulumi package is based on the aws Terraform Provider.