Function
Create a Function Resource
new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);def Function(resource_name, opts=None, code_checksum=None, description=None, environment_variables=None, filename=None, handler=None, memory_size=None, name=None, name_prefix=None, oss_bucket=None, oss_key=None, runtime=None, service=None, timeout=None, __props__=None);func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FunctionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Function Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Function resource accepts the following input properties:
- Handler string
The function entry point in your code.
- Runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- Service string
The Function Compute service name.
- Code
Checksum string The checksum (crc64) of the function code.
- Description string
The Function Compute function description.
- Environment
Variables Dictionary<string, object> A map that defines environment variables for the function.
- Filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- Memory
Size int Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- Name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- Name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- Oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- Oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- Timeout int
The amount of time your Function has to run in seconds.
- Handler string
The function entry point in your code.
- Runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- Service string
The Function Compute service name.
- Code
Checksum string The checksum (crc64) of the function code.
- Description string
The Function Compute function description.
- Environment
Variables map[string]interface{} A map that defines environment variables for the function.
- Filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- Memory
Size int Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- Name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- Name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- Oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- Oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- Timeout int
The amount of time your Function has to run in seconds.
- handler string
The function entry point in your code.
- runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- service string
The Function Compute service name.
- code
Checksum string The checksum (crc64) of the function code.
- description string
The Function Compute function description.
- environment
Variables {[key: string]: any} A map that defines environment variables for the function.
- filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- memory
Size number Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- timeout number
The amount of time your Function has to run in seconds.
- handler str
The function entry point in your code.
- runtime str
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- service str
The Function Compute service name.
- code_
checksum str The checksum (crc64) of the function code.
- description str
The Function Compute function description.
- environment_
variables Dict[str, Any] A map that defines environment variables for the function.
- filename str
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- memory_
size float Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- name str
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- name_
prefix str Setting a prefix to get a only function name. It is conflict with “name”.
- oss_
bucket str The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- oss_
key str The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- timeout float
The amount of time your Function has to run in seconds.
Outputs
All input properties are implicitly available as output properties. Additionally, the Function resource produces the following output properties:
- Function
Id string The Function Compute service ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string The date this resource was last modified.
- Function
Id string The Function Compute service ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string The date this resource was last modified.
- function
Id string The Function Compute service ID.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string The date this resource was last modified.
- function_
id str The Function Compute service ID.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str The date this resource was last modified.
Look up an Existing Function Resource
Get an existing Function resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FunctionState, opts?: CustomResourceOptions): Functionstatic get(resource_name, id, opts=None, code_checksum=None, description=None, environment_variables=None, filename=None, function_id=None, handler=None, last_modified=None, memory_size=None, name=None, name_prefix=None, oss_bucket=None, oss_key=None, runtime=None, service=None, timeout=None, __props__=None);func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Code
Checksum string The checksum (crc64) of the function code.
- Description string
The Function Compute function description.
- Environment
Variables Dictionary<string, object> A map that defines environment variables for the function.
- Filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- Function
Id string The Function Compute service ID.
- Handler string
The function entry point in your code.
- Last
Modified string The date this resource was last modified.
- Memory
Size int Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- Name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- Name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- Oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- Oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- Runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- Service string
The Function Compute service name.
- Timeout int
The amount of time your Function has to run in seconds.
- Code
Checksum string The checksum (crc64) of the function code.
- Description string
The Function Compute function description.
- Environment
Variables map[string]interface{} A map that defines environment variables for the function.
- Filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- Function
Id string The Function Compute service ID.
- Handler string
The function entry point in your code.
- Last
Modified string The date this resource was last modified.
- Memory
Size int Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- Name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- Name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- Oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- Oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- Runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- Service string
The Function Compute service name.
- Timeout int
The amount of time your Function has to run in seconds.
- code
Checksum string The checksum (crc64) of the function code.
- description string
The Function Compute function description.
- environment
Variables {[key: string]: any} A map that defines environment variables for the function.
- filename string
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- function
Id string The Function Compute service ID.
- handler string
The function entry point in your code.
- last
Modified string The date this resource was last modified.
- memory
Size number Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- name string
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- name
Prefix string Setting a prefix to get a only function name. It is conflict with “name”.
- oss
Bucket string The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- oss
Key string The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- runtime string
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- service string
The Function Compute service name.
- timeout number
The amount of time your Function has to run in seconds.
- code_
checksum str The checksum (crc64) of the function code.
- description str
The Function Compute function description.
- environment_
variables Dict[str, Any] A map that defines environment variables for the function.
- filename str
The path to the function’s deployment package within the local filesystem. It is conflict with the
oss_-prefixed options.- function_
id str The Function Compute service ID.
- handler str
The function entry point in your code.
- last_
modified str The date this resource was last modified.
- memory_
size float Amount of memory in MB your Function can use at runtime. Defaults to
128. Limits to [128, 3072].- name str
The Function Compute function name. It is the only in one service and is conflict with “name_prefix”.
- name_
prefix str Setting a prefix to get a only function name. It is conflict with “name”.
- oss_
bucket str The OSS bucket location containing the function’s deployment package. Conflicts with
filename. This bucket must reside in the same Alibaba Cloud region where you are creating the function.- oss_
key str The OSS key of an object containing the function’s deployment package. Conflicts with
filename.- runtime str
See [Runtimes][https://www.alibabacloud.com/help/doc-detail/52077.htm] for valid values.
- service str
The Function Compute service name.
- timeout float
The amount of time your Function has to run in seconds.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.