Skip to content

Commit a2a9e3c

Browse files
authored
[Network] az network application-gateway http-settings: Support dedicated backend connection and certificate validation (#32332)
1 parent 51d6b2c commit a2a9e3c

File tree

12 files changed

+2926
-519
lines changed

12 files changed

+2926
-519
lines changed

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/http_settings/_create.py

Lines changed: 156 additions & 36 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/http_settings/_delete.py

Lines changed: 128 additions & 34 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/http_settings/_list.py

Lines changed: 128 additions & 34 deletions
Large diffs are not rendered by default.

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/http_settings/_show.py

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

2424
_aaz_info = {
25-
"version": "2023-11-01",
25+
"version": "2024-10-01",
2626
"resources": [
27-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/applicationgateways/{}", "2023-11-01", "properties.backendHttpSettingsCollection[]"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/applicationgateways/{}", "2024-10-01", "properties.backendHttpSettingsCollection[]"],
2828
]
2929
}
3030

@@ -150,7 +150,7 @@ def url_parameters(self):
150150
def query_parameters(self):
151151
parameters = {
152152
**self.serialize_query_param(
153-
"api-version", "2023-11-01",
153+
"api-version", "2024-10-01",
154154
required=True,
155155
),
156156
}
@@ -411,7 +411,8 @@ def _build_schema_application_gateway_read(cls, _schema):
411411
flags={"read_only": True},
412412
)
413413
application_gateway_read.id = AAZStrType()
414-
application_gateway_read.identity = AAZObjectType()
414+
application_gateway_read.identity = AAZIdentityObjectType()
415+
cls._build_schema_managed_service_identity_read(application_gateway_read.identity)
415416
application_gateway_read.location = AAZStrType()
416417
application_gateway_read.name = AAZStrType(
417418
flags={"read_only": True},
@@ -425,33 +426,6 @@ def _build_schema_application_gateway_read(cls, _schema):
425426
)
426427
application_gateway_read.zones = AAZListType()
427428

428-
identity = _schema_application_gateway_read.identity
429-
identity.principal_id = AAZStrType(
430-
serialized_name="principalId",
431-
flags={"read_only": True},
432-
)
433-
identity.tenant_id = AAZStrType(
434-
serialized_name="tenantId",
435-
flags={"read_only": True},
436-
)
437-
identity.type = AAZStrType()
438-
identity.user_assigned_identities = AAZDictType(
439-
serialized_name="userAssignedIdentities",
440-
)
441-
442-
user_assigned_identities = _schema_application_gateway_read.identity.user_assigned_identities
443-
user_assigned_identities.Element = AAZObjectType()
444-
445-
_element = _schema_application_gateway_read.identity.user_assigned_identities.Element
446-
_element.client_id = AAZStrType(
447-
serialized_name="clientId",
448-
flags={"read_only": True},
449-
)
450-
_element.principal_id = AAZStrType(
451-
serialized_name="principalId",
452-
flags={"read_only": True},
453-
)
454-
455429
properties = _schema_application_gateway_read.properties
456430
properties.authentication_certificates = AAZListType(
457431
serialized_name="authenticationCertificates",
@@ -628,6 +602,9 @@ def _build_schema_application_gateway_read(cls, _schema):
628602
properties.cookie_based_affinity = AAZStrType(
629603
serialized_name="cookieBasedAffinity",
630604
)
605+
properties.dedicated_backend_connection = AAZBoolType(
606+
serialized_name="dedicatedBackendConnection",
607+
)
631608
properties.host_name = AAZStrType(
632609
serialized_name="hostName",
633610
)
@@ -649,9 +626,18 @@ def _build_schema_application_gateway_read(cls, _schema):
649626
properties.request_timeout = AAZIntType(
650627
serialized_name="requestTimeout",
651628
)
629+
properties.sni_name = AAZStrType(
630+
serialized_name="sniName",
631+
)
652632
properties.trusted_root_certificates = AAZListType(
653633
serialized_name="trustedRootCertificates",
654634
)
635+
properties.validate_cert_chain_and_expiry = AAZBoolType(
636+
serialized_name="validateCertChainAndExpiry",
637+
)
638+
properties.validate_sni = AAZBoolType(
639+
serialized_name="validateSNI",
640+
)
655641

656642
authentication_certificates = _schema_application_gateway_read.properties.backend_http_settings_collection.Element.properties.authentication_certificates
657643
authentication_certificates.Element = AAZObjectType()
@@ -1838,6 +1824,51 @@ def _build_schema_ip_configuration_read(cls, _schema):
18381824
_schema.name = cls._schema_ip_configuration_read.name
18391825
_schema.properties = cls._schema_ip_configuration_read.properties
18401826

1827+
_schema_managed_service_identity_read = None
1828+
1829+
@classmethod
1830+
def _build_schema_managed_service_identity_read(cls, _schema):
1831+
if cls._schema_managed_service_identity_read is not None:
1832+
_schema.principal_id = cls._schema_managed_service_identity_read.principal_id
1833+
_schema.tenant_id = cls._schema_managed_service_identity_read.tenant_id
1834+
_schema.type = cls._schema_managed_service_identity_read.type
1835+
_schema.user_assigned_identities = cls._schema_managed_service_identity_read.user_assigned_identities
1836+
return
1837+
1838+
cls._schema_managed_service_identity_read = _schema_managed_service_identity_read = AAZIdentityObjectType()
1839+
1840+
managed_service_identity_read = _schema_managed_service_identity_read
1841+
managed_service_identity_read.principal_id = AAZStrType(
1842+
serialized_name="principalId",
1843+
flags={"read_only": True},
1844+
)
1845+
managed_service_identity_read.tenant_id = AAZStrType(
1846+
serialized_name="tenantId",
1847+
flags={"read_only": True},
1848+
)
1849+
managed_service_identity_read.type = AAZStrType()
1850+
managed_service_identity_read.user_assigned_identities = AAZDictType(
1851+
serialized_name="userAssignedIdentities",
1852+
)
1853+
1854+
user_assigned_identities = _schema_managed_service_identity_read.user_assigned_identities
1855+
user_assigned_identities.Element = AAZObjectType()
1856+
1857+
_element = _schema_managed_service_identity_read.user_assigned_identities.Element
1858+
_element.client_id = AAZStrType(
1859+
serialized_name="clientId",
1860+
flags={"read_only": True},
1861+
)
1862+
_element.principal_id = AAZStrType(
1863+
serialized_name="principalId",
1864+
flags={"read_only": True},
1865+
)
1866+
1867+
_schema.principal_id = cls._schema_managed_service_identity_read.principal_id
1868+
_schema.tenant_id = cls._schema_managed_service_identity_read.tenant_id
1869+
_schema.type = cls._schema_managed_service_identity_read.type
1870+
_schema.user_assigned_identities = cls._schema_managed_service_identity_read.user_assigned_identities
1871+
18411872
_schema_network_interface_ip_configuration_read = None
18421873

18431874
@classmethod
@@ -1958,6 +1989,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
19581989
properties.location = AAZStrType()
19591990
properties.outbound_rule = AAZObjectType(
19601991
serialized_name="outboundRule",
1992+
flags={"read_only": True},
19611993
)
19621994
cls._build_schema_sub_resource_read(properties.outbound_rule)
19631995
properties.outbound_rules = AAZListType(
@@ -2013,6 +2045,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
20132045
cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration)
20142046
properties.network_interface_ip_configuration = AAZObjectType(
20152047
serialized_name="networkInterfaceIPConfiguration",
2048+
flags={"read_only": True},
20162049
)
20172050
cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration)
20182051
properties.subnet = AAZObjectType()
@@ -2076,6 +2109,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
20762109
cls._build_schema_sub_resource_read(properties.backend_address_pool)
20772110
properties.backend_ip_configuration = AAZObjectType(
20782111
serialized_name="backendIPConfiguration",
2112+
flags={"read_only": True},
20792113
)
20802114
cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration)
20812115
properties.backend_port = AAZIntType(
@@ -2223,6 +2257,10 @@ def _build_schema_network_interface_read(cls, _schema):
22232257
properties.auxiliary_sku = AAZStrType(
22242258
serialized_name="auxiliarySku",
22252259
)
2260+
properties.default_outbound_connectivity_enabled = AAZBoolType(
2261+
serialized_name="defaultOutboundConnectivityEnabled",
2262+
flags={"read_only": True},
2263+
)
22262264
properties.disable_tcp_state_tracking = AAZBoolType(
22272265
serialized_name="disableTcpStateTracking",
22282266
)
@@ -2231,6 +2269,7 @@ def _build_schema_network_interface_read(cls, _schema):
22312269
)
22322270
properties.dscp_configuration = AAZObjectType(
22332271
serialized_name="dscpConfiguration",
2272+
flags={"read_only": True},
22342273
)
22352274
cls._build_schema_sub_resource_read(properties.dscp_configuration)
22362275
properties.enable_accelerated_networking = AAZBoolType(
@@ -2285,6 +2324,7 @@ def _build_schema_network_interface_read(cls, _schema):
22852324
)
22862325
properties.virtual_machine = AAZObjectType(
22872326
serialized_name="virtualMachine",
2327+
flags={"read_only": True},
22882328
)
22892329
cls._build_schema_sub_resource_read(properties.virtual_machine)
22902330
properties.vnet_encryption_supported = AAZBoolType(
@@ -2356,6 +2396,9 @@ def _build_schema_network_interface_read(cls, _schema):
23562396
properties.auto_approval = AAZObjectType(
23572397
serialized_name="autoApproval",
23582398
)
2399+
properties.destination_ip_address = AAZStrType(
2400+
serialized_name="destinationIPAddress",
2401+
)
23592402
properties.enable_proxy_protocol = AAZBoolType(
23602403
serialized_name="enableProxyProtocol",
23612404
)
@@ -2571,6 +2614,8 @@ def _build_schema_network_security_group_read(cls, _schema):
25712614
flags={"read_only": True},
25722615
)
25732616
_element.id = AAZStrType()
2617+
_element.identity = AAZIdentityObjectType()
2618+
cls._build_schema_managed_service_identity_read(_element.identity)
25742619
_element.location = AAZStrType()
25752620
_element.name = AAZStrType(
25762621
flags={"read_only": True},
@@ -2585,6 +2630,9 @@ def _build_schema_network_security_group_read(cls, _schema):
25852630

25862631
properties = _schema_network_security_group_read.properties.flow_logs.Element.properties
25872632
properties.enabled = AAZBoolType()
2633+
properties.enabled_filtering_criteria = AAZStrType(
2634+
serialized_name="enabledFilteringCriteria",
2635+
)
25882636
properties.flow_analytics_configuration = AAZObjectType(
25892637
serialized_name="flowAnalyticsConfiguration",
25902638
)
@@ -2937,6 +2985,7 @@ def _build_schema_public_ip_address_read(cls, _schema):
29372985
)
29382986
properties.ip_configuration = AAZObjectType(
29392987
serialized_name="ipConfiguration",
2988+
flags={"read_only": True},
29402989
)
29412990
cls._build_schema_ip_configuration_read(properties.ip_configuration)
29422991
properties.ip_tags = AAZListType(
@@ -3035,13 +3084,23 @@ def _build_schema_public_ip_address_read(cls, _schema):
30353084
properties.public_ip_addresses = AAZListType(
30363085
serialized_name="publicIpAddresses",
30373086
)
3087+
properties.public_ip_addresses_v6 = AAZListType(
3088+
serialized_name="publicIpAddressesV6",
3089+
)
30383090
properties.public_ip_prefixes = AAZListType(
30393091
serialized_name="publicIpPrefixes",
30403092
)
3093+
properties.public_ip_prefixes_v6 = AAZListType(
3094+
serialized_name="publicIpPrefixesV6",
3095+
)
30413096
properties.resource_guid = AAZStrType(
30423097
serialized_name="resourceGuid",
30433098
flags={"read_only": True},
30443099
)
3100+
properties.source_virtual_network = AAZObjectType(
3101+
serialized_name="sourceVirtualNetwork",
3102+
)
3103+
cls._build_schema_sub_resource_read(properties.source_virtual_network)
30453104
properties.subnets = AAZListType(
30463105
flags={"read_only": True},
30473106
)
@@ -3050,10 +3109,18 @@ def _build_schema_public_ip_address_read(cls, _schema):
30503109
public_ip_addresses.Element = AAZObjectType()
30513110
cls._build_schema_sub_resource_read(public_ip_addresses.Element)
30523111

3112+
public_ip_addresses_v6 = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_addresses_v6
3113+
public_ip_addresses_v6.Element = AAZObjectType()
3114+
cls._build_schema_sub_resource_read(public_ip_addresses_v6.Element)
3115+
30533116
public_ip_prefixes = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes
30543117
public_ip_prefixes.Element = AAZObjectType()
30553118
cls._build_schema_sub_resource_read(public_ip_prefixes.Element)
30563119

3120+
public_ip_prefixes_v6 = _schema_public_ip_address_read.properties.nat_gateway.properties.public_ip_prefixes_v6
3121+
public_ip_prefixes_v6.Element = AAZObjectType()
3122+
cls._build_schema_sub_resource_read(public_ip_prefixes_v6.Element)
3123+
30573124
subnets = _schema_public_ip_address_read.properties.nat_gateway.properties.subnets
30583125
subnets.Element = AAZObjectType()
30593126
cls._build_schema_sub_resource_read(subnets.Element)
@@ -3253,6 +3320,9 @@ def _build_schema_subnet_read(cls, _schema):
32533320
serialized_name="ipConfigurations",
32543321
flags={"read_only": True},
32553322
)
3323+
properties.ipam_pool_prefix_allocations = AAZListType(
3324+
serialized_name="ipamPoolPrefixAllocations",
3325+
)
32563326
properties.nat_gateway = AAZObjectType(
32573327
serialized_name="natGateway",
32583328
)
@@ -3367,10 +3437,29 @@ def _build_schema_subnet_read(cls, _schema):
33673437
ip_configurations.Element = AAZObjectType()
33683438
cls._build_schema_ip_configuration_read(ip_configurations.Element)
33693439

3370-
private_endpoints = _schema_subnet_read.properties.private_endpoints
3371-
private_endpoints.Element = AAZObjectType(
3440+
ipam_pool_prefix_allocations = _schema_subnet_read.properties.ipam_pool_prefix_allocations
3441+
ipam_pool_prefix_allocations.Element = AAZObjectType()
3442+
3443+
_element = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element
3444+
_element.allocated_address_prefixes = AAZListType(
3445+
serialized_name="allocatedAddressPrefixes",
33723446
flags={"read_only": True},
33733447
)
3448+
_element.number_of_ip_addresses = AAZStrType(
3449+
serialized_name="numberOfIpAddresses",
3450+
)
3451+
_element.pool = AAZObjectType(
3452+
flags={"client_flatten": True},
3453+
)
3454+
3455+
allocated_address_prefixes = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element.allocated_address_prefixes
3456+
allocated_address_prefixes.Element = AAZStrType()
3457+
3458+
pool = _schema_subnet_read.properties.ipam_pool_prefix_allocations.Element.pool
3459+
pool.id = AAZStrType()
3460+
3461+
private_endpoints = _schema_subnet_read.properties.private_endpoints
3462+
private_endpoints.Element = AAZObjectType()
33743463
cls._build_schema_private_endpoint_read(private_endpoints.Element)
33753464

33763465
resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links
@@ -3455,6 +3544,7 @@ def _build_schema_subnet_read(cls, _schema):
34553544
)
34563545
properties.has_bgp_override = AAZBoolType(
34573546
serialized_name="hasBgpOverride",
3547+
flags={"read_only": True},
34583548
)
34593549
properties.next_hop_ip_address = AAZStrType(
34603550
serialized_name="nextHopIpAddress",
@@ -3596,6 +3686,10 @@ def _build_schema_subnet_read(cls, _schema):
35963686

35973687
_element = _schema_subnet_read.properties.service_endpoints.Element
35983688
_element.locations = AAZListType()
3689+
_element.network_identifier = AAZObjectType(
3690+
serialized_name="networkIdentifier",
3691+
)
3692+
cls._build_schema_sub_resource_read(_element.network_identifier)
35993693
_element.provisioning_state = AAZStrType(
36003694
serialized_name="provisioningState",
36013695
flags={"read_only": True},

0 commit comments

Comments
 (0)