# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['V2FunctionArgs', 'V2Function']

@pulumi.input_type
class V2FunctionArgs:
    def __init__(__self__, *,
                 function_name: pulumi.Input[str],
                 handler: pulumi.Input[str],
                 runtime: pulumi.Input[str],
                 service_name: pulumi.Input[str],
                 ca_port: Optional[pulumi.Input[int]] = None,
                 code: Optional[pulumi.Input['V2FunctionCodeArgs']] = None,
                 code_checksum: Optional[pulumi.Input[str]] = None,
                 cpu: Optional[pulumi.Input[float]] = None,
                 custom_container_config: Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']] = None,
                 custom_dns: Optional[pulumi.Input['V2FunctionCustomDnsArgs']] = None,
                 custom_health_check_config: Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']] = None,
                 custom_runtime_config: Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 gpu_memory_size: Optional[pulumi.Input[int]] = None,
                 initialization_timeout: Optional[pulumi.Input[int]] = None,
                 initializer: Optional[pulumi.Input[str]] = None,
                 instance_concurrency: Optional[pulumi.Input[int]] = None,
                 instance_lifecycle_config: Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 layers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 memory_size: Optional[pulumi.Input[int]] = None,
                 timeout: Optional[pulumi.Input[int]] = None):
        """
        The set of arguments for constructing a V2Function resource.
        """
        pulumi.set(__self__, "function_name", function_name)
        pulumi.set(__self__, "handler", handler)
        pulumi.set(__self__, "runtime", runtime)
        pulumi.set(__self__, "service_name", service_name)
        if ca_port is not None:
            pulumi.set(__self__, "ca_port", ca_port)
        if code is not None:
            pulumi.set(__self__, "code", code)
        if code_checksum is not None:
            pulumi.set(__self__, "code_checksum", code_checksum)
        if cpu is not None:
            pulumi.set(__self__, "cpu", cpu)
        if custom_container_config is not None:
            pulumi.set(__self__, "custom_container_config", custom_container_config)
        if custom_dns is not None:
            pulumi.set(__self__, "custom_dns", custom_dns)
        if custom_health_check_config is not None:
            pulumi.set(__self__, "custom_health_check_config", custom_health_check_config)
        if custom_runtime_config is not None:
            pulumi.set(__self__, "custom_runtime_config", custom_runtime_config)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if disk_size is not None:
            pulumi.set(__self__, "disk_size", disk_size)
        if environment_variables is not None:
            pulumi.set(__self__, "environment_variables", environment_variables)
        if gpu_memory_size is not None:
            pulumi.set(__self__, "gpu_memory_size", gpu_memory_size)
        if initialization_timeout is not None:
            pulumi.set(__self__, "initialization_timeout", initialization_timeout)
        if initializer is not None:
            pulumi.set(__self__, "initializer", initializer)
        if instance_concurrency is not None:
            pulumi.set(__self__, "instance_concurrency", instance_concurrency)
        if instance_lifecycle_config is not None:
            pulumi.set(__self__, "instance_lifecycle_config", instance_lifecycle_config)
        if instance_type is not None:
            pulumi.set(__self__, "instance_type", instance_type)
        if layers is not None:
            pulumi.set(__self__, "layers", layers)
        if memory_size is not None:
            pulumi.set(__self__, "memory_size", memory_size)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)

    @property
    @pulumi.getter(name="functionName")
    def function_name(self) -> pulumi.Input[str]:
        return pulumi.get(self, "function_name")

    @function_name.setter
    def function_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "function_name", value)

    @property
    @pulumi.getter
    def handler(self) -> pulumi.Input[str]:
        return pulumi.get(self, "handler")

    @handler.setter
    def handler(self, value: pulumi.Input[str]):
        pulumi.set(self, "handler", value)

    @property
    @pulumi.getter
    def runtime(self) -> pulumi.Input[str]:
        return pulumi.get(self, "runtime")

    @runtime.setter
    def runtime(self, value: pulumi.Input[str]):
        pulumi.set(self, "runtime", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> pulumi.Input[str]:
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: pulumi.Input[str]):
        pulumi.set(self, "service_name", value)

    @property
    @pulumi.getter(name="caPort")
    def ca_port(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "ca_port")

    @ca_port.setter
    def ca_port(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "ca_port", value)

    @property
    @pulumi.getter
    def code(self) -> Optional[pulumi.Input['V2FunctionCodeArgs']]:
        return pulumi.get(self, "code")

    @code.setter
    def code(self, value: Optional[pulumi.Input['V2FunctionCodeArgs']]):
        pulumi.set(self, "code", value)

    @property
    @pulumi.getter(name="codeChecksum")
    def code_checksum(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "code_checksum")

    @code_checksum.setter
    def code_checksum(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "code_checksum", value)

    @property
    @pulumi.getter
    def cpu(self) -> Optional[pulumi.Input[float]]:
        return pulumi.get(self, "cpu")

    @cpu.setter
    def cpu(self, value: Optional[pulumi.Input[float]]):
        pulumi.set(self, "cpu", value)

    @property
    @pulumi.getter(name="customContainerConfig")
    def custom_container_config(self) -> Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']]:
        return pulumi.get(self, "custom_container_config")

    @custom_container_config.setter
    def custom_container_config(self, value: Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']]):
        pulumi.set(self, "custom_container_config", value)

    @property
    @pulumi.getter(name="customDns")
    def custom_dns(self) -> Optional[pulumi.Input['V2FunctionCustomDnsArgs']]:
        return pulumi.get(self, "custom_dns")

    @custom_dns.setter
    def custom_dns(self, value: Optional[pulumi.Input['V2FunctionCustomDnsArgs']]):
        pulumi.set(self, "custom_dns", value)

    @property
    @pulumi.getter(name="customHealthCheckConfig")
    def custom_health_check_config(self) -> Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']]:
        return pulumi.get(self, "custom_health_check_config")

    @custom_health_check_config.setter
    def custom_health_check_config(self, value: Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']]):
        pulumi.set(self, "custom_health_check_config", value)

    @property
    @pulumi.getter(name="customRuntimeConfig")
    def custom_runtime_config(self) -> Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']]:
        return pulumi.get(self, "custom_runtime_config")

    @custom_runtime_config.setter
    def custom_runtime_config(self, value: Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']]):
        pulumi.set(self, "custom_runtime_config", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "disk_size")

    @disk_size.setter
    def disk_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "disk_size", value)

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        return pulumi.get(self, "environment_variables")

    @environment_variables.setter
    def environment_variables(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "environment_variables", value)

    @property
    @pulumi.getter(name="gpuMemorySize")
    def gpu_memory_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "gpu_memory_size")

    @gpu_memory_size.setter
    def gpu_memory_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "gpu_memory_size", value)

    @property
    @pulumi.getter(name="initializationTimeout")
    def initialization_timeout(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "initialization_timeout")

    @initialization_timeout.setter
    def initialization_timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "initialization_timeout", value)

    @property
    @pulumi.getter
    def initializer(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "initializer")

    @initializer.setter
    def initializer(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "initializer", value)

    @property
    @pulumi.getter(name="instanceConcurrency")
    def instance_concurrency(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "instance_concurrency")

    @instance_concurrency.setter
    def instance_concurrency(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "instance_concurrency", value)

    @property
    @pulumi.getter(name="instanceLifecycleConfig")
    def instance_lifecycle_config(self) -> Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']]:
        return pulumi.get(self, "instance_lifecycle_config")

    @instance_lifecycle_config.setter
    def instance_lifecycle_config(self, value: Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']]):
        pulumi.set(self, "instance_lifecycle_config", value)

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "instance_type")

    @instance_type.setter
    def instance_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "instance_type", value)

    @property
    @pulumi.getter
    def layers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        return pulumi.get(self, "layers")

    @layers.setter
    def layers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "layers", value)

    @property
    @pulumi.getter(name="memorySize")
    def memory_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "memory_size")

    @memory_size.setter
    def memory_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "memory_size", value)

    @property
    @pulumi.getter
    def timeout(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "timeout")

    @timeout.setter
    def timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "timeout", value)


@pulumi.input_type
class _V2FunctionState:
    def __init__(__self__, *,
                 ca_port: Optional[pulumi.Input[int]] = None,
                 code: Optional[pulumi.Input['V2FunctionCodeArgs']] = None,
                 code_checksum: Optional[pulumi.Input[str]] = None,
                 cpu: Optional[pulumi.Input[float]] = None,
                 create_time: Optional[pulumi.Input[str]] = None,
                 custom_container_config: Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']] = None,
                 custom_dns: Optional[pulumi.Input['V2FunctionCustomDnsArgs']] = None,
                 custom_health_check_config: Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']] = None,
                 custom_runtime_config: Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 function_name: Optional[pulumi.Input[str]] = None,
                 gpu_memory_size: Optional[pulumi.Input[int]] = None,
                 handler: Optional[pulumi.Input[str]] = None,
                 initialization_timeout: Optional[pulumi.Input[int]] = None,
                 initializer: Optional[pulumi.Input[str]] = None,
                 instance_concurrency: Optional[pulumi.Input[int]] = None,
                 instance_lifecycle_config: Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 layers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 memory_size: Optional[pulumi.Input[int]] = None,
                 runtime: Optional[pulumi.Input[str]] = None,
                 service_name: Optional[pulumi.Input[str]] = None,
                 timeout: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering V2Function resources.
        """
        if ca_port is not None:
            pulumi.set(__self__, "ca_port", ca_port)
        if code is not None:
            pulumi.set(__self__, "code", code)
        if code_checksum is not None:
            pulumi.set(__self__, "code_checksum", code_checksum)
        if cpu is not None:
            pulumi.set(__self__, "cpu", cpu)
        if create_time is not None:
            pulumi.set(__self__, "create_time", create_time)
        if custom_container_config is not None:
            pulumi.set(__self__, "custom_container_config", custom_container_config)
        if custom_dns is not None:
            pulumi.set(__self__, "custom_dns", custom_dns)
        if custom_health_check_config is not None:
            pulumi.set(__self__, "custom_health_check_config", custom_health_check_config)
        if custom_runtime_config is not None:
            pulumi.set(__self__, "custom_runtime_config", custom_runtime_config)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if disk_size is not None:
            pulumi.set(__self__, "disk_size", disk_size)
        if environment_variables is not None:
            pulumi.set(__self__, "environment_variables", environment_variables)
        if function_name is not None:
            pulumi.set(__self__, "function_name", function_name)
        if gpu_memory_size is not None:
            pulumi.set(__self__, "gpu_memory_size", gpu_memory_size)
        if handler is not None:
            pulumi.set(__self__, "handler", handler)
        if initialization_timeout is not None:
            pulumi.set(__self__, "initialization_timeout", initialization_timeout)
        if initializer is not None:
            pulumi.set(__self__, "initializer", initializer)
        if instance_concurrency is not None:
            pulumi.set(__self__, "instance_concurrency", instance_concurrency)
        if instance_lifecycle_config is not None:
            pulumi.set(__self__, "instance_lifecycle_config", instance_lifecycle_config)
        if instance_type is not None:
            pulumi.set(__self__, "instance_type", instance_type)
        if layers is not None:
            pulumi.set(__self__, "layers", layers)
        if memory_size is not None:
            pulumi.set(__self__, "memory_size", memory_size)
        if runtime is not None:
            pulumi.set(__self__, "runtime", runtime)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)
        if timeout is not None:
            pulumi.set(__self__, "timeout", timeout)

    @property
    @pulumi.getter(name="caPort")
    def ca_port(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "ca_port")

    @ca_port.setter
    def ca_port(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "ca_port", value)

    @property
    @pulumi.getter
    def code(self) -> Optional[pulumi.Input['V2FunctionCodeArgs']]:
        return pulumi.get(self, "code")

    @code.setter
    def code(self, value: Optional[pulumi.Input['V2FunctionCodeArgs']]):
        pulumi.set(self, "code", value)

    @property
    @pulumi.getter(name="codeChecksum")
    def code_checksum(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "code_checksum")

    @code_checksum.setter
    def code_checksum(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "code_checksum", value)

    @property
    @pulumi.getter
    def cpu(self) -> Optional[pulumi.Input[float]]:
        return pulumi.get(self, "cpu")

    @cpu.setter
    def cpu(self, value: Optional[pulumi.Input[float]]):
        pulumi.set(self, "cpu", value)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "create_time")

    @create_time.setter
    def create_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "create_time", value)

    @property
    @pulumi.getter(name="customContainerConfig")
    def custom_container_config(self) -> Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']]:
        return pulumi.get(self, "custom_container_config")

    @custom_container_config.setter
    def custom_container_config(self, value: Optional[pulumi.Input['V2FunctionCustomContainerConfigArgs']]):
        pulumi.set(self, "custom_container_config", value)

    @property
    @pulumi.getter(name="customDns")
    def custom_dns(self) -> Optional[pulumi.Input['V2FunctionCustomDnsArgs']]:
        return pulumi.get(self, "custom_dns")

    @custom_dns.setter
    def custom_dns(self, value: Optional[pulumi.Input['V2FunctionCustomDnsArgs']]):
        pulumi.set(self, "custom_dns", value)

    @property
    @pulumi.getter(name="customHealthCheckConfig")
    def custom_health_check_config(self) -> Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']]:
        return pulumi.get(self, "custom_health_check_config")

    @custom_health_check_config.setter
    def custom_health_check_config(self, value: Optional[pulumi.Input['V2FunctionCustomHealthCheckConfigArgs']]):
        pulumi.set(self, "custom_health_check_config", value)

    @property
    @pulumi.getter(name="customRuntimeConfig")
    def custom_runtime_config(self) -> Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']]:
        return pulumi.get(self, "custom_runtime_config")

    @custom_runtime_config.setter
    def custom_runtime_config(self, value: Optional[pulumi.Input['V2FunctionCustomRuntimeConfigArgs']]):
        pulumi.set(self, "custom_runtime_config", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "disk_size")

    @disk_size.setter
    def disk_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "disk_size", value)

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        return pulumi.get(self, "environment_variables")

    @environment_variables.setter
    def environment_variables(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "environment_variables", value)

    @property
    @pulumi.getter(name="functionName")
    def function_name(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "function_name")

    @function_name.setter
    def function_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "function_name", value)

    @property
    @pulumi.getter(name="gpuMemorySize")
    def gpu_memory_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "gpu_memory_size")

    @gpu_memory_size.setter
    def gpu_memory_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "gpu_memory_size", value)

    @property
    @pulumi.getter
    def handler(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "handler")

    @handler.setter
    def handler(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "handler", value)

    @property
    @pulumi.getter(name="initializationTimeout")
    def initialization_timeout(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "initialization_timeout")

    @initialization_timeout.setter
    def initialization_timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "initialization_timeout", value)

    @property
    @pulumi.getter
    def initializer(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "initializer")

    @initializer.setter
    def initializer(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "initializer", value)

    @property
    @pulumi.getter(name="instanceConcurrency")
    def instance_concurrency(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "instance_concurrency")

    @instance_concurrency.setter
    def instance_concurrency(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "instance_concurrency", value)

    @property
    @pulumi.getter(name="instanceLifecycleConfig")
    def instance_lifecycle_config(self) -> Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']]:
        return pulumi.get(self, "instance_lifecycle_config")

    @instance_lifecycle_config.setter
    def instance_lifecycle_config(self, value: Optional[pulumi.Input['V2FunctionInstanceLifecycleConfigArgs']]):
        pulumi.set(self, "instance_lifecycle_config", value)

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "instance_type")

    @instance_type.setter
    def instance_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "instance_type", value)

    @property
    @pulumi.getter
    def layers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        return pulumi.get(self, "layers")

    @layers.setter
    def layers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "layers", value)

    @property
    @pulumi.getter(name="memorySize")
    def memory_size(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "memory_size")

    @memory_size.setter
    def memory_size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "memory_size", value)

    @property
    @pulumi.getter
    def runtime(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "runtime")

    @runtime.setter
    def runtime(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "runtime", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)

    @property
    @pulumi.getter
    def timeout(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "timeout")

    @timeout.setter
    def timeout(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "timeout", value)


class V2Function(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 ca_port: Optional[pulumi.Input[int]] = None,
                 code: Optional[pulumi.Input[Union['V2FunctionCodeArgs', 'V2FunctionCodeArgsDict']]] = None,
                 code_checksum: Optional[pulumi.Input[str]] = None,
                 cpu: Optional[pulumi.Input[float]] = None,
                 custom_container_config: Optional[pulumi.Input[Union['V2FunctionCustomContainerConfigArgs', 'V2FunctionCustomContainerConfigArgsDict']]] = None,
                 custom_dns: Optional[pulumi.Input[Union['V2FunctionCustomDnsArgs', 'V2FunctionCustomDnsArgsDict']]] = None,
                 custom_health_check_config: Optional[pulumi.Input[Union['V2FunctionCustomHealthCheckConfigArgs', 'V2FunctionCustomHealthCheckConfigArgsDict']]] = None,
                 custom_runtime_config: Optional[pulumi.Input[Union['V2FunctionCustomRuntimeConfigArgs', 'V2FunctionCustomRuntimeConfigArgsDict']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 function_name: Optional[pulumi.Input[str]] = None,
                 gpu_memory_size: Optional[pulumi.Input[int]] = None,
                 handler: Optional[pulumi.Input[str]] = None,
                 initialization_timeout: Optional[pulumi.Input[int]] = None,
                 initializer: Optional[pulumi.Input[str]] = None,
                 instance_concurrency: Optional[pulumi.Input[int]] = None,
                 instance_lifecycle_config: Optional[pulumi.Input[Union['V2FunctionInstanceLifecycleConfigArgs', 'V2FunctionInstanceLifecycleConfigArgsDict']]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 layers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 memory_size: Optional[pulumi.Input[int]] = None,
                 runtime: Optional[pulumi.Input[str]] = None,
                 service_name: Optional[pulumi.Input[str]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        """
        Create a V2Function resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: V2FunctionArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a V2Function resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param V2FunctionArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(V2FunctionArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 ca_port: Optional[pulumi.Input[int]] = None,
                 code: Optional[pulumi.Input[Union['V2FunctionCodeArgs', 'V2FunctionCodeArgsDict']]] = None,
                 code_checksum: Optional[pulumi.Input[str]] = None,
                 cpu: Optional[pulumi.Input[float]] = None,
                 custom_container_config: Optional[pulumi.Input[Union['V2FunctionCustomContainerConfigArgs', 'V2FunctionCustomContainerConfigArgsDict']]] = None,
                 custom_dns: Optional[pulumi.Input[Union['V2FunctionCustomDnsArgs', 'V2FunctionCustomDnsArgsDict']]] = None,
                 custom_health_check_config: Optional[pulumi.Input[Union['V2FunctionCustomHealthCheckConfigArgs', 'V2FunctionCustomHealthCheckConfigArgsDict']]] = None,
                 custom_runtime_config: Optional[pulumi.Input[Union['V2FunctionCustomRuntimeConfigArgs', 'V2FunctionCustomRuntimeConfigArgsDict']]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 disk_size: Optional[pulumi.Input[int]] = None,
                 environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 function_name: Optional[pulumi.Input[str]] = None,
                 gpu_memory_size: Optional[pulumi.Input[int]] = None,
                 handler: Optional[pulumi.Input[str]] = None,
                 initialization_timeout: Optional[pulumi.Input[int]] = None,
                 initializer: Optional[pulumi.Input[str]] = None,
                 instance_concurrency: Optional[pulumi.Input[int]] = None,
                 instance_lifecycle_config: Optional[pulumi.Input[Union['V2FunctionInstanceLifecycleConfigArgs', 'V2FunctionInstanceLifecycleConfigArgsDict']]] = None,
                 instance_type: Optional[pulumi.Input[str]] = None,
                 layers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 memory_size: Optional[pulumi.Input[int]] = None,
                 runtime: Optional[pulumi.Input[str]] = None,
                 service_name: Optional[pulumi.Input[str]] = None,
                 timeout: Optional[pulumi.Input[int]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = V2FunctionArgs.__new__(V2FunctionArgs)

            __props__.__dict__["ca_port"] = ca_port
            __props__.__dict__["code"] = code
            __props__.__dict__["code_checksum"] = code_checksum
            __props__.__dict__["cpu"] = cpu
            __props__.__dict__["custom_container_config"] = custom_container_config
            __props__.__dict__["custom_dns"] = custom_dns
            __props__.__dict__["custom_health_check_config"] = custom_health_check_config
            __props__.__dict__["custom_runtime_config"] = custom_runtime_config
            __props__.__dict__["description"] = description
            __props__.__dict__["disk_size"] = disk_size
            __props__.__dict__["environment_variables"] = environment_variables
            if function_name is None and not opts.urn:
                raise TypeError("Missing required property 'function_name'")
            __props__.__dict__["function_name"] = function_name
            __props__.__dict__["gpu_memory_size"] = gpu_memory_size
            if handler is None and not opts.urn:
                raise TypeError("Missing required property 'handler'")
            __props__.__dict__["handler"] = handler
            __props__.__dict__["initialization_timeout"] = initialization_timeout
            __props__.__dict__["initializer"] = initializer
            __props__.__dict__["instance_concurrency"] = instance_concurrency
            __props__.__dict__["instance_lifecycle_config"] = instance_lifecycle_config
            __props__.__dict__["instance_type"] = instance_type
            __props__.__dict__["layers"] = layers
            __props__.__dict__["memory_size"] = memory_size
            if runtime is None and not opts.urn:
                raise TypeError("Missing required property 'runtime'")
            __props__.__dict__["runtime"] = runtime
            if service_name is None and not opts.urn:
                raise TypeError("Missing required property 'service_name'")
            __props__.__dict__["service_name"] = service_name
            __props__.__dict__["timeout"] = timeout
            __props__.__dict__["create_time"] = None
        super(V2Function, __self__).__init__(
            'alicloud:fc/v2Function:V2Function',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            ca_port: Optional[pulumi.Input[int]] = None,
            code: Optional[pulumi.Input[Union['V2FunctionCodeArgs', 'V2FunctionCodeArgsDict']]] = None,
            code_checksum: Optional[pulumi.Input[str]] = None,
            cpu: Optional[pulumi.Input[float]] = None,
            create_time: Optional[pulumi.Input[str]] = None,
            custom_container_config: Optional[pulumi.Input[Union['V2FunctionCustomContainerConfigArgs', 'V2FunctionCustomContainerConfigArgsDict']]] = None,
            custom_dns: Optional[pulumi.Input[Union['V2FunctionCustomDnsArgs', 'V2FunctionCustomDnsArgsDict']]] = None,
            custom_health_check_config: Optional[pulumi.Input[Union['V2FunctionCustomHealthCheckConfigArgs', 'V2FunctionCustomHealthCheckConfigArgsDict']]] = None,
            custom_runtime_config: Optional[pulumi.Input[Union['V2FunctionCustomRuntimeConfigArgs', 'V2FunctionCustomRuntimeConfigArgsDict']]] = None,
            description: Optional[pulumi.Input[str]] = None,
            disk_size: Optional[pulumi.Input[int]] = None,
            environment_variables: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            function_name: Optional[pulumi.Input[str]] = None,
            gpu_memory_size: Optional[pulumi.Input[int]] = None,
            handler: Optional[pulumi.Input[str]] = None,
            initialization_timeout: Optional[pulumi.Input[int]] = None,
            initializer: Optional[pulumi.Input[str]] = None,
            instance_concurrency: Optional[pulumi.Input[int]] = None,
            instance_lifecycle_config: Optional[pulumi.Input[Union['V2FunctionInstanceLifecycleConfigArgs', 'V2FunctionInstanceLifecycleConfigArgsDict']]] = None,
            instance_type: Optional[pulumi.Input[str]] = None,
            layers: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            memory_size: Optional[pulumi.Input[int]] = None,
            runtime: Optional[pulumi.Input[str]] = None,
            service_name: Optional[pulumi.Input[str]] = None,
            timeout: Optional[pulumi.Input[int]] = None) -> 'V2Function':
        """
        Get an existing V2Function resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _V2FunctionState.__new__(_V2FunctionState)

        __props__.__dict__["ca_port"] = ca_port
        __props__.__dict__["code"] = code
        __props__.__dict__["code_checksum"] = code_checksum
        __props__.__dict__["cpu"] = cpu
        __props__.__dict__["create_time"] = create_time
        __props__.__dict__["custom_container_config"] = custom_container_config
        __props__.__dict__["custom_dns"] = custom_dns
        __props__.__dict__["custom_health_check_config"] = custom_health_check_config
        __props__.__dict__["custom_runtime_config"] = custom_runtime_config
        __props__.__dict__["description"] = description
        __props__.__dict__["disk_size"] = disk_size
        __props__.__dict__["environment_variables"] = environment_variables
        __props__.__dict__["function_name"] = function_name
        __props__.__dict__["gpu_memory_size"] = gpu_memory_size
        __props__.__dict__["handler"] = handler
        __props__.__dict__["initialization_timeout"] = initialization_timeout
        __props__.__dict__["initializer"] = initializer
        __props__.__dict__["instance_concurrency"] = instance_concurrency
        __props__.__dict__["instance_lifecycle_config"] = instance_lifecycle_config
        __props__.__dict__["instance_type"] = instance_type
        __props__.__dict__["layers"] = layers
        __props__.__dict__["memory_size"] = memory_size
        __props__.__dict__["runtime"] = runtime
        __props__.__dict__["service_name"] = service_name
        __props__.__dict__["timeout"] = timeout
        return V2Function(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="caPort")
    def ca_port(self) -> pulumi.Output[int]:
        return pulumi.get(self, "ca_port")

    @property
    @pulumi.getter
    def code(self) -> pulumi.Output[Optional['outputs.V2FunctionCode']]:
        return pulumi.get(self, "code")

    @property
    @pulumi.getter(name="codeChecksum")
    def code_checksum(self) -> pulumi.Output[str]:
        return pulumi.get(self, "code_checksum")

    @property
    @pulumi.getter
    def cpu(self) -> pulumi.Output[Optional[float]]:
        return pulumi.get(self, "cpu")

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> pulumi.Output[str]:
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter(name="customContainerConfig")
    def custom_container_config(self) -> pulumi.Output[Optional['outputs.V2FunctionCustomContainerConfig']]:
        return pulumi.get(self, "custom_container_config")

    @property
    @pulumi.getter(name="customDns")
    def custom_dns(self) -> pulumi.Output[Optional['outputs.V2FunctionCustomDns']]:
        return pulumi.get(self, "custom_dns")

    @property
    @pulumi.getter(name="customHealthCheckConfig")
    def custom_health_check_config(self) -> pulumi.Output[Optional['outputs.V2FunctionCustomHealthCheckConfig']]:
        return pulumi.get(self, "custom_health_check_config")

    @property
    @pulumi.getter(name="customRuntimeConfig")
    def custom_runtime_config(self) -> pulumi.Output[Optional['outputs.V2FunctionCustomRuntimeConfig']]:
        return pulumi.get(self, "custom_runtime_config")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="diskSize")
    def disk_size(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "disk_size")

    @property
    @pulumi.getter(name="environmentVariables")
    def environment_variables(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        return pulumi.get(self, "environment_variables")

    @property
    @pulumi.getter(name="functionName")
    def function_name(self) -> pulumi.Output[str]:
        return pulumi.get(self, "function_name")

    @property
    @pulumi.getter(name="gpuMemorySize")
    def gpu_memory_size(self) -> pulumi.Output[Optional[int]]:
        return pulumi.get(self, "gpu_memory_size")

    @property
    @pulumi.getter
    def handler(self) -> pulumi.Output[str]:
        return pulumi.get(self, "handler")

    @property
    @pulumi.getter(name="initializationTimeout")
    def initialization_timeout(self) -> pulumi.Output[int]:
        return pulumi.get(self, "initialization_timeout")

    @property
    @pulumi.getter
    def initializer(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "initializer")

    @property
    @pulumi.getter(name="instanceConcurrency")
    def instance_concurrency(self) -> pulumi.Output[int]:
        return pulumi.get(self, "instance_concurrency")

    @property
    @pulumi.getter(name="instanceLifecycleConfig")
    def instance_lifecycle_config(self) -> pulumi.Output[Optional['outputs.V2FunctionInstanceLifecycleConfig']]:
        return pulumi.get(self, "instance_lifecycle_config")

    @property
    @pulumi.getter(name="instanceType")
    def instance_type(self) -> pulumi.Output[str]:
        return pulumi.get(self, "instance_type")

    @property
    @pulumi.getter
    def layers(self) -> pulumi.Output[Optional[Sequence[str]]]:
        return pulumi.get(self, "layers")

    @property
    @pulumi.getter(name="memorySize")
    def memory_size(self) -> pulumi.Output[int]:
        return pulumi.get(self, "memory_size")

    @property
    @pulumi.getter
    def runtime(self) -> pulumi.Output[str]:
        return pulumi.get(self, "runtime")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> pulumi.Output[str]:
        return pulumi.get(self, "service_name")

    @property
    @pulumi.getter
    def timeout(self) -> pulumi.Output[int]:
        return pulumi.get(self, "timeout")

