All Products
Search
Document Center

Service operation

Last Updated: Oct 15, 2018

For more information about services in Function Compute, see Description.

Contents

This topic describes how to create, update, query, or delete a service in the console or by using the command-line tool fcli.

Create service in the console

  1. Log on to the console.

  2. Select a region.

  3. Click the Icon button or click Create Service.

    CreateTrigger

  4. In the Create Service page:

    1. Enter the Service Name, such as newService.
    2. (Optional) Enter the Description, such as Hello, this is my first FC service.
    3. (Optional) Enable the Advanced Settings:
      1. Click the Drop button of Log Project option, and select a Log project.
      2. Click the Drop button of LogStore option, and select a Logstore.
      3. Click the Drop button of Role Operation option, and select a system Policy.AdvancedSettings
    4. Click OK to confirm your action.

Update service in the console

  1. Log on to the console.

  2. Select a region.

  3. Select a service.

  4. Click Edit of Basic Configurations area or Advanced Configurations areas to modify the configurations.

    UpdateService

List services in the console

  1. Log on to the console.

  2. Select a region.

  3. You can see all the services in the specified region from the left-side navigation pane.

Delete service in the console

  1. Log on to the console.

  2. Select a region.

  3. Select a service.

  4. Click Delete Service, in the prompted dialog box, make sure that the service to be deleted has no functions, and click OK.

    DeleteService

Create service by using fcli

mks: Creates a service.

  • -d —description string: Displays the details of the specified service.
  • -p —log-project string: Specifies the log project of the service.
  • -l —log-store string: Specifies the Logstore of the service.
  • -r —role string: Specifies the role of the service.
  1. // Create a service under the Basic Configurations area.
  2. >>> mks myService
  3. // Create a service. In the output, "my description" is the service details, "my-log-project" specifies the log project, "my-log-store" specifies the Logstore, and "myRoleName" specifies the role of the service.
  4. >>> mks myService -d 'my description' -p my-log-project -l my-log-store -r acs:ram::myID:role/myRoleName

Update service by using fcli

ups: updates a service. The parameters involved in a service update are the same as those involved in mks.

  • -d —description string: Displays the details of the service.
  • -p —log-project string: Specifies the log project of the service.
  • -l —log-store string: Specifies the Logstore of the service.
  • -r —role string: Specifies the role of the service.
  1. // Update the service. In the output, "my description" is the service details, "my-log-project" specifies the log project, "my-log-store" specifies the Logstore, and "myRoleName" specifies the role of the service.
  2. >>> ups myService -d 'my description' -p my-log-project -l my-log-store -r acs:ram::myID:role/myRoleName

List services by using fcli

ls: Lists all services under the current Alibaba Cloud account.

Delete service by using fcli

rm: Deletes a service. Make sure that the service has no available functions before performing the delete operation.

  1. ## Delete service by using fcli
  2. rm myService