```swift import Appwrite import AppwriteEnums let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID .setKey("") // Your secret API key let functions = Functions(client) let function = try await functions.create( functionId: "", name: "", runtime: .node145, execute: ["any"], // optional events: [], // optional schedule: "", // optional timeout: 1, // optional enabled: false, // optional logging: false, // optional entrypoint: "", // optional commands: "", // optional scopes: [.projectRead], // optional installationId: "", // optional providerRepositoryId: "", // optional providerBranch: "", // optional providerSilentMode: false, // optional providerRootDirectory: "", // optional providerBranches: [], // optional providerPaths: [], // optional buildSpecification: "", // optional runtimeSpecification: "", // optional deploymentRetention: 0 // optional ) ```