Bagikan melalui


Pembuatan Service Fabric

Membuat atau memperbarui sumber daya aplikasi Service Fabric.

Buat atau perbarui sumber daya aplikasi Service Fabric dengan nama yang ditentukan.

Minta

Metode Meminta URI
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}?api-version=2017-07-01-preview

Parameter

Nama Jenis Diperlukan Lokasi
subscriptionId string Ya Jalur
resourceGroupName string Ya Jalur
clusterName string Ya Jalur
applicationName string Ya Jalur
versi-api string Ya Kueri
parameter ApplicationResource Ya Isi

subscriptionId

Jenis: string
Diperlukan: Ya

Pengidentifikasi langganan pelanggan.


resourceGroupName

Jenis: string
Diperlukan: Ya

Nama grup sumber daya.


clusterName

Jenis: string
Diperlukan: Ya

Nama sumber daya kluster.


applicationName

Jenis: string
Diperlukan: Ya

Nama sumber daya aplikasi.


versi-api

Jenis: string
Diperlukan: Ya
Default: Pratinjau 2017-07-01

Versi API penyedia sumber daya Service Fabric. Ini adalah parameter yang diperlukan dan nilainya harus "2017-07-01-preview" untuk spesifikasi ini.


parameter

Jenis: ApplicationResource
Diperlukan: Ya

Sumber daya aplikasi.

Respons

Kode Status HTTP Deskripsi Skema Respons
202 (Diterima) Permintaan diterima dan operasi akan selesai secara asinkron.
ApplicationResource
Semua kode status lainnya Respons kesalahan terperinci.
ErrorModel

Contoh

Menempatkan aplikasi dengan parameter mininum

Minta

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp?api-version=2017-07-01-preview
Isi
{
  "type": "applications",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp",
  "name": "myCluster",
  "tags": {},
  "properties": {
    "typeName": "myAppType",
    "typeVersion": "1.0",
    "removeApplicationCapacity": false
  }
}

Respons 202

Header
Retry-After: 10
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
Isi
{
  "type": "applications",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp",
  "name": "myCluster",
  "tags": {},
  "etag": "W/\"636462502180261857\"",
  "properties": {
    "provisioningState": "Updating",
    "typeName": "myAppType",
    "typeVersion": "1.0",
    "removeApplicationCapacity": false
  }
}

Menempatkan aplikasi dengan parameter maksimum

Minta

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp?api-version=2017-07-01-preview
Isi
{
  "type": "applications",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp",
  "name": "myCluster",
  "tags": {},
  "properties": {
    "typeName": "myAppType",
    "typeVersion": "1.0",
    "parameters": {
      "param1": "value1"
    },
    "upgradePolicy": {
      "applicationHealthPolicy": {
        "considerWarningAsError": true,
        "maxPercentUnhealthyDeployedApplications": "0",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "0",
          "maxPercentUnhealthyPartitionsPerService": "0",
          "maxPercentUnhealthyReplicasPerPartition": "0"
        }
      },
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "Rollback",
        "healthCheckRetryTimeout": "00:10:00",
        "healthCheckWaitDuration": "00:02:00",
        "healthCheckStableDuration": "00:05:00",
        "upgradeDomainTimeout": "1.06:00:00",
        "upgradeTimeout": "01:00:00"
      },
      "upgradeReplicaSetCheckTimeout": "01:00:00",
      "forceRestart": false
    },
    "maximumNodes": "3",
    "minimumNodes": "1",
    "removeApplicationCapacity": false,
    "metrics": [
      {
        "name": "metric1",
        "reservationCapacity": "1",
        "maximumCapacity": "3",
        "totalApplicationCapacity": "5"
      }
    ]
  }
}

Respons 202

Header
Retry-After: 10
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
Isi
{
  "type": "applications",
  "location": "eastus",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp",
  "name": "myCluster",
  "tags": {},
  "etag": "W/\"636462502180261859\"",
  "properties": {
    "provisioningState": "Updating",
    "typeName": "myAppType",
    "typeVersion": "1.0",
    "parameters": {
      "param1": "value1"
    },
    "upgradePolicy": {
      "applicationHealthPolicy": {
        "considerWarningAsError": true,
        "maxPercentUnhealthyDeployedApplications": "0",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "0",
          "maxPercentUnhealthyPartitionsPerService": "0",
          "maxPercentUnhealthyReplicasPerPartition": "0"
        }
      },
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "Rollback",
        "healthCheckRetryTimeout": "00:10:00",
        "healthCheckWaitDuration": "00:02:00",
        "healthCheckStableDuration": "00:05:00",
        "upgradeDomainTimeout": "1.06:00:00",
        "upgradeTimeout": "01:00:00"
      },
      "upgradeReplicaSetCheckTimeout": "01:00:00",
      "forceRestart": false
    },
    "maximumNodes": "3",
    "minimumNodes": "1",
    "removeApplicationCapacity": false,
    "metrics": [
      {
        "name": "metric1",
        "reservationCapacity": "1",
        "maximumCapacity": "3",
        "totalApplicationCapacity": "5"
      }
    ]
  }
}