通过该接口,可以创建版本,通过s cli fc-api createService -h
可以获得帮助信息:
Usage
s cli fc-api createService
API Document: https://help.aliyun.com/document_detail/175256.html
Options
--region string The region of fc endpoint.
--access string Specify the key name.
--props string The json string of props.
--serviceName string The name of the service.
--description string The description of the service.
--internetAccess string Specifies whether to allow functions to access the Internet. Valid values:
true/false
--role string The RAM role that is used to grant required permissions to Function Compute.
The role is used in the following scenarios: 1)Sends logs generated by a
function to your Logstore. 2)Generates a token for a function to access other
cloud resources during function execution.
--logConfig string [JSON String] The log configuration. This parameter specifies a Logstore to
store function execution logs.
--nasConfig string [JSON String] The Apsara File Storage NAS (NAS) file system configuration,
which enables a function to access the specified NAS file system.
--vpcConfig string [JSON String] The VPC configuration, which enables a function to access the
specified VPC.
--tracingConfig string [JSON String] The configuration of Tracing Analysis. After Function Compute
integrates with Tracing Analysis, you can record the stay time of a request
in Function Compute, view the cold start time for a function, and record the
execution time of a function. For more information.
使用案例:
s cli fc-api createService --serviceName mytest
输出结果:
🔑 Using default access: default, If you want to change the default access for fc-api, you can [s cli fc-api set access Your-Access-Alias] to set default value.
🌍 Using default region: cn-hongkong, If you want to change the default region for fc-api, you can [s cli fc-api set region FC-Region] to set default value.
|
serviceName: mytest
description: ''
role: ''
logConfig:
project: ''
logstore: ''
enableRequestMetrics: false
enableInstanceMetrics: false
serviceId: 505d4b33-1057-42c6-b46c-da7b3b1937db
createdTime: '2021-07-15T03:21:22Z'
lastModifiedTime: '2021-07-15T03:21:22Z'
vpcConfig:
vpcId: ''
vSwitchIds: []
securityGroupId: ''
role: ''
internetAccess: true
nasConfig:
userId: -1
groupId: -1
mountPoints: []
vendorConfig: null
tracingConfig:
type: null
params: null