This topic describes the definition and parameters of a service.
Definition
A service is a resource management unit in Function Compute. In business scenarios, a single application can be divided into multiple services. From the resource utilization perspective, a single service can consist of multiple functions. For example, a data processing service is divided into data preparation and data processing. During data preparation, you can select a low-specification instance due to undemanding requirements for function resources. During data processing, however, you need to select a high-specification instance due to demanding requirements for function resources. Before you create a function, you must create a service. All functions of the same service share the same settings such as service authorization and log configuration. You can create and manage services in the Function Compute console or by using the Funcraft tool. For more information, see Service operations.
Service parameters
Parameter | Required | Description |
---|---|---|
ServiceName | Yes | The name of the service. The service name must be unique in the same region and cannot
be modified after the service is created. Meanwhile, the service name must comply
with the following constraints:
|
Description | No | The description of the service. |
NasConfig | No | Network attached storage (NAS) settings for the service. After you configure these settings, functions of the specified service can access the NAS file system in the same way as accessing a local file system. |
Role | No | Grants required permissions for the Function Compute instance to run functions for
the service. This parameter is applicable to the following scenarios:
For more information about permissions, see User permission. |
LogConfig | No | Specifies a log project and a Logstore of Log Service to store and analyze function
execution logs.
We recommend that you enable Log Service and configure this parameter. Otherwise, you cannot view function execution logs. Notice When you use Log Service, you will be billed for reserved resources. The minimum fee
is RMB 0.04 per day, even when no logs are generated. For more information, see Pay-as-you-go.
|
VpcConfig | No | Configures Virtual Private Cloud (VPC) for the service. This parameter allows functions to access the specified VPC instance. |
InternetAccess | No | Specifies whether to allow functions to access the Internet. If this parameter is set to true, functions can access the Internet. |