Skip to content

Commit fb5b966

Browse files
ajashant-msftgolddovejliusankunyilin-msftradhikagupta-msft
authored
SRP Jan25 [2025-01-01] API Version Swagger Changes (#33529)
* Copy latest API version 2024 without any change to new API version 2025 folder, change the API version 2024-01-01 in the new API version 2025-01-01 * SMB OAuth property swagger changes * Repair item] Fix required properties in activeDirectoryProperties swagger, improve descriptions * Zonal placement swagger changes for 2025-01-01 API * Create swagger for restore storage account Api * Swagger for Encryption in transit file service property for SMB & NFS in 2025-01-01 **Code Review Checklist** *Code Style/Hygiene* - [ ] Is the change self-contained ? If not, can this be broken to separate PRs ? - [ ] If this is a new feature, is the entire feature behind a config or allow-listed subscription or AFEC ? Ensure that the feature is turned off by default and enabled only for a select set of subscriptions. - [ ] If a new feature, and AFEC/subscription opt-in is not feasible, can this change be limited to stage/canaries and phased open in a future rollout ? - [ ] Are configs/DCs included for variable limits, settings and to disable the feature off as a whole ? - [ ] If a bug is being fixed that impacts written KVS state, is there a backfill (backfill job) plan in place to repair existing KVS records with bad data ? If not, is the bug fix backward compatible with existing data ? *API versioning* - [ ] Are new customer facing APIs or properties being introduced ? Should this change be introduced in a new API version ? - [ ] Is any existing KVS schema being modified ? If yes, this change should be introduced in a new API version. - [ ] If KVS schema is being modified for persistent state, is there a backfill (backfill job) plan in place to repair existing KVS records with the old schema ? If not, is the change backward compatible with existing KVS data ? *Logging* - [ ] Do any of the log messages include PII or sensitive information eg. keys (account/encryption), customer data (tags) ? - [ ] Are appropriate verbose logs included to diagnose customer issues when this change is deployed ? i.e. are we able to describe a timeline of what happened to a customer request while triggering the new code path ? *Exception/Error Handling* - [ ] Are all non-recoverable errors handled and logged ? Is a user-friendly/actionable error code returned to the user ? - [ ] If non-recoverable error are seen, is the transaction unwound to a clean state to avoid orphaned metadata ? - [ ] If recoverable, are the retries bounded for non-transactional ? - [ ] If recoverable, are the retries unbounded for transactional ? *Memory* - [ ] Are there any unbounded KVS reads eg. list entire KVS tables ? Consider pointed reads by key or paged reads. - [ ] Does the change introduce an increased memory footprint to RSRP replicas ? Do we require memory profiling in preprod/test ? *Performance* - [ ] KVS writes cost 5-15ms. Are there any redundant KVS reads/writes ? - [ ] Do we need to consider secondary indexes to improve operation performance ? *Unit Test Coverage* - [ ] Do unit tests cover all happy path & failure scenarios ? - [ ] Do any of the unit tests introduced rely on randomness or prone to transient failures eg. time skew, randomly selecting account type or request parameter etc ? - [ ] Do the Unit tests take less than 100ms(each) to execute when the test suite is run? - [ ] Do any of the unit tests take a dependency on time, I/O, network call, disks etc? *Monitoring* - [ ] Are metrics created for outbound/inbound external dependenc... * Merged PR 11577981: Swagger for Encryption in transit file service property for SMB & NFS in 2025-01-01 **Objective**: To add the swagger for a new file service property - 'EncryptionInTransit' for SMB & NFS, for service version '2026-02-06' . - The example is added in a new file S:\Azure\Storage\Storage-SRP\src\Swagger\Microsoft.Storage\stable\2026-02-06\examples\FileServicesPut_EncryptionInTransitRequired.json **Code Review Checklist** *Code Style/Hygiene* - [ ] Is the change self-contained ? If not, can this be broken to separate PRs ? - [ ] If this is a new feature, is the entire feature behind a config or allow-listed subscription or AFEC ? Ensure that the feature is turned off by default and enabled only for a select set of subscriptions. - [ ] If a new feature, and AFEC/subscription opt-in is not feasible, can this change be limited to stage/canaries and phased open in a future rollout ? - [ ] Are configs/DCs included for variable limits, settings and to disable the feature off as a whole ? - [ ] If a bug is being fixed that impacts written KVS state, is there a backfill (backfill job) plan in place to repair existing KVS records with bad data ? If not, is the bug fix backward compatible with existing data ? *API versioning* - [ ] Are new customer facing APIs or properties being introduced ? Should this change be introduced in a new API version ? - [ ] Is any existing KVS schema being modified ? If yes, this change should be introduced in a new API version. - [ ] If KVS schema is being modified for persistent state, is there a backfill (backfill job) plan in place to repair existing KVS records with the old schema ? If not, is the change backward compatible with existing KVS data ? *Logging* - [ ] Do any of the log messages include PII or sensitive information eg. keys (account/encryption), customer data (tags) ? - [ ] Are appropriate verbose logs included to diagnose customer issues when this change is deployed ? i.e. are we able to describe a timeline of what happened to a customer request while triggering the new code path ? *Exception/Error Handling* - [ ] Are all non-recoverable errors handled and logged ? Is a user-friendly/actionable error code returned to the user ? - [ ] If non-recoverable error are seen, is the transaction unwound to a clean state to avoid orphaned metadata ? - [ ] If recoverable, are the retries bounded for non-transactional ? - [ ] If recoverable, are the retries unbounded for transactional ? *Memory* - [ ] Are there any unbounded KVS reads eg. list entire KVS tables ? Consider pointed reads by key or paged reads. - [ ] Does the change introduce an increased memory footprint to RSRP replicas ? Do we require memory profiling in preprod/test ? *Performance* - [ ] KVS writes cost 5-15ms. Are there any redundant KVS reads/writes ? - [ ] Do we need to consider secondary indexes to improve operation performance ? *Unit Test Coverage* - [ ] Do unit tests cover all happy path & failure scenarios ? - [ ] Do any of the unit tests introduced rely on randomness or prone to transient failures eg. time skew, ... * Merged PR 12011805: Create swagger for restore storage account Api. **Why do we need this change?** We missed the chance to document restore storage account Api, though put storage account operation. This is also causing challenge of build-in policy for related scenario. Task 29330514: Build-in policy Storage_NetworkAcls_Audit.json should consider storage account recovery scenario ---- API change This pull request updates the Swagger documentation to include the restore storage account scenario. - Added `DeletedStorageAccountRestore.json` example for restoring a deleted storage account. - Updated `storage.json` to include `deletedAccountCreationTime` property and reference the new restore example. - Modified the description for the 202 response to include restore storage account requests. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #31884198 * suppress errors * fix the api version in eample from 2025-05-01 to 2025-01-01 * fix comma syntax error * Add the example refereces and model service * format and storage account model fix * Update DeletedStorageAccountRestore.json * Update DeletedStorageAccountRestore.json * fix the examples * fix prettier code check * Add type object to the "NfsSetting" and "EncryptionInTransit" in file.json * Add additional property tag in SMB & NFS Setting in file.json * Fix Auto REST exception file.json * Fix file.json errors * Fix reference definition for EncryptionInTransit in file.json * Prettier check - FileServicesPut_EncryptionInTransitRequired.json * Add suppression for BodyTopLevelProperties * fix readme and prettier check * more prettier fix --------- Co-authored-by: Risheek Rajolu <[email protected]> Co-authored-by: jliusan <[email protected]> Co-authored-by: Kunyi Lin <[email protected]> Co-authored-by: Radhika Gupta <[email protected]> Co-authored-by: Elvis Shi <[email protected]> Co-authored-by: Elvis Shi <[email protected]>
1 parent 0d9b37f commit fb5b966

File tree

198 files changed

+30658
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+30658
-3
lines changed

specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/blob.json

Lines changed: 1579 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,368 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "StorageManagementClient",
5+
"description": "Storage Resource Provider API Common Types",
6+
"version": "2025-01-01"
7+
},
8+
"paths": {},
9+
"definitions": {
10+
"CorsRules": {
11+
"properties": {
12+
"corsRules": {
13+
"type": "array",
14+
"items": {
15+
"description": "Specifies a CORS rule for the Blob service. ",
16+
"$ref": "#/definitions/CorsRule"
17+
},
18+
"description": "The List of CORS rules. You can include up to five CorsRule elements in the request. "
19+
}
20+
},
21+
"description": "Sets the CORS rules. You can include up to five CorsRule elements in the request. "
22+
},
23+
"CorsRule": {
24+
"properties": {
25+
"allowedOrigins": {
26+
"type": "array",
27+
"items": {
28+
"type": "string"
29+
},
30+
"description": "Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or \"*\" to allow all domains"
31+
},
32+
"allowedMethods": {
33+
"type": "array",
34+
"items": {
35+
"type": "string",
36+
"enum": [
37+
"DELETE",
38+
"GET",
39+
"HEAD",
40+
"MERGE",
41+
"POST",
42+
"OPTIONS",
43+
"PUT",
44+
"PATCH",
45+
"CONNECT",
46+
"TRACE"
47+
],
48+
"x-ms-enum": {
49+
"name": "AllowedMethods",
50+
"modelAsString": true
51+
}
52+
},
53+
"description": "Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin."
54+
},
55+
"maxAgeInSeconds": {
56+
"type": "integer",
57+
"description": "Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response."
58+
},
59+
"exposedHeaders": {
60+
"type": "array",
61+
"items": {
62+
"type": "string"
63+
},
64+
"description": "Required if CorsRule element is present. A list of response headers to expose to CORS clients."
65+
},
66+
"allowedHeaders": {
67+
"type": "array",
68+
"items": {
69+
"type": "string"
70+
},
71+
"description": "Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request."
72+
}
73+
},
74+
"required": [
75+
"allowedOrigins",
76+
"allowedMethods",
77+
"maxAgeInSeconds",
78+
"exposedHeaders",
79+
"allowedHeaders"
80+
],
81+
"description": "Specifies a CORS rule for the Blob service."
82+
},
83+
"DeleteRetentionPolicy": {
84+
"properties": {
85+
"enabled": {
86+
"type": "boolean",
87+
"description": "Indicates whether DeleteRetentionPolicy is enabled."
88+
},
89+
"days": {
90+
"type": "integer",
91+
"minimum": 1,
92+
"maximum": 365,
93+
"description": "Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365."
94+
},
95+
"allowPermanentDelete": {
96+
"type": "boolean",
97+
"description": "This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share."
98+
}
99+
},
100+
"description": "The service properties for soft delete."
101+
},
102+
"Sku": {
103+
"properties": {
104+
"name": {
105+
"$ref": "#/definitions/SkuName"
106+
},
107+
"tier": {
108+
"$ref": "#/definitions/Tier"
109+
}
110+
},
111+
"required": [
112+
"name"
113+
],
114+
"description": "The SKU of the storage account."
115+
},
116+
"SkuName": {
117+
"type": "string",
118+
"description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.",
119+
"enum": [
120+
"Standard_LRS",
121+
"Standard_GRS",
122+
"Standard_RAGRS",
123+
"Standard_ZRS",
124+
"Premium_LRS",
125+
"Premium_ZRS",
126+
"Standard_GZRS",
127+
"Standard_RAGZRS",
128+
"StandardV2_LRS",
129+
"StandardV2_GRS",
130+
"StandardV2_ZRS",
131+
"StandardV2_GZRS",
132+
"PremiumV2_LRS",
133+
"PremiumV2_ZRS"
134+
],
135+
"x-ms-enum": {
136+
"name": "SkuName",
137+
"modelAsString": true
138+
}
139+
},
140+
"Tier": {
141+
"readOnly": true,
142+
"type": "string",
143+
"description": "The SKU tier. This is based on the SKU name.",
144+
"enum": [
145+
"Standard",
146+
"Premium"
147+
],
148+
"x-ms-enum": {
149+
"name": "SkuTier",
150+
"modelAsString": false
151+
}
152+
},
153+
"CloudError": {
154+
"x-ms-external": true,
155+
"properties": {
156+
"error": {
157+
"$ref": "#/definitions/CloudErrorBody"
158+
}
159+
},
160+
"description": "An error response from the Storage service."
161+
},
162+
"CloudErrorBody": {
163+
"x-ms-external": true,
164+
"properties": {
165+
"code": {
166+
"type": "string",
167+
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
168+
},
169+
"message": {
170+
"type": "string",
171+
"description": "A message describing the error, intended to be suitable for display in a user interface."
172+
},
173+
"target": {
174+
"type": "string",
175+
"description": "The target of the particular error. For example, the name of the property in error."
176+
},
177+
"details": {
178+
"type": "array",
179+
"items": {
180+
"$ref": "#/definitions/CloudErrorBody"
181+
},
182+
"description": "A list of additional details about the error."
183+
}
184+
},
185+
"description": "An error response from the Storage service."
186+
},
187+
"SignedIdentifier": {
188+
"properties": {
189+
"id": {
190+
"type": "string",
191+
"description": "An unique identifier of the stored access policy."
192+
},
193+
"accessPolicy": {
194+
"$ref": "#/definitions/AccessPolicy",
195+
"description": "Access policy"
196+
}
197+
}
198+
},
199+
"AccessPolicy": {
200+
"properties": {
201+
"startTime": {
202+
"type": "string",
203+
"format": "date-time",
204+
"description": "Start time of the access policy"
205+
},
206+
"expiryTime": {
207+
"type": "string",
208+
"format": "date-time",
209+
"description": "Expiry time of the access policy"
210+
},
211+
"permission": {
212+
"type": "string",
213+
"description": "List of abbreviated permissions."
214+
}
215+
}
216+
},
217+
"StorageTaskReportSummary": {
218+
"type": "object",
219+
"properties": {
220+
"value": {
221+
"readOnly": true,
222+
"type": "array",
223+
"items": {
224+
"$ref": "#/definitions/StorageTaskReportInstance"
225+
},
226+
"x-ms-identifiers": [],
227+
"description": "Gets storage tasks run result summary."
228+
},
229+
"nextLink": {
230+
"type": "string",
231+
"description": "Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances and summary reports exceed maximum page size.",
232+
"readOnly": true
233+
}
234+
},
235+
"description": "Fetch Storage Tasks Run Summary."
236+
},
237+
"StorageTaskReportInstance": {
238+
"type": "object",
239+
"properties": {
240+
"properties": {
241+
"$ref": "#/definitions/StorageTaskReportProperties"
242+
}
243+
},
244+
"allOf": [
245+
{
246+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
247+
}
248+
],
249+
"description": "Storage Tasks run report instance"
250+
},
251+
"StorageTaskReportProperties": {
252+
"type": "object",
253+
"properties": {
254+
"taskAssignmentId": {
255+
"readOnly": true,
256+
"type": "string",
257+
"format": "arm-id",
258+
"x-ms-arm-id-details": {
259+
"allowedResources": [
260+
{
261+
"type": "Microsoft.Storage/storageAccounts/storageTaskAssignments"
262+
}
263+
]
264+
},
265+
"description": "Represents the Storage Task Assignment Id associated with the storage task that provided an execution context."
266+
},
267+
"storageAccountId": {
268+
"readOnly": true,
269+
"type": "string",
270+
"format": "arm-id",
271+
"x-ms-arm-id-details": {
272+
"allowedResources": [
273+
{
274+
"type": "Microsoft.Storage/storageAccounts"
275+
}
276+
]
277+
},
278+
"description": "Represents the Storage Account Id where the storage task definition was applied and executed."
279+
},
280+
"startTime": {
281+
"readOnly": true,
282+
"type": "string",
283+
"description": "Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
284+
},
285+
"finishTime": {
286+
"readOnly": true,
287+
"type": "string",
288+
"description": "End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
289+
},
290+
"objectsTargetedCount": {
291+
"readOnly": true,
292+
"type": "string",
293+
"description": "Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
294+
},
295+
"objectsOperatedOnCount": {
296+
"readOnly": true,
297+
"type": "string",
298+
"description": "Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
299+
},
300+
"objectFailedCount": {
301+
"readOnly": true,
302+
"type": "string",
303+
"description": "Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
304+
},
305+
"objectsSucceededCount": {
306+
"readOnly": true,
307+
"type": "string",
308+
"description": "Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators"
309+
},
310+
"runStatusError": {
311+
"readOnly": true,
312+
"type": "string",
313+
"description": "Well known Azure Storage error code that represents the error encountered during execution of the run instance."
314+
},
315+
"runStatusEnum": {
316+
"readOnly": true,
317+
"type": "string",
318+
"enum": [
319+
"InProgress",
320+
"Finished"
321+
],
322+
"x-ms-enum": {
323+
"name": "RunStatusEnum",
324+
"modelAsString": true
325+
},
326+
"description": "Represents the status of the execution."
327+
},
328+
"summaryReportPath": {
329+
"readOnly": true,
330+
"type": "string",
331+
"description": "Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. "
332+
},
333+
"taskId": {
334+
"readOnly": true,
335+
"type": "string",
336+
"format": "arm-id",
337+
"x-ms-arm-id-details": {
338+
"allowedResources": [
339+
{
340+
"type": "Microsoft.StorageActions/storageTasks"
341+
}
342+
]
343+
},
344+
"description": "Storage Task Arm Id."
345+
},
346+
"taskVersion": {
347+
"readOnly": true,
348+
"type": "string",
349+
"description": "Storage Task Version"
350+
},
351+
"runResult": {
352+
"readOnly": true,
353+
"type": "string",
354+
"enum": [
355+
"Succeeded",
356+
"Failed"
357+
],
358+
"x-ms-enum": {
359+
"name": "RunResult",
360+
"modelAsString": true
361+
},
362+
"description": "Represents the overall result of the execution for the run instance"
363+
}
364+
},
365+
"description": "Storage task execution report for a run instance."
366+
}
367+
}
368+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "res4303",
5+
"accountName": "sto7280",
6+
"containerName": "container8723",
7+
"api-version": "2025-01-01",
8+
"monitor": "true",
9+
"LegalHold": {
10+
"tags": [
11+
"tag1",
12+
"tag2",
13+
"tag3"
14+
]
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"hasLegalHold": false,
21+
"tags": []
22+
}
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)