aws.lambda.RuntimeManagementConfig
Explore with Pulumi AI
Resource for managing an AWS Lambda Runtime Management Config.
Refer to the AWS Lambda documentation for supported runtimes.
Deletion of this resource returns the runtime update mode to
Auto
(the default behavior). To leave the configured runtime management options in-place, use aremoved
block with the destroy lifecycle set tofalse
.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.RuntimeManagementConfig("example", {
functionName: test.functionName,
updateRuntimeOn: "FunctionUpdate",
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.RuntimeManagementConfig("example",
function_name=test["functionName"],
update_runtime_on="FunctionUpdate")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewRuntimeManagementConfig(ctx, "example", &lambda.RuntimeManagementConfigArgs{
FunctionName: pulumi.Any(test.FunctionName),
UpdateRuntimeOn: pulumi.String("FunctionUpdate"),
})
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 = new Aws.Lambda.RuntimeManagementConfig("example", new()
{
FunctionName = test.FunctionName,
UpdateRuntimeOn = "FunctionUpdate",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.RuntimeManagementConfig;
import com.pulumi.aws.lambda.RuntimeManagementConfigArgs;
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) {
var example = new RuntimeManagementConfig("example", RuntimeManagementConfigArgs.builder()
.functionName(test.functionName())
.updateRuntimeOn("FunctionUpdate")
.build());
}
}
resources:
example:
type: aws:lambda:RuntimeManagementConfig
properties:
functionName: ${test.functionName}
updateRuntimeOn: FunctionUpdate
Manual
Update
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lambda.RuntimeManagementConfig("example", {
functionName: test.functionName,
updateRuntimeOn: "Manual",
runtimeVersionArn: "arn:aws:lambda:us-east-1::runtime:abcd1234",
});
import pulumi
import pulumi_aws as aws
example = aws.lambda_.RuntimeManagementConfig("example",
function_name=test["functionName"],
update_runtime_on="Manual",
runtime_version_arn="arn:aws:lambda:us-east-1::runtime:abcd1234")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lambda.NewRuntimeManagementConfig(ctx, "example", &lambda.RuntimeManagementConfigArgs{
FunctionName: pulumi.Any(test.FunctionName),
UpdateRuntimeOn: pulumi.String("Manual"),
RuntimeVersionArn: pulumi.String("arn:aws:lambda:us-east-1::runtime:abcd1234"),
})
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 = new Aws.Lambda.RuntimeManagementConfig("example", new()
{
FunctionName = test.FunctionName,
UpdateRuntimeOn = "Manual",
RuntimeVersionArn = "arn:aws:lambda:us-east-1::runtime:abcd1234",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.RuntimeManagementConfig;
import com.pulumi.aws.lambda.RuntimeManagementConfigArgs;
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) {
var example = new RuntimeManagementConfig("example", RuntimeManagementConfigArgs.builder()
.functionName(test.functionName())
.updateRuntimeOn("Manual")
.runtimeVersionArn("arn:aws:lambda:us-east-1::runtime:abcd1234")
.build());
}
}
resources:
example:
type: aws:lambda:RuntimeManagementConfig
properties:
functionName: ${test.functionName}
updateRuntimeOn: Manual
runtimeVersionArn: arn:aws:lambda:us-east-1::runtime:abcd1234
Once the runtime update mode is set to
Manual
, theaws.lambda.Function
runtime
cannot be updated. To upgrade a runtime, theupdate_runtime_on
argument must be set toAuto
orFunctionUpdate
prior to changing the function’sruntime
argument.
Create RuntimeManagementConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RuntimeManagementConfig(name: string, args: RuntimeManagementConfigArgs, opts?: CustomResourceOptions);
@overload
def RuntimeManagementConfig(resource_name: str,
args: RuntimeManagementConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RuntimeManagementConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_name: Optional[str] = None,
qualifier: Optional[str] = None,
runtime_version_arn: Optional[str] = None,
update_runtime_on: Optional[str] = None)
func NewRuntimeManagementConfig(ctx *Context, name string, args RuntimeManagementConfigArgs, opts ...ResourceOption) (*RuntimeManagementConfig, error)
public RuntimeManagementConfig(string name, RuntimeManagementConfigArgs args, CustomResourceOptions? opts = null)
public RuntimeManagementConfig(String name, RuntimeManagementConfigArgs args)
public RuntimeManagementConfig(String name, RuntimeManagementConfigArgs args, CustomResourceOptions options)
type: aws:lambda:RuntimeManagementConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RuntimeManagementConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuntimeManagementConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuntimeManagementConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuntimeManagementConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuntimeManagementConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var runtimeManagementConfigResource = new Aws.Lambda.RuntimeManagementConfig("runtimeManagementConfigResource", new()
{
FunctionName = "string",
Qualifier = "string",
RuntimeVersionArn = "string",
UpdateRuntimeOn = "string",
});
example, err := lambda.NewRuntimeManagementConfig(ctx, "runtimeManagementConfigResource", &lambda.RuntimeManagementConfigArgs{
FunctionName: pulumi.String("string"),
Qualifier: pulumi.String("string"),
RuntimeVersionArn: pulumi.String("string"),
UpdateRuntimeOn: pulumi.String("string"),
})
var runtimeManagementConfigResource = new RuntimeManagementConfig("runtimeManagementConfigResource", RuntimeManagementConfigArgs.builder()
.functionName("string")
.qualifier("string")
.runtimeVersionArn("string")
.updateRuntimeOn("string")
.build());
runtime_management_config_resource = aws.lambda_.RuntimeManagementConfig("runtimeManagementConfigResource",
function_name="string",
qualifier="string",
runtime_version_arn="string",
update_runtime_on="string")
const runtimeManagementConfigResource = new aws.lambda.RuntimeManagementConfig("runtimeManagementConfigResource", {
functionName: "string",
qualifier: "string",
runtimeVersionArn: "string",
updateRuntimeOn: "string",
});
type: aws:lambda:RuntimeManagementConfig
properties:
functionName: string
qualifier: string
runtimeVersionArn: string
updateRuntimeOn: string
RuntimeManagementConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RuntimeManagementConfig resource accepts the following input properties:
- Function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- Qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - Runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - Update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- Function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- Qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - Runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - Update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Name String Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier String
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version StringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime StringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function_
name str Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier str
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime_
version_ strarn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update_
runtime_ stron - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Name String Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier String
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version StringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime StringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
Outputs
All input properties are implicitly available as output properties. Additionally, the RuntimeManagementConfig resource produces the following output properties:
- Function
Arn string - ARN of the function.
- Id string
- The provider-assigned unique ID for this managed resource.
- Function
Arn string - ARN of the function.
- Id string
- The provider-assigned unique ID for this managed resource.
- function
Arn String - ARN of the function.
- id String
- The provider-assigned unique ID for this managed resource.
- function
Arn string - ARN of the function.
- id string
- The provider-assigned unique ID for this managed resource.
- function_
arn str - ARN of the function.
- id str
- The provider-assigned unique ID for this managed resource.
- function
Arn String - ARN of the function.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RuntimeManagementConfig Resource
Get an existing RuntimeManagementConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RuntimeManagementConfigState, opts?: CustomResourceOptions): RuntimeManagementConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
function_arn: Optional[str] = None,
function_name: Optional[str] = None,
qualifier: Optional[str] = None,
runtime_version_arn: Optional[str] = None,
update_runtime_on: Optional[str] = None) -> RuntimeManagementConfig
func GetRuntimeManagementConfig(ctx *Context, name string, id IDInput, state *RuntimeManagementConfigState, opts ...ResourceOption) (*RuntimeManagementConfig, error)
public static RuntimeManagementConfig Get(string name, Input<string> id, RuntimeManagementConfigState? state, CustomResourceOptions? opts = null)
public static RuntimeManagementConfig get(String name, Output<String> id, RuntimeManagementConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Function
Arn string - ARN of the function.
- Function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- Qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - Runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - Update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- Function
Arn string - ARN of the function.
- Function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- Qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - Runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - Update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Arn String - ARN of the function.
- function
Name String Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier String
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version StringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime StringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Arn string - ARN of the function.
- function
Name string Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier string
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version stringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime stringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function_
arn str - ARN of the function.
- function_
name str Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier str
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime_
version_ strarn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update_
runtime_ stron - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
- function
Arn String - ARN of the function.
- function
Name String Name or ARN of the Lambda function.
The following arguments are optional:
- qualifier String
- Version of the function. This can be
$LATEST
or a published version number. If omitted, this resource will manage the runtime configuration for$LATEST
. - runtime
Version StringArn - ARN of the runtime version. Only required when
update_runtime_on
isManual
. - update
Runtime StringOn - Runtime update mode. Valid values are
Auto
,FunctionUpdate
, andManual
. When a function is created, the default mode isAuto
.
Import
Using pulumi import
, import Lambda Runtime Management Config using a comma-delimited string combining function_name
and qualifier
. For example:
$ pulumi import aws:lambda/runtimeManagementConfig:RuntimeManagementConfig example my-function,$LATEST
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.