Skip to content
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 @@ -20,7 +20,7 @@ interactions:
User-Agent:
- AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-5.15.0-1039-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksipprefix000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003\",\r\n
Expand Down Expand Up @@ -176,7 +176,7 @@ interactions:
User-Agent:
- AZURECLI/2.49.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-5.15.0-1039-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksipprefix000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksipprefix000003\",\r\n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksslbipp1000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002\",\r\n
Expand Down Expand Up @@ -171,7 +171,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksslbipp1000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp1000002\",\r\n
Expand Down Expand Up @@ -231,7 +231,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksslbipp2000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003\",\r\n
Expand Down Expand Up @@ -382,7 +382,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003?api-version=2024-07-01
response:
body:
string: "{\r\n \"name\": \"cliaksslbipp2000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPPrefixes/cliaksslbipp2000003\",\r\n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002?api-version=2024-07-01
response:
body:
string: '{"name":"cliaksslbip1000002","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002","etag":"W/\"1bdf3cc2-cfbb-4a00-bd2c-63711609f90e\"","location":"westcentralus","properties":{"provisioningState":"Updating","resourceGuid":"f7003fc8-c164-47de-bc14-7462b71dc77b","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -164,7 +164,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002?api-version=2024-07-01
response:
body:
string: '{"name":"cliaksslbip1000002","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip1000002","etag":"W/\"24abb0fc-8ab8-4ec1-81a5-0eb7dca10da2\"","location":"westcentralus","properties":{"provisioningState":"Succeeded","resourceGuid":"f7003fc8-c164-47de-bc14-7462b71dc77b","ipAddress":"52.161.142.141","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -217,7 +217,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003?api-version=2024-07-01
response:
body:
string: '{"name":"cliaksslbip2000003","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003","etag":"W/\"9b9dc802-e163-4bff-a3ed-c0c34b3a452d\"","location":"westcentralus","properties":{"provisioningState":"Updating","resourceGuid":"234c2eaa-30b9-440b-9867-7b8d2e36d10e","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -361,7 +361,7 @@ interactions:
User-Agent:
- AZURECLI/2.59.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.5.0-1017-azure-x86_64-with-glibc2.29)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003?api-version=2024-07-01
response:
body:
string: '{"name":"cliaksslbip2000003","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/cliaksslbip2000003","etag":"W/\"62213989-1dad-4eb5-bb25-61ce63e92fbd\"","location":"westcentralus","properties":{"provisioningState":"Succeeded","resourceGuid":"234c2eaa-30b9-440b-9867-7b8d2e36d10e","ipAddress":"52.161.165.48","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interactions:
User-Agent:
- AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1?api-version=2024-07-01
response:
body:
string: '{"name":"ip1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1","etag":"W/\"b9f4efce-4514-48fc-a8fc-3a362cbfc498\"","location":"westus","properties":{"provisioningState":"Updating","resourceGuid":"42c64e85-9808-48a8-b36a-7d431d0067cf","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -172,7 +172,7 @@ interactions:
User-Agent:
- AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1?api-version=2024-07-01
response:
body:
string: '{"name":"ip1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip1","etag":"W/\"e8e99c66-d090-473b-b9a7-25b6537230fe\"","location":"westus","properties":{"provisioningState":"Succeeded","resourceGuid":"42c64e85-9808-48a8-b36a-7d431d0067cf","ipAddress":"172.184.104.24","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -273,7 +273,7 @@ interactions:
User-Agent:
- AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2?api-version=2024-07-01
response:
body:
string: '{"name":"ip2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2","etag":"W/\"fa561cba-dcf6-488c-96e9-2004e5a1a3fe\"","location":"westus","properties":{"provisioningState":"Updating","resourceGuid":"1553726b-fdb2-4a05-9a4b-514f07e6b901","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down Expand Up @@ -379,7 +379,7 @@ interactions:
User-Agent:
- AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2?api-version=2022-11-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2?api-version=2024-07-01
response:
body:
string: '{"name":"ip2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_clone000001/providers/Microsoft.Network/publicIPAddresses/ip2","etag":"W/\"76689714-674c-4b53-9349-b1f1eafd809b\"","location":"westus","properties":{"provisioningState":"Succeeded","resourceGuid":"1553726b-fdb2-4a05-9a4b-514f07e6b901","ipAddress":"172.184.176.98","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2022-01-01",
"version": "2024-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/natgateways/{}", "2022-01-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/natgateways/{}", "2024-07-01"],
]
}

