az sf application

Manage the applications running on a Service Fabric cluster.

Commands

az sf application create Creates a Service Fabric application using the specified description.
az sf application delete Deletes an existing Service Fabric application.
az sf application health Gets the health of the service fabric application.
az sf application list Gets the list of applications created in the Service Fabric cluster that match filters specified as the parameter.
az sf application manifest Gets the manifest describing an application type.
az sf application package-delete Deletes existing image store content.
az sf application provision Provisions or registers a Service Fabric application type with the cluster.
az sf application report-health Sends a health report on the Service Fabric application.
az sf application type Gets the list of application types in the Service Fabric cluster.
az sf application unprovision Removes or unregisters a Service Fabric application type from the cluster.
az sf application upgrade Starts upgrading an application in the Service Fabric cluster.
az sf application upload Copies a Service Fabric application package to the image store.

az sf application create

Creates a Service Fabric application using the specified description.

az sf application create --app-name
--app-type
--app-version
[--max-node-count]
[--metrics]
[--min-node-count]
[--parameters]
[--timeout]

Required Parameters

--app-name

The name of the application, including the 'fabric:' URI scheme.

--app-type

The application type name found in the application manifest.

--app-version

The version of the application type as defined in the application manifest.

Optional Parameters

--max-node-count

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

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

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

A JSON encoded list of application parameter overrides to be applied when creating the application.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application delete

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. By default Service Fabric will try to close service replicas in a graceful manner and then delete the service. However if service is having issues closing the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close sequence and forcefully delete the application and all of the its services.

az sf application delete --application-id
[--force-remove]
[--timeout]

Required Parameters

--application-id

The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme.

Optional Parameters

--force-remove

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

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application health

Returns the heath state of the service fabric application. The response reports either Ok, Error or Warning health state. If the entity is not found in the helath store, it will return Error.

az sf application health --application-id
[--deployed-applications-health-state-filter]
[--events-health-state-filter]
[--services-health-state-filter]
[--timeout]

Required Parameters

--application-id

The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme.

Optional Parameters

--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. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. 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 value. Matches any HealthState. The value is zero. - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535.

--events-health-state-filter

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. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. 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 value. Matches any HealthState. The value is zero. - None - Filter that doesn’t match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535.

--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. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. 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 value. Matches any HealthState. The value is zero. - None - Filter that doesn�t match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application list

Gets the information about the applications that were created or in the process of being created in the Service Fabric cluster and match filters specified as the parameter. 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.

az sf application list [--application-type-name]
[--continuation-token]
[--exclude-application-parameters]
[--timeout]

Optional Parameters

--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

The continuation token parameter is used to obtain next set of results. 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. 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. The value of this parameter should not be URL encoded.

--exclude-application-parameters

The flag that specifies whether application parameters will be excluded from the result.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application manifest

Gets the manifest describing an application type. The response contains the application manifest XML as a string.

az sf application manifest --application-type-name
--application-type-version
[--timeout]

Required Parameters

--application-type-name

The name of the application type.

--application-type-version

The version of the application type.

Optional Parameters

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application package-delete

Deletes existing image store content being found within the given image store relative path. This can be used to delete uploaded application packages once they are provisioned.

az sf application package-delete --content-path
[--timeout]

Required Parameters

--content-path

Relative path to file or folder in the image store from its root.

Optional Parameters

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application provision

Provisions or registers a Service Fabric application type with the cluster. This is required before any new applications can be instantiated.

az sf application provision --application-type-build-path
[--timeout]

Required Parameters

--application-type-build-path

The relative image store path to the application package.

Optional Parameters

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application report-health

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. 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, check that the report appears in the events section.

az sf application report-health --application-id
--health-property
--health-state
--source-id
[--description]
[--remove-when-expired]
[--sequence-number]
[--timeout]
[--ttl]

Required Parameters

--application-id

The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme.

--health-property

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. 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. 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. Together with the SourceId, the property uniquely identifies the health information.

--health-state

Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.

--source-id

The source name which identifies the client/watchdog/system component which generated the health information.

Optional Parameters

--description

The description of the health information. It represents free text used to add human readable information about the report. The maximum string length for the description is 4096 characters. If the provided string is longer, it will be automatically truncated. 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. Note that when truncated, the description has less than 4096 characters from the original string.

--remove-when-expired

Value that indicates whether the report is removed from health store when it expires. If set to true, the report is removed from the health store after it expires. If set to false, the report is treated as an error when expired. The value of this property is false by default. When clients report periodically, they should set this value to false (default). This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the health report expires. This flags the entity as being in Error health state.

--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

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60
--ttl

The duration, in milliseconds, for which this health report is valid. When clients report periodically, they should send reports with higher frequency than time to live. If not specified, time to live defaults to infinite value.

az sf application type

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. For example, if there are 10 application types but a page only fits the first 3 application types, or if max results is set to 3, then 3 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.

az sf application type [--continuation-token]
[--exclude-application-parameters]
[--max-results]
[--timeout]

Optional Parameters

--continuation-token

The continuation token parameter is used to obtain next set of results. 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. 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. The value of this parameter should not be URL encoded.

--exclude-application-parameters

The flag that specifies whether application parameters will be excluded from the result.

--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 queries includes as much results as possible that fit in the return message.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application unprovision

Removes or unregisters a Service Fabric application type from the cluster. This operation can only be performed if all application instance of the application type has been deleted. Once the application type is unregistered, no new application instance can be created for this particular application type.

az sf application unprovision --application-type-name
--application-type-version
[--timeout]

Required Parameters

--application-type-name

The name of the application type.

--application-type-version

The application type version.

Optional Parameters

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf application upgrade

Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid. Please 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 results in application using the default value of the parameters from the application manifest.

az sf application upgrade --app-id
--app-version
--parameters
[--default-service-health-policy]
[--failure-action]
[--force-restart]
[--health-check-retry-timeout]
[--health-check-stable-duration]
[--health-check-wait-duration]
[--max-unhealthy-apps]
[--mode]
[--replica-set-check-timeout]
[--service-health-policy]
[--timeout]
[--upgrade-domain-timeout]
[--upgrade-timeout]
[--warning-as-error]

Required Parameters

--app-id

The identity of the application. This is typically the full name of the application without the 'fabric:' URI scheme.

--app-version

The target application type version (found in the application manifest) for the application upgrade.

--parameters

A JSON encoded list of application parameter overrides to be applied when upgrading the application.

Optional Parameters

--default-service-health-policy

JSON encoded specification of the health policy used by default to evaluate the health of a service type.

--failure-action

The action to perform when a Monitored upgrade encounters monitoring policy or health policy violations.

--force-restart

Forcefully restart processes during upgrade even when the code version has not changed.

--health-check-retry-timeout

The amount of time to retry health evaluations when the application or cluster is unhealthy before the failure action is executed. Measured in milliseconds.

default value: PT0H10M0S
--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. Measured in milliseconds.

default value: PT0H2M0S
--health-check-wait-duration

The amount of time to wait after completing an upgrade domain before applying health policies. Measured in milliseconds.

default value: 0
--max-unhealthy-apps

The maximum allowed percentage of unhealthy deployed applications. Represented as a number between 0 and 100.

--mode

The mode used to monitor health during a rolling upgrade.

default value: UnmonitoredAuto
--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.

default value: 42949672925
--service-health-policy

JSON encoded map with service type health policy per service type name. The map is empty be default.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60
--upgrade-domain-timeout

The amount of time each upgrade domain has to complete before FailureAction is executed. Measured in milliseconds.

default value: P10675199DT02H48M05.4775807S
--upgrade-timeout

The amount of time the overall upgrade has to complete before FailureAction is executed. Measured in milliseconds.

default value: P10675199DT02H48M05.4775807S
--warning-as-error

Treat health evaluation warnings with the same severity as errors.

az sf application upload

The cmdlet copies a Service Fabric application package to the image store. After copying the application package, use the sf application provision cmdlet to register the application type. Can optionally display upload progress for each file in the package. Upload progress is sent to stderr.

az sf application upload --path
[--show-progress]

Required Parameters

--path

The path to your local application package.

Optional Parameters

--show-progress

Show file upload progress.