Service Fabric サービスの作成
Service Fabric サービス リソースを作成または更新します。
指定した名前で Service Fabric サービス リソースを作成または更新します。
Request
Method | 要求 URI |
---|---|
PUT | /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}?api-version=2017-07-01-preview |
パラメーター
名前 | Type | 必須 | 場所 |
---|---|---|---|
subscriptionId | string | はい | パス |
resourceGroupName | string | はい | パス |
clusterName | string | はい | パス |
applicationName | string | はい | パス |
Servicename | string | はい | パス |
api-version | string | はい | クエリ |
parameters | ServiceResource | はい | Body |
subscriptionId
型: string
必須: はい
顧客サブスクリプション識別子。
resourceGroupName
型: string
必須: はい
リソース グループの名前。
clusterName
型: string
必須: はい
クラスター リソースの名前。
applicationName
型: string
必須: はい
アプリケーション リソースの名前。
serviceName
型: string
必須: はい
{applicationName}~{serviceName} の形式のサービス リソースの名前。
api-version
型: string
必須: はい
既定値: 2017-07-01-preview
Service Fabric リソース プロバイダー API のバージョン。 これは必須のパラメーターであり、この仕様の値は "2017-07-01-preview" である必要があります。
parameters
種類: ServiceResource
必須: はい
サービス リソース。
応答
HTTP 状態コード | 説明 | 応答スキーマ |
---|---|---|
202 (承認済み) | 要求が受け入れられ、操作は非同期的に完了します。 |
ServiceResource |
その他のすべての状態コード | 詳細なエラー応答。 |
ErrorModel |
使用例
mininum パラメーターを使用してサービスを配置する
要求
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService?api-version=2017-07-01-preview
本文
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"properties": {
"serviceKind": "Stateless",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"instanceCount": "1"
}
}
202 応答
ヘッダー
Retry-After: 10
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
本文
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"etag": "W/\"636462502183671256\"",
"properties": {
"provisioningState": "Updating",
"serviceKind": "Stateless",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"instanceCount": "1"
}
}
最大パラメーターを使用してサービスを配置する
要求
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService?api-version=2017-07-01-preview
本文
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"properties": {
"serviceKind": "Stateless",
"placementConstraints": "NodeType==frontend",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"serviceLoadMetrics": [
{
"name": "metric1",
"weight": "Low"
}
],
"correlationScheme": [
{
"serviceName": "fabric:/app1/app1~svc1",
"scheme": "Affinity"
}
],
"servicePlacementPolicies": [],
"defaultMoveCost": "Medium",
"instanceCount": "5"
}
}
202 応答
ヘッダー
Retry-After: 10
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
本文
{
"type": "services",
"location": "eastus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApp/services/myService",
"name": "myCluster",
"tags": {},
"etag": "W/\"636462502183671258\"",
"properties": {
"provisioningState": "Updating",
"serviceKind": "Stateless",
"placementConstraints": "NodeType==frontend",
"serviceTypeName": "myServiceType",
"partitionDescription": {
"partitionScheme": "Singleton"
},
"serviceLoadMetrics": [
{
"name": "metric1",
"weight": "Low"
}
],
"servicePlacementPolicies": [],
"defaultMoveCost": "Medium",
"instanceCount": "5"
}
}