remove
remove Commands
remove commands are used to remove a deployed resource. Resources cannot be recovered once removed.
Command Parsing
You can run remove -h or remove --help to view the documentation.
This command includes four subcommands:
- function: Delete a specified function.
- trigger: Delete a specified trigger.
- version: Delete a specified version.
- alias: Delete a specified alias.
|
Parameter Name |
Abbreviation |
Required in YAML |
Description |
|---|---|---|---|
|
assume-yes |
y |
No |
During interaction, y is selected by default. |
Example
Function [myFunction] deleted successfully.
remove function
remove function is used to delete a specified function. This will also delete all versions, aliases, and triggers of the function.
You can run remove function -h or remove function --help to view the documentation.
|
Parameter Name |
Abbreviation |
Required in YAML |
Required in CLI |
Description |
|---|---|---|---|---|
|
region |
- |
No |
Yes |
Region |
|
function-name |
- |
No |
Yes |
Function name |
|
assume-yes |
y |
No |
Yes |
During interaction, y is selected by default. |
Example
- If you have a resource description file (YAML), run s remove function to delete a specified function.
- If you use CLI (without a YAML resource description file), specify the name and region of the service. For example, s cli fgs remove function --region cn-north-4 --function-name fgs-test.
When using CLI, if the key is not default, add the access parameter. For example, s cli fgs remove function --region cn-north-4 --function-name fgs-test --access xxxx.
Execution result of the preceding command:Function [fg-test] deleted.
remove trigger
remove trigger is used to delete a specified trigger.
You can run remove trigger -h or remove trigger --help to view the documentation.
This command also supports some global parameters, such as -a/--access and --debug. For details, see Global Parameters of Serverless Devs.
|
Parameter Name |
Abbreviation |
Required in YAML |
Required in CLI |
Description |
|---|---|---|---|---|
|
region |
- |
No |
Yes |
Region |
|
function-name |
- |
No |
Yes |
Function name |
|
version-name |
- |
No |
No |
Version. Default: latest |
|
trigger-type |
- |
No |
Yes |
Trigger type |
|
trigger-name |
- |
No |
Yes |
Trigger name. APIG: API name; OBS: bucket name; TIMER: trigger name |
|
assume-yes |
y |
No |
No |
During interaction, y is selected by default. |
Example
- If you have a resource description file (YAML), run s remove trigger to delete a trigger declared in the file.
- If you use CLI (without a YAML resource description file), specify the name and region of the service. For example, s cli fgs remove trigger --region cn-north-4 --function-name fgs-test --trigger-type APIG --trigger-name fgs-test-trigger.
Trigger [fgs-test-trigger] deleted.
remove version
remove version is used to delete a specified version.
You can run remove version -h or remove version --help to view the documentation.
This command also supports some global parameters, such as -a/--access and --debug. For details, see Global Parameters of Serverless Devs.
|
Parameter Name |
Abbreviation |
Required in YAML |
Required in CLI |
Description |
|---|---|---|---|---|
|
region |
- |
No |
Yes |
Region |
|
function-name |
- |
No |
Yes |
Service name |
|
version-name |
- |
Yes |
Yes |
Version name, which cannot be latest. |
Example
- If you have a resource description file (YAML), run s remove version --version-name versionName to delete a specified versionName.
- If you use CLI (without a YAML resource description file), specify the region and name of the service. For example, s cli fgs remove version --region cn-north-4 --function-name fgs-test --version-name v1.
Version [v1] deleted.
remove alias
remove alias is used to delete a specified alias.
You can run remove alias -h or remove alias --help to view the documentation.
This command also supports some global parameters, such as -a/--access and --debug. For details, see Global Parameters of Serverless Devs.
|
Parameter Name |
Abbreviation |
Required in YAML |
Required in CLI |
Description |
|---|---|---|---|---|
|
region |
- |
No |
Yes |
Region |
|
function-name |
- |
No |
Yes |
Service name |
|
alias-name |
- |
Yes |
Yes |
Alias |
Example
- If you have a resource description file (YAML), run s remove alias --alias-name aliasName to delete a specified alias.
- If you use CLI (without a YAML resource description file), specify the region and name of the service. For example, s cli fgs remove alias --region cn-north-4 --function-name fgs-test --alias-name pre.
Alias [pre] deleted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot