Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVNM, IPAM, VNV updating resource name regex validation #31130

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"description": "IP Address Manager Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and everywhere else.
What happens to the resources that fall under the previous regex and do not follow the new regex pattern ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RP logic has always followed the new definition, so this is not a concern

},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -194,7 +194,7 @@
"description": "IP Address Manager Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -253,7 +253,7 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -304,7 +304,7 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -366,7 +366,7 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -419,7 +419,7 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -475,7 +475,7 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "query",
Expand Down Expand Up @@ -568,15 +568,15 @@
"description": "IP Address Manager Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "staticCidrName",
"description": "Static Cidr allocation name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -641,15 +641,15 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "staticCidrName",
"description": "StaticCidr resource name to retrieve.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -700,15 +700,15 @@
"description": "Pool resource name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "staticCidrName",
"description": "StaticCidr resource name to delete.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-]*$",
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$",
"description": "The name of the network manager.",
"x-ms-parameter-location": "method"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "query",
Expand Down Expand Up @@ -124,15 +124,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisIntentName",
"description": "Reachability Analysis Intent name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down Expand Up @@ -186,15 +186,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisIntentName",
"description": "Reachability Analysis Intent name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "body",
Expand Down Expand Up @@ -260,15 +260,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisIntentName",
"description": "Reachability Analysis Intent name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down Expand Up @@ -321,7 +321,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "query",
Expand Down Expand Up @@ -411,15 +411,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisRunName",
"description": "Reachability Analysis Run name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down Expand Up @@ -473,15 +473,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisRunName",
"description": "Reachability Analysis Run name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "body",
Expand Down Expand Up @@ -547,15 +547,15 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "path",
"name": "reachabilityAnalysisRunName",
"description": "Reachability Analysis Run name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down Expand Up @@ -700,7 +700,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down Expand Up @@ -754,7 +754,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "body",
Expand Down Expand Up @@ -823,7 +823,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
},
{
"in": "body",
Expand Down Expand Up @@ -882,7 +882,7 @@
"description": "Workspace name.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9_.-]*$"
"pattern": "^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$"
}
],
"responses": {
Expand Down