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 @@ -25,9 +25,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2024-03-01",
"version": "2024-10-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/applicationgatewaywebapplicationfirewallpolicies/{}", "2024-03-01", "properties.customRules[]"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/applicationgatewaywebapplicationfirewallpolicies/{}", "2024-10-01", "properties.customRules[]"],
]
}

Expand Down Expand Up @@ -136,7 +136,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["variable-name"],
help="User Session clause variable.",
required=True,
enum={"ClientAddr": "ClientAddr", "GeoLocation": "GeoLocation", "None": "None"},
enum={"ClientAddr": "ClientAddr", "ClientAddrXFFHeader": "ClientAddrXFFHeader", "GeoLocation": "GeoLocation", "GeoLocationXFFHeader": "GeoLocationXFFHeader", "None": "None"},
)

match_conditions = cls._args_schema.match_conditions
Expand All @@ -146,6 +146,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_element.values = AAZListArg(
options=["values"],
help="Space-separated list of values to match.",
required=True,
)
_element.variables = AAZListArg(
options=["variables"],
Expand Down Expand Up @@ -293,7 +294,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01",
"api-version", "2024-10-01",
required=True,
),
}
Expand Down Expand Up @@ -376,7 +377,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01",
"api-version", "2024-10-01",
required=True,
),
}
Expand Down Expand Up @@ -465,7 +466,7 @@ def _create_instance(self):

_elements = _builder.get(".matchConditions[]")
if _elements is not None:
_elements.set_prop("matchValues", AAZListType, ".values")
_elements.set_prop("matchValues", AAZListType, ".values", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("matchVariables", AAZListType, ".variables", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("negationConditon", AAZBoolType, ".negate")
_elements.set_prop("operator", AAZStrType, ".operator", typ_kwargs={"flags": {"required": True}})
Expand Down Expand Up @@ -970,7 +971,7 @@ def _build_schema_managed_service_identity_read(cls, _schema):
_schema.user_assigned_identities = cls._schema_managed_service_identity_read.user_assigned_identities
return

cls._schema_managed_service_identity_read = _schema_managed_service_identity_read = AAZObjectType()
cls._schema_managed_service_identity_read = _schema_managed_service_identity_read = AAZIdentityObjectType()

managed_service_identity_read = _schema_managed_service_identity_read
managed_service_identity_read.principal_id = AAZStrType(
Expand Down Expand Up @@ -1392,6 +1393,10 @@ def _build_schema_network_interface_read(cls, _schema):
properties.auxiliary_sku = AAZStrType(
serialized_name="auxiliarySku",
)
properties.default_outbound_connectivity_enabled = AAZBoolType(
serialized_name="defaultOutboundConnectivityEnabled",
flags={"read_only": True},
)
properties.disable_tcp_state_tracking = AAZBoolType(
serialized_name="disableTcpStateTracking",
)
Expand Down Expand Up @@ -1745,7 +1750,7 @@ def _build_schema_network_security_group_read(cls, _schema):
flags={"read_only": True},
)
_element.id = AAZStrType()
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
cls._build_schema_managed_service_identity_read(_element.identity)
_element.location = AAZStrType()
_element.name = AAZStrType(
Expand Down Expand Up @@ -2215,13 +2220,23 @@ def _build_schema_public_ip_address_read(cls, _schema):
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",
)
cls._build_schema_sub_resource_read(properties.source_virtual_network)
properties.subnets = AAZListType(
flags={"read_only": True},
)
Expand All @@ -2230,10 +2245,18 @@ def _build_schema_public_ip_address_read(cls, _schema):
public_ip_addresses.Element = AAZObjectType()
cls._build_schema_sub_resource_read(public_ip_addresses.Element)

public_ip_addresses_v6 = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses_v6
public_ip_addresses_v6.Element = AAZObjectType()
cls._build_schema_sub_resource_read(public_ip_addresses_v6.Element)

public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes
public_ip_prefixes.Element = AAZObjectType()
cls._build_schema_sub_resource_read(public_ip_prefixes.Element)

public_ip_prefixes_v6 = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes_v6
public_ip_prefixes_v6.Element = AAZObjectType()
cls._build_schema_sub_resource_read(public_ip_prefixes_v6.Element)

subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets
subnets.Element = AAZObjectType()
cls._build_schema_sub_resource_read(subnets.Element)
Expand Down Expand Up @@ -2433,6 +2456,9 @@ def _build_schema_subnet_read(cls, _schema):
serialized_name="ipConfigurations",
flags={"read_only": True},
)
properties.ipam_pool_prefix_allocations = AAZListType(
serialized_name="ipamPoolPrefixAllocations",
)
properties.nat_gateway = AAZObjectType(
serialized_name="natGateway",
)
Expand Down Expand Up @@ -2547,6 +2573,27 @@ def _build_schema_subnet_read(cls, _schema):
ip_configurations.Element = AAZObjectType()
cls._build_schema_ip_configuration_read(ip_configurations.Element)

ipam_pool_prefix_allocations = _schema_subnet_read.properties.ipam_pool_prefix_allocations
ipam_pool_prefix_allocations.Element = AAZObjectType()

_element = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element
_element.allocated_address_prefixes = AAZListType(
serialized_name="allocatedAddressPrefixes",
flags={"read_only": True},
)
_element.number_of_ip_addresses = AAZStrType(
serialized_name="numberOfIpAddresses",
)
_element.pool = AAZObjectType(
flags={"client_flatten": True},
)

allocated_address_prefixes = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element.allocated_address_prefixes
allocated_address_prefixes.Element = AAZStrType()

pool = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element.pool
pool.id = AAZStrType()

private_endpoints = _schema_subnet_read.properties.private_endpoints
private_endpoints.Element = AAZObjectType()
cls._build_schema_private_endpoint_read(private_endpoints.Element)
Expand Down Expand Up @@ -2952,7 +2999,7 @@ def _build_schema_web_application_firewall_policy_read(cls, _schema):
flags={"read_only": True},
)
_element.id = AAZStrType()
_element.identity = AAZObjectType()
_element.identity = AAZIdentityObjectType()
cls._build_schema_managed_service_identity_read(_element.identity)
_element.location = AAZStrType()
_element.name = AAZStrType(
Expand Down Expand Up @@ -4182,6 +4229,7 @@ def _build_schema_web_application_firewall_policy_read(cls, _schema):
_element = _schema_web_application_firewall_policy_read.properties.custom_rules.Element.match_conditions.Element
_element.match_values = AAZListType(
serialized_name="matchValues",
flags={"required": True},
)
_element.match_variables = AAZListType(
serialized_name="matchVariables",
Expand Down Expand Up @@ -4278,6 +4326,10 @@ def _build_schema_web_application_firewall_policy_read(cls, _schema):
managed_rule_sets.Element = AAZObjectType()

_element = _schema_web_application_firewall_policy_read.properties.managed_rules.managed_rule_sets.Element
_element.computed_disabled_rules = AAZListType(
serialized_name="computedDisabledRules",
flags={"read_only": True},
)
_element.rule_group_overrides = AAZListType(
serialized_name="ruleGroupOverrides",
)
Expand All @@ -4290,6 +4342,19 @@ def _build_schema_web_application_firewall_policy_read(cls, _schema):
flags={"required": True},
)

computed_disabled_rules = _schema_web_application_firewall_policy_read.properties.managed_rules.managed_rule_sets.Element.computed_disabled_rules
computed_disabled_rules.Element = AAZObjectType()

_element = _schema_web_application_firewall_policy_read.properties.managed_rules.managed_rule_sets.Element.computed_disabled_rules.Element
_element.rule_group_name = AAZStrType(
serialized_name="ruleGroupName",
flags={"required": True},
)
_element.rules = AAZListType()

rules = _schema_web_application_firewall_policy_read.properties.managed_rules.managed_rule_sets.Element.computed_disabled_rules.Element.rules
rules.Element = AAZStrType()

rule_group_overrides = _schema_web_application_firewall_policy_read.properties.managed_rules.managed_rule_sets.Element.rule_group_overrides
rule_group_overrides.Element = AAZObjectType()

Expand Down
Loading
Loading