Expand Down Expand Up @@ -117,10 +117,28 @@ def _build_arguments_schema(cls, *args, **kwargs):
sku.name = AAZStrArg(
options=["name"],
help="Name of Nat Gateway SKU.",
enum={"Standard": "Standard"},
enum={"Standard": "Standard", "StandardV2": "StandardV2"},
)
return cls._args_schema

_args_sub_resource_create = None

@classmethod
def _build_args_sub_resource_create(cls, _schema):
if cls._args_sub_resource_create is not None:
_schema.id = cls._args_sub_resource_create.id
return

cls._args_sub_resource_create = AAZObjectArg()

sub_resource_create = cls._args_sub_resource_create
sub_resource_create.id = AAZStrArg(
options=["id"],
help="Resource ID.",
)

_schema.id = cls._args_sub_resource_create.id

def _execute_operations(self):
self.pre_operations()
yield self.NatGatewaysCreateOrUpdate(ctx=self.ctx)()
Expand Down Expand Up @@ -202,7 +220,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down Expand Up @@ -316,13 +334,23 @@ def _build_schema_on_200_201(cls):
properties.public_ip_addresses = AAZListType(
serialized_name="publicIpAddresses",
)
properties.public_ip_addresses_v6 = AAZListType(
serialized_name="publicIpAddressesV6",
)
properties.public_ip_prefixes = AAZListType(
serialized_name="publicIpPrefixes",
)
properties.public_ip_prefixes_v6 = AAZListType(
serialized_name="publicIpPrefixesV6",
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
properties.source_virtual_network = AAZObjectType(
serialized_name="sourceVirtualNetwork",
)
_CreateHelper._build_schema_sub_resource_read(properties.source_virtual_network)
properties.subnets = AAZListType(
flags={"read_only": True},
)
Expand All @@ -331,10 +359,18 @@ def _build_schema_on_200_201(cls):
public_ip_addresses.Element = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(public_ip_addresses.Element)

public_ip_addresses_v6 = cls._schema_on_200_201.properties.public_ip_addresses_v6
public_ip_addresses_v6.Element = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(public_ip_addresses_v6.Element)

public_ip_prefixes = cls._schema_on_200_201.properties.public_ip_prefixes
public_ip_prefixes.Element = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(public_ip_prefixes.Element)

public_ip_prefixes_v6 = cls._schema_on_200_201.properties.public_ip_prefixes_v6
public_ip_prefixes_v6.Element = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(public_ip_prefixes_v6.Element)

subnets = cls._schema_on_200_201.properties.subnets
subnets.Element = AAZObjectType()
_CreateHelper._build_schema_sub_resource_read(subnets.Element)
Expand All @@ -354,6 +390,12 @@ def _build_schema_on_200_201(cls):
class _CreateHelper:
"""Helper class for Create"""

@classmethod
def _build_schema_sub_resource_create(cls, _builder):
if _builder is None:
return
_builder.set_prop("id", AAZStrType, ".id")

_schema_sub_resource_read = None

@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2022-01-01",
"version": "2024-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/natgateways/{}", "2022-01-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/natgateways/{}", "2024-07-01"],
]
}

Expand Down Expand Up @@ -142,7 +142,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
"api-version", "2024-07-01",
required=True,
),
}
Expand Down
Loading