in src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/private_link_service/_create.py [0:0]
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("extendedLocation", AAZObjectType)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
extended_location = _builder.get(".extendedLocation")
if extended_location is not None:
extended_location.set_prop("name", AAZStrType, ".edge_zone")
extended_location.set_prop("type", AAZStrType, ".edge_zone_type")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("autoApproval", AAZObjectType)
properties.set_prop("destinationIPAddress", AAZStrType, ".destination_ip_address")
properties.set_prop("enableProxyProtocol", AAZBoolType, ".enable_proxy_protocol")
properties.set_prop("fqdns", AAZListType, ".fqdns")
properties.set_prop("ipConfigurations", AAZListType, ".ip_configurations")
properties.set_prop("loadBalancerFrontendIpConfigurations", AAZListType, ".load_balancer_frontend_ip_configurations")
properties.set_prop("visibility", AAZObjectType)
auto_approval = _builder.get(".properties.autoApproval")
if auto_approval is not None:
auto_approval.set_prop("subscriptions", AAZListType, ".auto_approval")
subscriptions = _builder.get(".properties.autoApproval.subscriptions")
if subscriptions is not None:
subscriptions.set_elements(AAZStrType, ".")
fqdns = _builder.get(".properties.fqdns")
if fqdns is not None:
fqdns.set_elements(AAZStrType, ".")
ip_configurations = _builder.get(".properties.ipConfigurations")
if ip_configurations is not None:
ip_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(".properties.ipConfigurations[].properties")
if properties is not None:
properties.set_prop("primary", AAZBoolType, ".primary")
properties.set_prop("privateIPAddress", AAZStrType, ".private_ip_address")
properties.set_prop("privateIPAddressVersion", AAZStrType, ".private_ip_address_version")
properties.set_prop("privateIPAllocationMethod", AAZStrType, ".private_ip_allocation_method")
properties.set_prop("subnet", AAZObjectType, ".subnet")
subnet = _builder.get(".properties.ipConfigurations[].properties.subnet")
if subnet is not None:
subnet.set_prop("id", AAZStrType, ".id")
subnet.set_prop("name", AAZStrType, ".name")
subnet.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
subnet.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties")
if properties is not None:
properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
properties.set_prop("addressPrefixes", AAZListType, ".address_prefixes")
properties.set_prop("applicationGatewayIPConfigurations", AAZListType, ".application_gateway_ip_configurations")
properties.set_prop("defaultOutboundAccess", AAZBoolType, ".default_outbound_access")
properties.set_prop("delegations", AAZListType, ".delegations")
properties.set_prop("ipAllocations", AAZListType, ".ip_allocations")
_CreateHelper._build_schema_sub_resource_create(properties.set_prop("natGateway", AAZObjectType, ".nat_gateway"))
properties.set_prop("networkSecurityGroup", AAZObjectType, ".network_security_group")
properties.set_prop("privateEndpointNetworkPolicies", AAZStrType, ".private_endpoint_network_policies")
properties.set_prop("privateLinkServiceNetworkPolicies", AAZStrType, ".private_link_service_network_policies")
properties.set_prop("routeTable", AAZObjectType, ".route_table")
properties.set_prop("serviceEndpointPolicies", AAZListType, ".service_endpoint_policies")
properties.set_prop("serviceEndpoints", AAZListType, ".service_endpoints")
properties.set_prop("sharingScope", AAZStrType, ".sharing_scope")
address_prefixes = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.addressPrefixes")
if address_prefixes is not None:
address_prefixes.set_elements(AAZStrType, ".")
application_gateway_ip_configurations = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations")
if application_gateway_ip_configurations is not None:
application_gateway_ip_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations[].properties")
if properties is not None:
_CreateHelper._build_schema_sub_resource_create(properties.set_prop("subnet", AAZObjectType, ".subnet"))
delegations = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.delegations")
if delegations is not None:
delegations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.delegations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.delegations[].properties")
if properties is not None:
properties.set_prop("serviceName", AAZStrType, ".service_name")
ip_allocations = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.ipAllocations")
if ip_allocations is not None:
_CreateHelper._build_schema_sub_resource_create(ip_allocations.set_elements(AAZObjectType, "."))
network_security_group = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup")
if network_security_group is not None:
network_security_group.set_prop("id", AAZStrType, ".id")
network_security_group.set_prop("location", AAZStrType, ".location")
network_security_group.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
network_security_group.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties")
if properties is not None:
properties.set_prop("flushConnection", AAZBoolType, ".flush_connection")
properties.set_prop("securityRules", AAZListType, ".security_rules")
security_rules = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules")
if security_rules is not None:
security_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties")
if properties is not None:
properties.set_prop("access", AAZStrType, ".access", typ_kwargs={"flags": {"required": True}})
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("destinationAddressPrefix", AAZStrType, ".destination_address_prefix")
properties.set_prop("destinationAddressPrefixes", AAZListType, ".destination_address_prefixes")
properties.set_prop("destinationApplicationSecurityGroups", AAZListType, ".destination_application_security_groups")
properties.set_prop("destinationPortRange", AAZStrType, ".destination_port_range")
properties.set_prop("destinationPortRanges", AAZListType, ".destination_port_ranges")
properties.set_prop("direction", AAZStrType, ".direction", typ_kwargs={"flags": {"required": True}})
properties.set_prop("priority", AAZIntType, ".priority", typ_kwargs={"flags": {"required": True}})
properties.set_prop("protocol", AAZStrType, ".protocol", typ_kwargs={"flags": {"required": True}})
properties.set_prop("sourceAddressPrefix", AAZStrType, ".source_address_prefix")
properties.set_prop("sourceAddressPrefixes", AAZListType, ".source_address_prefixes")
properties.set_prop("sourceApplicationSecurityGroups", AAZListType, ".source_application_security_groups")
properties.set_prop("sourcePortRange", AAZStrType, ".source_port_range")
properties.set_prop("sourcePortRanges", AAZListType, ".source_port_ranges")
destination_address_prefixes = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationAddressPrefixes")
if destination_address_prefixes is not None:
destination_address_prefixes.set_elements(AAZStrType, ".")
destination_application_security_groups = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationApplicationSecurityGroups")
if destination_application_security_groups is not None:
_CreateHelper._build_schema_application_security_group_create(destination_application_security_groups.set_elements(AAZObjectType, "."))
destination_port_ranges = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationPortRanges")
if destination_port_ranges is not None:
destination_port_ranges.set_elements(AAZStrType, ".")
source_address_prefixes = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourceAddressPrefixes")
if source_address_prefixes is not None:
source_address_prefixes.set_elements(AAZStrType, ".")
source_application_security_groups = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourceApplicationSecurityGroups")
if source_application_security_groups is not None:
_CreateHelper._build_schema_application_security_group_create(source_application_security_groups.set_elements(AAZObjectType, "."))
source_port_ranges = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourcePortRanges")
if source_port_ranges is not None:
source_port_ranges.set_elements(AAZStrType, ".")
tags = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.networkSecurityGroup.tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
route_table = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable")
if route_table is not None:
route_table.set_prop("id", AAZStrType, ".id")
route_table.set_prop("location", AAZStrType, ".location")
route_table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
route_table.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable.properties")
if properties is not None:
properties.set_prop("disableBgpRoutePropagation", AAZBoolType, ".disable_bgp_route_propagation")
properties.set_prop("routes", AAZListType, ".routes")
routes = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable.properties.routes")
if routes is not None:
routes.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable.properties.routes[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable.properties.routes[].properties")
if properties is not None:
properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
properties.set_prop("nextHopIpAddress", AAZStrType, ".next_hop_ip_address")
properties.set_prop("nextHopType", AAZStrType, ".next_hop_type", typ_kwargs={"flags": {"required": True}})
tags = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.routeTable.tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
service_endpoint_policies = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies")
if service_endpoint_policies is not None:
service_endpoint_policies.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("location", AAZStrType, ".location")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties")
if properties is not None:
properties.set_prop("contextualServiceEndpointPolicies", AAZListType, ".contextual_service_endpoint_policies")
properties.set_prop("serviceAlias", AAZStrType, ".service_alias")
properties.set_prop("serviceEndpointPolicyDefinitions", AAZListType, ".service_endpoint_policy_definitions")
contextual_service_endpoint_policies = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.contextualServiceEndpointPolicies")
if contextual_service_endpoint_policies is not None:
contextual_service_endpoint_policies.set_elements(AAZStrType, ".")
service_endpoint_policy_definitions = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions")
if service_endpoint_policy_definitions is not None:
service_endpoint_policy_definitions.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("service", AAZStrType, ".service")
properties.set_prop("serviceResources", AAZListType, ".service_resources")
service_resources = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties.serviceResources")
if service_resources is not None:
service_resources.set_elements(AAZStrType, ".")
tags = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
service_endpoints = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpoints")
if service_endpoints is not None:
service_endpoints.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpoints[]")
if _elements is not None:
_elements.set_prop("locations", AAZListType, ".locations")
_CreateHelper._build_schema_sub_resource_create(_elements.set_prop("networkIdentifier", AAZObjectType, ".network_identifier"))
_elements.set_prop("service", AAZStrType, ".service")
locations = _builder.get(".properties.ipConfigurations[].properties.subnet.properties.serviceEndpoints[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
load_balancer_frontend_ip_configurations = _builder.get(".properties.loadBalancerFrontendIpConfigurations")
if load_balancer_frontend_ip_configurations is not None:
load_balancer_frontend_ip_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("zones", AAZListType, ".zones")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties")
if properties is not None:
properties.set_prop("gatewayLoadBalancer", AAZObjectType, ".gateway_load_balancer")
properties.set_prop("privateIPAddress", AAZStrType, ".private_ip_address")
properties.set_prop("privateIPAddressVersion", AAZStrType, ".private_ip_address_version")
properties.set_prop("privateIPAllocationMethod", AAZStrType, ".private_ip_allocation_method")
properties.set_prop("publicIPPrefix", AAZObjectType, ".public_ip_prefix")
properties.set_prop("subnet", AAZObjectType, ".subnet")
gateway_load_balancer = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.gatewayLoadBalancer")
if gateway_load_balancer is not None:
gateway_load_balancer.set_prop("id", AAZStrType, ".id")
public_ip_prefix = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.publicIPPrefix")
if public_ip_prefix is not None:
public_ip_prefix.set_prop("id", AAZStrType, ".id")
subnet = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet")
if subnet is not None:
subnet.set_prop("id", AAZStrType, ".id")
subnet.set_prop("name", AAZStrType, ".name")
subnet.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
subnet.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties")
if properties is not None:
properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
properties.set_prop("addressPrefixes", AAZListType, ".address_prefixes")
properties.set_prop("applicationGatewayIPConfigurations", AAZListType, ".application_gateway_ip_configurations")
properties.set_prop("defaultOutboundAccess", AAZBoolType, ".default_outbound_access")
properties.set_prop("delegations", AAZListType, ".delegations")
properties.set_prop("ipAllocations", AAZListType, ".ip_allocations")
_CreateHelper._build_schema_sub_resource_create(properties.set_prop("natGateway", AAZObjectType, ".nat_gateway"))
properties.set_prop("networkSecurityGroup", AAZObjectType, ".network_security_group")
properties.set_prop("privateEndpointNetworkPolicies", AAZStrType, ".private_endpoint_network_policies")
properties.set_prop("privateLinkServiceNetworkPolicies", AAZStrType, ".private_link_service_network_policies")
properties.set_prop("routeTable", AAZObjectType, ".route_table")
properties.set_prop("serviceEndpointPolicies", AAZListType, ".service_endpoint_policies")
properties.set_prop("serviceEndpoints", AAZListType, ".service_endpoints")
properties.set_prop("sharingScope", AAZStrType, ".sharing_scope")
address_prefixes = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.addressPrefixes")
if address_prefixes is not None:
address_prefixes.set_elements(AAZStrType, ".")
application_gateway_ip_configurations = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations")
if application_gateway_ip_configurations is not None:
application_gateway_ip_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.applicationGatewayIPConfigurations[].properties")
if properties is not None:
_CreateHelper._build_schema_sub_resource_create(properties.set_prop("subnet", AAZObjectType, ".subnet"))
delegations = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.delegations")
if delegations is not None:
delegations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.delegations[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.delegations[].properties")
if properties is not None:
properties.set_prop("serviceName", AAZStrType, ".service_name")
ip_allocations = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.ipAllocations")
if ip_allocations is not None:
_CreateHelper._build_schema_sub_resource_create(ip_allocations.set_elements(AAZObjectType, "."))
network_security_group = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup")
if network_security_group is not None:
network_security_group.set_prop("id", AAZStrType, ".id")
network_security_group.set_prop("location", AAZStrType, ".location")
network_security_group.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
network_security_group.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties")
if properties is not None:
properties.set_prop("flushConnection", AAZBoolType, ".flush_connection")
properties.set_prop("securityRules", AAZListType, ".security_rules")
security_rules = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules")
if security_rules is not None:
security_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties")
if properties is not None:
properties.set_prop("access", AAZStrType, ".access", typ_kwargs={"flags": {"required": True}})
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("destinationAddressPrefix", AAZStrType, ".destination_address_prefix")
properties.set_prop("destinationAddressPrefixes", AAZListType, ".destination_address_prefixes")
properties.set_prop("destinationApplicationSecurityGroups", AAZListType, ".destination_application_security_groups")
properties.set_prop("destinationPortRange", AAZStrType, ".destination_port_range")
properties.set_prop("destinationPortRanges", AAZListType, ".destination_port_ranges")
properties.set_prop("direction", AAZStrType, ".direction", typ_kwargs={"flags": {"required": True}})
properties.set_prop("priority", AAZIntType, ".priority", typ_kwargs={"flags": {"required": True}})
properties.set_prop("protocol", AAZStrType, ".protocol", typ_kwargs={"flags": {"required": True}})
properties.set_prop("sourceAddressPrefix", AAZStrType, ".source_address_prefix")
properties.set_prop("sourceAddressPrefixes", AAZListType, ".source_address_prefixes")
properties.set_prop("sourceApplicationSecurityGroups", AAZListType, ".source_application_security_groups")
properties.set_prop("sourcePortRange", AAZStrType, ".source_port_range")
properties.set_prop("sourcePortRanges", AAZListType, ".source_port_ranges")
destination_address_prefixes = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationAddressPrefixes")
if destination_address_prefixes is not None:
destination_address_prefixes.set_elements(AAZStrType, ".")
destination_application_security_groups = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationApplicationSecurityGroups")
if destination_application_security_groups is not None:
_CreateHelper._build_schema_application_security_group_create(destination_application_security_groups.set_elements(AAZObjectType, "."))
destination_port_ranges = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.destinationPortRanges")
if destination_port_ranges is not None:
destination_port_ranges.set_elements(AAZStrType, ".")
source_address_prefixes = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourceAddressPrefixes")
if source_address_prefixes is not None:
source_address_prefixes.set_elements(AAZStrType, ".")
source_application_security_groups = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourceApplicationSecurityGroups")
if source_application_security_groups is not None:
_CreateHelper._build_schema_application_security_group_create(source_application_security_groups.set_elements(AAZObjectType, "."))
source_port_ranges = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.properties.securityRules[].properties.sourcePortRanges")
if source_port_ranges is not None:
source_port_ranges.set_elements(AAZStrType, ".")
tags = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.networkSecurityGroup.tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
route_table = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable")
if route_table is not None:
route_table.set_prop("id", AAZStrType, ".id")
route_table.set_prop("location", AAZStrType, ".location")
route_table.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
route_table.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable.properties")
if properties is not None:
properties.set_prop("disableBgpRoutePropagation", AAZBoolType, ".disable_bgp_route_propagation")
properties.set_prop("routes", AAZListType, ".routes")
routes = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable.properties.routes")
if routes is not None:
routes.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable.properties.routes[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable.properties.routes[].properties")
if properties is not None:
properties.set_prop("addressPrefix", AAZStrType, ".address_prefix")
properties.set_prop("nextHopIpAddress", AAZStrType, ".next_hop_ip_address")
properties.set_prop("nextHopType", AAZStrType, ".next_hop_type", typ_kwargs={"flags": {"required": True}})
tags = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.routeTable.tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
service_endpoint_policies = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies")
if service_endpoint_policies is not None:
service_endpoint_policies.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("location", AAZStrType, ".location")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties")
if properties is not None:
properties.set_prop("contextualServiceEndpointPolicies", AAZListType, ".contextual_service_endpoint_policies")
properties.set_prop("serviceAlias", AAZStrType, ".service_alias")
properties.set_prop("serviceEndpointPolicyDefinitions", AAZListType, ".service_endpoint_policy_definitions")
contextual_service_endpoint_policies = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.contextualServiceEndpointPolicies")
if contextual_service_endpoint_policies is not None:
contextual_service_endpoint_policies.set_elements(AAZStrType, ".")
service_endpoint_policy_definitions = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions")
if service_endpoint_policy_definitions is not None:
service_endpoint_policy_definitions.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("name", AAZStrType, ".name")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_elements.set_prop("type", AAZStrType, ".type")
properties = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("service", AAZStrType, ".service")
properties.set_prop("serviceResources", AAZListType, ".service_resources")
service_resources = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].properties.serviceEndpointPolicyDefinitions[].properties.serviceResources")
if service_resources is not None:
service_resources.set_elements(AAZStrType, ".")
tags = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpointPolicies[].tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
service_endpoints = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpoints")
if service_endpoints is not None:
service_endpoints.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpoints[]")
if _elements is not None:
_elements.set_prop("locations", AAZListType, ".locations")
_CreateHelper._build_schema_sub_resource_create(_elements.set_prop("networkIdentifier", AAZObjectType, ".network_identifier"))
_elements.set_prop("service", AAZStrType, ".service")
locations = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].properties.subnet.properties.serviceEndpoints[].locations")
if locations is not None:
locations.set_elements(AAZStrType, ".")
zones = _builder.get(".properties.loadBalancerFrontendIpConfigurations[].zones")
if zones is not None:
zones.set_elements(AAZStrType, ".")
visibility = _builder.get(".properties.visibility")
if visibility is not None:
visibility.set_prop("subscriptions", AAZListType, ".visibility")
subscriptions = _builder.get(".properties.visibility.subscriptions")
if subscriptions is not None:
subscriptions.set_elements(AAZStrType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)