This topic describes provisioned configuration-related commands in the FC-API component.

Prerequisites

Before you begin, make sure that the following operations are complete:

Set a provisioned configuration

Command syntax:
s cli fc-api putProvisionConfig --region <regionid> --access <accessname> --serviceName <serviceName> --props <props> --functionName <functionName> --qualifier <qualifier> --target <target parameter> --scheduledActions <The configuration of scheduled auto scaling> --targetTrackingPolicies <The configuration of metric tracking auto scaling>
Parameters:
  • --region string: the ID of the region where the resource is deployed.
  • --access string: the alias of the key used.
  • --props string: the properties of the component. For more information about the props parameter, see YAML syntax.
  • --serviceName string: the name of the service.
  • --functionName string: the name of the function.
  • --qualifier string: the alias or version of the service.
  • --target number: the number of provisioned instances to be configured for the function.
  • --scheduledActions string: The configuration of scheduled auto scaling. You can configure scheduled auto scaling to flexibly configure provisioned instances. You can configure the number of provisioned instances to be automatically adjusted to a specified value at a specified time. This way, the number of provisioned instances can meet the concurrency of your business.
  • --targetTrackingPolicies string: the configuration of metric tracking auto scaling. Provisioned instances are scaled in or out every minute based on the concurrency utilization of provisioned instances.
Example:
s cli fc-api putProvisionConfig --region cn-hangzhou --serviceName mytest --functionName mytest --qualifier test --target 4

For information about the API operation for setting a provisioned configuration, see PutProvisionConfig.

Query a provisioned configuration

Command syntax:
s cli fc-api getProvisionConfig  --region <regionid> --access <accessname> --props <props> --serviceName <serviceName> --functionName <functionName> --qualifier <qualifier>
Parameters:
  • --region string: the ID of the region where the resource is deployed.
  • --access string: the alias of the key used.
  • --props string: the properties of the component. For more information about the props parameter, see YAML syntax.
  • --serviceName string: the name of the service.
  • --functionName string: the name of the function.
  • --qualifier string: the alias or version of the service.
Example:
s cli fc-api getProvisionConfig  --region cn-hangzhou --serviceName mytest --functionName mytest  --qualifier test

For information about the API operation for querying a provisioned configuration, see GetProvisionConfig.

Query provisioned configurations

Command syntax:
s cli fc-api listProvisionConfigs --region <regionid> --access <accessname> --props <props> --limit <limit number> --serviceName <serviceName> --qualifier <quelifier> --nextToken <nextresult>
Parameters:
  • --region string: the ID of the region where the resource is deployed.
  • --access string: the alias of the key used.
  • --props string: the properties of the component. For more information about the props parameter, see YAML syntax.
  • --limit string: the maximum number of resources to be returned.
  • --nextToken string: the token used to return more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.
  • --serviceName string: the name of the service.
  • --qualifier string: the alias or version of the service.
Example:
s cli fc-api listProvisionConfigs --region cn-hangzhou --limit 6 --serviceName mytest --qualifier LATEST

For information about the API operation for querying provisioned configurations, see ListProvisionConfigs.