AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.outposts.getAssets
Explore with Pulumi AI
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.
- Host
Id List<string>Filters - Filters by list of Host IDs of a Dedicated Host.
- Status
Id List<string>Filters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
- Arn string
- Outpost ARN.
- Host
Id []stringFilters - Filters by list of Host IDs of a Dedicated Host.
- Status
Id []stringFilters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
- arn String
- Outpost ARN.
- host
Id List<String>Filters - Filters by list of Host IDs of a Dedicated Host.
- status
Id List<String>Filters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
- arn string
- Outpost ARN.
- host
Id string[]Filters - Filters by list of Host IDs of a Dedicated Host.
- status
Id string[]Filters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
- arn str
- Outpost ARN.
- host_
id_ Sequence[str]filters - Filters by list of Host IDs of a Dedicated Host.
- status_
id_ Sequence[str]filters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
- arn String
- Outpost ARN.
- host
Id List<String>Filters - Filters by list of Host IDs of a Dedicated Host.
- status
Id List<String>Filters - Filters by list of state status. Valid values: "ACTIVE", "RETIRING".
getAssets Result
The following output properties are available:
- Arn string
- Asset
Ids 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.
- Host
Id List<string>Filters - Status
Id List<string>Filters
- Arn string
- Asset
Ids []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.
- Host
Id []stringFilters - Status
Id []stringFilters
- arn String
- asset
Ids 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.
- host
Id List<String>Filters - status
Id List<String>Filters
- arn string
- asset
Ids 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.
- host
Id string[]Filters - status
Id string[]Filters
- 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_ Sequence[str]filters - status_
id_ Sequence[str]filters
- arn String
- asset
Ids 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.
- host
Id List<String>Filters - status
Id List<String>Filters
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.