Interface CreateFunctionRequest.Builder

    • Method Detail

      • functionName

        CreateFunctionRequest.Builder functionName​(String 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • runtime

        CreateFunctionRequest.Builder runtime​(String runtime)

        The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

        The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.

        For a list of all currently supported runtimes, see Supported runtimes.

        Parameters:
        runtime - The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

        The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.

        For a list of all currently supported runtimes, see Supported runtimes.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        Runtime, Runtime
      • runtime

        CreateFunctionRequest.Builder runtime​(Runtime runtime)

        The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

        The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.

        For a list of all currently supported runtimes, see Supported runtimes.

        Parameters:
        runtime - The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

        The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.

        For a list of all currently supported runtimes, see Supported runtimes.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        Runtime, Runtime
      • role

        CreateFunctionRequest.Builder role​(String role)

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

        Parameters:
        role - The Amazon Resource Name (ARN) of the function's execution role.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • handler

        CreateFunctionRequest.Builder handler​(String 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • code

        CreateFunctionRequest.Builder code​(FunctionCode code)

        The code for the function.

        Parameters:
        code - The code for the function.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • description

        CreateFunctionRequest.Builder description​(String description)

        A description of the function.

        Parameters:
        description - A description of the function.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • timeout

        CreateFunctionRequest.Builder timeout​(Integer 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • memorySize

        CreateFunctionRequest.Builder memorySize​(Integer 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • publish

        CreateFunctionRequest.Builder publish​(Boolean publish)

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

        Parameters:
        publish - Set to true to publish the first version of the function during creation.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • vpcConfig

        CreateFunctionRequest.Builder vpcConfig​(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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • packageType

        CreateFunctionRequest.Builder packageType​(String packageType)

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

        Parameters:
        packageType - The type of deployment package. Set to Image for container image and set to Zip for .zip file archive.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        PackageType, PackageType
      • packageType

        CreateFunctionRequest.Builder packageType​(PackageType packageType)

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

        Parameters:
        packageType - The type of deployment package. Set to Image for container image and set to Zip for .zip file archive.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        PackageType, PackageType
      • deadLetterConfig

        CreateFunctionRequest.Builder deadLetterConfig​(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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • environment

        CreateFunctionRequest.Builder environment​(Environment environment)

        Environment variables that are accessible from function code during execution.

        Parameters:
        environment - Environment variables that are accessible from function code during execution.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tracingConfig

        CreateFunctionRequest.Builder tracingConfig​(TracingConfig tracingConfig)

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

        Parameters:
        tracingConfig - Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tags

        CreateFunctionRequest.Builder tags​(Map<String,​String> tags)

        A list of tags to apply to the function.

        Parameters:
        tags - A list of tags to apply to the function.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • layers

        CreateFunctionRequest.Builder layers​(Collection<String> layers)

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

        Parameters:
        layers - A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • layers

        CreateFunctionRequest.Builder layers​(String... layers)

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

        Parameters:
        layers - A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • fileSystemConfigs

        CreateFunctionRequest.Builder fileSystemConfigs​(Collection<FileSystemConfig> fileSystemConfigs)

        Connection settings for an Amazon EFS file system.

        Parameters:
        fileSystemConfigs - Connection settings for an Amazon EFS file system.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • fileSystemConfigs

        CreateFunctionRequest.Builder fileSystemConfigs​(FileSystemConfig... fileSystemConfigs)

        Connection settings for an Amazon EFS file system.

        Parameters:
        fileSystemConfigs - Connection settings for an Amazon EFS file system.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • codeSigningConfigArn

        CreateFunctionRequest.Builder codeSigningConfigArn​(String 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • architecturesWithStrings

        CreateFunctionRequest.Builder architecturesWithStrings​(Collection<String> 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • architecturesWithStrings

        CreateFunctionRequest.Builder architecturesWithStrings​(String... 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • architectures

        CreateFunctionRequest.Builder architectures​(Collection<Architecture> 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • architectures

        CreateFunctionRequest.Builder architectures​(Architecture... 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • ephemeralStorage

        CreateFunctionRequest.Builder ephemeralStorage​(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).

        Parameters:
        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).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • loggingConfig

        CreateFunctionRequest.Builder loggingConfig​(LoggingConfig loggingConfig)

        The function's Amazon CloudWatch Logs configuration settings.

        Parameters:
        loggingConfig - The function's Amazon CloudWatch Logs configuration settings.
        Returns:
        Returns a reference to this object so that method calls can be chained together.