swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Azure Service Fabric Resource Provider API Client
  title: ServiceFabricManagementClient
  version: 2017-07-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/servicefabric/resource-manager/Microsoft.ServiceFabric/preview/2017-07-01-preview/application.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: servicefabric-application
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  api-version:
    default: 2017-07-01-preview
    description: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2017-07-01-preview" for this specification.
    enum:
      - 2017-07-01-preview
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: client
  applicationName:
    description: The name of the application resource.
    in: path
    name: applicationName
    required: true
    type: string
    x-ms-parameter-location: method
  applicationTypeName:
    description: The name of the application type name resource.
    in: path
    name: applicationTypeName
    required: true
    type: string
    x-ms-parameter-location: method
  clusterNameParameter:
    description: The name of the cluster resource.
    in: path
    name: clusterName
    required: true
    type: string
    x-ms-parameter-location: method
  resourceGroupNameParameter:
    description: The name of the resource group.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  serviceName:
    description: The name of the service resource in the format of {applicationName}~{serviceName}.
    in: path
    name: serviceName
    required: true
    type: string
    x-ms-parameter-location: method
  subscriptionId:
    description: The customer subscription identifier.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: client
  version:
    description: The application type version.
    in: path
    name: version
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.ServiceFabric/operations:
    get:
      description: Get the list of available Service Fabric resource provider API operations.
      operationId: Operations_List
      parameters:
        - description: The version of the Service Fabric resource provider API
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Lists all of the available Service Fabric resource provider API operations.
      tags:
        - Operations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes":
    get:
      description: Gets all application type name resources created or in the process of being created in the Service Fabric cluster resource.
      operationId: ApplicationTypes_List
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationTypeResourceList"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets the list of application type name resources created in the specified Service Fabric cluster resource.
      tags:
        - ApplicationType
      x-ms-examples:
        Get a list of application type name resources:
          parameters:
            api-version: 2017-07-01-preview
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType
                    location: eastus
                    name: myCluster
                    properties:
                      provisioningState: Succeeded
                    type: applicationTypes
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}":
    delete:
      description: Delete a Service Fabric application type name resource with the specified name.
      operationId: ApplicationTypes_Delete
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/api-version"
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
        "204":
          description: The resource was not found.
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Deletes a Service Fabric application type name resource.
      tags:
        - ApplicationType
      x-ms-examples:
        Delete an application type:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/6a367b2d-9f60-4941-b886-e348ddcb4127?api-version=2017-07-01-preview
                Retry-After: "10"
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource.
      operationId: ApplicationTypes_Get
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationTypeResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets a Service Fabric application type name resource.
      tags:
        - ApplicationType
      x-ms-examples:
        Get an application type:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType
                location: eastus
                name: myCluster
                properties:
                  provisioningState: Succeeded
                type: applicationTypes
              headers: {}
    put:
      description: Create or update a Service Fabric application type name resource with the specified name.
      operationId: ApplicationTypes_Create
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/api-version"
        - description: The application type name resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ApplicationTypeResource"
          x-ms-parameter-location: method
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationTypeResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Creates or updates a Service Fabric application type name resource.
      tags:
        - ApplicationType
      x-ms-examples:
        Put an application type:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType
              location: eastus
              name: myCluster
              type: applicationTypes
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType
                location: eastus
                name: myCluster
                properties:
                  provisioningState: Succeeded
                type: applicationTypes
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions":
    get:
      description: Gets all application type version resources created or in the process of being created in the Service Fabric application type name resource.
      operationId: ApplicationTypeVersions_List
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationTypeVersionResourceList"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets the list of application type version resources created in the specified Service Fabric application type name resource.
      tags:
        - ApplicationTypeVersion
      x-ms-examples:
        Get a list of application type version resources:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0
                    location: eastus
                    name: myCluster
                    properties:
                      appPackageUrl: http://fakelink.test.com/MyAppType
                      defaultParameterList: []
                      provisioningState: Updating
                    type: versions
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}":
    delete:
      description: Delete a Service Fabric application type version resource with the specified name.
      operationId: ApplicationTypeVersions_Delete
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/version"
        - $ref: "#/parameters/api-version"
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
        "204":
          description: The resource was not found.
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Deletes a Service Fabric application type version resource.
      tags:
        - ApplicationTypeVersion
      x-ms-examples:
        Delete an application type version:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
            version: "1.0"
          responses:
            "202":
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/28e62369-ed8c-4aba-8c05-ab7d6238cc3d?api-version=2017-07-01-preview
                Retry-After: "10"
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Get a Service Fabric application type version resource created or in the process of being created in the Service Fabric application type name resource.
      operationId: ApplicationTypeVersions_Get
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/version"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationTypeVersionResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets a Service Fabric application type version resource.
      tags:
        - ApplicationTypeVersion
      x-ms-examples:
        Get an application type version:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
            version: "1.0"
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0
                location: eastus
                name: myCluster
                properties:
                  appPackageUrl: http://fakelink.test.com/MyAppType
                  defaultParameterList: []
                  provisioningState: Updating
                type: versions
              headers: {}
    put:
      description: Create or update a Service Fabric application type version resource with the specified name.
      operationId: ApplicationTypeVersions_Create
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationTypeName"
        - $ref: "#/parameters/version"
        - $ref: "#/parameters/api-version"
        - description: The application type version resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ApplicationTypeVersionResource"
          x-ms-parameter-location: method
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
          schema:
            $ref: "#/definitions/ApplicationTypeVersionResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Creates or updates a Service Fabric application type version resource.
      tags:
        - ApplicationTypeVersion
      x-ms-examples:
        Put an application type version:
          parameters:
            api-version: 2017-07-01-preview
            applicationTypeName: myAppType
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0
              location: eastus
              name: myCluster
              properties:
                appPackageUrl: http://fakelink.test.com/MyAppType
              type: versions
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
            version: "1.0"
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applicationTypes/myAppType/versions/1.0
                location: eastus
                name: myCluster
                properties:
                  appPackageUrl: http://fakelink.test.com/MyAppType
                  defaultParameterList: []
                  provisioningState: Updating
                type: versions
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/e2413c7e-d51b-40ac-8155-bc85bf8ae856?api-version=2017-07-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications":
    get:
      description: Gets all application resources created or in the process of being created in the Service Fabric cluster resource.
      operationId: Applications_List
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationResourceList"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets the list of application resources created in the specified Service Fabric cluster resource.
      tags:
        - Application
      x-ms-examples:
        Get a list of application resources:
          parameters:
            api-version: 2017-07-01-preview
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
                    location: eastus
                    name: myCluster
                    properties:
                      metrics:
                        - MaximumCapacity: 3
                          Name: metric1
                          ReservationCapacity: 1
                          TotalApplicationCapacity: 5
                      provisioningState: Updating
                      removeApplicationCapacity: false
                      typeName: myAppType
                      typeVersion: "1.0"
                    type: applications
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}":
    delete:
      description: Delete a Service Fabric application resource with the specified name.
      operationId: Applications_Delete
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/api-version"
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
        "204":
          description: The resource was not found.
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Deletes a Service Fabric application resource.
      tags:
        - Application
      x-ms-examples:
        Delete an application:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/76053752-a423-4a80-b283-1dad1ba5f314?api-version=2017-07-01-preview
                Retry-After: "10"
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Get a Service Fabric application resource created or in the process of being created in the Service Fabric cluster resource.
      operationId: Applications_Get
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ApplicationResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets a Service Fabric application resource.
      tags:
        - Application
      x-ms-examples:
        Get an application:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
                location: eastus
                name: myCluster
                properties:
                  maximumNodes: 3
                  metrics:
                    - MaximumCapacity: 3
                      Name: metric1
                      ReservationCapacity: 1
                      TotalApplicationCapacity: 5
                  minimumNodes: 1
                  parameters:
                    param1: value1
                  provisioningState: Updating
                  removeApplicationCapacity: false
                  typeName: myAppType
                  typeVersion: "1.0"
                  upgradePolicy:
                    applicationHealthPolicy:
                      ConsiderWarningAsError: true
                      DefaultServiceTypeHealthPolicy:
                        maxPercentUnhealthyPartitionsPerService: 0
                        maxPercentUnhealthyReplicasPerPartition: 0
                        maxPercentUnhealthyServices: 0
                      MaxPercentUnhealthyDeployedApplications: 0
                    forceRestart: false
                    rollingUpgradeMonitoringPolicy:
                      failureAction: Rollback
                      healthCheckRetryTimeout: 00:10:00
                      healthCheckStableDuration: 00:05:00
                      healthCheckWaitDuration: 00:02:00
                      upgradeDomainTimeout: 1.06:00:00
                      upgradeTimeout: 01:00:00
                    upgradeReplicaSetCheckTimeout: 01:00:00
                type: applications
              headers: {}
    patch:
      description: Update a Service Fabric application resource with the specified name.
      operationId: Applications_Update
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/api-version"
        - description: The application resource for patch operations.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ApplicationResourceUpdate"
          x-ms-parameter-location: method
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
          schema:
            $ref: "#/definitions/ApplicationResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Updates a Service Fabric application resource.
      tags:
        - Application
      x-ms-examples:
        Patch an application:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
              location: eastus
              name: myCluster
              properties:
                metrics:
                  - MaximumCapacity: 3
                    Name: metric1
                    ReservationCapacity: 1
                    TotalApplicationCapacity: 5
                removeApplicationCapacity: false
                typeVersion: "1.0"
              type: applications
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
                location: eastus
                name: myCluster
                properties:
                  metrics:
                    - MaximumCapacity: 3
                      Name: metric1
                      ReservationCapacity: 1
                      TotalApplicationCapacity: 5
                  provisioningState: Updating
                  removeApplicationCapacity: false
                  typeName: myAppType
                  typeVersion: "1.0"
                type: applications
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/a553eb63-c332-40df-8ace-eb8d34a9b298?api-version=2017-07-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
    put:
      description: Create or update a Service Fabric application resource with the specified name.
      operationId: Applications_Create
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/api-version"
        - description: The application resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ApplicationResource"
          x-ms-parameter-location: method
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
          schema:
            $ref: "#/definitions/ApplicationResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Creates or updates a Service Fabric application resource.
      tags:
        - Application
      x-ms-examples:
        Put an application with maximum parameters:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
              location: eastus
              name: myCluster
              properties:
                maximumNodes: 3
                metrics:
                  - MaximumCapacity: 3
                    Name: metric1
                    ReservationCapacity: 1
                    TotalApplicationCapacity: 5
                minimumNodes: 1
                parameters:
                  param1: value1
                removeApplicationCapacity: false
                typeName: myAppType
                typeVersion: "1.0"
                upgradePolicy:
                  applicationHealthPolicy:
                    ConsiderWarningAsError: true
                    DefaultServiceTypeHealthPolicy:
                      maxPercentUnhealthyPartitionsPerService: 0
                      maxPercentUnhealthyReplicasPerPartition: 0
                      maxPercentUnhealthyServices: 0
                    MaxPercentUnhealthyDeployedApplications: 0
                  forceRestart: false
                  rollingUpgradeMonitoringPolicy:
                    failureAction: Rollback
                    healthCheckRetryTimeout: 00:10:00
                    healthCheckStableDuration: 00:05:00
                    healthCheckWaitDuration: 00:02:00
                    upgradeDomainTimeout: 1.06:00:00
                    upgradeTimeout: 01:00:00
                  upgradeReplicaSetCheckTimeout: 01:00:00
              type: applications
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
                location: eastus
                name: myCluster
                properties:
                  maximumNodes: 3
                  metrics:
                    - MaximumCapacity: 3
                      Name: metric1
                      ReservationCapacity: 1
                      TotalApplicationCapacity: 5
                  minimumNodes: 1
                  parameters:
                    param1: value1
                  provisioningState: Updating
                  removeApplicationCapacity: false
                  typeName: myAppType
                  typeVersion: "1.0"
                  upgradePolicy:
                    applicationHealthPolicy:
                      ConsiderWarningAsError: true
                      DefaultServiceTypeHealthPolicy:
                        maxPercentUnhealthyPartitionsPerService: 0
                        maxPercentUnhealthyReplicasPerPartition: 0
                        maxPercentUnhealthyServices: 0
                      MaxPercentUnhealthyDeployedApplications: 0
                    forceRestart: false
                    rollingUpgradeMonitoringPolicy:
                      failureAction: Rollback
                      healthCheckRetryTimeout: 00:10:00
                      healthCheckStableDuration: 00:05:00
                      healthCheckWaitDuration: 00:02:00
                      upgradeDomainTimeout: 1.06:00:00
                      upgradeTimeout: 01:00:00
                    upgradeReplicaSetCheckTimeout: 01:00:00
                type: applications
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/9c2ce367-47ea-43de-b69e-c5a423da4557?api-version=2017-07-01-preview
                Retry-After: "10"
        Put an application with minimum parameters:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
              location: eastus
              name: myCluster
              properties:
                removeApplicationCapacity: false
                typeName: myAppType
                typeVersion: "1.0"
              type: applications
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp
                location: eastus
                name: myCluster
                properties:
                  provisioningState: Updating
                  removeApplicationCapacity: false
                  typeName: myAppType
                  typeVersion: "1.0"
                type: applications
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/5dce62ce-439b-47af-81d8-99ab14708e91?api-version=2017-07-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services":
    get:
      description: Gets all service resources created or in the process of being created in the Service Fabric application resource.
      operationId: Services_List
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ServiceResourceList"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets the list of service resources created in the specified Service Fabric application resource.
      tags:
        - Service
      x-ms-examples:
        Get a list of service resources:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            resourceGroupName: resRg
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
                    location: eastus
                    name: myCluster
                    properties:
                      instanceCount: 1
                      partitionDescription:
                        PartitionScheme: Singleton
                      provisioningState: Updating
                      serviceKind: Stateless
                      serviceLoadMetrics:
                        - Name: metric1
                          Weight: Low
                      serviceTypeName: myServiceType
                    type: services
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}":
    delete:
      description: Delete a Service Fabric service resource with the specified name.
      operationId: Services_Delete
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/serviceName"
        - $ref: "#/parameters/api-version"
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
        "204":
          description: The resource was not found.
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Deletes a Service Fabric service resource.
      tags:
        - Service
      x-ms-examples:
        Delete a service:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            resourceGroupName: resRg
            serviceName: myService
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/41fa5ef9-7f34-4c36-a730-93e0bb757d22?api-version=2017-07-01-preview
                Retry-After: "10"
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Get a Service Fabric service resource created or in the process of being created in the Service Fabric application resource.
      operationId: Services_Get
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/serviceName"
        - $ref: "#/parameters/api-version"
      responses:
        "200":
          description: The operation completed successfully.
          schema:
            $ref: "#/definitions/ServiceResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Gets a Service Fabric service resource.
      tags:
        - Service
      x-ms-examples:
        Get a service:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            resourceGroupName: resRg
            serviceName: myService
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
                location: eastus
                name: myCluster
                properties:
                  defaultMoveCost: Medium
                  instanceCount: 5
                  partitionDescription:
                    PartitionScheme: Singleton
                  placementConstraints: NodeType==frontend
                  provisioningState: Updating
                  serviceKind: Stateless
                  serviceLoadMetrics:
                    - Name: metric1
                      Weight: Low
                  servicePlacementPolicies: []
                  serviceTypeName: myServiceType
                type: services
              headers: {}
    patch:
      description: Update a Service Fabric service resource with the specified name.
      operationId: Services_Update
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/serviceName"
        - $ref: "#/parameters/api-version"
        - description: The service resource for patch operations.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ServiceResourceUpdate"
          x-ms-parameter-location: method
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
          schema:
            $ref: "#/definitions/ServiceResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Updates a Service Fabric service resource.
      tags:
        - Service
      x-ms-examples:
        Patch a service:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
              location: eastus
              name: myCluster
              properties:
                serviceKind: Stateless
                serviceLoadMetrics:
                  - Name: metric1
                    Weight: Low
              type: services
            resourceGroupName: resRg
            serviceName: myService
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
                location: eastus
                name: myCluster
                properties:
                  instanceCount: 1
                  partitionDescription:
                    PartitionScheme: Singleton
                  provisioningState: Updating
                  serviceKind: Stateless
                  serviceLoadMetrics:
                    - Name: metric1
                      Weight: Low
                  serviceTypeName: myServiceType
                type: services
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/4dde8d8b-b6b2-4c56-99c6-9b83932bb09a?api-version=2017-07-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
    put:
      description: Create or update a Service Fabric service resource with the specified name.
      operationId: Services_Create
      parameters:
        - $ref: "#/parameters/subscriptionId"
        - $ref: "#/parameters/resourceGroupNameParameter"
        - $ref: "#/parameters/clusterNameParameter"
        - $ref: "#/parameters/applicationName"
        - $ref: "#/parameters/serviceName"
        - $ref: "#/parameters/api-version"
        - description: The service resource.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ServiceResource"
          x-ms-parameter-location: method
      responses:
        "202":
          description: The request was accepted and the operation will complete asynchronously.
          schema:
            $ref: "#/definitions/ServiceResource"
        default:
          description: The detailed error response.
          schema:
            $ref: "#/definitions/ErrorModel"
      summary: Creates or updates a Service Fabric service resource.
      tags:
        - Service
      x-ms-examples:
        Put a service with maximum parameters:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
              location: eastus
              name: myCluster
              properties:
                correlationScheme:
                  - Scheme: Affinity
                    ServiceName: fabric:/app1/app1~svc1
                defaultMoveCost: Medium
                instanceCount: 5
                partitionDescription:
                  PartitionScheme: Singleton
                placementConstraints: NodeType==frontend
                serviceKind: Stateless
                serviceLoadMetrics:
                  - Name: metric1
                    Weight: Low
                servicePlacementPolicies: []
                serviceTypeName: myServiceType
              type: services
            resourceGroupName: resRg
            serviceName: myService
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
                location: eastus
                name: myCluster
                properties:
                  defaultMoveCost: Medium
                  instanceCount: 5
                  partitionDescription:
                    PartitionScheme: Singleton
                  placementConstraints: NodeType==frontend
                  provisioningState: Updating
                  serviceKind: Stateless
                  serviceLoadMetrics:
                    - Name: metric1
                      Weight: Low
                  servicePlacementPolicies: []
                  serviceTypeName: myServiceType
                type: services
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/2e633105-aadc-4928-9164-d76b974170a3?api-version=2017-07-01-preview
                Retry-After: "10"
        Put a service with minimum parameters:
          parameters:
            api-version: 2017-07-01-preview
            applicationName: myApp
            clusterName: myCluster
            parameters:
              id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
              location: eastus
              name: myCluster
              properties:
                instanceCount: 1
                partitionDescription:
                  PartitionScheme: Singleton
                serviceKind: Stateless
                serviceTypeName: myServiceType
              type: services
            resourceGroupName: resRg
            serviceName: myService
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "202":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService
                location: eastus
                name: myCluster
                properties:
                  instanceCount: 1
                  partitionDescription:
                    PartitionScheme: Singleton
                  provisioningState: Updating
                  serviceKind: Stateless
                  serviceTypeName: myServiceType
                type: services
              headers:
                Location: http://10.91.140.224/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/operationResults/5bc615c3-6c5b-4593-80e1-008f55376ec7?api-version=2017-07-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
definitions:
  ApplicationMetricDescription:
    description: |
      Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application.
    properties:
      MaximumCapacity:
        description: |
          The maximum node capacity for Service Fabric application.
          This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value.
          If set to zero, capacity for this metric is unlimited on each node.
          When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
          When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
        format: int64
        type: integer
      Name:
        description: The name of the metric.
        type: string
      ReservationCapacity:
        description: |
          The node reservation capacity for Service Fabric application.
          This is the amount of load which is reserved on nodes which have instances of this application.
          If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application.
          If set to zero, no capacity is reserved for this metric.
          When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.
        format: int64
        type: integer
      TotalApplicationCapacity:
        description: |
          The total metric capacity for Service Fabric application.
          This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value.
          When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.
        format: int64
        type: integer
    type: object
  ApplicationMetricDescriptionList:
    description: List of application capacity metric description.
    items:
      $ref: "#/definitions/ApplicationMetricDescription"
    type: array
  ApplicationParameterList:
    additionalProperties:
      type: string
    description: List of application parameters with overridden values from their default values specified in the application manifest.
    type: object
  ApplicationResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: The application resource.
    properties:
      properties:
        $ref: "#/definitions/ApplicationResourceProperties"
        description: The application resource properties.
        x-ms-client-flatten: true
  ApplicationResourceList:
    description: The list of application resources.
    properties:
      value:
        items:
          $ref: "#/definitions/ApplicationResource"
        type: array
  ApplicationResourceProperties:
    allOf:
      - $ref: "#/definitions/ApplicationResourceUpdateProperties"
    description: The application resource properties.
    properties:
      provisioningState:
        description: The current deployment or provisioning state, which only appears in the response
        readOnly: true
        type: string
      typeName:
        $ref: "#/definitions/ApplicationTypeName"
        description: The application type name as defined in the application manifest.
  ApplicationResourceUpdate:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: The application resource for patch operations.
    properties:
      properties:
        $ref: "#/definitions/ApplicationResourceUpdateProperties"
        description: The application resource properties for patch operations.
        x-ms-client-flatten: true
  ApplicationResourceUpdateProperties:
    description: The application resource properties for patch operations.
    properties:
      maximumNodes:
        default: 0
        description: 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. By default, the value of this property is zero and it means that the services can be placed on any node.
        format: int64
        minimum: 0
        type: integer
      metrics:
        $ref: "#/definitions/ApplicationMetricDescriptionList"
        description: List of application capacity metric description.
      minimumNodes:
        description: 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. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
        format: int64
        minimum: 0
        type: integer
      parameters:
        $ref: "#/definitions/ApplicationParameterList"
        description: List of application parameters with overridden values from their default values specified in the application manifest.
      removeApplicationCapacity:
        description: Remove the current application capacity settings.
        type: boolean
      typeVersion:
        $ref: "#/definitions/ApplicationTypeVersion"
        description: The version of the application type as defined in the application manifest.
      upgradePolicy:
        $ref: "#/definitions/ApplicationUpgradePolicy"
        description: Describes the policy for a monitored application upgrade.
  ApplicationTypeName:
    description: The application type name as defined in the application manifest.
    type: string
  ApplicationTypeParameterList:
    additionalProperties:
      type: string
    description: List of application type parameters that can be overridden when creating or updating the application.
    type: object
  ApplicationTypeResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: The application type name resource
    properties:
      properties:
        $ref: "#/definitions/ApplicationTypeResourceProperties"
        description: The application type name properties
        x-ms-client-flatten: true
  ApplicationTypeResourceList:
    description: The list of application type names.
    properties:
      value:
        items:
          $ref: "#/definitions/ApplicationTypeResource"
        type: array
  ApplicationTypeResourceProperties:
    description: The application type name properties
    properties:
      provisioningState:
        description: The current deployment or provisioning state, which only appears in the response.
        readOnly: true
        type: string
  ApplicationTypeVersion:
    description: The version of the application type as defined in the application manifest.
    type: string
  ApplicationTypeVersionResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: An application type version resource for the specified application type name resource.
    properties:
      properties:
        $ref: "#/definitions/ApplicationTypeVersionResourceProperties"
        description: The properties of the application type version resource.
        x-ms-client-flatten: true
  ApplicationTypeVersionResourceList:
    description: The list of application type version resources for the specified application type name resource.
    properties:
      value:
        items:
          $ref: "#/definitions/ApplicationTypeVersionResource"
        type: array
  ApplicationTypeVersionResourceProperties:
    description: The properties of the application type version resource.
    properties:
      appPackageUrl:
        description: The URL to the application package
        type: string
      defaultParameterList:
        $ref: "#/definitions/ApplicationTypeParameterList"
        description: List of application type parameters that can be overridden when creating or updating the application.
        readOnly: true
      provisioningState:
        description: The current deployment or provisioning state, which only appears in the response
        readOnly: true
        type: string
    required:
      - appPackageUrl
  ApplicationUpgradePolicy:
    description: Describes the policy for a monitored application upgrade.
    properties:
      applicationHealthPolicy:
        $ref: "#/definitions/ArmApplicationHealthPolicy"
        description: |
          Defines a health policy used to evaluate the health of an application or one of its children entities.
      forceRestart:
        $ref: "#/definitions/ForceRestart"
        description: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
      rollingUpgradeMonitoringPolicy:
        $ref: "#/definitions/ArmRollingUpgradeMonitoringPolicy"
        description: The policy used for monitoring the application upgrade
      upgradeReplicaSetCheckTimeout:
        description: The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).
        type: string
  ArmApplicationHealthPolicy:
    description: |
      Defines a health policy used to evaluate the health of an application or one of its children entities.
    properties:
      ConsiderWarningAsError:
        default: false
        description: Indicates whether warnings are treated with the same severity as errors.
        type: boolean
      DefaultServiceTypeHealthPolicy:
        $ref: "#/definitions/ArmServiceTypeHealthPolicy"
        description: The health policy used by default to evaluate the health of a service type.
      MaxPercentUnhealthyDeployedApplications:
        default: 0
        description: |
          The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.
          The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.
          This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.
          The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
        type: integer
      ServiceTypeHealthPolicyMap:
        $ref: "#/definitions/ArmServiceTypeHealthPolicyMap"
        description: The map with service type health policy per service type name. The map is empty by default.
    type: object
  ArmRollingUpgradeMonitoringPolicy:
    description: The policy used for monitoring the application upgrade
    properties:
      failureAction:
        description: The activation Mode of the service package
        enum:
          - Rollback
          - Manual
        type: string
        x-ms-enum:
          modelAsString: true
          name: ArmUpgradeFailureAction
          values:
            - description: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.
              value: Rollback
            - description: Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically.
              value: Manual
      healthCheckRetryTimeout:
        $ref: "#/definitions/HealthCheckRetryTimeout"
        description: The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. 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.
      healthCheckStableDuration:
        $ref: "#/definitions/HealthCheckStableDuration"
        description: The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. 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.
      healthCheckWaitDuration:
        $ref: "#/definitions/HealthCheckWaitDuration"
        description: The amount of time to wait after completing an upgrade domain before applying health policies. 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.
      upgradeDomainTimeout:
        $ref: "#/definitions/UpgradeDomainTimeout"
        description: The amount of time each upgrade domain has to complete before FailureAction is executed. 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.
      upgradeTimeout:
        $ref: "#/definitions/UpgradeTimeout"
        description: The amount of time the overall upgrade has to complete before FailureAction is executed. 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.
  ArmServiceTypeHealthPolicy:
    description: |
      Represents the health policy used to evaluate the health of services belonging to a service type.
    properties:
      maxPercentUnhealthyPartitionsPerService:
        default: 0
        description: |
          The maximum percentage of partitions per service allowed to be unhealthy before your application is considered in error.
        maximum: 100
        minimum: 0
        type: integer
      maxPercentUnhealthyReplicasPerPartition:
        default: 0
        description: |
          The maximum percentage of replicas per partition allowed to be unhealthy before your application is considered in error.
        maximum: 100
        minimum: 0
        type: integer
      maxPercentUnhealthyServices:
        default: 0
        description: |
          The maximum percentage of services allowed to be unhealthy before your application is considered in error.
        maximum: 100
        minimum: 0
        type: integer
    type: object
  ArmServiceTypeHealthPolicyMap:
    additionalProperties:
      $ref: "#/definitions/ArmServiceTypeHealthPolicy"
    description: |
      Defines a ServiceTypeHealthPolicy per service type name.

      The entries in the map replace the default service type health policy for each specified service type.
      For example, in an application that contains both a stateless gateway service type and a stateful engine service type, the health policies for the stateless and stateful services can be configured differently.
      With policy per service type, there's more granular control of the health of the service.

      If no policy is specified for a service type name, the DefaultServiceTypeHealthPolicy is used for evaluation.
    type: object
  AvailableOperationDisplay:
    description: Operation supported by Service Fabric resource provider
    properties:
      description:
        description: Operation description
        type: string
      operation:
        description: The operation that can be performed.
        type: string
      provider:
        description: The name of the provider.
        type: string
      resource:
        description: The resource on which the operation is performed
        type: string
  CorrelationSchemeList:
    description: A list that describes the correlation of the service with other services.
    items:
      $ref: "#/definitions/ServiceCorrelationDescription"
    type: array
  ErrorModel:
    description: The structure of the error.
    properties:
      error:
        $ref: "#/definitions/ErrorModelError"
        description: The error details.
  ErrorModelError:
    description: The error details.
    properties:
      code:
        description: The error code.
        type: string
      message:
        description: The error message.
        type: string
  ForceRestart:
    default: false
    description: If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
    type: boolean
  HealthCheckRetryTimeout:
    default: PT0H10M0S
    description: The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. 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.
    type: string
  HealthCheckStableDuration:
    default: PT0H2M0S
    description: The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. 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.
    type: string
  HealthCheckWaitDuration:
    default: "0"
    description: The amount of time to wait after completing an upgrade domain before applying health policies. 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.
    type: string
  MoveCost:
    description: Specifies the move cost for the service.
    enum:
      - Zero
      - Low
      - Medium
      - High
    type: string
    x-ms-enum:
      modelAsString: true
      name: MoveCost
      values:
        - description: Zero move cost. This value is zero.
          value: Zero
        - description: Specifies the move cost of the service as Low. The value is 1.
          value: Low
        - description: Specifies the move cost of the service as Medium. The value is 2.
          value: Medium
        - description: Specifies the move cost of the service as High. The value is 3.
          value: High
  NamedPartitionSchemeDescription:
    allOf:
      - $ref: "#/definitions/PartitionSchemeDescription"
      - description: NamedPartitionSchemeDescription
        type: object
    description: Describes the named partition scheme of the service.
    properties:
      Count:
        description: The number of partitions.
        type: integer
      Names:
        description: Array of size specified by the ‘Count’ parameter, for the names of the partitions.
        items:
          type: string
        type: array
    required:
      - Count
      - Names
    x-ms-discriminator-value: Named
  OperationListResult:
    description: Describes the result of the request to list Service Fabric operations.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: List of Service Fabric operations supported by the Microsoft.ServiceFabric resource provider.
        items:
          $ref: "#/definitions/OperationResult"
        type: array
  OperationResult:
    description: Available operation list result
    properties:
      display:
        $ref: "#/definitions/AvailableOperationDisplay"
        description: The object that represents the operation.
      name:
        description: The name of the operation.
        type: string
      nextLink:
        description: The URL to use for getting the next set of results.
        type: string
      origin:
        description: Origin result
        type: string
  PartitionScheme:
    description: Enumerates the ways that a service can be partitioned.
    enum:
      - Invalid
      - Singleton
      - UniformInt64Range
      - Named
    type: string
    x-ms-enum:
      modelAsString: true
      name: PartitionScheme
      values:
        - description: Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
          value: Invalid
        - description: Indicates that the partition is based on string names, and is a SingletonPartitionSchemeDescription object, The value is 1.
          value: Singleton
        - description: Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionSchemeDescription object. The value is 2.
          value: UniformInt64Range
        - description: Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription object. The value is 3
          value: Named
  PartitionSchemeDescription:
    description: Describes how the service is partitioned.
    discriminator: PartitionScheme
    properties:
      PartitionScheme:
        $ref: "#/definitions/PartitionScheme"
        description: Specifies how the service is partitioned.
    required:
      - PartitionScheme
    type: object
  ProxyResource:
    description: The resource model definition for proxy-only resource.
    properties:
      id:
        description: Azure resource identifier.
        readOnly: true
        type: string
      location:
        description: Azure resource location.
        type: string
        x-ms-mutability:
          - create
          - read
      name:
        description: Azure resource name.
        readOnly: true
        type: string
      type:
        description: Azure resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ServiceCorrelationDescription:
    description: Creates a particular correlation between services.
    properties:
      Scheme:
        $ref: "#/definitions/ServiceCorrelationScheme"
        description: The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName.
      ServiceName:
        $ref: "#/definitions/ServiceName"
        description: The name of the service that the correlation relationship is established with.
    required:
      - Scheme
      - ServiceName
    type: object
  ServiceCorrelationScheme:
    description: The service correlation scheme.
    enum:
      - Invalid
      - Affinity
      - AlignedAffinity
      - NonAlignedAffinity
    type: string
    x-ms-enum:
      modelAsString: true
      name: ServiceCorrelationScheme
      values:
        - description: An invalid correlation scheme. Cannot be used. The value is zero.
          value: Invalid
        - description: Indicates that this service has an affinity relationship with another service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity options. The value is 1.
          value: Affinity
        - description: Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 2.
          value: AlignedAffinity
        - description: Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 3.
          value: NonAlignedAffinity
  ServiceKind:
    description: The kind of service (Stateless or Stateful).
    enum:
      - Invalid
      - Stateless
      - Stateful
    type: string
    x-ms-enum:
      modelAsString: true
      name: ServiceKind
      values:
        - description: Indicates the service kind is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
          value: Invalid
        - description: Does not use Service Fabric to make its state highly available or reliable. The value is 1.
          value: Stateless
        - description: Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 2.
          value: Stateful
  ServiceLoadMetricDescription:
    description: Specifies a metric to load balance a service during runtime.
    properties:
      DefaultLoad:
        description: Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
        type: integer
      Name:
        description: The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
        type: string
      PrimaryDefaultLoad:
        description: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
        type: integer
      SecondaryDefaultLoad:
        description: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
        type: integer
      Weight:
        $ref: "#/definitions/ServiceLoadMetricWeight"
        description: The service load metric relative weight, compared to other metrics configured for this service, as a number.
    required:
      - Name
    type: object
  ServiceLoadMetricWeight:
    description: Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.
    enum:
      - Zero
      - Low
      - Medium
      - High
    type: string
    x-ms-enum:
      modelAsString: true
      name: ServiceLoadMetricWeight
      values:
        - description: Disables resource balancing for this metric. This value is zero.
          value: Zero
        - description: Specifies the metric weight of the service load as Low. The value is 1.
          value: Low
        - description: Specifies the metric weight of the service load as Medium. The value is 2.
          value: Medium
        - description: Specifies the metric weight of the service load as High. The value is 3.
          value: High
  ServiceLoadMetricsList:
    description: The service load metrics is given as an array of ServiceLoadMetricDescription objects.
    items:
      $ref: "#/definitions/ServiceLoadMetricDescription"
    type: array
  ServiceName:
    description: The full name of the service with 'fabric:' URI scheme.
    type: string
  ServicePlacementPoliciesList:
    description: A list that describes the correlation of the service with other services.
    items:
      $ref: "#/definitions/ServicePlacementPolicyDescription"
    type: array
  ServicePlacementPolicyDescription:
    description: Describes the policy to be used for placement of a Service Fabric service.
    discriminator: Type
    properties:
      Type:
        $ref: "#/definitions/ServicePlacementPolicyType"
        description: The type of placement policy for a service fabric service. Following are the possible values.
    required:
      - Type
    type: object
  ServicePlacementPolicyType:
    description: The type of placement policy for a service fabric service. Following are the possible values.
    enum:
      - Invalid
      - InvalidDomain
      - RequiredDomain
      - PreferredPrimaryDomain
      - RequiredDomainDistribution
      - NonPartiallyPlaceService
    type: string
    x-ms-enum:
      modelAsString: true
      name: ServicePlacementPolicyType
      values:
        - description: Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
          value: Invalid
        - description: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 1.
          value: InvalidDomain
        - description: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 2.
          value: RequiredDomain
        - description: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 3.
          value: PreferredPrimaryDomain
        - description: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4.
          value: RequiredDomainDistribution
        - description: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5.
          value: NonPartiallyPlaceService
  ServiceResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: The service resource.
    properties:
      properties:
        $ref: "#/definitions/ServiceResourceProperties"
        description: The service resource properties.
        x-ms-client-flatten: true
  ServiceResourceList:
    description: The list of service resources.
    properties:
      value:
        items:
          $ref: "#/definitions/ServiceResource"
        type: array
  ServiceResourceProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourcePropertiesBase"
    description: The service resource properties.
    discriminator: serviceKind
    properties:
      partitionDescription:
        $ref: "#/definitions/PartitionSchemeDescription"
        description: Describes how the service is partitioned.
      provisioningState:
        description: The current deployment or provisioning state, which only appears in the response
        readOnly: true
        type: string
      serviceKind:
        $ref: "#/definitions/ServiceKind"
        description: The kind of service (Stateless or Stateful).
      serviceTypeName:
        description: The name of the service type
        type: string
    required:
      - serviceKind
  ServiceResourcePropertiesBase:
    description: The common service resource properties.
    properties:
      correlationScheme:
        $ref: "#/definitions/CorrelationSchemeList"
        description: A list that describes the correlation of the service with other services.
      defaultMoveCost:
        $ref: "#/definitions/MoveCost"
        description: Specifies the move cost for the service.
      placementConstraints:
        description: 'The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".'
        type: string
      serviceLoadMetrics:
        $ref: "#/definitions/ServiceLoadMetricsList"
        description: The service load metrics is given as an array of ServiceLoadMetricDescription objects.
      servicePlacementPolicies:
        $ref: "#/definitions/ServicePlacementPoliciesList"
        description: A list that describes the correlation of the service with other services.
  ServiceResourceUpdate:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: The service resource for patch operations.
    properties:
      properties:
        $ref: "#/definitions/ServiceResourceUpdateProperties"
        description: The service resource properties for patch operations.
        x-ms-client-flatten: true
  ServiceResourceUpdateProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourcePropertiesBase"
    description: The service resource properties for patch operations.
    discriminator: serviceKind
    properties:
      serviceKind:
        $ref: "#/definitions/ServiceKind"
        description: The kind of service (Stateless or Stateful).
    required:
      - serviceKind
  SingletonPartitionSchemeDescription:
    allOf:
      - $ref: "#/definitions/PartitionSchemeDescription"
      - description: SingletonPartitionSchemeDescription
        type: object
    description: Describes the partition scheme of a singleton-partitioned, or non-partitioned service.
    x-ms-discriminator-value: Singleton
  StatefulServiceProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourceProperties"
    description: The properties of a stateful service resource.
    properties:
      hasPersistedState:
        description: A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.
        type: boolean
      minReplicaSetSize:
        description: The minimum replica set size as a number.
        minimum: 1
        type: integer
      quorumLossWaitDuration:
        description: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      replicaRestartWaitDuration:
        description: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      standByReplicaKeepDuration:
        description: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      targetReplicaSetSize:
        description: The target replica set size as a number.
        minimum: 1
        type: integer
    x-ms-discriminator-value: Stateful
  StatefulServiceUpdateProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourceUpdateProperties"
    description: The properties of a stateful service resource for patch operations.
    properties:
      minReplicaSetSize:
        description: The minimum replica set size as a number.
        minimum: 1
        type: integer
      quorumLossWaitDuration:
        description: The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      replicaRestartWaitDuration:
        description: The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      standByReplicaKeepDuration:
        description: The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).
        format: date-time
        type: string
      targetReplicaSetSize:
        description: The target replica set size as a number.
        minimum: 1
        type: integer
    x-ms-discriminator-value: Stateful
  StatelessServiceProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourceProperties"
    description: The properties of a stateless service resource.
    properties:
      instanceCount:
        description: The instance count.
        minimum: -1
        type: integer
    x-ms-discriminator-value: Stateless
  StatelessServiceUpdateProperties:
    allOf:
      - $ref: "#/definitions/ServiceResourceUpdateProperties"
    description: The properties of a stateless service resource for patch operations.
    properties:
      instanceCount:
        description: The instance count.
        minimum: -1
        type: integer
    x-ms-discriminator-value: Stateless
  UniformInt64RangePartitionSchemeDescription:
    allOf:
      - $ref: "#/definitions/PartitionSchemeDescription"
      - description: UniformInt64RangePartitionSchemeDescription
        type: object
    description: Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions.
    properties:
      Count:
        description: The number of partitions.
        type: integer
      HighKey:
        description: |
          String indicating the upper bound of the partition key range that
          should be split between the partition ‘Count’
        type: string
      LowKey:
        description: |
          String indicating the lower bound of the partition key range that
          should be split between the partition ‘Count’
        type: string
    required:
      - Count
      - LowKey
      - HighKey
    x-ms-discriminator-value: UniformInt64Range
  UpgradeDomainTimeout:
    default: P10675199DT02H48M05.4775807S
    description: The amount of time each upgrade domain has to complete before FailureAction is executed. 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.
    type: string
  UpgradeTimeout:
    default: P10675199DT02H48M05.4775807S
    description: The amount of time the overall upgrade has to complete before FailureAction is executed. 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.
    type: string
