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 @@ -108,6 +108,7 @@ def load_arguments(self, _):
c.argument('enable_http2', arg_type=get_three_state_flag(positive_label='Enabled', negative_label='Disabled'), options_list=['--http2'], help='Use HTTP2 for the application gateway.')
c.ignore('public_ip_address_type', 'frontend_type', 'subnet_type')
c.argument('ssl_profile_id', help='SSL profile resource of the application gateway.', is_preview=True)
c.argument('enable_fips', arg_type=get_three_state_flag(), help='Whether FIPS is enabled on the application gateway resource.')

with self.argument_context('network application-gateway', arg_group='Private Link Configuration') as c:
c.argument('enable_private_link',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def build_application_gateway_resource(cmd, name, location, tags, sku_name, sku_
http_listener_protocol, routing_rule_type, public_ip_id, subnet_id,
connection_draining_timeout, enable_http2, min_capacity, zones,
custom_error_pages, firewall_policy, max_capacity,
user_assigned_identity,
user_assigned_identity, enable_fips,
enable_private_link=False,
private_link_name=None,
private_link_ip_address=None,
Expand Down Expand Up @@ -270,6 +270,8 @@ def _ag_subresource_id(_type, name):
ag_properties.update({'sslCertificates': [ssl_cert]})
if enable_http2:
ag_properties.update({'enableHttp2': enable_http2})
if enable_fips is not None:
ag_properties.update({'enableFips': enable_fips})
if min_capacity:
if 'autoscaleConfiguration' not in ag_properties:
ag_properties['autoscaleConfiguration'] = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Custom error configurations of the application gateway resource.",
nullable=True,
)
_args_schema.enable_fips = AAZBoolArg(
options=["--enable-fips"],
help="Whether FIPS is enabled on the application gateway resource.",
nullable=True,
)
_args_schema.http2 = AAZBoolArg(
options=["--http2"],
help="Use HTTP2 for the application gateway",
Expand Down Expand Up @@ -610,7 +615,7 @@ def _update_instance(self, instance):
value=instance,
typ=AAZObjectType
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("identity", AAZIdentityObjectType, ".identity")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")

Expand All @@ -627,6 +632,7 @@ def _update_instance(self, instance):
if properties is not None:
properties.set_prop("autoscaleConfiguration", AAZObjectType)
properties.set_prop("customErrorConfigurations", AAZListType, ".custom_error_configurations")
properties.set_prop("enableFips", AAZBoolType, ".enable_fips")
properties.set_prop("enableHttp2", AAZBoolType, ".http2")
properties.set_prop("sku", AAZObjectType)
properties.set_prop("sslProfiles", AAZListType, ".ssl_profiles")
Expand Down Expand Up @@ -956,7 +962,7 @@ def _build_schema_application_gateway_read(cls, _schema):
flags={"read_only": True},
)
application_gateway_read.id = AAZStrType()
application_gateway_read.identity = AAZObjectType()
application_gateway_read.identity = AAZIdentityObjectType()
application_gateway_read.location = AAZStrType()
application_gateway_read.name = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -2503,6 +2509,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
properties.location = AAZStrType()
properties.outbound_rule = AAZObjectType(
serialized_name="outboundRule",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.outbound_rule)
properties.outbound_rules = AAZListType(
Expand Down Expand Up @@ -2558,6 +2565,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
cls._build_schema_sub_resource_read(properties.load_balancer_frontend_ip_configuration)
properties.network_interface_ip_configuration = AAZObjectType(
serialized_name="networkInterfaceIPConfiguration",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.network_interface_ip_configuration)
properties.subnet = AAZObjectType()
Expand Down Expand Up @@ -2621,6 +2629,7 @@ def _build_schema_network_interface_ip_configuration_read(cls, _schema):
cls._build_schema_sub_resource_read(properties.backend_address_pool)
properties.backend_ip_configuration = AAZObjectType(
serialized_name="backendIPConfiguration",
flags={"read_only": True},
)
cls._build_schema_network_interface_ip_configuration_read(properties.backend_ip_configuration)
properties.backend_port = AAZIntType(
Expand Down Expand Up @@ -2776,6 +2785,7 @@ def _build_schema_network_interface_read(cls, _schema):
)
properties.dscp_configuration = AAZObjectType(
serialized_name="dscpConfiguration",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.dscp_configuration)
properties.enable_accelerated_networking = AAZBoolType(
Expand Down Expand Up @@ -2830,6 +2840,7 @@ def _build_schema_network_interface_read(cls, _schema):
)
properties.virtual_machine = AAZObjectType(
serialized_name="virtualMachine",
flags={"read_only": True},
)
cls._build_schema_sub_resource_read(properties.virtual_machine)
properties.vnet_encryption_supported = AAZBoolType(
Expand Down Expand Up @@ -3482,6 +3493,7 @@ def _build_schema_public_ip_address_read(cls, _schema):
)
properties.ip_configuration = AAZObjectType(
serialized_name="ipConfiguration",
flags={"read_only": True},
)
cls._build_schema_ip_configuration_read(properties.ip_configuration)
properties.ip_tags = AAZListType(
Expand Down Expand Up @@ -3913,9 +3925,7 @@ def _build_schema_subnet_read(cls, _schema):
cls._build_schema_ip_configuration_read(ip_configurations.Element)

private_endpoints = _schema_subnet_read.properties.private_endpoints
private_endpoints.Element = AAZObjectType(
flags={"read_only": True},
)
private_endpoints.Element = AAZObjectType()
Comment thread
necusjz marked this conversation as resolved.
cls._build_schema_private_endpoint_read(private_endpoints.Element)

resource_navigation_links = _schema_subnet_read.properties.resource_navigation_links
Expand Down Expand Up @@ -4000,6 +4010,7 @@ def _build_schema_subnet_read(cls, _schema):
)
properties.has_bgp_override = AAZBoolType(
serialized_name="hasBgpOverride",
flags={"read_only": True},
)
properties.next_hop_ip_address = AAZStrType(
serialized_name="nextHopIpAddress",
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli/azure/cli/command_modules/network/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def create_application_gateway(cmd, application_gateway_name, resource_group_nam
public_ip_address_type=None, subnet_type=None, validate=False,
connection_draining_timeout=0, enable_http2=None, min_capacity=None, zones=None,
custom_error_pages=None, firewall_policy=None, max_capacity=None,
user_assigned_identity=None,
user_assigned_identity=None, enable_fips=None,
enable_private_link=False,
private_link_ip_address=None,
private_link_subnet='PrivateLinkDefaultSubnet',
Expand Down Expand Up @@ -301,7 +301,7 @@ def create_application_gateway(cmd, application_gateway_name, resource_group_nam
http_settings_cookie_based_affinity, http_settings_protocol, http_settings_port,
http_listener_protocol, routing_rule_type, public_ip_id, subnet_id,
connection_draining_timeout, enable_http2, min_capacity, zones, custom_error_pages,
firewall_policy, max_capacity, user_assigned_identity,
firewall_policy, max_capacity, user_assigned_identity, enable_fips,
enable_private_link, private_link_name,
private_link_ip_address, private_link_ip_allocation_method, private_link_primary,
private_link_subnet_id, trusted_client_cert, ssl_profile, ssl_profile_id, ssl_cert_name)
Expand Down
Loading