Create a new function.

Example

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 import
const 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
// },
// };

Param

CreateFunctionCommandInput

Returns

CreateFunctionCommandOutput

See

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.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions