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

[PrivateDns] Add resolutionPolicy property to vnet links #30115

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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 @@ -4,3 +4,7 @@
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

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

_aaz_info = {
"version": "2018-09-01",
"version": "2024-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2024-06-01"],
]
}

Expand Down Expand Up @@ -89,6 +89,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
resource_group_arg="resource_group",
),
)

# define Arg Group "Properties"

_args_schema = cls._args_schema
_args_schema.resolution_policy = AAZStrArg(
options=["--resolution-policy"],
arg_group="Properties",
help="The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.",
enum={"Default": "Default", "NxDomainRedirect": "NxDomainRedirect"},
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -176,7 +186,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -211,6 +221,7 @@ def content(self):
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("registrationEnabled", AAZBoolType, ".registration_enabled")
properties.set_prop("resolutionPolicy", AAZStrType, ".resolution_policy")
properties.set_prop("virtualNetwork", AAZObjectType)

virtual_network = _builder.get(".properties.virtualNetwork")
Expand Down Expand Up @@ -265,6 +276,9 @@ def _build_schema_on_200_201(cls):
properties.registration_enabled = AAZBoolType(
serialized_name="registrationEnabled",
)
properties.resolution_policy = AAZStrType(
serialized_name="resolutionPolicy",
)
properties.virtual_network = AAZObjectType(
serialized_name="virtualNetwork",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2018-09-01",
"version": "2024-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2024-06-01"],
]
}

Expand Down Expand Up @@ -159,7 +159,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2018-09-01",
"version": "2024-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks", "2024-06-01"],
]
}

Expand Down Expand Up @@ -128,7 +128,7 @@ def query_parameters(self):
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -195,6 +195,9 @@ def _build_schema_on_200(cls):
properties.registration_enabled = AAZBoolType(
serialized_name="registrationEnabled",
)
properties.resolution_policy = AAZStrType(
serialized_name="resolutionPolicy",
)
properties.virtual_network = AAZObjectType(
serialized_name="virtualNetwork",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2018-09-01",
"version": "2024-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2024-06-01"],
]
}

Expand Down Expand Up @@ -130,7 +130,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -187,6 +187,9 @@ def _build_schema_on_200(cls):
properties.registration_enabled = AAZBoolType(
serialized_name="registrationEnabled",
)
properties.resolution_policy = AAZStrType(
serialized_name="resolutionPolicy",
)
properties.virtual_network = AAZObjectType(
serialized_name="virtualNetwork",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Update(AAZCommand):
"""

_aaz_info = {
"version": "2018-09-01",
"version": "2024-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2024-06-01"],
]
}

Expand Down Expand Up @@ -85,6 +85,15 @@ def _build_arguments_schema(cls, *args, **kwargs):
# define Arg Group "Parameters"

# define Arg Group "Properties"

_args_schema = cls._args_schema
_args_schema.resolution_policy = AAZStrArg(
options=["--resolution-policy"],
arg_group="Properties",
help="The resolution policy on the virtual network link. Only applicable for virtual network links to privatelink zones, and for A,AAAA,CNAME queries. When set to 'NxDomainRedirect', Azure DNS resolver falls back to public resolution if private dns query resolution results in non-existent domain response.",
nullable=True,
enum={"Default": "Default", "NxDomainRedirect": "NxDomainRedirect"},
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -169,7 +178,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -272,7 +281,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -339,6 +348,7 @@ def _update_instance(self, instance):
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("registrationEnabled", AAZBoolType, ".registration_enabled")
properties.set_prop("resolutionPolicy", AAZStrType, ".resolution_policy")

tags = _builder.get(".tags")
if tags is not None:
Expand Down Expand Up @@ -399,6 +409,9 @@ def _build_schema_virtual_network_link_read(cls, _schema):
properties.registration_enabled = AAZBoolType(
serialized_name="registrationEnabled",
)
properties.resolution_policy = AAZStrType(
serialized_name="resolutionPolicy",
)
properties.virtual_network = AAZObjectType(
serialized_name="virtualNetwork",
)
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/privatednszones/{}/virtualnetworklinks/{}", "2018-09-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/privatednszones/{}/virtualnetworklinks/{}", "2024-06-01"],
]
}

Expand Down Expand Up @@ -126,7 +126,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01",
"api-version", "2024-06-01",
required=True,
),
}
Expand Down Expand Up @@ -183,6 +183,9 @@ def _build_schema_on_200(cls):
properties.registration_enabled = AAZBoolType(
serialized_name="registrationEnabled",
)
properties.resolution_policy = AAZStrType(
serialized_name="resolutionPolicy",
)
properties.virtual_network = AAZObjectType(
serialized_name="virtualNetwork",
)
Expand Down
Loading