appwrite/docs/examples/1.6.x/server-dotnet/examples/functions/create.md
2024-08-21 17:47:19 +05:30

1.3 KiB

using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services;

Client client = new Client() .SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key

Functions functions = new Functions(client);

Function result = await functions.Create( functionId: "<FUNCTION_ID>", name: "", runtime: .Node145, execute: ["any"], // optional events: new List(), // optional schedule: "", // optional timeout: 1, // optional enabled: false, // optional logging: false, // optional entrypoint: "", // optional commands: "", // optional scopes: new List(), // optional installationId: "<INSTALLATION_ID>", // optional providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional providerBranch: "<PROVIDER_BRANCH>", // optional providerSilentMode: false, // optional providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional templateRepository: "<TEMPLATE_REPOSITORY>", // optional templateOwner: "<TEMPLATE_OWNER>", // optional templateRootDirectory: "<TEMPLATE_ROOT_DIRECTORY>", // optional templateVersion: "<TEMPLATE_VERSION>", // optional specification: "" // optional );