Skip to content

Commit f8130db

Browse files
anpintLeiwang3SQL
authored andcommitted
[Microsoft.StorageSync] Update 2020-03-01 and 2020-09-01 specifications to address swagger correctness and completeness items. (Azure#16041)
* Address swagger correctness items in 2020-03-01 API version. Added various properties that are returned by RP but not defined in swagger. * Swagger completeness: Add location based async operation polling * Fix reference to example file for 2020-09-01 * Fix semantic validation error for 2020-09-01 and fix a typo in 2020-03-01 * Fix typo in examples for location based operations API
1 parent 2be2394 commit f8130db

File tree

4 files changed

+436
-2
lines changed

4 files changed

+436
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "52b8da2f-61e0-4a1f-8dde-336911f367fb",
4+
"locationName": "westus",
5+
"operationId": "eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui=",
6+
"api-version": "2020-03-01"
7+
},
8+
"responses": {
9+
"200": {
10+
"headers": {
11+
"x-ms-request-id": "74e55a4d-1c6f-46de-9a8d-278e53a47403",
12+
"x-ms-correlation-request-id": "d166ca76-dad2-49df-b409-d2acfd42d730"
13+
},
14+
"body": {
15+
"id": "/subscriptions/52b8da2f-61e0-4a1f-8dde-336911f367fb/providers/microsoft.storagesync/locations/westus/operations/eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui=",
16+
"name": "eyJwYXJ0aXRpb25JZCI6ImE1ZDNiMDU4LTYwN2MtNDI0Ny05Y2FmLWJlZmU4NGQ0ZDU0NyIsIndvcmtmbG93SWQiOiJjYzg1MTY2YS0xMjI2LTQ4MGYtYWM5ZC1jMmRhNTVmY2M2ODYiLCJ3b3JrZmxvd09wZXJhdGlvbklkIjoiOTdmODU5ZTAtOGY1MC00ZTg4LWJkZDEtNWZlYzgwYTVlYzM0tui=",
17+
"status": "Succeeded",
18+
"startTime": "2021-09-14T19:59:24.6247688Z",
19+
"endTime": "2021-09-14T19:59:30.8055279Z"
20+
}
21+
}
22+
}
23+
}

specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2020-03-01/storagesync.json

Lines changed: 286 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,66 @@
30713071
}
30723072
}
30733073
}
3074+
},
3075+
"/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}": {
3076+
"get": {
3077+
"parameters": [
3078+
{
3079+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
3080+
},
3081+
{
3082+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
3083+
},
3084+
{
3085+
"name": "locationName",
3086+
"in": "path",
3087+
"required": true,
3088+
"type": "string",
3089+
"description": "The desired region to obtain information from."
3090+
},
3091+
{
3092+
"name": "operationId",
3093+
"in": "path",
3094+
"description": "operation Id",
3095+
"required": true,
3096+
"type": "string"
3097+
}
3098+
],
3099+
"tags": [
3100+
"Operation Status"
3101+
],
3102+
"operationId": "LocationOperationStatus",
3103+
"description": "Get Operation status",
3104+
"x-ms-examples": {
3105+
"Workflows_Get": {
3106+
"$ref": "./examples/LocationOperationStatus_Get.json"
3107+
}
3108+
},
3109+
"responses": {
3110+
"200": {
3111+
"description": "Operation Status",
3112+
"schema": {
3113+
"$ref": "#/definitions/LocationOperationStatus"
3114+
},
3115+
"headers": {
3116+
"x-ms-request-id": {
3117+
"description": "request id.",
3118+
"type": "string"
3119+
},
3120+
"x-ms-correlation-request-id": {
3121+
"description": "correlation request id.",
3122+
"type": "string"
3123+
}
3124+
}
3125+
},
3126+
"default": {
3127+
"description": "Error message indicating why the operation failed.",
3128+
"schema": {
3129+
"$ref": "#/definitions/StorageSyncError"
3130+
}
3131+
}
3132+
}
3133+
}
30743134
}
30753135
},
30763136
"definitions": {
@@ -3107,6 +3167,10 @@
31073167
"details": {
31083168
"$ref": "#/definitions/StorageSyncErrorDetails",
31093169
"description": "Error details of the given entry."
3170+
},
3171+
"innerError": {
3172+
"$ref": "#/definitions/StorageSyncInnerErrorDetails",
3173+
"description": "Inner error details of the given entry."
31103174
}
31113175
}
31123176
},
@@ -3125,6 +3189,48 @@
31253189
"target": {
31263190
"type": "string",
31273191
"description": "Target of the given entry."
3192+
},
3193+
"requestUri": {
3194+
"type": "string",
3195+
"description": "Request URI of the given entry."
3196+
},
3197+
"exceptionType": {
3198+
"type": "string",
3199+
"description": "Exception type of the given entry."
3200+
},
3201+
"httpMethod": {
3202+
"type": "string",
3203+
"description": "HTTP method of the given entry."
3204+
},
3205+
"hashedMessage": {
3206+
"type": "string",
3207+
"description": "Hashed message of the given entry."
3208+
},
3209+
"httpErrorCode": {
3210+
"type": "string",
3211+
"description": "HTTP error code of the given entry."
3212+
}
3213+
}
3214+
},
3215+
"StorageSyncInnerErrorDetails": {
3216+
"type": "object",
3217+
"description": "Error Details object.",
3218+
"properties": {
3219+
"callStack": {
3220+
"type": "string",
3221+
"description": "Call stack of the error."
3222+
},
3223+
"message": {
3224+
"type": "string",
3225+
"description": "Error message of the error."
3226+
},
3227+
"innerException": {
3228+
"type": "string",
3229+
"description": "Exception of the inner error."
3230+
},
3231+
"innerExceptionCallStack": {
3232+
"type": "string",
3233+
"description": "Call stack of the inner error."
31283234
}
31293235
}
31303236
},
@@ -3396,11 +3502,13 @@
33963502
},
33973503
"initialDownloadPolicy": {
33983504
"$ref": "#/definitions/InitialDownloadPolicy",
3399-
"description": "Policy for how namespace and files are recalled during FastDr."
3505+
"description": "Policy for how namespace and files are recalled during FastDr.",
3506+
"default": "NamespaceThenModifiedFiles"
34003507
},
34013508
"localCacheMode": {
34023509
"$ref": "#/definitions/LocalCacheMode",
3403-
"description": "Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access."
3510+
"description": "Policy for enabling follow-the-sun business models: link local cache to cloud behavior to pre-populate before local access.",
3511+
"default": "UpdateLocallyCachedFiles"
34043512
}
34053513
}
34063514
},
@@ -3578,6 +3686,10 @@
35783686
"origin": {
35793687
"type": "string",
35803688
"description": "The origin."
3689+
},
3690+
"properties": {
3691+
"$ref": "#/definitions/OperationProperties",
3692+
"description": "Properties of the operations resource."
35813693
}
35823694
}
35833695
},
@@ -3625,6 +3737,84 @@
36253737
}
36263738
}
36273739
},
3740+
"OperationProperties": {
3741+
"type": "object",
3742+
"description": "Properties of the operations resource.",
3743+
"properties": {
3744+
"serviceSpecification": {
3745+
"$ref": "#/definitions/OperationResourceServiceSpecification",
3746+
"description": "Service specification for the operations resource."
3747+
}
3748+
}
3749+
},
3750+
"OperationResourceServiceSpecification": {
3751+
"type": "object",
3752+
"description": "Service specification.",
3753+
"properties": {
3754+
"metricSpecifications": {
3755+
"type": "array",
3756+
"items": {
3757+
"$ref": "#/definitions/OperationResourceMetricSpecification"
3758+
},
3759+
"description": "List of metric specifications."
3760+
}
3761+
}
3762+
},
3763+
"OperationResourceMetricSpecification": {
3764+
"type": "object",
3765+
"description": "Operation Display Resource object.",
3766+
"properties": {
3767+
"name": {
3768+
"type": "string",
3769+
"description": "Name of the metric."
3770+
},
3771+
"displayName": {
3772+
"type": "string",
3773+
"description": "Display name for the metric."
3774+
},
3775+
"displayDescription": {
3776+
"type": "string",
3777+
"description": "Display description for the metric."
3778+
},
3779+
"unit": {
3780+
"type": "string",
3781+
"description": "Unit for the metric."
3782+
},
3783+
"aggregationType": {
3784+
"type": "string",
3785+
"description": "Aggregation type for the metric."
3786+
},
3787+
"fillGapWithZero": {
3788+
"type": "boolean",
3789+
"description": "Fill gaps in the metric with zero."
3790+
},
3791+
"dimensions": {
3792+
"type": "array",
3793+
"items": {
3794+
"$ref": "#/definitions/OperationResourceMetricSpecificationDimension"
3795+
},
3796+
"description": "Dimensions for the metric specification."
3797+
}
3798+
}
3799+
},
3800+
"OperationResourceMetricSpecificationDimension": {
3801+
"type": "object",
3802+
"description": "OperationResourceMetricSpecificationDimension object.",
3803+
"properties": {
3804+
"name": {
3805+
"type": "string",
3806+
"description": "Name of the dimension."
3807+
},
3808+
"displayName": {
3809+
"type": "string",
3810+
"description": "Display name of the dimensions."
3811+
},
3812+
"toBeExportedForShoebox": {
3813+
"type": "boolean",
3814+
"description": "Indicates metric should be exported for Shoebox."
3815+
}
3816+
}
3817+
},
36283818
"CheckNameAvailabilityParameters": {
36293819
"properties": {
36303820
"name": {
@@ -4017,6 +4207,17 @@
40174207
"type": "string",
40184208
"description": "Registered Server Agent Version"
40194209
},
4210+
"agentVersionStatus": {
4211+
"$ref": "#/definitions/RegisteredServerAgentVersionStatus",
4212+
"description": "Registered Server Agent Version Status",
4213+
"readOnly": true
4214+
},
4215+
"agentVersionExpirationDate": {
4216+
"type": "string",
4217+
"format": "date-time",
4218+
"description": "Registered Server Agent Version Expiration Date",
4219+
"readOnly": true
4220+
},
40204221
"serverOSVersion": {
40214222
"type": "string",
40224223
"description": "Registered Server OS Version"
@@ -4375,6 +4576,11 @@
43754576
},
43764577
"description": "Array of per-item errors coming from the last sync session.",
43774578
"readOnly": true
4579+
},
4580+
"lastSyncMode": {
4581+
"$ref": "#/definitions/ServerEndpointSyncMode",
4582+
"description": "Sync mode",
4583+
"readOnly": true
43784584
}
43794585
}
43804586
},
@@ -4422,6 +4628,11 @@
44224628
"minimum": 0,
44234629
"description": "Total bytes (if available)",
44244630
"readOnly": true
4631+
},
4632+
"syncMode": {
4633+
"$ref": "#/definitions/ServerEndpointSyncMode",
4634+
"description": "Sync mode",
4635+
"readOnly": true
44254636
}
44264637
}
44274638
},
@@ -4451,6 +4662,21 @@
44514662
}
44524663
}
44534664
},
4665+
"ServerEndpointSyncMode": {
4666+
"type": "string",
4667+
"description": "Sync mode for the server endpoint.",
4668+
"enum": [
4669+
"Regular",
4670+
"NamespaceDownload",
4671+
"InitialUpload",
4672+
"SnapshotUpload",
4673+
"InitialFullDownload"
4674+
],
4675+
"x-ms-enum": {
4676+
"name": "ServerEndpointSyncMode",
4677+
"modelAsString": true
4678+
}
4679+
},
44544680
"PhysicalPath": {
44554681
"type": "string",
44564682
"description": "Server folder used for data synchronization"
@@ -4630,6 +4856,50 @@
46304856
},
46314857
"description": "Operation status object"
46324858
},
4859+
"LocationOperationStatus": {
4860+
"type": "object",
4861+
"properties": {
4862+
"id": {
4863+
"readOnly": true,
4864+
"type": "string",
4865+
"description": "Operation resource Id"
4866+
},
4867+
"name": {
4868+
"readOnly": true,
4869+
"type": "string",
4870+
"description": "Operation Id"
4871+
},
4872+
"status": {
4873+
"readOnly": true,
4874+
"type": "string",
4875+
"description": "Operation status"
4876+
},
4877+
"startTime": {
4878+
"readOnly": true,
4879+
"type": "string",
4880+
"format": "date-time",
4881+
"description": "Start time of the operation"
4882+
},
4883+
"endTime": {
4884+
"readOnly": true,
4885+
"type": "string",
4886+
"format": "date-time",
4887+
"description": "End time of the operation"
4888+
},
4889+
"error": {
4890+
"readOnly": true,
4891+
"$ref": "#/definitions/StorageSyncApiError",
4892+
"description": "Error details."
4893+
},
4894+
"percentComplete": {
4895+
"readOnly": true,
4896+
"type": "integer",
4897+
"format": "int32",
4898+
"description": "Percent complete."
4899+
}
4900+
},
4901+
"description": "Operation status object"
4902+
},
46334903
"ServerEndpointCloudTieringStatus": {
46344904
"type": "object",
46354905
"description": "Server endpoint cloud tiering status object.",
@@ -4921,6 +5191,20 @@
49215191
"readOnly": true
49225192
}
49235193
}
5194+
},
5195+
"RegisteredServerAgentVersionStatus": {
5196+
"type": "string",
5197+
"description": "Type of the registered server agent version status",
5198+
"enum": [
5199+
"Ok",
5200+
"NearExpiry",
5201+
"Expired",
5202+
"Blocked"
5203+
],
5204+
"x-ms-enum": {
5205+
"name": "RegisteredServerAgentVersionStatus",
5206+
"modelAsString": true
5207+
}
49245208
}
49255209
},
49265210
"parameters": {

0 commit comments

Comments
 (0)