Creates a function by calling the CreateFunction operation.
Operation description
When you create a function by using an OSS code package, if the error "unable to access object xxx in bucket xxx" is reported, grant the current user access permissions on the OSS bucket. For example, you can use the system access policy AliyunOSSReadOnlyAccess or a custom policy with finer granularity of authorization such as oss:GetObject. For details about the policy content, see Grant a Resource Access Management (RAM) user permissions to read all resources in a bucket.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:CreateFunction |
create |
*All Resource
|
None | None |
Request syntax
POST /2023-03-30/functions HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body | CreateFunctionInput |
Yes |
The function configuration information. |
Response elements
|
Element |
Type |
Description |
Example |
| Function |
The function configuration information. |
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.