Skip to content
v2.277.0

CfnWebFunctionRevisionProps Struct ​

Properties for defining a CfnWebFunctionRevision.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const cfnWebFunctionRevisionProps: lambda.CfnWebFunctionRevisionProps = {
  buildConfig: {
    codeConfig: {
      s3Object: {
        bucket: 'bucket',
        key: 'key',

        // the properties below are optional
        versionId: 'versionId',
      },
    },
    runtimeConfig: {
      runtime: 'runtime',
    },
  },
  functionName: 'functionName',
  serviceConfig: {
    executionRoleArn: 'executionRoleArn',

    // the properties below are optional
    egressNetworkConnectorArn: 'egressNetworkConnectorArn',
    environmentVariables: {
      environmentVariablesKey: 'environmentVariables',
    },
    maxConcurrencyPerEnvironment: 123,
    telemetryConfig: {
      loggingConfig: {
        applicationLogLevel: 'applicationLogLevel',
        logGroup: 'logGroup',
        systemLogLevel: 'systemLogLevel',
      },
    },
    timeoutSeconds: 123,
  },

  // the properties below are optional
  description: 'description',
  kmsKeyArn: 'kmsKeyArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

cfn_web_function_revision_props = lambda.CfnWebFunctionRevisionProps(
    build_config=lambda.CfnWebFunctionRevision.BuildConfigProperty(
        code_config=lambda.CfnWebFunctionRevision.CodeConfigProperty(
            s3_object=lambda.CfnWebFunctionRevision.S3ObjectProperty(
                bucket="bucket",
                key="key",

                # the properties below are optional
                version_id="versionId"
            )
        ),
        runtime_config=lambda.CfnWebFunctionRevision.RuntimeConfigProperty(
            runtime="runtime"
        )
    ),
    function_name="functionName",
    service_config=lambda.CfnWebFunctionRevision.ServiceConfigProperty(
        execution_role_arn="executionRoleArn",

        # the properties below are optional
        egress_network_connector_arn="egressNetworkConnectorArn",
        environment_variables={
            "environment_variables_key": "environmentVariables"
        },
        max_concurrency_per_environment=123,
        telemetry_config=lambda.CfnWebFunctionRevision.TelemetryConfigProperty(
            logging_config=lambda.CfnWebFunctionRevision.LoggingConfigProperty(
                application_log_level="applicationLogLevel",
                log_group="logGroup",
                system_log_level="systemLogLevel"
            )
        ),
        timeout_seconds=123
    ),

    # the properties below are optional
    description="description",
    kms_key_arn="kmsKeyArn"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

CfnWebFunctionRevisionProps cfnWebFunctionRevisionProps = CfnWebFunctionRevisionProps.builder()
        .buildConfig(BuildConfigProperty.builder()
                .codeConfig(CodeConfigProperty.builder()
                        .s3Object(S3ObjectProperty.builder()
                                .bucket("bucket")
                                .key("key")

                                // the properties below are optional
                                .versionId("versionId")
                                .build())
                        .build())
                .runtimeConfig(RuntimeConfigProperty.builder()
                        .runtime("runtime")
                        .build())
                .build())
        .functionName("functionName")
        .serviceConfig(ServiceConfigProperty.builder()
                .executionRoleArn("executionRoleArn")

                // the properties below are optional
                .egressNetworkConnectorArn("egressNetworkConnectorArn")
                .environmentVariables(Map.of(
                        "environmentVariablesKey", "environmentVariables"))
                .maxConcurrencyPerEnvironment(123)
                .telemetryConfig(TelemetryConfigProperty.builder()
                        .loggingConfig(LoggingConfigProperty.builder()
                                .applicationLogLevel("applicationLogLevel")
                                .logGroup("logGroup")
                                .systemLogLevel("systemLogLevel")
                                .build())
                        .build())
                .timeoutSeconds(123)
                .build())

        // the properties below are optional
        .description("description")
        .kmsKeyArn("kmsKeyArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var cfnWebFunctionRevisionProps = new CfnWebFunctionRevisionProps {
    BuildConfig = new BuildConfigProperty {
        CodeConfig = new CodeConfigProperty {
            S3Object = new S3ObjectProperty {
                Bucket = "bucket",
                Key = "key",

                // the properties below are optional
                VersionId = "versionId"
            }
        },
        RuntimeConfig = new RuntimeConfigProperty {
            Runtime = "runtime"
        }
    },
    FunctionName = "functionName",
    ServiceConfig = new ServiceConfigProperty {
        ExecutionRoleArn = "executionRoleArn",

        // the properties below are optional
        EgressNetworkConnectorArn = "egressNetworkConnectorArn",
        EnvironmentVariables = new Dictionary<string, string> {
            { "environmentVariablesKey", "environmentVariables" }
        },
        MaxConcurrencyPerEnvironment = 123,
        TelemetryConfig = new TelemetryConfigProperty {
            LoggingConfig = new LoggingConfigProperty {
                ApplicationLogLevel = "applicationLogLevel",
                LogGroup = "logGroup",
                SystemLogLevel = "systemLogLevel"
            }
        },
        TimeoutSeconds = 123
    },

    // the properties below are optional
    Description = "description",
    KmsKeyArn = "kmsKeyArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnWebFunctionRevisionProps := &CfnWebFunctionRevisionProps{
	BuildConfig: &BuildConfigProperty{
		CodeConfig: &CodeConfigProperty{
			S3Object: &S3ObjectProperty{
				Bucket: jsii.String("bucket"),
				Key: jsii.String("key"),

				// the properties below are optional
				VersionId: jsii.String("versionId"),
			},
		},
		RuntimeConfig: &RuntimeConfigProperty{
			Runtime: jsii.String("runtime"),
		},
	},
	FunctionName: jsii.String("functionName"),
	ServiceConfig: &ServiceConfigProperty{
		ExecutionRoleArn: jsii.String("executionRoleArn"),

		// the properties below are optional
		EgressNetworkConnectorArn: jsii.String("egressNetworkConnectorArn"),
		EnvironmentVariables: map[string]*string{
			"environmentVariablesKey": jsii.String("environmentVariables"),
		},
		MaxConcurrencyPerEnvironment: jsii.Number(123),
		TelemetryConfig: &TelemetryConfigProperty{
			LoggingConfig: &LoggingConfigProperty{
				ApplicationLogLevel: jsii.String("applicationLogLevel"),
				LogGroup: jsii.String("logGroup"),
				SystemLogLevel: jsii.String("systemLogLevel"),
			},
		},
		TimeoutSeconds: jsii.Number(123),
	},

	// the properties below are optional
	Description: jsii.String("description"),
	KmsKeyArn: jsii.String("kmsKeyArn"),
}

Properties ​

buildConfigIResolvable | CfnWebFunctionRevision.BuildConfigPropertybuild_configtyping.Union[IResolvable, BuildConfigProperty]buildConfigIResolvableBuildConfigIResolvableBuildConfiginterface{}required#
The build configuration for the revision.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description of the revision.
functionNamestringfunction_namestrfunctionNameStringFunctionNamestringFunctionName*stringrequired#
The name of the web function this revision belongs to.

The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

kmsKeyArnoptionalstringkms_key_arnoptionalstrkmsKeyArnoptionalStringKmsKeyArnoptionalstringKmsKeyArnoptional*string#
The ARN of the KMS key used to encrypt the revision.
serviceConfigIResolvable | CfnWebFunctionRevision.ServiceConfigPropertyservice_configtyping.Union[IResolvable, ServiceConfigProperty]serviceConfigIResolvableServiceConfigIResolvableServiceConfiginterface{}required#
The service configuration for the revision.