AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
aws.imagebuilder.getComponents
Start a Neo task
Explain and create an aws.imagebuilder.getComponents resource
Use this data source to get the ARNs and names of Image Builder Components matching the specified criteria.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.imagebuilder.getComponents({
owner: "Self",
filters: [{
name: "platform",
values: ["Linux"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.imagebuilder.get_components(owner="Self",
filters=[{
"name": "platform",
"values": ["Linux"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/imagebuilder"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := imagebuilder.GetComponents(ctx, &imagebuilder.GetComponentsArgs{
Owner: pulumi.StringRef("Self"),
Filters: []imagebuilder.GetComponentsFilter{
{
Name: "platform",
Values: []string{
"Linux",
},
},
},
}, 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.ImageBuilder.GetComponents.Invoke(new()
{
Owner = "Self",
Filters = new[]
{
new Aws.ImageBuilder.Inputs.GetComponentsFilterInputArgs
{
Name = "platform",
Values = new[]
{
"Linux",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.imagebuilder.ImagebuilderFunctions;
import com.pulumi.aws.imagebuilder.inputs.GetComponentsArgs;
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 = ImagebuilderFunctions.getComponents(GetComponentsArgs.builder()
.owner("Self")
.filters(GetComponentsFilterArgs.builder()
.name("platform")
.values("Linux")
.build())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:imagebuilder:getComponents
arguments:
owner: Self
filters:
- name: platform
values:
- Linux
Using getComponents
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 getComponents(args: GetComponentsArgs, opts?: InvokeOptions): Promise<GetComponentsResult>
function getComponentsOutput(args: GetComponentsOutputArgs, opts?: InvokeOptions): Output<GetComponentsResult>def get_components(filters: Optional[Sequence[GetComponentsFilter]] = None,
owner: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetComponentsResult
def get_components_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetComponentsFilterArgs]]]] = None,
owner: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComponentsResult]func GetComponents(ctx *Context, args *GetComponentsArgs, opts ...InvokeOption) (*GetComponentsResult, error)
func GetComponentsOutput(ctx *Context, args *GetComponentsOutputArgs, opts ...InvokeOption) GetComponentsResultOutput> Note: This function is named GetComponents in the Go SDK.
public static class GetComponents
{
public static Task<GetComponentsResult> InvokeAsync(GetComponentsArgs args, InvokeOptions? opts = null)
public static Output<GetComponentsResult> Invoke(GetComponentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetComponentsResult> getComponents(GetComponentsArgs args, InvokeOptions options)
public static Output<GetComponentsResult> getComponents(GetComponentsArgs args, InvokeOptions options)
fn::invoke:
function: aws:imagebuilder/getComponents:getComponents
arguments:
# arguments dictionaryThe following arguments are supported:
- Filters
List<Get
Components Filter> - Configuration block(s) for filtering. Detailed below.
- Owner string
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Filters
[]Get
Components Filter - Configuration block(s) for filtering. Detailed below.
- Owner string
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
List<Get
Components Filter> - Configuration block(s) for filtering. Detailed below.
- owner String
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
Get
Components Filter[] - Configuration block(s) for filtering. Detailed below.
- owner string
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
Sequence[Get
Components Filter] - Configuration block(s) for filtering. Detailed below.
- owner str
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters List<Property Map>
- Configuration block(s) for filtering. Detailed below.
- owner String
- Owner of the image recipes. Valid values are
Self,Shared,AmazonandThirdParty. Defaults toSelf. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
getComponents Result
The following output properties are available:
Supporting Types
GetComponentsFilter
- Name string
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- Values List<string>
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- Name string
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- Values []string
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name String
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- values List<String>
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name string
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- values string[]
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name str
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- values Sequence[str]
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
- name String
- Name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.
- values List<String>
- Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
