AWS Classic

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

getComponents

Use this data source to get the ARNs and names of Image Builder Components matching the specified criteria.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.ImageBuilder.GetComponents.InvokeAsync(new Aws.ImageBuilder.GetComponentsArgs
        {
            Filters = 
            {
                new Aws.ImageBuilder.Inputs.GetComponentsFilterArgs
                {
                    Name = "platform",
                    Values = 
                    {
                        "Linux",
                    },
                },
            },
            Owner = "Self",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			Filters: []imagebuilder.GetComponentsFilter{
				imagebuilder.GetComponentsFilter{
					Name: "platform",
					Values: []string{
						"Linux",
					},
				},
			},
			Owner: pulumi.StringRef("Self"),
		}, 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 example = Output.of(ImagebuilderFunctions.getComponents(GetComponentsArgs.builder()
            .filters(GetComponentsFilter.builder()
                .name("platform")
                .values("Linux")
                .build())
            .owner("Self")
            .build()));

        }
}
import pulumi
import pulumi_aws as aws

example = aws.imagebuilder.get_components(filters=[aws.imagebuilder.GetComponentsFilterArgs(
        name="platform",
        values=["Linux"],
    )],
    owner="Self")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.imagebuilder.getComponents({
    filters: [{
        name: "platform",
        values: ["Linux"],
    }],
    owner: "Self",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:imagebuilder:getComponents
      Arguments:
        filters:
          - name: platform
            values:
              - Linux
        owner: Self

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,
                   opts: Optional[InvokeOptions] = None) -> GetComponentsResult
def get_components_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetComponentsFilterArgs]]]] = None,
                   owner: 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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:imagebuilder/getComponents:getComponents
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<GetComponentsFilter>

Configuration block(s) for filtering. Detailed below.

Owner string

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

Filters []GetComponentsFilter

Configuration block(s) for filtering. Detailed below.

Owner string

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

filters ListComponentsFilter>

Configuration block(s) for filtering. Detailed below.

owner String

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

filters GetComponentsFilter[]

Configuration block(s) for filtering. Detailed below.

owner string

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

filters Sequence[GetComponentsFilter]

Configuration block(s) for filtering. Detailed below.

owner str

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

filters List

Configuration block(s) for filtering. Detailed below.

owner String

The owner of the image recipes. Valid values are Self, Shared and Amazon. Defaults to Self.

getComponents Result

The following output properties are available:

Arns List<string>

Set of ARNs of the matched Image Builder Components.

Id string

The provider-assigned unique ID for this managed resource.

Names List<string>

Set of names of the matched Image Builder Components.

Filters List<GetComponentsFilter>
Owner string
Arns []string

Set of ARNs of the matched Image Builder Components.

Id string

The provider-assigned unique ID for this managed resource.

Names []string

Set of names of the matched Image Builder Components.

Filters []GetComponentsFilter
Owner string
arns List

Set of ARNs of the matched Image Builder Components.

id String

The provider-assigned unique ID for this managed resource.

names List

Set of names of the matched Image Builder Components.

filters ListComponentsFilter>
owner String
arns string[]

Set of ARNs of the matched Image Builder Components.

id string

The provider-assigned unique ID for this managed resource.

names string[]

Set of names of the matched Image Builder Components.

filters GetComponentsFilter[]
owner string
arns Sequence[str]

Set of ARNs of the matched Image Builder Components.

id str

The provider-assigned unique ID for this managed resource.

names Sequence[str]

Set of names of the matched Image Builder Components.

filters Sequence[GetComponentsFilter]
owner str
arns List

Set of ARNs of the matched Image Builder Components.

id String

The provider-assigned unique ID for this managed resource.

names List

Set of names of the matched Image Builder Components.

filters List
owner String

Supporting Types

GetComponentsFilter

Name string

The 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

The 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

The name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.

values List

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name string

The 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

The 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

The name of the filter field. Valid values can be found in the Image Builder ListComponents API Reference.

values List

Set of values that are accepted for the given filter field. Results will be selected if any given value 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.