1. Packages
  2. AWS Classic
  3. API Docs
  4. outposts
  5. getAssets

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.outposts.getAssets

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Information about hardware assets in an Outpost.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.outposts.getAssets({
        arn: exampleAwsOutpostsOutpost.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.outposts.get_assets(arn=example_aws_outposts_outpost["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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: exampleAwsOutpostsOutpost.Arn,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Outposts.GetAssets.Invoke(new()
        {
            Arn = exampleAwsOutpostsOutpost.Arn,
        });
    
    });
    
    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(exampleAwsOutpostsOutpost.arn())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:outposts:getAssets
          Arguments:
            arn: ${exampleAwsOutpostsOutpost.arn}
    

    With Host ID Filter

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.outposts.getAssets({
        arn: exampleAwsOutpostsOutpost.arn,
        hostIdFilters: ["h-x38g5n0yd2a0ueb61"],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.outposts.get_assets(arn=example_aws_outposts_outpost["arn"],
        host_id_filters=["h-x38g5n0yd2a0ueb61"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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: exampleAwsOutpostsOutpost.Arn,
    			HostIdFilters: []string{
    				"h-x38g5n0yd2a0ueb61",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Outposts.GetAssets.Invoke(new()
        {
            Arn = exampleAwsOutpostsOutpost.Arn,
            HostIdFilters = new[]
            {
                "h-x38g5n0yd2a0ueb61",
            },
        });
    
    });
    
    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(exampleAwsOutpostsOutpost.arn())
                .hostIdFilters("h-x38g5n0yd2a0ueb61")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:outposts:getAssets
          Arguments:
            arn: ${exampleAwsOutpostsOutpost.arn}
            hostIdFilters:
              - h-x38g5n0yd2a0ueb61
    

    With Status ID Filter

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.outposts.getAssets({
        arn: exampleAwsOutpostsOutpost.arn,
        statusIdFilters: ["ACTIVE"],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.outposts.get_assets(arn=example_aws_outposts_outpost["arn"],
        status_id_filters=["ACTIVE"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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: exampleAwsOutpostsOutpost.Arn,
    			StatusIdFilters: []string{
    				"ACTIVE",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Outposts.GetAssets.Invoke(new()
        {
            Arn = exampleAwsOutpostsOutpost.Arn,
            StatusIdFilters = new[]
            {
                "ACTIVE",
            },
        });
    
    });
    
    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(exampleAwsOutpostsOutpost.arn())
                .statusIdFilters("ACTIVE")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:outposts:getAssets
          Arguments:
            arn: ${exampleAwsOutpostsOutpost.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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi