sfctl applicationsfctl application

创建、删除和管理应用程序及应用程序类型。Create, delete, and manage applications and application types.

命令Commands

CommandCommand 说明Description
createcreate 使用指定说明创建 Service Fabric 应用程序。Creates a Service Fabric application using the specified description.
deletedelete 删除现有 Service Fabric 应用程序。Deletes an existing Service Fabric application.
deployeddeployed 获取部署在 Service Fabric 节点上的应用程序的相关信息。Gets the information about an application deployed on a Service Fabric node.
deployed-healthdeployed-health 获取部署在 Service Fabric 节点上的应用程序的运行状况。Gets the information about health of an application deployed on a Service Fabric node.
deployed-listdeployed-list 获取部署在 Service Fabric 节点上的应用程序的列表。Gets the list of applications deployed on a Service Fabric node.
healthhealth 获取 Service Fabric 应用程序运行状况。Gets the health of the service fabric application.
infoinfo 获取 Service Fabric 应用程序的相关信息。Gets information about a Service Fabric application.
listlist 获取在 Service Fabric 群集中创建且与指定的筛选器匹配的应用程序列表。Gets the list of applications created in the Service Fabric cluster that match the specified filters.
loadload 获取 Service Fabric 应用程序的相关加载信息。Gets load information about a Service Fabric application.
manifestmanifest 获取描述应用程序类型的清单。Gets the manifest describing an application type.
provisionprovision 使用外部存储中的 .sfpkg 包或使用映像存储中的应用程序包向群集预配或注册 Service Fabric 应用程序类型。Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.
report-healthreport-health 发送有关 Service Fabric 应用程序的运行状况报告。Sends a health report on the Service Fabric application.
typetype 获取 Service Fabric 群集中与指定名称完全匹配的应用程序类型的列表。Gets the list of application types in the Service Fabric cluster matching exactly the specified name.
type-listtype-list 获取 Service Fabric 群集中应用程序类型的列表。Gets the list of application types in the Service Fabric cluster.
unprovisionunprovision 从群集中删除或注销 Service Fabric 应用程序类型。Removes or unregisters a Service Fabric application type from the cluster.
升级upgrade 开始升级 Service Fabric 群集中的应用程序。Starts upgrading an application in the Service Fabric cluster.
upgrade-resumeupgrade-resume 继续升级 Service Fabric 群集中的应用程序。Resumes upgrading an application in the Service Fabric cluster.
upgrade-rollbackupgrade-rollback 开始回滚 Service Fabric 群集中当前正在进行的应用程序升级。Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.
upgrade-statusupgrade-status 获取对此应用程序执行的最近一次升级的详细信息。Gets details for the latest upgrade performed on this application.
uploadupload 将 Service Fabric 应用程序包复制到映像存储区。Copy a Service Fabric application package to the image store.

sfctl application createsfctl application create

使用指定说明创建 Service Fabric 应用程序。Creates a Service Fabric application using the specified description.

参数Arguments

参数Argument 说明Description
--app-name [必需]--app-name [Required] 应用程序名称,包括“fabric:”URI 方案。The name of the application, including the 'fabric:' URI scheme.
--app-type [必需]--app-type [Required] 在应用程序清单中找到的应用程序类型名称。The application type name found in the application manifest.
--app-version [必需]--app-version [Required] 应用程序清单中定义的应用程序类型的版本。The version of the application type as defined in the application manifest.
--max-node-count--max-node-count Service Fabric 为此应用程序保留的容量的最大节点数。The maximum number of nodes where Service Fabric will reserve capacity for this application. 请注意,这并不表示此应用程序的服务放置在所有这些节点上。Note that this does not mean that the services of this application will be placed on all of those nodes.
--metrics--metrics 应用程序容量指标说明的 JSON 编码列表。A JSON encoded list of application capacity metric descriptions. 指标定义为一个名称,与应用程序所在的每个节点的一组容量关联。A metric is defined as a name, associated with a set of capacities for each node that the application exists on.
--min-node-count--min-node-count Service Fabric 为此应用程序保留的容量的最小节点数。The minimum number of nodes where Service Fabric will reserve capacity for this application. 请注意,这并不表示此应用程序的服务放置在所有这些节点上。Note that this does not mean that the services of this application will be placed on all of those nodes.
--parameters--parameters 创建应用程序时应用的应用程序参数替代的 JSON 编码列表。A JSON encoded list of application parameter overrides to be applied when creating the application.
--timeout -t--timeout -t 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application deletesfctl application delete

删除现有 Service Fabric 应用程序。Deletes an existing Service Fabric application.

必须先创建应用程序才能进行删除。An application must be created before it can be deleted. 删除应用程序会删除该应用程序中包含的所有服务。Deleting an application will delete all services that are part of that application. 默认情况下,Service Fabric 尝试正常关闭服务副本,然后删除服务。By default, Service Fabric will try to close service replicas in a graceful manner and then delete the service. 但是,如果服务无法正常关闭,删除操作可能需要很长时间,也可能出现停滞。However, if a service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. 使用可选 ForceRemove 标志跳过正常关闭序列,强制删除应用程序及其所有服务。Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of its services.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--force-remove--force-remove 强制删除 Service Fabric 应用程序或服务,跳过正常关闭序列。Remove a Service Fabric application or service forcefully without going through the graceful shutdown sequence. 若因服务代码中的问题而无法正常关闭副本,导致删除应用程序或服务操作超时,可使用此参数强制删除该应用程序或服务。This parameter can be used to forcefully delete an application or service for which delete is timing out due to issues in the service code that prevents graceful close of replicas.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application deployedsfctl application deployed

获取部署在 Service Fabric 节点上的应用程序的相关信息。Gets the information about an application deployed on a Service Fabric node.

如果提供的应用程序 ID 是系统应用程序的,则此查询将返回系统应用程序信息。This query returns system application information if the application ID provided is for system application. 结果包括处于活动、正在激活和正在下载状态的已部署应用程序。Results encompass deployed applications in active, activating, and downloading states. 此查询要求节点名称对应于群集上的某个节点。This query requires that the node name corresponds to a node on the cluster. 如果提供的节点名称未指向群集上的任何活动 Service Fabric 节点,则查询将失败。The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--include-health-state--include-health-state 包含实体的运行状况。Include the health state of an entity. 如果此参数为 false 或未指定,则返回的运行状况为“Unknown”。If this parameter is false or not specified, then the health state returned is "Unknown". 设置为 true,查询将并行转到节点和运行状况系统服务,然后将结果合并。When set to true, the query goes in parallel to the node and the health system service before the results are merged. 因此,查询开销更高,并可能需要更长的时间。As a result, the query is more expensive and may take a longer time.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application deployed-healthsfctl application deployed-health

获取部署在 Service Fabric 节点上的应用程序的运行状况。Gets the information about health of an application deployed on a Service Fabric node.

获取部署在 Service Fabric 节点上的应用程序的运行状况。Gets the information about health of an application deployed on a Service Fabric node. 使用 EventsHealthStateFilter 可以选择性地根据运行状况筛选部署的应用程序上报告的 HealthEvent 对象的集合。Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed application based on health state. 使用 DeployedServicePackagesHealthStateFilter 可以选择性地根据运行状况筛选 DeployedServicePackageHealth 子项。Use DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on health state.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--deployed-service-packages-health-state-filter--deployed-service-packages-health-state-filter 用于根据运行状况筛选服务包运行状况查询结果中返回的已部署服务包运行状况对象。Allows filtering of the deployed service package health state objects returned in the result of deployed application health query based on their health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的已部署服务包。Only deployed service packages that match the filter are returned. 所有已部署服务包用于评估已部署应用程序的聚合运行状况。All deployed service packages are used to evaluate the aggregated health state of the deployed application. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value can be a combination of these values, obtained using the bitwise 'OR' operator. 例如,如果提供的值为 6,则返回 HealthState 值为 OK (2) 和 Warning (4) 的服务包的运行状态。For example, if the provided value is 6 then health state of service packages with HealthState value of OK (2) and Warning (4) are returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--events-health-state-filter--events-health-state-filter 用于根据运行状况筛选返回的 HealthEvent 对象集合。Allows filtering the collection of HealthEvent objects returned based on health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的事件。Only events that match the filter are returned. 所有事件用于评估聚合运行状态。All events are used to evaluate the aggregated health state. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value could be a combination of these values, obtained using the bitwise 'OR' operator. 例如,如果提供的值为 6,则返回 HealthState 值为 OK (2) 和 Warning (4) 的所有事件。For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--exclude-health-statistics--exclude-health-statistics 指示运行状况统计数据是否应作为查询结果的一部分返回。Indicates whether the health statistics should be returned as part of the query result. 默认值为 False。False by default. 统计信息显示处于 Ok、Warning 和 Error 运行状况的子实体数。The statistics show the number of children entities in health state Ok, Warning, and Error.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application deployed-listsfctl application deployed-list

获取部署在 Service Fabric 节点上的应用程序的列表。Gets the list of applications deployed on a Service Fabric node.

获取部署在 Service Fabric 节点上的应用程序的列表。Gets the list of applications deployed on a Service Fabric node. 除非显式按 ID 查询,否则结果不会包含有关已部署系统应用程序的信息The results do not include information about deployed system applications unless explicitly queried for by ID. 结果包括处于活动、正在激活和正在下载状态的已部署应用程序。Results encompass deployed applications in active, activating, and downloading states. 此查询要求节点名称对应于群集上的某个节点。This query requires that the node name corresponds to a node on the cluster. 如果提供的节点名称未指向群集上的任何活动 Service Fabric 节点,则查询将失败。The query fails if the provided node name does not point to any active Service Fabric nodes on the cluster.

参数Arguments

参数Argument 说明Description
--node-name [必需]--node-name [Required] 节点的名称。The name of the node.
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--include-health-state--include-health-state 包含实体的运行状况。Include the health state of an entity. 如果此参数为 false 或未指定,则返回的运行状况为“Unknown”。If this parameter is false or not specified, then the health state returned is "Unknown". 设置为 true,查询将并行转到节点和运行状况系统服务,然后将结果合并。When set to true, the query goes in parallel to the node and the health system service before the results are merged. 因此,查询开销更高,并可能需要更长的时间。As a result, the query is more expensive and may take a longer time.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application healthsfctl application health

获取 Service Fabric 应用程序运行状况。Gets the health of the service fabric application.

返回 Service Fabric 应用程序的运行状态。Returns the heath state of the service fabric application. 响应报告“Ok”、“Error”或“Warning”运行状态。The response reports either Ok, Error or Warning health state. 如果未在运行状况存储中找到实体,则返回 Error。If the entity is not found in the health store, it will return Error.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--deployed-applications-health-state-filter--deployed-applications-health-state-filter 用于根据运行状况筛选应用程序运行状况查询结果中返回的已部署应用程序运行状况对象。Allows filtering of the deployed applications health state objects returned in the result of application health query based on their health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的已部署应用程序。Only deployed applications that match the filter will be returned. 所有已部署应用程序都用于评估聚合运行状况。All deployed applications are used to evaluate the aggregated health state. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value could be a combination of these values, obtained using bitwise 'OR' operator. 例如,如果提供的值为 6,则返回 HealthState 值为 OK (2) 和 Warning (4) 的已部署应用程序的运行状况。For example, if the provided value is 6 then health state of deployed applications with HealthState value of OK (2) and Warning (4) are returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--events-health-state-filter--events-health-state-filter 用于根据运行状况筛选返回的 HealthEvent 对象集合。Allows filtering the collection of HealthEvent objects returned based on health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的事件。Only events that match the filter are returned. 所有事件用于评估聚合运行状态。All events are used to evaluate the aggregated health state. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value could be a combination of these values, obtained using the bitwise 'OR' operator. 例如,如果提供的值为 6,则返回 HealthState 值为 OK (2) 和 Warning (4) 的所有事件。For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--exclude-health-statistics--exclude-health-statistics 指示运行状况统计数据是否应作为查询结果的一部分返回。Indicates whether the health statistics should be returned as part of the query result. 默认值为 False。False by default. 统计信息显示处于 Ok、Warning 和 Error 运行状况的子实体数。The statistics show the number of children entities in health state Ok, Warning, and Error.
--services-health-state-filter--services-health-state-filter 用于根据运行状况筛选服务运行状况查询结果中返回的服务运行状况对象。Allows filtering of the services health state objects returned in the result of services health query based on their health state. 此参数的可能值包括以下运行状态之一的整数值。The possible values for this parameter include integer value of one of the following health states. 仅返回与筛选器匹配的服务。Only services that match the filter are returned. 所有服务都用于评估聚合运行状况。All services are used to evaluate the aggregated health state. 如果未指定,则返回所有项。If not specified, all entries are returned. 状态值为基于标志的枚举,因此该值可以是使用按位“OR”运算符获取的值的组合。The state values are flag-based enumeration, so the value could be a combination of these values, obtained using bitwise 'OR' operator. 例如,如果提供的值为“6”,则返回 HealthState 值为 OK (2) 和 Warning (4) 的服务的运行状况。For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned.
- Default - 默认值。- Default - Default value. 匹配任何 HealthState。Matches any HealthState. 值为 0。The value is zero.
- None - 不与任何 HealthState 值匹配的筛选器。- None - Filter that doesn't match any HealthState value. 未返回有关给定状态集合的结果时使用。Used in order to return no results on a given collection of states. 值为 1。The value is 1.
- Ok - 与 HealthState 值为 OK 的输入匹配的筛选器。- Ok - Filter that matches input with HealthState value Ok. 值为 2。The value is 2.
- Warning - 与 HealthState 值为 Warning 的输入匹配的筛选器。- Warning - Filter that matches input with HealthState value Warning. 值为 4。The value is 4.
- Error - 与 HealthState 值为 Error 的输入匹配的筛选器。- Error - Filter that matches input with HealthState value Error. 值为 8。The value is 8.
- All - 与具有任意 HealthState 值的输入匹配的筛选器。- All - Filter that matches input with any HealthState value. 值为 65535。The value is 65535.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application infosfctl application info

获取 Service Fabric 应用程序的相关信息。Gets information about a Service Fabric application.

返回 Service Fabric 群集中已创建或正在创建且名称与指定为参数的应用程序匹配的应用程序相关信息。Returns the information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. 响应包括名称、类型、状态、参数以及应用程序的其他相关详细信息。The response includes the name, type, status, parameters, and other details about the application.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--exclude-application-parameters--exclude-application-parameters 该标志指定应用程序参数是否排除在结果之外。The flag that specifies whether application parameters will be excluded from the result.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application listsfctl application list

获取在 Service Fabric 群集中创建且与指定的筛选器匹配的应用程序列表。Gets the list of applications created in the Service Fabric cluster that match the specified filters.

获取 Service Fabric 群集中已创建或正在创建且与指定的筛选器匹配的应用程序相关信息。Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match the specified filters. 响应包括名称、类型、状态、参数以及应用程序的其他相关详细信息。The response includes the name, type, status, parameters, and other details about the application. 如果一页无法容纳这些应用程序,则返回一页结果及一个继续标记,该标记可用于获取下一页。If the applications do not fit in a page, one page of results is returned as well as a continuation token, which can be used to get the next page. 不能同时指定筛选器 ApplicationTypeName 和 ApplicationDefinitionKindFilter。Filters ApplicationTypeName and ApplicationDefinitionKindFilter cannot be specified at the same time.

参数Arguments

参数Argument 说明Description
--application-definition-kind-filter--application-definition-kind-filter 用来筛选 ApplicationDefinitionKind,它是用来定义 Service Fabric 应用程序的机制。Used to filter on ApplicationDefinitionKind, which is the mechanism used to define a Service Fabric application.
- Default - 默认值,它执行与选择“所有”时相同的功能。- Default - Default value, which performs the same function as selecting "All". 值为 0。The value is 0.
- All - 与任何 ApplicationDefinitionKind 值输入匹配的筛选器。- All - Filter that matches input with any ApplicationDefinitionKind value. 值为 65535。The value is 65535.
- ServiceFabricApplicationDescription - 与 ApplicationDefinitionKind 值 ServiceFabricApplicationDescription 输入匹配的筛选器。- ServiceFabricApplicationDescription - Filter that matches input with ApplicationDefinitionKind value ServiceFabricApplicationDescription. 值为 1。The value is 1.
- Compose - 与 ApplicationDefinitionKind 值 Compose 输入匹配的筛选器。- Compose - Filter that matches input with ApplicationDefinitionKind value Compose. 值为 2。The value is 2.
--application-type-name--application-type-name 用于筛选要查询的应用程序的应用程序类型名称。The application type name used to filter the applications to query for. 此值不应包含应用程序类型版本。This value should not contain the application type version.
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--exclude-application-parameters--exclude-application-parameters 该标志指定应用程序参数是否排除在结果之外。The flag that specifies whether application parameters will be excluded from the result.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application loadsfctl application load

获取 Service Fabric 应用程序的相关加载信息。Gets load information about a Service Fabric application.

返回 Service Fabric 群集中已创建或正在创建且名称与指定为参数的应用程序匹配的应用程序加载信息。Returns the load information about the application that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. 响应包括名称、最小节点数、最大节点数、应用程序目前占用的节点数以及有关应用程序的应用程序加载指标信息。The response includes the name, minimum nodes, maximum nodes, the number of nodes the application is occupying currently, and application load metric information about the application.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application manifestsfctl application manifest

获取描述应用程序类型的清单。Gets the manifest describing an application type.

响应包含字符串形式的应用程序清单 XML。The response contains the application manifest XML as a string.

参数Arguments

参数Argument 说明Description
--application-type-name [必需]--application-type-name [Required] 应用程序类型的名称。The name of the application type.
--application-type-version [必需]--application-type-version [Required] 应用程序类型的版本。The version of the application type.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application provisionsfctl application provision

使用外部存储中的 .sfpkg 包或使用映像存储中的应用程序包向群集预配或注册 Service Fabric 应用程序类型。Provisions or registers a Service Fabric application type with the cluster using the '.sfpkg' package in the external store or using the application package in the image store.

向群集预配 Service Fabric 应用程序类型。Provisions a Service Fabric application type with the cluster. 必须完成此预配才能实例化任意新应用程序。The provision is required before any new applications can be instantiated. 可以在 relativePathInImageStore 指定的应用程序包上或者使用外部 .sfpkg 的 URI 执行预配操作。The provision operation can be performed either on the application package specified by the relativePathInImageStore, or by using the URI of the external '.sfpkg'. 除非设置了 --external-provision,否则此命令需要映像存储预配。Unless --external-provision is set, this command will expect image store provision.

参数Arguments

参数Argument 说明Description
--application-package-download-uri--application-package-download-uri “.sfpkg”应用程序包的路径,可使用 HTTP 或 HTTPS 协议从该处下载应用程序包。The path to the '.sfpkg' application package from where the application package can be downloaded using HTTP or HTTPS protocols.

仅适用于预配种类的外部存储。For provision kind external store only. 应用程序包可以存储在外部存储中,该存储提供 GET 操作来下载文件。The application package can be stored in an external store that provides GET operation to download the file. 支持的协议为 HTTP 和 HTTPS,并且路径必须允许读取访问权限。Supported protocols are HTTP and HTTPS, and the path must allow READ access.
--application-type-build-path--application-type-build-path 仅适用于预配种类的映像存储。For provision kind image store only. 应用程序包在先前的上传操作中指定的映像存储中的相对路径。The relative path for the application package in the image store specified during the prior upload operation.
--application-type-name--application-type-name 仅适用于预配种类的外部存储。For provision kind external store only. 应用程序类型名称表示在应用程序清单中找到的应用程序类型的名称。The application type name represents the name of the application type found in the application manifest.
--application-type-version--application-type-version 仅适用于预配种类的外部存储。For provision kind external store only. 应用程序类型版本表示在应用程序清单中找到的应用程序类型的版本。The application type version represents the version of the application type found in the application manifest.
--external-provision--external-provision 可以从其中注册或预配应用程序包的位置。The location from where application package can be registered or provisioned. 指示预配针对之前上传到外部存储的应用程序包。Indicates that the provision is for an application package that was previously uploaded to an external store. 应用程序包以扩展名 *.sfpkg 结尾。The application package ends with the extension *.sfpkg.
--no-wait--no-wait 指示预配是否应当以异步方式进行。Indicates whether or not provisioning should occur asynchronously.

当设置为 true 时,预配操作将在请求被系统接受时返回,并且预配操作继续进行,没有任何超时限制。When set to true, the provision operation returns when the request is accepted by the system, and the provision operation continues without any timeout limit. 默认值是 False。The default value is false. 对于大型应用程序包,建议将值设置为 true。For large application packages, we recommend setting the value to true.
--timeout -t--timeout -t 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application report-healthsfctl application report-health

发送有关 Service Fabric 应用程序的运行状况报告。Sends a health report on the Service Fabric application.

报告指定的 Service Fabric 应用程序的运行状况。Reports health state of the specified Service Fabric application. 该报告必须包含有关运行状况报告及其所报告属性的源的信息。The report must contain the information about the source of the health report and property on which it is reported. 报告将发送到 Service Fabric 网关应用程序,后者会将其转发到运行状况存储。The report is sent to a Service Fabric gateway Application, which forwards to the health store. 该报告可能被网关接受但被运行状况存储在执行额外的验证后拒绝。The report may be accepted by the gateway, but rejected by the health store after extra validation. 例如,运行状况存储可能会由于无效的参数(如过时的序列号)而拒绝该报告。For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. 若要了解该报告是否已在运行状况存储中应用,请获取应用程序运行状况并检查该报告是否显示。To see whether the report was applied in the health store, get application health and check that the report appears.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application.

这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the '~' character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is 'fabric:/myapp/app1', the application identity would be 'myapp~app1' in 6.0+ and 'myapp/app1' in previous versions.
--health-property [必需]--health-property [Required] 运行状况信息的属性。The property of the health information.

一个实体可以有不同属性的运行状况报告。An entity can have health reports for different properties. 该属性是一个字符串,不是固定的枚举,因此可使报告器灵活地对触发报告的状态条件进行分类。The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. 例如,SourceId 为“LocalWatchdog”的报告器可以监视节点上的可用磁盘的状态,因此它可以报告该节点的“AvailableDisk”属性。For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, so it can report "AvailableDisk" property on that node. 同一报告器可以监视节点连接,因此它可以报告同一节点的“Connectivity”属性。The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. 在运行状况存储中,这些报告均被视为指定节点的单独运行状况事件。In the health store, these reports are treated as separate health events for the specified node. 与 SourceId 一起,该属性唯一地标识运行状况信息。Together with the SourceId, the property uniquely identifies the health information.
--health-state [必需]--health-state [Required] 可能的值包括:“Invalid”、“Ok”、“Warning”、“Error”、“Unknown”。Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.
--source-id [必需]--source-id [Required] 标识已生成运行状况信息的客户端/监视程序/系统组件的源名称。The source name that identifies the client/watchdog/system component that generated the health information.
--description--description 运行状况信息的说明。The description of the health information.

它表示用于添加有关该报告的用户可读信息的自定义文本。It represents free text used to add human readable information about the report. 该说明的最大字符串长度为 4096 个字符。The maximum string length for the description is 4096 characters. 如果所提供字符串的长度大于该值,它将被自动截断。If the provided string is longer, it will be automatically truncated. 截断时,该说明的末尾字符包含一个标记“[Truncated]”,并且总字符串大小为 4096 个字符。When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. 该标记的存在向用户指示截断已发生。The presence of the marker indicates to users that truncation occurred. 请注意,当截断时,该说明包含来自原始字符串的 4096 个以内的字符。Note that when truncated, the description has less than 4096 characters from the original string.
--immediate--immediate 一个用于指示是否应立即发送报告的标志。A flag that indicates whether the report should be sent immediately.

运行状况报告将发送到 Service Fabric 网关应用程序,后者会将其转发到运行状况存储。A health report is sent to a Service Fabric gateway Application, which forwards to the health store. 如果 Immediate 设置为 true,则报告将立即从 HTTP 网关发送至运行状况存储,而无论 HTTP 网关应用程序使用的 Fabric 客户端设置如何。If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, regardless of the fabric client settings that the HTTP Gateway Application is using. 这对于应尽快发送的关键报告十分有用。This is useful for critical reports that should be sent as soon as possible. 由于计时和其他情况,发送报告可能仍会失败,例如,在 HTTP 网关已关闭或消息无法到达网关的情况下。Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway is closed or the message doesn't reach the Gateway. 如果 Immediate 设置为 false,则报告将基于来自 HTTP 网关的运行状况客户端设置发送。If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. 因此,系统将根据 HealthReportSendInterval 配置对其进行批处理。Therefore, it will be batched according to the HealthReportSendInterval configuration. 这是建议的设置,因为它可让运行状况客户端优化发往运行状况存储的运行状况报告消息以及运行状况报告处理。This is the recommended setting because it allows the health client to optimize health reporting messages to health store as well as health report processing. 默认情况下,报告不立即发送。By default, reports are not sent immediately.
--remove-when-expired--remove-when-expired 该值指示是否在报告过期时从运行状况存储删除该报告。Value that indicates whether the report is removed from health store when it expires.

如果设置为 true,报告在过期后将从运行状况存储中删除。If set to true, the report is removed from the health store after it expires. 如果设置为 false,报告在过期时将被视为错误。If set to false, the report is treated as an error when expired. 此属性的值在默认情况下为 false。The value of this property is false by default. 当客户端定期报告时,它们应将 RemoveWhenExpired 设置为 false(默认值)。When clients report periodically, they should set RemoveWhenExpired false (default). 这样,如果报告器有问题(例如死锁)并且无法报告,那么在运行状况报告过期时该实体就会被评估为处于错误状态。This way, is the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. 这会将该实体标记为处于“Error”运行状况状态。This flags the entity as being in Error health state.
--sequence-number--sequence-number 此运行状况报告的序列号(采用数字字符串形式)。The sequence number for this health report as a numeric string.

报告序列号由运行状况存储用来检测过时的报告。The report sequence number is used by the health store to detect stale reports. 如果未指定,序列号将在报告被添加时由运行状况客户端自动生成。If not specified, a sequence number is auto-generated by the health client when a report is added.
--timeout -t--timeout -t 默认值: 60。Default: 60.
--ttl--ttl 此运行状况报告保持有效的持续时间。The duration for which this health report is valid. 此字段将 ISO8601 格式用于指定该持续时间。This field uses ISO8601 format for specifying the duration.

当客户端定期报告时,它们应以高于生存时间的频率发送报告。When clients report periodically, they should send reports with higher frequency than time to live. 如果客户端以非定期的方式报告,它们可以将生存时间设置为无限。If clients report on transition, they can set the time to live to infinite. 生存时间过期时,包含运行状况信息的运行状况事件将从运行状况存储中删除(如果 RemoveWhenExpired 为 true),或者将会评估为处于错误状态(如果 RemoveWhenExpired 为 false)。When time to live expires, the health event that contains the health information is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. 如果未指定,生存时间将默认为无限值。If not specified, time to live defaults to infinite value.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application typesfctl application type

获取 Service Fabric 群集中与指定名称完全匹配的应用程序类型的列表。Gets the list of application types in the Service Fabric cluster matching exactly the specified name.

返回 Service Fabric 群集中已预配或正在预配的应用程序类型的相关信息。Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. 这些结果为名称与指定为参数的应用程序类型完全匹配,并且符合给定查询参数的应用程序类型。These results are of application types whose name match exactly the one specified as the parameter, and which comply with the given query parameters. 返回与应用程序类型名称匹配的所有应用程序类型版本,每个版本作为一个应用程序类型返回。All versions of the application type matching the application type name are returned, with each version returned as one application type. 响应包括名称、版本、状态以及有关应用程序类型的其他详细信息。The response includes the name, version, status, and other details about the application type. 这是分页查询,如果一页无法容纳所有应用程序类型,则返回一页结果及一个继续标记,该标记可用于获取下一页。This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token, which can be used to get the next page. 例如,如果有 10 个应用程序类型,但一页仅能容纳前 3 个应用程序类型,或者最大结果数设置为 3,则返回 3 个结果。For example, if there are 10 application types but a page only fits the first three application types, or if max results is set to 3, then three is returned. 要访问其他结果,请使用下一查询中返回的继续标记来检索后续页面。To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. 如果没有后续页面,则返回空继续标记。An empty continuation token is returned if there are no subsequent pages.

参数Arguments

参数Argument 说明Description
--application-type-name [必需]--application-type-name [Required] 应用程序类型的名称。The name of the application type.
--application-type-version--application-type-version 应用程序类型的版本。The version of the application type.
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--exclude-application-parameters--exclude-application-parameters 该标志指定应用程序参数是否排除在结果之外。The flag that specifies whether application parameters will be excluded from the result.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application type-listsfctl application type-list

获取 Service Fabric 群集中应用程序类型的列表。Gets the list of application types in the Service Fabric cluster.

返回 Service Fabric 群集中已预配或正在预配的应用程序类型的相关信息。Returns the information about the application types that are provisioned or in the process of being provisioned in the Service Fabric cluster. 应用程序类型的每个版本作为一个应用程序类型返回。Each version of an application type is returned as one application type. 响应包括名称、版本、状态以及有关应用程序类型的其他详细信息。The response includes the name, version, status, and other details about the application type. 这是分页查询,如果一页无法容纳所有应用程序类型,则返回一页结果及一个继续标记,该标记可用于获取下一页。This is a paged query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a continuation token, which can be used to get the next page. 例如,如果有 10 个应用程序类型,但一页仅能容纳前 3 个应用程序类型,或者最大结果数设置为 3,则返回 3 个结果。For example, if there are 10 application types but a page only fits the first three application types, or if max results is set to 3, then three is returned. 要访问其他结果,请使用下一查询中返回的继续标记来检索后续页面。To access the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. 如果没有后续页面,则返回空继续标记。An empty continuation token is returned if there are no subsequent pages.

参数Arguments

参数Argument 说明Description
--application-type-definition-kind-filter--application-type-definition-kind-filter 用来筛选 ApplicationTypeDefinitionKind,它是用来定义 Service Fabric 应用程序类型的机制。Used to filter on ApplicationTypeDefinitionKind which is the mechanism used to define a Service Fabric application type.
- Default - 默认值,它执行与选择“所有”时相同的功能。- Default - Default value, which performs the same function as selecting "All". 值为 0。The value is 0.
- All - 与任何 ApplicationTypeDefinitionKind 值输入匹配的筛选器。- All - Filter that matches input with any ApplicationTypeDefinitionKind value. 值为 65535。The value is 65535.
- ServiceFabricApplicationPackage - 将输入与 ApplicationTypeDefinitionKind 值 ServiceFabricApplicationPackage 进行匹配的筛选器。- ServiceFabricApplicationPackage - Filter that matches input with ApplicationTypeDefinitionKind value ServiceFabricApplicationPackage. 值为 1。The value is 1.
- Compose - 与 ApplicationTypeDefinitionKind 值 Compose 输入匹配的筛选器。- Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. 值为 2。The value is 2.
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--exclude-application-parameters--exclude-application-parameters 该标志指定应用程序参数是否排除在结果之外。The flag that specifies whether application parameters will be excluded from the result.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application unprovisionsfctl application unprovision

从群集中删除或注销 Service Fabric 应用程序类型。Removes or unregisters a Service Fabric application type from the cluster.

仅当已删除应用程序类型的所有应用程序实例时,才可执行此操作。This operation can only be performed if all application instances of the application type have been deleted. 注销应用程序类型后,无法为此特定应用程序类型创建新的应用程序实例。Once the application type is unregistered, no new application instances can be created for this particular application type.

参数Arguments

参数Argument 说明Description
--application-type-name [必需]--application-type-name [Required] 应用程序类型的名称。The name of the application type.
--application-type-version [必需]--application-type-version [Required] 应用程序清单中定义的应用程序类型的版本。The version of the application type as defined in the application manifest.
--async-parameter--async-parameter 此标志指示取消预配是否应当以异步方式进行。The flag indicating whether or not unprovision should occur asynchronously. 当设置为 true 时,取消预配操作将在请求被系统接受时返回,并且取消预配操作继续进行,没有任何超时限制。When set to true, the unprovision operation returns when the request is accepted by the system, and the unprovision operation continues without any timeout limit. 默认值是 False。The default value is false. 但是,对于已预配的大型应用程序包,建议将其设置为 true。However, we recommend setting it to true for large application packages that were provisioned.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application upgradesfctl application upgrade

开始升级 Service Fabric 群集中的应用程序。Starts upgrading an application in the Service Fabric cluster.

验证提供的应用程序升级参数,如果参数有效,则开始升级应用程序。Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid. 请注意,升级说明将替换现有应用程序说明。Note that upgrade description replaces the existing application description. 这意味着,如果未指定参数,应用程序的现有参数将替换为空的参数列表。This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. 这会导致应用程序使用应用程序清单中的默认参数值。This would result in the application using the default value of the parameters from the application manifest.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application.

这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--application-version [必需]--application-version [Required] 应用程序升级的目标应用程序类型版本(在应用程序清单中找到)。The target application type version (found in the application manifest) for the application upgrade.
--parameters [必需]--parameters [Required] 升级应用程序时应用的应用程序参数替代的 JSON 编码列表。A JSON encoded list of application parameter overrides to be applied when upgrading the application.
--default-service-health-policy--default-service-health-policy 默认使用的健康策略的 JSON 编码规范,用于评估服务类型的运行状况。JSON encoded specification of the health policy used by default to evaluate the health of a service type.
--failure-action--failure-action 监视的升级违反监视策略或健康策略时要执行的操作。The action to perform when a Monitored upgrade encounters monitoring policy or health policy violations.
--force-restart--force-restart 即使代码版本没有改变,也在升级过程中强制重新启动进程。Forcefully restart processes during upgrade even when the code version has not changed.
--health-check-retry-timeout--health-check-retry-timeout 应用程序或群集不正常时尝试执行运行状况检查所间隔的时间长度。The length of time between attempts to perform health checks if the application or cluster is not healthy. 默认值: PT0H10M0S。Default: PT0H10M0S.
--health-check-stable-duration--health-check-stable-duration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. 默认值: PT0H2M0S。Default: PT0H2M0S.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--health-check-wait-duration--health-check-wait-duration 启动运行状况检查进程之前,完成升级域后等待的时间长度。The length of time to wait after completing an upgrade domain before starting the health checks process. 默认值: 0。Default: 0.
--max-unhealthy-apps--max-unhealthy-apps 允许的已部署的不正常应用程序的最大百分比。The maximum allowed percentage of unhealthy deployed applications. 由介于 0 到 100 间的数字表示。Represented as a number between 0 and 100.
--mode--mode 在滚动升级期间用于监视运行状况的模式。The mode used to monitor health during a rolling upgrade. 默认值: UnmonitoredAuto。Default: UnmonitoredAuto.
--replica-set-check-timeout--replica-set-check-timeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. 以秒为度量单位。Measured in seconds.
--service-health-policy--service-health-policy 包含每个服务类型名称的服务类型健康策略的 JSON 编码映射。JSON encoded map with service type health policy per service type name. 映射默认为空。The map is empty be default.
--timeout -t--timeout -t 默认值: 60。Default: 60.
--upgrade-domain-timeout--upgrade-domain-timeout 执行 FailureAction 前,每个升级域需等待的时长。The amount of time each upgrade domain has to complete before FailureAction is executed. 默认值: P10675199DT02H48M05.4775807S。Default: P10675199DT02H48M05.4775807S.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--upgrade-timeout--upgrade-timeout 执行 FailureAction 前,完成整个升级需等待的时长。The amount of time the overall upgrade has to complete before FailureAction is executed. 默认值: P10675199DT02H48M05.4775807S。Default: P10675199DT02H48M05.4775807S.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--warning-as-error--warning-as-error 指示是否将警告的严重性视为与错误相同。Indicates whether warnings are treated with the same severity as errors.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application upgrade-resumesfctl application upgrade-resume

继续升级 Service Fabric 群集中的应用程序。Resumes upgrading an application in the Service Fabric cluster.

恢复不受监控的手动 Service Fabric 应用程序升级。Resumes an unmonitored manual Service Fabric application upgrade. Service Fabric 每次升级一个升级域。Service Fabric upgrades one upgrade domain at a time. 对于不受监控的手动升级,Service Fabric 完成升级域后,会等待调用此 API,然后再继续升级下一个升级域。For unmonitored manual upgrades, after Service Fabric finishes an upgrade domain, it waits for you to call this API before proceeding to the next upgrade domain.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--upgrade-domain-name [必需]--upgrade-domain-name [Required] 要恢复升级的升级域的名称。The name of the upgrade domain in which to resume the upgrade.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application upgrade-rollbacksfctl application upgrade-rollback

开始回滚 Service Fabric 群集中当前正在进行的应用程序升级。Starts rolling back the currently on-going upgrade of an application in the Service Fabric cluster.

开始将当前应用程序升级回滚到以前的版本。Starts rolling back the current application upgrade to the previous version. 此 API 只可用于回滚当前正在进行的、前滚到新版本的升级。This API can only be used to roll back the current in-progress upgrade that is rolling forward to new version. 如果应用程序当前未在升级,请使用 StartApplicationUpgrade API 将其升级到所需版本,包括回滚到以前的版本。If the application is not currently being upgraded use StartApplicationUpgrade API to upgrade it to desired version, including rolling back to a previous version.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application upgrade-statussfctl application upgrade-status

获取对此应用程序执行的最近一次升级的详细信息。Gets details for the latest upgrade performed on this application.

返回有关最新应用程序升级状态的信息,以及可帮助调试应用程序运行状况问题的详细信息。Returns information about the state of the latest application upgrade along with details to aid debugging application health issues.

参数Arguments

参数Argument 说明Description
--application-id [必需]--application-id [Required] 应用程序的标识。The identity of the application. 这通常是不带“fabric:”URI 方案的应用程序全名。This is typically the full name of the application without the 'fabric:' URI scheme. 从版本 6.0 开始,分层名称以“~”字符隔开。Starting from version 6.0, hierarchical names are delimited with the "~" character. 例如,如果应用程序名称为“fabric:/myapp/app1”,则 6.0 及更高版本中的应用程序标识为“myapp~app1”,在以前的版本中为“myapp/app1”。For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in previous versions.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl application uploadsfctl application upload

将 Service Fabric 应用程序包复制到映像存储区。Copy a Service Fabric application package to the image store.

(可选)显示包中每个文件的上传进度。Optionally display upload progress for each file in the package. 上传进度发送到 stderrUpload progress is sent to stderr.

参数Arguments

参数Argument 说明Description
--path [必需]--path [Required] 本地应用程序包的路径。Path to local application package.
--compress--compress 仅适用于 Service Fabric 应用程序包。Applicable only to Service Fabric application packages. 在默认位置或 compressed-location 参数指定的位置创建一个包含压缩的应用程序包的新文件夹,然后上传新建的文件夹。Create a new folder containing the compressed application package to either the default location, or to the location specified by the compressed-location parameter, and then upload the newly created folder.

如果 sfctl 已生成压缩文件,设置此标志时,将覆盖该文件。If there is already a compressed file generated by sfctl, it will be overwritten if this flag is set. 如果目录不是应用程序包,将返回错误。An error will be returned if the directory is not an application package. 如果目录已经是压缩的应用程序包,将按原样复制文件夹。If it is already a compressed application package, the folder will be copied over as is. 默认情况下,在成功上传后,将删除新建的压缩应用程序包。By default, the newly created compressed application package will be deleted after a successful upload. 如果上传不成功,请根据需要手动清理压缩包。If upload is not successful, please manually clean up the compressed package as needed. 如果 compressed-location 参数引用不存在的目录,则删除操作不会删除任何可能已创建的空目录。The deletion does not remove any empty dirs which may have been created if the compressed location parameter references non-existent directories.
--compressed-location--compressed-location 要将压缩的应用程序包放到的位置。The location to put the compressed application package.

如果未提供任何位置,压缩包将放在新建的名为 sfctl_compressed_temp 的文件夹下,而该文件夹位于 path 参数中指定的父目录下。If no location is provided, the compressed package will be placed under a newly created folder called sfctl_compressed_temp under the parent directory specified in the path argument. 例如,如果 path 参数的值为 C:/FolderA/AppPkg,则压缩包将添加到 C:/FolderA/sfctl_compressed_temp/AppPkg。For example, if the path argument has value C:/FolderA/AppPkg, then the compressed package will be added to C:/FolderA/sfctl_compressed_temp/AppPkg.
--imagestore-string--imagestore-string 应用程序包上传到的目标映像存储区。Destination image store to upload the application package to. 默认值: fabric:ImageStore。Default: fabric:ImageStore.

若要上传到文件位置,请使用“file:”启动此参数。To upload to a file location, start this parameter with 'file:'. 否则,该值应为映像存储连接字符串,例如默认值。Otherwise the value should be the image store connection string, such as the default value.
--keep-compressed--keep-compressed 成功完成上传后是否保留生成的压缩包。Whether or not to keep the generated compressed package on successful upload completion.

如果未设置,则成功完成上传后,将删除压缩的应用包。If not set, then on successful completion, the compressed app packages will be deleted. 如果上传不成功,则应用程序包将始终保留在输出目录中,以便重新上传。If upload was not successful, then the application package will always be kept in the output directory for re-upload.
--show-progress--show-progress 显示大型包的文件上传进度。Show file upload progress for large packages.
--timeout -t--timeout -t 总超时,以秒为单位。The total timeout in seconds. 超过上传超时持续时间后,上传将失败并返回错误。Upload will fail and return error after the upload timeout duration has passed. 此超时适用于整个应用程序包,单独的文件超时将等于剩余的超时持续时间。This timeout applies to the entire application package, and individual file timeouts will equal the remaining timeout duration. 超时不包括压缩应用程序包所需的时间。Timeout does not include the time required to compress the application package. 默认值为 : 300。Default: 300.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

后续步骤Next steps