import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS Lambda MicroVMs Image. Use this resource to define the base image, application code, and runtime configuration from which MicroVMs are launched. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getPartition({}); * const currentGetRegion = aws.getRegion({}); * const example = new aws.iam.Role("example", { * name: "example", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "lambda.amazonaws.com", * }, * }], * }), * }); * const exampleBucket = new aws.s3.Bucket("example", {bucket: "example"}); * const exampleRolePolicy = new aws.iam.RolePolicy("example", { * name: "example", * role: example.id, * policy: pulumi.jsonStringify({ * Version: "2012-10-17", * Statement: [{ * Action: ["s3:GetObject"], * Effect: "Allow", * Resource: pulumi.interpolate`${exampleBucket.arn}/*`, * }], * }), * }); * const exampleBucketObjectv2 = new aws.s3.BucketObjectv2("example", { * bucket: exampleBucket.bucket, * key: "code.zip", * source: new pulumi.asset.FileAsset("code.zip"), * }); * const exampleImage = new aws.lambdamicrovms.Image("example", { * codeArtifact: { * uri: pulumi.interpolate`s3://${exampleBucket.bucket}/${exampleBucketObjectv2.key}`, * }, * name: "example", * baseImageArn: Promise.all([current, currentGetRegion]).then(([current, currentGetRegion]) => `arn:${current.partition}:lambda:${currentGetRegion.region}:aws:microvm-image:al2023-1`), * buildRoleArn: example.arn, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `arn` (String) ARN of the Lambda MicroVMs Image. * * Using `pulumi import`, import Lambda MicroVMs Image using the `arn`. For example: * * ```sh * $ pulumi import aws:lambda/microvmsImage:MicrovmsImage example arn:aws:lambda:us-east-1:123456789012:microvm-image:example * ``` * * @deprecated aws.lambda/microvmsimage.MicrovmsImage has been deprecated in favor of aws.lambdamicrovms/image.Image */ export declare class MicrovmsImage extends pulumi.CustomResource { /** * Get an existing MicrovmsImage resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: MicrovmsImageState, opts?: pulumi.CustomResourceOptions): MicrovmsImage; /** * Returns true if the given object is an instance of MicrovmsImage. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is MicrovmsImage; /** * List of additional OS capabilities granted to the MicroVM runtime environment. Valid values: `ALL`. */ readonly additionalOsCapabilities: pulumi.Output; /** * ARN of the Image. */ readonly arn: pulumi.Output; /** * ARN of the base MicroVM image. AWS-managed base images use ARNs of the form `arn:aws:lambda::aws:microvm-image:al2023-1`. */ readonly baseImageArn: pulumi.Output; /** * Major version number of the base MicroVM image to use (e.g., `1`). If omitted, the service selects a version. */ readonly baseImageVersion: pulumi.Output; /** * ARN of the IAM role used to build the image. The role must be assumable by `lambda.amazonaws.com` and have access to the code artifact. */ readonly buildRoleArn: pulumi.Output; /** * Code artifact containing the application code and metadata for the image. See below. */ readonly codeArtifact: pulumi.Output; /** * CPU configuration for the MicroVM. See `cpuConfiguration` Block below. */ readonly cpuConfigurations: pulumi.Output; /** * RFC3339 timestamp when the image was created. */ readonly createdAt: pulumi.Output; /** * Description of the MicroVM image. */ readonly description: pulumi.Output; /** * List of egress network connectors available to the MicroVM at runtime. Defaults to `["INTERNET_EGRESS"]`. */ readonly egressNetworkConnectors: pulumi.Output; /** * Map of environment variables set in the MicroVM runtime environment. */ readonly environmentVariables: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Current version of the image. */ readonly imageVersion: pulumi.Output; /** * Latest active version of the image. */ readonly latestActiveImageVersion: pulumi.Output; /** * Latest failed version of the image, if any. */ readonly latestFailedImageVersion: pulumi.Output; /** * Name of the MicroVM image. Changing this value creates a new resource. * * The following arguments are optional: */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Current state of the image (e.g., `CREATED`). */ readonly state: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * RFC3339 timestamp when the image was last updated. */ readonly updatedAt: pulumi.Output; /** * Create a MicrovmsImage resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ /** @deprecated aws.lambda/microvmsimage.MicrovmsImage has been deprecated in favor of aws.lambdamicrovms/image.Image */ constructor(name: string, args: MicrovmsImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MicrovmsImage resources. */ export interface MicrovmsImageState { /** * List of additional OS capabilities granted to the MicroVM runtime environment. Valid values: `ALL`. */ additionalOsCapabilities?: pulumi.Input[] | undefined>; /** * ARN of the Image. */ arn?: pulumi.Input; /** * ARN of the base MicroVM image. AWS-managed base images use ARNs of the form `arn:aws:lambda::aws:microvm-image:al2023-1`. */ baseImageArn?: pulumi.Input; /** * Major version number of the base MicroVM image to use (e.g., `1`). If omitted, the service selects a version. */ baseImageVersion?: pulumi.Input; /** * ARN of the IAM role used to build the image. The role must be assumable by `lambda.amazonaws.com` and have access to the code artifact. */ buildRoleArn?: pulumi.Input; /** * Code artifact containing the application code and metadata for the image. See below. */ codeArtifact?: pulumi.Input; /** * CPU configuration for the MicroVM. See `cpuConfiguration` Block below. */ cpuConfigurations?: pulumi.Input[] | undefined>; /** * RFC3339 timestamp when the image was created. */ createdAt?: pulumi.Input; /** * Description of the MicroVM image. */ description?: pulumi.Input; /** * List of egress network connectors available to the MicroVM at runtime. Defaults to `["INTERNET_EGRESS"]`. */ egressNetworkConnectors?: pulumi.Input[] | undefined>; /** * Map of environment variables set in the MicroVM runtime environment. */ environmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Current version of the image. */ imageVersion?: pulumi.Input; /** * Latest active version of the image. */ latestActiveImageVersion?: pulumi.Input; /** * Latest failed version of the image, if any. */ latestFailedImageVersion?: pulumi.Input; /** * Name of the MicroVM image. Changing this value creates a new resource. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Current state of the image (e.g., `CREATED`). */ state?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * RFC3339 timestamp when the image was last updated. */ updatedAt?: pulumi.Input; } /** * The set of arguments for constructing a MicrovmsImage resource. */ export interface MicrovmsImageArgs { /** * List of additional OS capabilities granted to the MicroVM runtime environment. Valid values: `ALL`. */ additionalOsCapabilities?: pulumi.Input[] | undefined>; /** * ARN of the base MicroVM image. AWS-managed base images use ARNs of the form `arn:aws:lambda::aws:microvm-image:al2023-1`. */ baseImageArn: pulumi.Input; /** * Major version number of the base MicroVM image to use (e.g., `1`). If omitted, the service selects a version. */ baseImageVersion?: pulumi.Input; /** * ARN of the IAM role used to build the image. The role must be assumable by `lambda.amazonaws.com` and have access to the code artifact. */ buildRoleArn: pulumi.Input; /** * Code artifact containing the application code and metadata for the image. See below. */ codeArtifact: pulumi.Input; /** * CPU configuration for the MicroVM. See `cpuConfiguration` Block below. */ cpuConfigurations?: pulumi.Input[] | undefined>; /** * Description of the MicroVM image. */ description?: pulumi.Input; /** * List of egress network connectors available to the MicroVM at runtime. Defaults to `["INTERNET_EGRESS"]`. */ egressNetworkConnectors?: pulumi.Input[] | undefined>; /** * Map of environment variables set in the MicroVM runtime environment. */ environmentVariables?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Name of the MicroVM image. Changing this value creates a new resource. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; } //# sourceMappingURL=microvmsImage.d.ts.map