All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.lambda.model.CreateFunctionRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Lambda module holds the client classes that are used for communicating with AWS Lambda Service

The newest version!
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.lambda.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateFunctionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name or ARN of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

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

*/ private String functionName; /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

*/ private String runtime; /** *

* The Amazon Resource Name (ARN) of the function's execution role. *

*/ private String role; /** *

* 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 Lambda programming model. *

*/ private String handler; /** *

* The code for the function. *

*/ private FunctionCode code; /** *

* A description of the function. *

*/ private String description; /** *

* 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 Lambda execution environment. *

*/ private Integer timeout; /** *

* The amount of memory available to the function 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. *

*/ private Integer memorySize; /** *

* Set to true to publish the first version of the function during creation. *

*/ private Boolean publish; /** *

* 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 Configuring a Lambda function to * access resources in a VPC. *

*/ private VpcConfig vpcConfig; /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

*/ private String packageType; /** *

* A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when * they fail processing. For more information, see Dead-letter queues. *

*/ private DeadLetterConfig deadLetterConfig; /** *

* Environment variables that are accessible from function code during execution. *

*/ private Environment environment; /** *

* The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, * Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container * image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key * that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't * provide a customer managed key, Lambda uses a default service key. *

*/ private String kMSKeyArn; /** *

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

*/ private TracingConfig tracingConfig; /** *

* A list of tags to apply to the function. *

*/ private com.amazonaws.internal.SdkInternalMap tags; /** *

* A list of function layers to * add to the function's execution environment. Specify each layer by its ARN, including the version. *

*/ private com.amazonaws.internal.SdkInternalList layers; /** *

* Connection settings for an Amazon EFS file system. *

*/ private com.amazonaws.internal.SdkInternalList fileSystemConfigs; /** *

* Container image configuration values that * override the values in the container image Dockerfile. *

*/ private ImageConfig imageConfig; /** *

* 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. *

*/ private String codeSigningConfigArn; /** *

* 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 x86_64. *

*/ private com.amazonaws.internal.SdkInternalList architectures; /** *

* The size of the function's /tmp directory in MB. The default value is 512, but can be any whole * number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). *

*/ private EphemeralStorage ephemeralStorage; /** *

* The function's SnapStart setting. *

*/ private SnapStart snapStart; /** *

* The function's Amazon CloudWatch Logs configuration settings. *

*/ private LoggingConfig loggingConfig; /** *

* The name or ARN of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

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

* * @param functionName * The name or ARN of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. */ public void setFunctionName(String functionName) { this.functionName = functionName; } /** *

* The name or ARN of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

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

* * @return The name or ARN of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. */ public String getFunctionName() { return this.functionName; } /** *

* The name or ARN of the Lambda function. *

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

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

* * @param functionName * The name or ARN of the Lambda function.

*

* Name formats *

*
    *
  • *

    * Function namemy-function. *

    *
  • *
  • *

    * Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function. *

    *
  • *
  • *

    * Partial ARN123456789012:function:my-function. *

    *
  • *
*

* The length constraint applies only to the full ARN. If you specify only the function name, it is limited * to 64 characters in length. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withFunctionName(String functionName) { setFunctionName(functionName); return this; } /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

* * @param runtime * The identifier of the function's runtime. Runtime is required * if the deployment package is a .zip file archive.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @see Runtime */ public void setRuntime(String runtime) { this.runtime = runtime; } /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

* * @return The identifier of the function's runtime. Runtime is required * if the deployment package is a .zip file archive.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @see Runtime */ public String getRuntime() { return this.runtime; } /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

* * @param runtime * The identifier of the function's runtime. Runtime is required * if the deployment package is a .zip file archive.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ public CreateFunctionRequest withRuntime(String runtime) { setRuntime(runtime); return this; } /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

* * @param runtime * The identifier of the function's runtime. Runtime is required * if the deployment package is a .zip file archive.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @see Runtime */ public void setRuntime(Runtime runtime) { withRuntime(runtime); } /** *

* The identifier of the function's runtime. Runtime is required if the * deployment package is a .zip file archive. *

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. *

* * @param runtime * The identifier of the function's runtime. Runtime is required * if the deployment package is a .zip file archive.

*

