Protected
Create a new function.
Use a bare-bones client and the command you need to make an API call.
import { FunctionsClient, CreateFunctionCommand } from "@stedi/sdk-client-functions"; // ES Modules import// const { FunctionsClient, CreateFunctionCommand } = require("@stedi/sdk-client-functions"); // CommonJS importconst client = new FunctionsClient(config);const input = { // CreateFunctionInput idempotencyKey: "STRING_VALUE", functionName: "STRING_VALUE", // required packageBucket: "STRING_VALUE", // required packageKey: "STRING_VALUE", // required packageSha256: "STRING_VALUE", environmentVariables: { // EnvironmentVariables "<keys>": "STRING_VALUE", }, timeout: Number("int"), logRetention: 1 || 3 || 5 || 7 || 14 || 30 || 60 || 90 || 120 || 150 || 180 || 365 || 400 || 545 || 731 || 1827 || 3653, asyncInvokeConfig: { // AsyncInvokeConfig maximumRetryAttempts: Number("int"), }, reservedConcurrentExecutions: Number("int"), issueManagerName: "STRING_VALUE",};const command = new CreateFunctionCommand(input);const response = await client.send(command);// { // CreateFunctionOutput// functionName: "STRING_VALUE", // required// resourceDetail: { // CreateResourceDetail// idempotencyKey: "STRING_VALUE", // required// },// };
CreateFunctionCommandInput
CreateFunctionCommandOutput
input
response
config
InvalidZipFileException (client fault)
RequestTooLargeException (client fault)
TooManyRequestsException (client fault)
AccessDeniedException (client fault)
ProductUnavailableException (client fault)
ResourceAlreadyExistsException (client fault)
ResourceNotFoundException (client fault)
ResourceUnderChangeException (client fault)
ServiceException (server fault)
FunctionsServiceException
Base exception class for all service exceptions from Functions service.
Readonly
Static
Create a new function.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateFunctionCommandInput
Returns
CreateFunctionCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidZipFileException (client fault)
Throws
RequestTooLargeException (client fault)
Throws
TooManyRequestsException (client fault)
Throws
AccessDeniedException (client fault)
Throws
ProductUnavailableException (client fault)
Throws
ResourceAlreadyExistsException (client fault)
Throws
ResourceNotFoundException (client fault)
Throws
ResourceUnderChangeException (client fault)
Throws
ServiceException (server fault)
Throws
FunctionsServiceException
Base exception class for all service exceptions from Functions service.