1. Packages
  2. AWS
  3. API Docs
  4. imagebuilder
  5. getContainerRecipes
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.imagebuilder.getContainerRecipes

Explore with Pulumi AI

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.imagebuilder.getContainerRecipes({
    owner: "Self",
    filters: [{
        name: "platform",
        values: ["Linux"],
    }],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.imagebuilder.get_container_recipes(owner="Self",
    filters=[{
        "name": "platform",
        "values": ["Linux"],
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/imagebuilder"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := imagebuilder.GetContainerRecipes(ctx, &imagebuilder.GetContainerRecipesArgs{
			Owner: pulumi.StringRef("Self"),
			Filters: []imagebuilder.GetContainerRecipesFilter{
				{
					Name: "platform",
					Values: []string{
						"Linux",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.ImageBuilder.GetContainerRecipes.Invoke(new()
    {
        Owner = "Self",
        Filters = new[]
        {
            new Aws.ImageBuilder.Inputs.GetContainerRecipesFilterInputArgs
            {
                Name = "platform",
                Values = new[]
                {
                    "Linux",
                },
            },
        },
    });

});
Copy
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.GetContainerRecipesArgs;
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.getContainerRecipes(GetContainerRecipesArgs.builder()
            .owner("Self")
            .filters(GetContainerRecipesFilterArgs.builder()
                .name("platform")
                .values("Linux")
                .build())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:imagebuilder:getContainerRecipes
      arguments:
        owner: Self
        filters:
          - name: platform
            values:
              - Linux
Copy

Using getContainerRecipes

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 getContainerRecipes(args: GetContainerRecipesArgs, opts?: InvokeOptions): Promise<GetContainerRecipesResult>
function getContainerRecipesOutput(args: GetContainerRecipesOutputArgs, opts?: InvokeOptions): Output<GetContainerRecipesResult>
Copy
def get_container_recipes(filters: Optional[Sequence[GetContainerRecipesFilter]] = None,
                          owner: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetContainerRecipesResult
def get_container_recipes_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetContainerRecipesFilterArgs]]]] = None,
                          owner: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetContainerRecipesResult]
Copy
func GetContainerRecipes(ctx *Context, args *GetContainerRecipesArgs, opts ...InvokeOption) (*GetContainerRecipesResult, error)
func GetContainerRecipesOutput(ctx *Context, args *GetContainerRecipesOutputArgs, opts ...InvokeOption) GetContainerRecipesResultOutput
Copy

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

public static class GetContainerRecipes 
{
    public static Task<GetContainerRecipesResult> InvokeAsync(GetContainerRecipesArgs args, InvokeOptions? opts = null)
    public static Output<GetContainerRecipesResult> Invoke(GetContainerRecipesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetContainerRecipesResult> getContainerRecipes(GetContainerRecipesArgs args, InvokeOptions options)
public static Output<GetContainerRecipesResult> getContainerRecipes(GetContainerRecipesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:imagebuilder/getContainerRecipes:getContainerRecipes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetContainerRecipesFilter>
Configuration block(s) for filtering. Detailed below.
Owner string
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.
Filters []GetContainerRecipesFilter
Configuration block(s) for filtering. Detailed below.
Owner string
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.
filters List<GetContainerRecipesFilter>
Configuration block(s) for filtering. Detailed below.
owner String
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.
filters GetContainerRecipesFilter[]
Configuration block(s) for filtering. Detailed below.
owner string
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.
filters Sequence[GetContainerRecipesFilter]
Configuration block(s) for filtering. Detailed below.
owner str
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.
filters List<Property Map>
Configuration block(s) for filtering. Detailed below.
owner String
Owner of the container recipes. Valid values are Self, Shared, Amazon and ThirdParty. Defaults to Self.

getContainerRecipes Result

The following output properties are available:

Arns List<string>
Set of ARNs of the matched Image Builder Container Recipes.
Id string
The provider-assigned unique ID for this managed resource.
Names List<string>
Set of names of the matched Image Builder Container Recipes.
Filters List<GetContainerRecipesFilter>
Owner string
Arns []string
Set of ARNs of the matched Image Builder Container Recipes.
Id string
The provider-assigned unique ID for this managed resource.
Names []string
Set of names of the matched Image Builder Container Recipes.
Filters []GetContainerRecipesFilter
Owner string
arns List<String>
Set of ARNs of the matched Image Builder Container Recipes.
id String
The provider-assigned unique ID for this managed resource.
names List<String>
Set of names of the matched Image Builder Container Recipes.
filters List<GetContainerRecipesFilter>
owner String
arns string[]
Set of ARNs of the matched Image Builder Container Recipes.
id string
The provider-assigned unique ID for this managed resource.
names string[]
Set of names of the matched Image Builder Container Recipes.
filters GetContainerRecipesFilter[]
owner string
arns Sequence[str]
Set of ARNs of the matched Image Builder Container Recipes.
id str
The provider-assigned unique ID for this managed resource.
names Sequence[str]
Set of names of the matched Image Builder Container Recipes.
filters Sequence[GetContainerRecipesFilter]
owner str
arns List<String>
Set of ARNs of the matched Image Builder Container Recipes.
id String
The provider-assigned unique ID for this managed resource.
names List<String>
Set of names of the matched Image Builder Container Recipes.
filters List<Property Map>
owner String

Supporting Types

GetContainerRecipesFilter

Name This property is required. string
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
Values This property is required. List<string>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Name This property is required. string
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
Values This property is required. []string
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
name This property is required. String
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
values This property is required. List<String>
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
name This property is required. string
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
values This property is required. string[]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
name This property is required. str
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
values This property is required. Sequence[str]
Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
name This property is required. String
Name of the filter field. Valid values can be found in the Image Builder ListContainerRecipes API Reference.
values This property is required. 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 aws Terraform Provider.