Service Fabric Create
Crée ou met à jour une ressource d’application Service Fabric.
Créez ou mettez à jour une ressource d’application Service Fabric avec le nom spécifié.
Requête
Méthode | URI de requête |
---|---|
PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}?api-version=2017-07-01-preview |
Paramètres
Nom | Type | Obligatoire | Emplacement |
---|---|---|---|
subscriptionId | string | Oui | Chemin d’accès |
resourceGroupName | string | Oui | Chemin d’accès |
clusterName | string | Oui | Chemin d’accès |
applicationName | string | Oui | Chemin d’accès |
api-version | string | Oui | Requête |
parameters | ApplicationResource | Oui | body |
subscriptionId
Type : chaîne
Obligatoire : Oui
Identificateur d’abonnement client.
resourceGroupName
Type : chaîne
Obligatoire : Oui
Nom du groupe de ressources.
clusterName
Type : chaîne
Obligatoire : Oui
Nom de la ressource de cluster.
applicationName
Type : chaîne
Obligatoire : Oui
Nom de la ressource d’application.
api-version
Type : chaîne
Obligatoire : Oui
Par défaut : 2017-07-01-preview
Version de l’API du fournisseur de ressources Service Fabric. Il s’agit d’un paramètre obligatoire et sa valeur doit être « 2017-07-01-preview » pour cette spécification.
parameters
Type : ApplicationResource
Obligatoire : Oui
Ressource d’application.
Réponses
Code d’état HTTP | Description | Schéma de réponse |
---|---|---|
202 (accepté) | La demande a été acceptée et l’opération se termine de manière asynchrone. |
ApplicationResource |
Tous les autres codes status | Réponse d’erreur détaillée. |
ErrorModel |
Exemples
Placer une application avec des paramètres mininum
Requête
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
Corps
{
"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
}
}
Réponse 202
En-têtes
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
Corps
{
"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
}
}
Placer une application avec le nombre maximal de paramètres
Requête
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
Corps
{
"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"
}
]
}
}
Réponse 202
En-têtes
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
Corps
{
"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"
}
]
}
}