* The following list includes deprecated runtimes. For more information, see Runtime * deprecation policy. * @return Returns a reference to this object so that method calls can be chained together. * @see Runtime */ public CreateFunctionRequest withRuntime(Runtime runtime) { this.runtime = runtime.toString(); return this; } /** *

* The Amazon Resource Name (ARN) of the function's execution role. *

* * @param role * The Amazon Resource Name (ARN) of the function's execution role. */ public void setRole(String role) { this.role = role; } /** *

* The Amazon Resource Name (ARN) of the function's execution role. *

* * @return The Amazon Resource Name (ARN) of the function's execution role. */ public String getRole() { return this.role; } /** *

* The Amazon Resource Name (ARN) of the function's execution role. *

* * @param role * The Amazon Resource Name (ARN) of the function's execution role. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withRole(String role) { setRole(role); return this; } /** *

* 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 Lambda programming model. *

* * @param handler * 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 Lambda programming * model. */ public void setHandler(String handler) { this.handler = handler; } /** *

* 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 Lambda programming model. *

* * @return 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 Lambda programming * model. */ public String getHandler() { return this.handler; } /** *

* 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 Lambda programming model. *

* * @param handler * 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 Lambda programming * model. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withHandler(String handler) { setHandler(handler); return this; } /** *

* The code for the function. *

* * @param code * The code for the function. */ public void setCode(FunctionCode code) { this.code = code; } /** *

* The code for the function. *

* * @return The code for the function. */ public FunctionCode getCode() { return this.code; } /** *

* The code for the function. *

* * @param code * The code for the function. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withCode(FunctionCode code) { setCode(code); return this; } /** *

* A description of the function. *

* * @param description * A description of the function. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the function. *

* * @return A description of the function. */ public String getDescription() { return this.description; } /** *

* A description of the function. *

* * @param description * A description of the function. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withDescription(String description) { setDescription(description); return this; } /** *

* 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 Lambda execution environment. *

* * @param timeout * 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 Lambda execution * environment. */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** *

* 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 Lambda execution environment. *

* * @return 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 Lambda execution * environment. */ public Integer getTimeout() { return this.timeout; } /** *

* 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 Lambda execution environment. *

* * @param timeout * 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 Lambda execution * environment. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withTimeout(Integer timeout) { setTimeout(timeout); return this; } /** *

* The amount of memory available to the function 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. *

* * @param memorySize * The amount of memory available to the function 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. */ public void setMemorySize(Integer memorySize) { this.memorySize = memorySize; } /** *

* The amount of memory available to the function 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. *

* * @return The amount of memory available to the function 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. */ public Integer getMemorySize() { return this.memorySize; } /** *

* The amount of memory available to the function 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. *

* * @param memorySize * The amount of memory available to the function 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withMemorySize(Integer memorySize) { setMemorySize(memorySize); return this; } /** *

* Set to true to publish the first version of the function during creation. *

* * @param publish * Set to true to publish the first version of the function during creation. */ public void setPublish(Boolean publish) { this.publish = publish; } /** *

* Set to true to publish the first version of the function during creation. *

* * @return Set to true to publish the first version of the function during creation. */ public Boolean getPublish() { return this.publish; } /** *

* Set to true to publish the first version of the function during creation. *

* * @param publish * Set to true to publish the first version of the function during creation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withPublish(Boolean publish) { setPublish(publish); return this; } /** *

* Set to true to publish the first version of the function during creation. *

* * @return Set to true to publish the first version of the function during creation. */ public Boolean isPublish() { return this.publish; } /** *

* 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 Configuring a Lambda function to * access resources in a VPC. *

* * @param vpcConfig * 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 Configuring a Lambda function * to access resources in a VPC. */ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** *

* 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 Configuring a Lambda function to * access resources in a VPC. *

* * @return 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 Configuring a Lambda function * to access resources in a VPC. */ public VpcConfig getVpcConfig() { return this.vpcConfig; } /** *

* 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 Configuring a Lambda function to * access resources in a VPC. *

* * @param vpcConfig * 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 Configuring a Lambda function * to access resources in a VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withVpcConfig(VpcConfig vpcConfig) { setVpcConfig(vpcConfig); return this; } /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

* * @param packageType * The type of deployment package. Set to Image for container image and set to Zip * for .zip file archive. * @see PackageType */ public void setPackageType(String packageType) { this.packageType = packageType; } /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

