-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathfunction.py
More file actions
103 lines (100 loc) · 4.58 KB
/
function.py
File metadata and controls
103 lines (100 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
from typing import Any, Dict, List, Optional, Union, cast
from pydantic import Field, PrivateAttr
from .base_model import AppwriteModel
from .variable import Variable
class Function(AppwriteModel):
"""
Function
Attributes
----------
id : str
Function ID.
createdat : str
Function creation date in ISO 8601 format.
updatedat : str
Function update date in ISO 8601 format.
execute : List[Any]
Execution permissions.
name : str
Function name.
enabled : bool
Function enabled.
live : bool
Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration.
logging : bool
When disabled, executions will exclude logs and errors, and will be slightly faster.
runtime : str
Function execution and build runtime.
deploymentretention : float
How many days to keep the non-active deployments before they will be automatically deleted.
deploymentid : str
Function's active deployment ID.
deploymentcreatedat : str
Active deployment creation date in ISO 8601 format.
latestdeploymentid : str
Function's latest deployment ID.
latestdeploymentcreatedat : str
Latest deployment creation date in ISO 8601 format.
latestdeploymentstatus : str
Status of latest deployment. Possible values are "waiting", "processing", "building", "ready", and "failed".
scopes : List[Any]
Allowed permission scopes.
vars : List[Variable]
Function variables.
events : List[Any]
Function trigger events.
schedule : str
Function execution schedule in CRON format.
timeout : float
Function execution timeout in seconds.
entrypoint : str
The entrypoint file used to execute the deployment.
commands : str
The build command used to build the deployment.
version : str
Version of Open Runtimes used for the function.
installationid : str
Function VCS (Version Control System) installation id.
providerrepositoryid : str
VCS (Version Control System) Repository ID
providerbranch : str
VCS (Version Control System) branch name
providerrootdirectory : str
Path to function in VCS (Version Control System) repository
providersilentmode : bool
Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests
buildspecification : str
Machine specification for deployment builds.
runtimespecification : str
Machine specification for executions.
"""
id: str = Field(..., alias='$id')
createdat: str = Field(..., alias='$createdAt')
updatedat: str = Field(..., alias='$updatedAt')
execute: List[Any] = Field(..., alias='execute')
name: str = Field(..., alias='name')
enabled: bool = Field(..., alias='enabled')
live: bool = Field(..., alias='live')
logging: bool = Field(..., alias='logging')
runtime: str = Field(..., alias='runtime')
deploymentretention: float = Field(..., alias='deploymentRetention')
deploymentid: str = Field(..., alias='deploymentId')
deploymentcreatedat: str = Field(..., alias='deploymentCreatedAt')
latestdeploymentid: str = Field(..., alias='latestDeploymentId')
latestdeploymentcreatedat: str = Field(..., alias='latestDeploymentCreatedAt')
latestdeploymentstatus: str = Field(..., alias='latestDeploymentStatus')
scopes: List[Any] = Field(..., alias='scopes')
vars: List[Variable] = Field(..., alias='vars')
events: List[Any] = Field(..., alias='events')
schedule: str = Field(..., alias='schedule')
timeout: float = Field(..., alias='timeout')
entrypoint: str = Field(..., alias='entrypoint')
commands: str = Field(..., alias='commands')
version: str = Field(..., alias='version')
installationid: str = Field(..., alias='installationId')
providerrepositoryid: str = Field(..., alias='providerRepositoryId')
providerbranch: str = Field(..., alias='providerBranch')
providerrootdirectory: str = Field(..., alias='providerRootDirectory')
providersilentmode: bool = Field(..., alias='providerSilentMode')
buildspecification: str = Field(..., alias='buildSpecification')
runtimespecification: str = Field(..., alias='runtimeSpecification')