1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateFunction`](crate::operation::create_function::builders::CreateFunctionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`function_name(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::function_name) / [`set_function_name(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_function_name): <p>The name of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
/// - [`runtime(Runtime)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::runtime) / [`set_runtime(Option<Runtime>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_runtime): <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime</a>. Runtime is required if the deployment package is a .zip file archive.</p> <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy">Runtime deprecation policy</a>.</p>
/// - [`role(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::role) / [`set_role(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_role): <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
/// - [`handler(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::handler) / [`set_handler(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_handler): <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
/// - [`code(FunctionCode)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::code) / [`set_code(Option<FunctionCode>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_code): <p>The code for the function.</p>
/// - [`description(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_description): <p>A description of the function.</p>
/// - [`timeout(i32)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::timeout) / [`set_timeout(Option<i32>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_timeout): <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
/// - [`memory_size(i32)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::memory_size) / [`set_memory_size(Option<i32>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_memory_size): <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
/// - [`publish(bool)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::publish) / [`set_publish(Option<bool>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_publish): <p>Set to true to publish the first version of the function during creation.</p>
/// - [`vpc_config(VpcConfig)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::vpc_config) / [`set_vpc_config(Option<VpcConfig>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_vpc_config): <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
/// - [`package_type(PackageType)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::package_type) / [`set_package_type(Option<PackageType>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_package_type): <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
/// - [`dead_letter_config(DeadLetterConfig)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::dead_letter_config) / [`set_dead_letter_config(Option<DeadLetterConfig>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_dead_letter_config): <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
/// - [`environment(Environment)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::environment) / [`set_environment(Option<Environment>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_environment): <p>Environment variables that are accessible from function code during execution.</p>
/// - [`kms_key_arn(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::kms_key_arn) / [`set_kms_key_arn(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_kms_key_arn): <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>. When <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> is activated, this key is also used to encrypt your function's snapshot. If you don't provide a customer managed key, Lambda uses a default service key.</p>
/// - [`tracing_config(TracingConfig)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::tracing_config) / [`set_tracing_config(Option<TracingConfig>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_tracing_config): <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
/// - [`tags(HashMap<String, String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_tags): <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
/// - [`layers(Vec<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::layers) / [`set_layers(Option<Vec<String>>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_layers): <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
/// - [`file_system_configs(Vec<FileSystemConfig>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::file_system_configs) / [`set_file_system_configs(Option<Vec<FileSystemConfig>>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_file_system_configs): <p>Connection settings for an Amazon EFS file system.</p>
/// - [`image_config(ImageConfig)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::image_config) / [`set_image_config(Option<ImageConfig>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_image_config): <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-images.html#configuration-images-settings">configuration values</a> that override the values in the container image Dockerfile.</p>
/// - [`code_signing_config_arn(impl Into<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::code_signing_config_arn) / [`set_code_signing_config_arn(Option<String>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_code_signing_config_arn): <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
/// - [`architectures(Vec<Architecture>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::architectures) / [`set_architectures(Option<Vec<Architecture>>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_architectures): <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
/// - [`ephemeral_storage(EphemeralStorage)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::ephemeral_storage) / [`set_ephemeral_storage(Option<EphemeralStorage>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_ephemeral_storage): <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB.</p>
/// - [`snap_start(SnapStart)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::snap_start) / [`set_snap_start(Option<SnapStart>)`](crate::operation::create_function::builders::CreateFunctionFluentBuilder::set_snap_start): <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
/// - On success, responds with [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput) with field(s):
/// - [`function_name(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::function_name): <p>The name of the function.</p>
/// - [`function_arn(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::function_arn): <p>The function's Amazon Resource Name (ARN).</p>
/// - [`runtime(Option<Runtime>)`](crate::operation::create_function::CreateFunctionOutput::runtime): <p>The runtime environment for the Lambda function.</p>
/// - [`role(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::role): <p>The function's execution role.</p>
/// - [`handler(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::handler): <p>The function that Lambda calls to begin running your function.</p>
/// - [`code_size(i64)`](crate::operation::create_function::CreateFunctionOutput::code_size): <p>The size of the function's deployment package, in bytes.</p>
/// - [`description(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::description): <p>The function's description.</p>
/// - [`timeout(Option<i32>)`](crate::operation::create_function::CreateFunctionOutput::timeout): <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
/// - [`memory_size(Option<i32>)`](crate::operation::create_function::CreateFunctionOutput::memory_size): <p>The amount of memory available to the function at runtime.</p>
/// - [`last_modified(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::last_modified): <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
/// - [`code_sha256(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::code_sha256): <p>The SHA256 hash of the function's deployment package.</p>
/// - [`version(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::version): <p>The version of the Lambda function.</p>
/// - [`vpc_config(Option<VpcConfigResponse>)`](crate::operation::create_function::CreateFunctionOutput::vpc_config): <p>The function's networking configuration.</p>
/// - [`dead_letter_config(Option<DeadLetterConfig>)`](crate::operation::create_function::CreateFunctionOutput::dead_letter_config): <p>The function's dead letter queue.</p>
/// - [`environment(Option<EnvironmentResponse>)`](crate::operation::create_function::CreateFunctionOutput::environment): <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
/// - [`kms_key_arn(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::kms_key_arn): <p>The KMS key that's used to encrypt the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>. When <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> is activated, this key is also used to encrypt the function's snapshot. This key is returned only if you've configured a customer managed key.</p>
/// - [`tracing_config(Option<TracingConfigResponse>)`](crate::operation::create_function::CreateFunctionOutput::tracing_config): <p>The function's X-Ray tracing configuration.</p>
/// - [`master_arn(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::master_arn): <p>For Lambda@Edge functions, the ARN of the main function.</p>
/// - [`revision_id(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::revision_id): <p>The latest updated revision of the function or alias.</p>
/// - [`layers(Option<Vec<Layer>>)`](crate::operation::create_function::CreateFunctionOutput::layers): <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
/// - [`state(Option<State>)`](crate::operation::create_function::CreateFunctionOutput::state): <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
/// - [`state_reason(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::state_reason): <p>The reason for the function's current state.</p>
/// - [`state_reason_code(Option<StateReasonCode>)`](crate::operation::create_function::CreateFunctionOutput::state_reason_code): <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
/// - [`last_update_status(Option<LastUpdateStatus>)`](crate::operation::create_function::CreateFunctionOutput::last_update_status): <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
/// - [`last_update_status_reason(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::last_update_status_reason): <p>The reason for the last update that was performed on the function.</p>
/// - [`last_update_status_reason_code(Option<LastUpdateStatusReasonCode>)`](crate::operation::create_function::CreateFunctionOutput::last_update_status_reason_code): <p>The reason code for the last update that was performed on the function.</p>
/// - [`file_system_configs(Option<Vec<FileSystemConfig>>)`](crate::operation::create_function::CreateFunctionOutput::file_system_configs): <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
/// - [`package_type(Option<PackageType>)`](crate::operation::create_function::CreateFunctionOutput::package_type): <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
/// - [`image_config_response(Option<ImageConfigResponse>)`](crate::operation::create_function::CreateFunctionOutput::image_config_response): <p>The function's image configuration values.</p>
/// - [`signing_profile_version_arn(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::signing_profile_version_arn): <p>The ARN of the signing profile version.</p>
/// - [`signing_job_arn(Option<String>)`](crate::operation::create_function::CreateFunctionOutput::signing_job_arn): <p>The ARN of the signing job.</p>
/// - [`architectures(Option<Vec<Architecture>>)`](crate::operation::create_function::CreateFunctionOutput::architectures): <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
/// - [`ephemeral_storage(Option<EphemeralStorage>)`](crate::operation::create_function::CreateFunctionOutput::ephemeral_storage): <p>The size of the function’s <code>/tmp</code> directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.</p>
/// - [`snap_start(Option<SnapStartResponse>)`](crate::operation::create_function::CreateFunctionOutput::snap_start): <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
/// - [`runtime_version_config(Option<RuntimeVersionConfig>)`](crate::operation::create_function::CreateFunctionOutput::runtime_version_config): <p>The ARN of the runtime and any errors that occured.</p>
/// - On failure, responds with [`SdkError<CreateFunctionError>`](crate::operation::create_function::CreateFunctionError)
pub fn create_function(
&self,
) -> crate::operation::create_function::builders::CreateFunctionFluentBuilder {
crate::operation::create_function::builders::CreateFunctionFluentBuilder::new(
self.handle.clone(),
)
}
}