* * @return The type of deployment package. Set to Image for container image and set to Zip * for .zip file archive. * @see PackageType */ public String getPackageType() { return this.packageType; } /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

* * @param packageType * The type of deployment package. Set to Image for container image and set to Zip * for .zip file archive. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageType */ public CreateFunctionRequest withPackageType(String packageType) { setPackageType(packageType); return this; } /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

* * @param packageType * The type of deployment package. Set to Image for container image and set to Zip * for .zip file archive. * @see PackageType */ public void setPackageType(PackageType packageType) { withPackageType(packageType); } /** *

* The type of deployment package. Set to Image for container image and set to Zip for * .zip file archive. *

* * @param packageType * The type of deployment package. Set to Image for container image and set to Zip * for .zip file archive. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageType */ public CreateFunctionRequest withPackageType(PackageType packageType) { this.packageType = packageType.toString(); return this; } /** *

* A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when * they fail processing. For more information, see Dead-letter queues. *

* * @param deadLetterConfig * A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events * when they fail processing. For more information, see Dead-letter * queues. */ public void setDeadLetterConfig(DeadLetterConfig deadLetterConfig) { this.deadLetterConfig = deadLetterConfig; } /** *

* A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when * they fail processing. For more information, see Dead-letter queues. *

* * @return A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous * events when they fail processing. For more information, see Dead-letter * queues. */ public DeadLetterConfig getDeadLetterConfig() { return this.deadLetterConfig; } /** *

* A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when * they fail processing. For more information, see Dead-letter queues. *

* * @param deadLetterConfig * A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events * when they fail processing. For more information, see Dead-letter * queues. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withDeadLetterConfig(DeadLetterConfig deadLetterConfig) { setDeadLetterConfig(deadLetterConfig); return this; } /** *

* Environment variables that are accessible from function code during execution. *

* * @param environment * Environment variables that are accessible from function code during execution. */ public void setEnvironment(Environment environment) { this.environment = environment; } /** *

* Environment variables that are accessible from function code during execution. *

* * @return Environment variables that are accessible from function code during execution. */ public Environment getEnvironment() { return this.environment; } /** *

* Environment variables that are accessible from function code during execution. *

* * @param environment * Environment variables that are accessible from function code during execution. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withEnvironment(Environment environment) { setEnvironment(environment); return this; } /** *

* The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, * Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container * image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key * that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't * provide a customer managed key, Lambda uses a default service key. *

* * @param kMSKeyArn * The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is * activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function * using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that * this is not the same key that's used to protect your container image in the Amazon Elastic Container * Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key. */ public void setKMSKeyArn(String kMSKeyArn) { this.kMSKeyArn = kMSKeyArn; } /** *

* The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, * Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container * image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key * that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't * provide a customer managed key, Lambda uses a default service key. *

* * @return The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's * environment variables. When Lambda SnapStart is * activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function * using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that * this is not the same key that's used to protect your container image in the Amazon Elastic Container * Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key. */ public String getKMSKeyArn() { return this.kMSKeyArn; } /** *

* The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, * Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container * image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key * that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't * provide a customer managed key, Lambda uses a default service key. *

* * @param kMSKeyArn * The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is * activated, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function * using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that * this is not the same key that's used to protect your container image in the Amazon Elastic Container * Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withKMSKeyArn(String kMSKeyArn) { setKMSKeyArn(kMSKeyArn); return this; } /** *

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

* * @param tracingConfig * Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. */ public void setTracingConfig(TracingConfig tracingConfig) { this.tracingConfig = tracingConfig; } /** *

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

* * @return Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. */ public TracingConfig getTracingConfig() { return this.tracingConfig; } /** *

* Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. *

* * @param tracingConfig * Set Mode to Active to sample and trace a subset of incoming requests with X-Ray. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withTracingConfig(TracingConfig tracingConfig) { setTracingConfig(tracingConfig); return this; } /** *

* A list of tags to apply to the function. *

* * @return A list of tags to apply to the * function. */ public java.util.Map getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalMap(); } return tags; } /** *

* A list of tags to apply to the function. *

* * @param tags * A list of tags to apply to the * function. */ public void setTags(java.util.Map tags) { this.tags = tags == null ? null : new com.amazonaws.internal.SdkInternalMap(tags); } /** *

* A list of tags to apply to the function. *

* * @param tags * A list of tags to apply to the * function. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateFunctionRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new com.amazonaws.internal.SdkInternalMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest clearTagsEntries() { this.tags = null; return this; } /** *

* A list of function layers to * add to the function's execution environment. Specify each layer by its ARN, including the version. *

* * @return A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. */ public java.util.List getLayers() { if (layers == null) { layers = new com.amazonaws.internal.SdkInternalList(); } return layers; } /** *

* A list of function layers to * add to the function's execution environment. Specify each layer by its ARN, including the version. *

* * @param layers * A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. */ public void setLayers(java.util.Collection layers) { if (layers == null) { this.layers = null; return; } this.layers = new com.amazonaws.internal.SdkInternalList(layers); } /** *

* A list of function layers to * add to the function's execution environment. Specify each layer by its ARN, including the version. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLayers(java.util.Collection)} or {@link #withLayers(java.util.Collection)} if you want to override the * existing values. *

* * @param layers * A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withLayers(String... layers) { if (this.layers == null) { setLayers(new com.amazonaws.internal.SdkInternalList(layers.length)); } for (String ele : layers) { this.layers.add(ele); } return this; } /** *

* A list of function layers to * add to the function's execution environment. Specify each layer by its ARN, including the version. *

* * @param layers * A list of function * layers to add to the function's execution environment. Specify each layer by its ARN, including the * version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withLayers(java.util.Collection layers) { setLayers(layers); return this; } /** *

* Connection settings for an Amazon EFS file system. *

* * @return Connection settings for an Amazon EFS file system. */ public java.util.List getFileSystemConfigs() { if (fileSystemConfigs == null) { fileSystemConfigs = new com.amazonaws.internal.SdkInternalList(); } return fileSystemConfigs; } /** *

* Connection settings for an Amazon EFS file system. *

* * @param fileSystemConfigs * Connection settings for an Amazon EFS file system. */ public void setFileSystemConfigs(java.util.Collection fileSystemConfigs) { if (fileSystemConfigs == null) { this.fileSystemConfigs = null; return; } this.fileSystemConfigs = new com.amazonaws.internal.SdkInternalList(fileSystemConfigs); } /** *

* Connection settings for an Amazon EFS file system. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setFileSystemConfigs(java.util.Collection)} or {@link #withFileSystemConfigs(java.util.Collection)} if * you want to override the existing values. *

* * @param fileSystemConfigs * Connection settings for an Amazon EFS file system. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withFileSystemConfigs(FileSystemConfig... fileSystemConfigs) { if (this.fileSystemConfigs == null) { setFileSystemConfigs(new com.amazonaws.internal.SdkInternalList(fileSystemConfigs.length)); } for (FileSystemConfig ele : fileSystemConfigs) { this.fileSystemConfigs.add(ele); } return this; } /** *

* Connection settings for an Amazon EFS file system. *

* * @param fileSystemConfigs * Connection settings for an Amazon EFS file system. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withFileSystemConfigs(java.util.Collection fileSystemConfigs) { setFileSystemConfigs(fileSystemConfigs); return this; } /** *

* Container image configuration values that * override the values in the container image Dockerfile. *

* * @param imageConfig * Container image configuration * values that override the values in the container image Dockerfile. */ public void setImageConfig(ImageConfig imageConfig) { this.imageConfig = imageConfig; } /** *

* Container image configuration values that * override the values in the container image Dockerfile. *

* * @return Container image configuration * values that override the values in the container image Dockerfile. */ public ImageConfig getImageConfig() { return this.imageConfig; } /** *

* Container image configuration values that * override the values in the container image Dockerfile. *

* * @param imageConfig * Container image configuration * values that override the values in the container image Dockerfile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withImageConfig(ImageConfig imageConfig) { setImageConfig(imageConfig); return this; } /** *

* 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. *

* * @param codeSigningConfigArn * 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. */ public void setCodeSigningConfigArn(String codeSigningConfigArn) { this.codeSigningConfigArn = codeSigningConfigArn; } /** *

* 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. *

* * @return 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. */ public String getCodeSigningConfigArn() { return this.codeSigningConfigArn; } /** *

* 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. *

* * @param codeSigningConfigArn * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withCodeSigningConfigArn(String codeSigningConfigArn) { setCodeSigningConfigArn(codeSigningConfigArn); return this; } /** *

* 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 x86_64. *

* * @return 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 x86_64. * @see Architecture */ public java.util.List getArchitectures() { if (architectures == null) { architectures = new com.amazonaws.internal.SdkInternalList(); } return architectures; } /** *

* 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 x86_64. *

* * @param architectures * 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 x86_64. * @see Architecture */ public void setArchitectures(java.util.Collection architectures) { if (architectures == null) { this.architectures = null; return; } this.architectures = new com.amazonaws.internal.SdkInternalList(architectures); } /** *

* 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 x86_64. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setArchitectures(java.util.Collection)} or {@link #withArchitectures(java.util.Collection)} if you want * to override the existing values. *

* * @param architectures * 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 x86_64. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public CreateFunctionRequest withArchitectures(String... architectures) { if (this.architectures == null) { setArchitectures(new com.amazonaws.internal.SdkInternalList(architectures.length)); } for (String ele : architectures) { this.architectures.add(ele); } return this; } /** *

* 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 x86_64. *

* * @param architectures * 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 x86_64. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public CreateFunctionRequest withArchitectures(java.util.Collection architectures) { setArchitectures(architectures); return this; } /** *

* 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 x86_64. *

* * @param architectures * 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 x86_64. * @return Returns a reference to this object so that method calls can be chained together. * @see Architecture */ public CreateFunctionRequest withArchitectures(Architecture... architectures) { com.amazonaws.internal.SdkInternalList architecturesCopy = new com.amazonaws.internal.SdkInternalList(architectures.length); for (Architecture value : architectures) { architecturesCopy.add(value.toString()); } if (getArchitectures() == null) { setArchitectures(architecturesCopy); } else { getArchitectures().addAll(architecturesCopy); } return this; } /** *

* The size of the function's /tmp directory in MB. The default value is 512, but can be any whole * number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). *

* * @param ephemeralStorage * The size of the function's /tmp directory in MB. The default value is 512, but can be any * whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). */ public void setEphemeralStorage(EphemeralStorage ephemeralStorage) { this.ephemeralStorage = ephemeralStorage; } /** *

* The size of the function's /tmp directory in MB. The default value is 512, but can be any whole * number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). *

* * @return The size of the function's /tmp directory in MB. The default value is 512, but can be any * whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). */ public EphemeralStorage getEphemeralStorage() { return this.ephemeralStorage; } /** *

* The size of the function's /tmp directory in MB. The default value is 512, but can be any whole * number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). *

* * @param ephemeralStorage * The size of the function's /tmp directory in MB. The default value is 512, but can be any * whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withEphemeralStorage(EphemeralStorage ephemeralStorage) { setEphemeralStorage(ephemeralStorage); return this; } /** *

* The function's SnapStart setting. *

* * @param snapStart * The function's SnapStart * setting. */ public void setSnapStart(SnapStart snapStart) { this.snapStart = snapStart; } /** *

* The function's SnapStart setting. *

* * @return The function's SnapStart * setting. */ public SnapStart getSnapStart() { return this.snapStart; } /** *

* The function's SnapStart setting. *

* * @param snapStart * The function's SnapStart * setting. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withSnapStart(SnapStart snapStart) { setSnapStart(snapStart); return this; } /** *

* The function's Amazon CloudWatch Logs configuration settings. *

* * @param loggingConfig * The function's Amazon CloudWatch Logs configuration settings. */ public void setLoggingConfig(LoggingConfig loggingConfig) { this.loggingConfig = loggingConfig; } /** *

* The function's Amazon CloudWatch Logs configuration settings. *

* * @return The function's Amazon CloudWatch Logs configuration settings. */ public LoggingConfig getLoggingConfig() { return this.loggingConfig; } /** *

* The function's Amazon CloudWatch Logs configuration settings. *

* * @param loggingConfig * The function's Amazon CloudWatch Logs configuration settings. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFunctionRequest withLoggingConfig(LoggingConfig loggingConfig) { setLoggingConfig(loggingConfig); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFunctionName() != null) sb.append("FunctionName: ").append(getFunctionName()).append(","); if (getRuntime() != null) sb.append("Runtime: ").append(getRuntime()).append(","); if (getRole() != null) sb.append("Role: ").append(getRole()).append(","); if (getHandler() != null) sb.append("Handler: ").append(getHandler()).append(","); if (getCode() != null) sb.append("Code: ").append(getCode()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getTimeout() != null) sb.append("Timeout: ").append(getTimeout()).append(","); if (getMemorySize() != null) sb.append("MemorySize: ").append(getMemorySize()).append(","); if (getPublish() != null) sb.append("Publish: ").append(getPublish()).append(","); if (getVpcConfig() != null) sb.append("VpcConfig: ").append(getVpcConfig()).append(","); if (getPackageType() != null) sb.append("PackageType: ").append(getPackageType()).append(","); if (getDeadLetterConfig() != null) sb.append("DeadLetterConfig: ").append(getDeadLetterConfig()).append(","); if (getEnvironment() != null) sb.append("Environment: ").append(getEnvironment()).append(","); if (getKMSKeyArn() != null) sb.append("KMSKeyArn: ").append(getKMSKeyArn()).append(","); if (getTracingConfig() != null) sb.append("TracingConfig: ").append(getTracingConfig()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getLayers() != null) sb.append("Layers: ").append(getLayers()).append(","); if (getFileSystemConfigs() != null) sb.append("FileSystemConfigs: ").append(getFileSystemConfigs()).append(","); if (getImageConfig() != null) sb.append("ImageConfig: ").append(getImageConfig()).append(","); if (getCodeSigningConfigArn() != null) sb.append("CodeSigningConfigArn: ").append(getCodeSigningConfigArn()).append(","); if (getArchitectures() != null) sb.append("Architectures: ").append(getArchitectures()).append(","); if (getEphemeralStorage() != null) sb.append("EphemeralStorage: ").append(getEphemeralStorage()).append(","); if (getSnapStart() != null) sb.append("SnapStart: ").append(getSnapStart()).append(","); if (getLoggingConfig() != null) sb.append("LoggingConfig: ").append(getLoggingConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateFunctionRequest == false) return false; CreateFunctionRequest other = (CreateFunctionRequest) obj; if (other.getFunctionName() == null ^ this.getFunctionName() == null) return false; if (other.getFunctionName() != null && other.getFunctionName().equals(this.getFunctionName()) == false) return false; if (other.getRuntime() == null ^ this.getRuntime() == null) return false; if (other.getRuntime() != null && other.getRuntime().equals(this.getRuntime()) == false) return false; if (other.getRole() == null ^ this.getRole() == null) return false; if (other.getRole() != null && other.getRole().equals(this.getRole()) == false) return false; if (other.getHandler() == null ^ this.getHandler() == null) return false; if (other.getHandler() != null && other.getHandler().equals(this.getHandler()) == false) return false; if (other.getCode() == null ^ this.getCode() == null) return false; if (other.getCode() != null && other.getCode().equals(this.getCode()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getTimeout() == null ^ this.getTimeout() == null) return false; if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == false) return false; if (other.getMemorySize() == null ^ this.getMemorySize() == null) return false; if (other.getMemorySize() != null && other.getMemorySize().equals(this.getMemorySize()) == false) return false; if (other.getPublish() == null ^ this.getPublish() == null) return false; if (other.getPublish() != null && other.getPublish().equals(this.getPublish()) == false) return false; if (other.getVpcConfig() == null ^ this.getVpcConfig() == null) return false; if (other.getVpcConfig() != null && other.getVpcConfig().equals(this.getVpcConfig()) == false) return false; if (other.getPackageType() == null ^ this.getPackageType() == null) return false; if (other.getPackageType() != null && other.getPackageType().equals(this.getPackageType()) == false) return false; if (other.getDeadLetterConfig() == null ^ this.getDeadLetterConfig() == null) return false; if (other.getDeadLetterConfig() != null && other.getDeadLetterConfig().equals(this.getDeadLetterConfig()) == false) return false; if (other.getEnvironment() == null ^ this.getEnvironment() == null) return false; if (other.getEnvironment() != null && other.getEnvironment().equals(this.getEnvironment()) == false) return false; if (other.getKMSKeyArn() == null ^ this.getKMSKeyArn() == null) return false; if (other.getKMSKeyArn() != null && other.getKMSKeyArn().equals(this.getKMSKeyArn()) == false) return false; if (other.getTracingConfig() == null ^ this.getTracingConfig() == null) return false; if (other.getTracingConfig() != null && other.getTracingConfig().equals(this.getTracingConfig()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getLayers() == null ^ this.getLayers() == null) return false; if (other.getLayers() != null && other.getLayers().equals(this.getLayers()) == false) return false; if (other.getFileSystemConfigs() == null ^ this.getFileSystemConfigs() == null) return false; if (other.getFileSystemConfigs() != null && other.getFileSystemConfigs().equals(this.getFileSystemConfigs()) == false) return false; if (other.getImageConfig() == null ^ this.getImageConfig() == null) return false; if (other.getImageConfig() != null && other.getImageConfig().equals(this.getImageConfig()) == false) return false; if (other.getCodeSigningConfigArn() == null ^ this.getCodeSigningConfigArn() == null) return false; if (other.getCodeSigningConfigArn() != null && other.getCodeSigningConfigArn().equals(this.getCodeSigningConfigArn()) == false) return false; if (other.getArchitectures() == null ^ this.getArchitectures() == null) return false; if (other.getArchitectures() != null && other.getArchitectures().equals(this.getArchitectures()) == false) return false; if (other.getEphemeralStorage() == null ^ this.getEphemeralStorage() == null) return false; if (other.getEphemeralStorage() != null && other.getEphemeralStorage().equals(this.getEphemeralStorage()) == false) return false; if (other.getSnapStart() == null ^ this.getSnapStart() == null) return false; if (other.getSnapStart() != null && other.getSnapStart().equals(this.getSnapStart()) == false) return false; if (other.getLoggingConfig() == null ^ this.getLoggingConfig() == null) return false; if (other.getLoggingConfig() != null && other.getLoggingConfig().equals(this.getLoggingConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFunctionName() == null) ? 0 : getFunctionName().hashCode()); hashCode = prime * hashCode + ((getRuntime() == null) ? 0 : getRuntime().hashCode()); hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode()); hashCode = prime * hashCode + ((getHandler() == null) ? 0 : getHandler().hashCode()); hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode()); hashCode = prime * hashCode + ((getMemorySize() == null) ? 0 : getMemorySize().hashCode()); hashCode = prime * hashCode + ((getPublish() == null) ? 0 : getPublish().hashCode()); hashCode = prime * hashCode + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode()); hashCode = prime * hashCode + ((getPackageType() == null) ? 0 : getPackageType().hashCode()); hashCode = prime * hashCode + ((getDeadLetterConfig() == null) ? 0 : getDeadLetterConfig().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); hashCode = prime * hashCode + ((getKMSKeyArn() == null) ? 0 : getKMSKeyArn().hashCode()); hashCode = prime * hashCode + ((getTracingConfig() == null) ? 0 : getTracingConfig().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getLayers() == null) ? 0 : getLayers().hashCode()); hashCode = prime * hashCode + ((getFileSystemConfigs() == null) ? 0 : getFileSystemConfigs().hashCode()); hashCode = prime * hashCode + ((getImageConfig() == null) ? 0 : getImageConfig().hashCode()); hashCode = prime * hashCode + ((getCodeSigningConfigArn() == null) ? 0 : getCodeSigningConfigArn().hashCode()); hashCode = prime * hashCode + ((getArchitectures() == null) ? 0 : getArchitectures().hashCode()); hashCode = prime * hashCode + ((getEphemeralStorage() == null) ? 0 : getEphemeralStorage().hashCode()); hashCode = prime * hashCode + ((getSnapStart() == null) ? 0 : getSnapStart().hashCode()); hashCode = prime * hashCode + ((getLoggingConfig() == null) ? 0 : getLoggingConfig().hashCode()); return hashCode; } @Override public CreateFunctionRequest clone() { return (CreateFunctionRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy