Skip to content

Commit d3c6234

Browse files
Ptnan7Jingnan Xu
andauthored
{AFD} Fix Issue 31584: make location parameter as unrequired. (#31588)
Co-authored-by: Jingnan Xu <jingnanxu@microsoft.com>
1 parent 4370a6f commit d3c6234

134 files changed

Lines changed: 9284 additions & 17202 deletions

File tree

Some content is hidden

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

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/custom_domain/_regenerate_validation_token.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class RegenerateValidationToken(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}/refreshvalidationtoken", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/customdomains/{}/refreshvalidationtoken", "2025-04-15"],
2828
]
2929
}
3030

@@ -56,6 +56,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5656
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5757
required=True,
5858
id_part="name",
59+
fmt=AAZStrArgFormat(
60+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
61+
max_length=260,
62+
min_length=1,
63+
),
5964
)
6065
_args_schema.resource_group = AAZResourceGroupNameArg(
6166
required=True,
@@ -143,7 +148,7 @@ def url_parameters(self):
143148
def query_parameters(self):
144149
parameters = {
145150
**self.serialize_query_param(
146-
"api-version", "2024-09-01",
151+
"api-version", "2025-04-15",
147152
required=True,
148153
),
149154
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_create.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Create(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
2828
]
2929
}
3030

@@ -54,6 +54,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5454
options=["--profile-name"],
5555
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5656
required=True,
57+
fmt=AAZStrArgFormat(
58+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
59+
max_length=260,
60+
min_length=1,
61+
),
5762
)
5863
_args_schema.resource_group = AAZResourceGroupNameArg(
5964
required=True,
@@ -181,7 +186,7 @@ def url_parameters(self):
181186
def query_parameters(self):
182187
parameters = {
183188
**self.serialize_query_param(
184-
"api-version", "2024-09-01",
189+
"api-version", "2025-04-15",
185190
required=True,
186191
),
187192
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_delete.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class Delete(AAZCommand):
2323
"""
2424

2525
_aaz_info = {
26-
"version": "2024-09-01",
26+
"version": "2025-04-15",
2727
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2024-09-01"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
2929
]
3030
}
3131

@@ -57,6 +57,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5757
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5858
required=True,
5959
id_part="name",
60+
fmt=AAZStrArgFormat(
61+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
62+
max_length=260,
63+
min_length=1,
64+
),
6065
)
6166
_args_schema.resource_group = AAZResourceGroupNameArg(
6267
required=True,
@@ -153,7 +158,7 @@ def url_parameters(self):
153158
def query_parameters(self):
154159
parameters = {
155160
**self.serialize_query_param(
156-
"api-version", "2024-09-01",
161+
"api-version", "2025-04-15",
157162
required=True,
158163
),
159164
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_list.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class List(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints", "2025-04-15"],
2828
]
2929
}
3030

@@ -49,6 +49,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
4949
options=["--profile-name"],
5050
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5151
required=True,
52+
fmt=AAZStrArgFormat(
53+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
54+
max_length=260,
55+
min_length=1,
56+
),
5257
)
5358
_args_schema.resource_group = AAZResourceGroupNameArg(
5459
required=True,
@@ -121,7 +126,7 @@ def url_parameters(self):
121126
def query_parameters(self):
122127
parameters = {
123128
**self.serialize_query_param(
124-
"api-version", "2024-09-01",
129+
"api-version", "2025-04-15",
125130
required=True,
126131
),
127132
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_purge.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Purge(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}/purge", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}/purge", "2025-04-15"],
2828
]
2929
}
3030

@@ -56,6 +56,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5656
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5757
required=True,
5858
id_part="name",
59+
fmt=AAZStrArgFormat(
60+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
61+
max_length=260,
62+
min_length=1,
63+
),
5964
)
6065
_args_schema.resource_group = AAZResourceGroupNameArg(
6166
required=True,
@@ -164,7 +169,7 @@ def url_parameters(self):
164169
def query_parameters(self):
165170
parameters = {
166171
**self.serialize_query_param(
167-
"api-version", "2024-09-01",
172+
"api-version", "2025-04-15",
168173
required=True,
169174
),
170175
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_show.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Show(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
2828
]
2929
}
3030

@@ -55,6 +55,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5555
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5656
required=True,
5757
id_part="name",
58+
fmt=AAZStrArgFormat(
59+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
60+
max_length=260,
61+
min_length=1,
62+
),
5863
)
5964
_args_schema.resource_group = AAZResourceGroupNameArg(
6065
required=True,
@@ -130,7 +135,7 @@ def url_parameters(self):
130135
def query_parameters(self):
131136
parameters = {
132137
**self.serialize_query_param(
133-
"api-version", "2024-09-01",
138+
"api-version", "2025-04-15",
134139
required=True,
135140
),
136141
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_update.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Update(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
2828
]
2929
}
3030

@@ -58,6 +58,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5858
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5959
required=True,
6060
id_part="name",
61+
fmt=AAZStrArgFormat(
62+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
63+
max_length=260,
64+
min_length=1,
65+
),
6166
)
6267
_args_schema.resource_group = AAZResourceGroupNameArg(
6368
required=True,
@@ -186,7 +191,7 @@ def url_parameters(self):
186191
def query_parameters(self):
187192
parameters = {
188193
**self.serialize_query_param(
189-
"api-version", "2024-09-01",
194+
"api-version", "2025-04-15",
190195
required=True,
191196
),
192197
}
@@ -289,7 +294,7 @@ def url_parameters(self):
289294
def query_parameters(self):
290295
parameters = {
291296
**self.serialize_query_param(
292-
"api-version", "2024-09-01",
297+
"api-version", "2025-04-15",
293298
required=True,
294299
),
295300
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/endpoint/_wait.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
2020

2121
_aaz_info = {
2222
"resources": [
23-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2024-09-01"],
23+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}/afdendpoints/{}", "2025-04-15"],
2424
]
2525
}
2626

@@ -51,6 +51,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
5151
help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.",
5252
required=True,
5353
id_part="name",
54+
fmt=AAZStrArgFormat(
55+
pattern="^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$",
56+
max_length=260,
57+
min_length=1,
58+
),
5459
)
5560
_args_schema.resource_group = AAZResourceGroupNameArg(
5661
required=True,
@@ -126,7 +131,7 @@ def url_parameters(self):
126131
def query_parameters(self):
127132
parameters = {
128133
**self.serialize_query_param(
129-
"api-version", "2024-09-01",
134+
"api-version", "2025-04-15",
130135
required=True,
131136
),
132137
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_create.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Create(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}", "2025-04-15"],
2828
]
2929
}
3030

@@ -66,6 +66,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
6666
arg_group="Profile",
6767
help="Resource location.",
6868
required=True,
69+
default="global",
6970
fmt=AAZResourceLocationArgFormat(
7071
resource_group_arg="resource_group",
7172
),
@@ -255,7 +256,7 @@ def url_parameters(self):
255256
def query_parameters(self):
256257
parameters = {
257258
**self.serialize_query_param(
258-
"api-version", "2024-09-01",
259+
"api-version", "2025-04-15",
259260
required=True,
260261
),
261262
}

src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_delete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Delete(AAZCommand):
2222
"""
2323

2424
_aaz_info = {
25-
"version": "2024-09-01",
25+
"version": "2025-04-15",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}", "2024-09-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.cdn/profiles/{}", "2025-04-15"],
2828
]
2929
}
3030

@@ -142,7 +142,7 @@ def url_parameters(self):
142142
def query_parameters(self):
143143
parameters = {
144144
**self.serialize_query_param(
145-
"api-version", "2024-09-01",
145+
"api-version", "2025-04-15",
146146
required=True,
147147
),
148148
}

0 commit comments

Comments
 (0)