AWS Classic

v5.21.1 published on Thursday, Nov 17, 2022 by Pulumi

getImageRecipes

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.ImageBuilder.GetImageRecipes.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.ImageBuilder.Inputs.GetImageRecipesFilterInputArgs
            {
                Name = "platform",
                Values = new[]
                {
                    "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.GetImageRecipes(ctx, &imagebuilder.GetImageRecipesArgs{
			Filters: []imagebuilder.GetImageRecipesFilter{
				imagebuilder.GetImageRecipesFilter{
					Name: "platform",
					Values: []string{
						"Linux",
					},
				},
			},
			Owner: pulumi.StringRef("Self"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetImageRecipesArgs;
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.getImageRecipes(GetImageRecipesArgs.builder()
            .filters(GetImageRecipesFilterArgs.builder()
                .name("platform")
                .values("Linux")
                .build())
            .owner("Self")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

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

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

Using getImageRecipes

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 getImageRecipes(args: GetImageRecipesArgs, opts?: InvokeOptions): Promise<GetImageRecipesResult>
function getImageRecipesOutput(args: GetImageRecipesOutputArgs, opts?: InvokeOptions): Output<GetImageRecipesResult>
def get_image_recipes(filters: Optional[Sequence[GetImageRecipesFilter]] = None,
                      owner: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetImageRecipesResult
def get_image_recipes_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetImageRecipesFilterArgs]]]] = None,
                      owner: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetImageRecipesResult]
func GetImageRecipes(ctx *Context, args *GetImageRecipesArgs, opts ...InvokeOption) (*GetImageRecipesResult, error)
func GetImageRecipesOutput(ctx *Context, args *GetImageRecipesOutputArgs, opts ...InvokeOption) GetImageRecipesResultOutput

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

public static class GetImageRecipes 
{
    public static Task<GetImageRecipesResult> InvokeAsync(GetImageRecipesArgs args, InvokeOptions? opts = null)
    public static Output<GetImageRecipesResult> Invoke(GetImageRecipesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetImageRecipesResult> getImageRecipes(GetImageRecipesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:imagebuilder/getImageRecipes:getImageRecipes
  arguments:
    # arguments dictionary

The following arguments are supported:

Filters List<GetImageRecipesFilter>

Configuration block(s) for filtering. Detailed below.

Owner string

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

Filters []GetImageRecipesFilter

Configuration block(s) for filtering. Detailed below.

Owner string

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

filters List<GetImageRecipesFilter>

Configuration block(s) for filtering. Detailed below.

owner String

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

filters GetImageRecipesFilter[]

Configuration block(s) for filtering. Detailed below.

owner string

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

filters Sequence[GetImageRecipesFilter]

Configuration block(s) for filtering. Detailed below.

owner str

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

filters List<Property Map>

Configuration block(s) for filtering. Detailed below.

owner String

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

getImageRecipes Result

The following output properties are available:

Arns List<string>

Set of ARNs of the matched Image Builder Image Recipes.

Id string

The provider-assigned unique ID for this managed resource.

Names List<string>

Set of names of the matched Image Builder Image Recipes.

Filters List<GetImageRecipesFilter>
Owner string
Arns []string

Set of ARNs of the matched Image Builder Image Recipes.

Id string

The provider-assigned unique ID for this managed resource.

Names []string

Set of names of the matched Image Builder Image Recipes.

Filters []GetImageRecipesFilter
Owner string
arns List<String>

Set of ARNs of the matched Image Builder Image Recipes.

id String

The provider-assigned unique ID for this managed resource.

names List<String>

Set of names of the matched Image Builder Image Recipes.

filters List<GetImageRecipesFilter>
owner String
arns string[]

Set of ARNs of the matched Image Builder Image Recipes.

id string

The provider-assigned unique ID for this managed resource.

names string[]

Set of names of the matched Image Builder Image Recipes.

filters GetImageRecipesFilter[]
owner string
arns Sequence[str]

Set of ARNs of the matched Image Builder Image Recipes.

id str

The provider-assigned unique ID for this managed resource.

names Sequence[str]

Set of names of the matched Image Builder Image Recipes.

filters Sequence[GetImageRecipesFilter]
owner str
arns List<String>

Set of ARNs of the matched Image Builder Image Recipes.

id String

The provider-assigned unique ID for this managed resource.

names List<String>

Set of names of the matched Image Builder Image Recipes.

filters List<Property Map>
owner String

Supporting Types

GetImageRecipesFilter

Name string

Name of the filter field. Valid values can be found in the Image Builder ListImageRecipes 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 ListImageRecipes 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 ListImageRecipes 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 ListImageRecipes 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 ListImageRecipes 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 ListImageRecipes 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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.