Skip to content

Commit e571430

Browse files
Arsene Muhireaimuhire
authored andcommitted
Align DiskRP name patterns with public contract
1 parent b901198 commit e571430

5 files changed

Lines changed: 34 additions & 40 deletions

File tree

specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/Disk.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ model Disk is Azure.ResourceManager.TrackedResource<DiskProperties> {
1919
Resource = Disk,
2020
KeyName = "diskName",
2121
SegmentName = "disks",
22-
NamePattern = "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
22+
NamePattern = "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
2323
>;
2424

2525
/**

specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/DiskRestorePoint.tsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ model DiskRestorePoint
2020
Resource = DiskRestorePoint,
2121
KeyName = "diskRestorePointName",
2222
SegmentName = "diskRestorePoints",
23-
NamePattern = "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
23+
NamePattern = ""
2424
>;
2525
}
2626

@@ -54,7 +54,7 @@ interface DiskRestorePointsOps
5454
DiskRestorePoint,
5555
SegmentName = "diskRestorePoints",
5656
KeyName = "diskRestorePointName",
57-
NamePattern = "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
57+
NamePattern = ""
5858
>,
5959
}>,
6060
CloudError

specification/compute/resource-manager/Microsoft.Compute/Compute/ComputeDisk/Snapshot.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ model Snapshot is Azure.ResourceManager.TrackedResource<SnapshotProperties> {
1919
Resource = Snapshot,
2020
KeyName = "snapshotName",
2121
SegmentName = "snapshots",
22-
NamePattern = "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
22+
NamePattern = "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
2323
>;
2424

2525
/**

specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2024-03-02/DiskRP.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
12581258
"required": true,
12591259
"type": "string",
1260-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1260+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
12611261
}
12621262
],
12631263
"responses": {
@@ -1302,7 +1302,7 @@
13021302
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
13031303
"required": true,
13041304
"type": "string",
1305-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1305+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
13061306
},
13071307
{
13081308
"name": "disk",
@@ -1450,7 +1450,7 @@
14501450
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
14511451
"required": true,
14521452
"type": "string",
1453-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1453+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
14541454
},
14551455
{
14561456
"name": "disk",
@@ -1553,7 +1553,7 @@
15531553
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
15541554
"required": true,
15551555
"type": "string",
1556-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1556+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
15571557
}
15581558
],
15591559
"responses": {
@@ -1618,7 +1618,7 @@
16181618
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
16191619
"required": true,
16201620
"type": "string",
1621-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1621+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
16221622
},
16231623
{
16241624
"name": "grantAccessData",
@@ -1696,7 +1696,7 @@
16961696
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
16971697
"required": true,
16981698
"type": "string",
1699-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1699+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
17001700
}
17011701
],
17021702
"responses": {
@@ -1827,8 +1827,7 @@
18271827
"in": "path",
18281828
"description": "The name of the DiskRestorePoint",
18291829
"required": true,
1830-
"type": "string",
1831-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1830+
"type": "string"
18321831
}
18331832
],
18341833
"responses": {
@@ -1891,8 +1890,7 @@
18911890
"in": "path",
18921891
"description": "The name of the DiskRestorePoint",
18931892
"required": true,
1894-
"type": "string",
1895-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1893+
"type": "string"
18961894
},
18971895
{
18981896
"name": "grantAccessData",
@@ -1980,8 +1978,7 @@
19801978
"in": "path",
19811979
"description": "The name of the DiskRestorePoint",
19821980
"required": true,
1983-
"type": "string",
1984-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1981+
"type": "string"
19851982
}
19861983
],
19871984
"responses": {
@@ -2085,7 +2082,7 @@
20852082
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
20862083
"required": true,
20872084
"type": "string",
2088-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2085+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
20892086
}
20902087
],
20912088
"responses": {
@@ -2133,7 +2130,7 @@
21332130
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
21342131
"required": true,
21352132
"type": "string",
2136-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2133+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
21372134
},
21382135
{
21392136
"name": "snapshot",
@@ -2224,7 +2221,7 @@
22242221
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
22252222
"required": true,
22262223
"type": "string",
2227-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2224+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
22282225
},
22292226
{
22302227
"name": "snapshot",
@@ -2303,7 +2300,7 @@
23032300
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
23042301
"required": true,
23052302
"type": "string",
2306-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2303+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
23072304
}
23082305
],
23092306
"responses": {
@@ -2368,7 +2365,7 @@
23682365
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
23692366
"required": true,
23702367
"type": "string",
2371-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2368+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
23722369
},
23732370
{
23742371
"name": "grantAccessData",
@@ -2443,7 +2440,7 @@
24432440
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
24442441
"required": true,
24452442
"type": "string",
2446-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2443+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
24472444
}
24482445
],
24492446
"responses": {

specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-01-02/DiskRP.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
12581258
"required": true,
12591259
"type": "string",
1260-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1260+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
12611261
}
12621262
],
12631263
"responses": {
@@ -1302,7 +1302,7 @@
13021302
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
13031303
"required": true,
13041304
"type": "string",
1305-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1305+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
13061306
},
13071307
{
13081308
"name": "disk",
@@ -1456,7 +1456,7 @@
14561456
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
14571457
"required": true,
14581458
"type": "string",
1459-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1459+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
14601460
},
14611461
{
14621462
"name": "disk",
@@ -1559,7 +1559,7 @@
15591559
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
15601560
"required": true,
15611561
"type": "string",
1562-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1562+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
15631563
}
15641564
],
15651565
"responses": {
@@ -1624,7 +1624,7 @@
16241624
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
16251625
"required": true,
16261626
"type": "string",
1627-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1627+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
16281628
},
16291629
{
16301630
"name": "grantAccessData",
@@ -1705,7 +1705,7 @@
17051705
"description": "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The maximum name length is 80 characters.",
17061706
"required": true,
17071707
"type": "string",
1708-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
1708+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
17091709
}
17101710
],
17111711
"responses": {
@@ -1836,8 +1836,7 @@
18361836
"in": "path",
18371837
"description": "The name of the DiskRestorePoint",
18381838
"required": true,
1839-
"type": "string",
1840-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1839+
"type": "string"
18411840
}
18421841
],
18431842
"responses": {
@@ -1900,8 +1899,7 @@
19001899
"in": "path",
19011900
"description": "The name of the DiskRestorePoint",
19021901
"required": true,
1903-
"type": "string",
1904-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1902+
"type": "string"
19051903
},
19061904
{
19071905
"name": "grantAccessData",
@@ -1989,8 +1987,7 @@
19891987
"in": "path",
19901988
"description": "The name of the DiskRestorePoint",
19911989
"required": true,
1992-
"type": "string",
1993-
"pattern": "^[^_\\W][\\w-._]{0,259}(?<![-.])$"
1990+
"type": "string"
19941991
}
19951992
],
19961993
"responses": {
@@ -2094,7 +2091,7 @@
20942091
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
20952092
"required": true,
20962093
"type": "string",
2097-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2094+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
20982095
}
20992096
],
21002097
"responses": {
@@ -2142,7 +2139,7 @@
21422139
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
21432140
"required": true,
21442141
"type": "string",
2145-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2142+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
21462143
},
21472144
{
21482145
"name": "snapshot",
@@ -2236,7 +2233,7 @@
22362233
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
22372234
"required": true,
22382235
"type": "string",
2239-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2236+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
22402237
},
22412238
{
22422239
"name": "snapshot",
@@ -2315,7 +2312,7 @@
23152312
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
23162313
"required": true,
23172314
"type": "string",
2318-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2315+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
23192316
}
23202317
],
23212318
"responses": {
@@ -2380,7 +2377,7 @@
23802377
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
23812378
"required": true,
23822379
"type": "string",
2383-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2380+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
23842381
},
23852382
{
23862383
"name": "grantAccessData",
@@ -2455,7 +2452,7 @@
24552452
"description": "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, underscore (_), hyphen (-), and dot (.). The max name length is 80 characters.",
24562453
"required": true,
24572454
"type": "string",
2458-
"pattern": "^[^_\\W][\\w-._]{0,89}(?<![-.])$"
2455+
"pattern": "^[^_\\W][\\w-._]{0,79}(?<![-.])$"
24592456
}
24602457
],
24612458
"responses": {

0 commit comments

Comments
 (0)