Skip to content

Commit

Permalink
Create commands for 2023-07-01-preview Api version (#7055)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushal087 committed Dec 20, 2023
1 parent ad9794d commit 76d5f00
Show file tree
Hide file tree
Showing 41 changed files with 3,476 additions and 3,338 deletions.
6 changes: 6 additions & 0 deletions src/nsp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Release History
===============
===============

##### 0.3.0
++++++
No new commands added or updated.
Commands for new api version 2023-07-01-preview added.

##### 0.2.1
++++++
No new commands added.
Expand Down
12 changes: 6 additions & 6 deletions src/nsp/azext_nsp/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -138,7 +138,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
6 changes: 3 additions & 3 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -119,7 +119,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
36 changes: 19 additions & 17 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/networksecurityperimeters", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.network/networksecurityperimeters", "2023-07-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters", "2023-07-01-preview"],
]
}

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
Expand Down Expand Up @@ -61,12 +63,12 @@ def _build_arguments_schema(cls, *args, **kwargs):

def _execute_operations(self):
self.pre_operations()
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
if condition_0:
self.NetworkSecurityPerimetersListBySubscription(ctx=self.ctx)()
if condition_1:
self.NetworkSecurityPerimetersList(ctx=self.ctx)()
if condition_1:
self.NetworkSecurityPerimetersListBySubscription(ctx=self.ctx)()
self.post_operations()

@register_callback
Expand All @@ -82,7 +84,7 @@ def _output(self, *args, **kwargs):
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

class NetworkSecurityPerimetersListBySubscription(AAZHttpOperation):
class NetworkSecurityPerimetersList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -96,7 +98,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters",
**self.url_parameters
)

Expand All @@ -111,6 +113,10 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand All @@ -128,7 +134,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -196,7 +202,7 @@ def _build_schema_on_200(cls):

return cls._schema_on_200

class NetworkSecurityPerimetersList(AAZHttpOperation):
class NetworkSecurityPerimetersListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -210,7 +216,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters",
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters",
**self.url_parameters
)

Expand All @@ -225,10 +231,6 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand All @@ -246,7 +248,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
6 changes: 3 additions & 3 deletions src/nsp/azext_nsp/aaz/latest/network/perimeter/_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -187,7 +187,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -153,7 +153,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations", "2023-07-01-preview"],
]
}

AZ_SUPPORT_PAGINATION = True

def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
Expand Down Expand Up @@ -137,7 +139,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"network perimeter association update",
)
class Update(AAZCommand):
"""Creates or updates a NSP resource association.
"""Updates a NSP resource association.
:example: Update NSP Association
az network perimeter association update --name MyAssociation --perimeter-name MyPerimeter --resource-group MyResourceGroup --access-mode Enforced --private-link-resource id="<PaaSArmID> --profile id="ProfileArmID"
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -214,7 +214,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -301,7 +301,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):

_aaz_info = {
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/resourceassociations/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -126,7 +126,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/links/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/links/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -164,7 +164,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2021-02-01-preview",
"version": "2023-07-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/links/{}", "2021-02-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networksecurityperimeters/{}/links/{}", "2023-07-01-preview"],
]
}

Expand Down Expand Up @@ -153,7 +153,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-02-01-preview",
"api-version", "2023-07-01-preview",
required=True,
),
}
Expand Down
Loading

0 comments on commit 76d5f00

Please sign in to comment.