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

[AutoPR network/resource-manager] Add/Edit Outbound Rule on Load Balancer and Examples #3087

Closed
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def get_long_running_output(response):
lro_delay = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
from .public_ip_address_sku_py3 import PublicIPAddressSku
from .public_ip_address_dns_settings_py3 import PublicIPAddressDnsSettings
from .ip_tag_py3 import IpTag
from .public_ip_prefix_sku_py3 import PublicIPPrefixSku
from .referenced_public_ip_address_py3 import ReferencedPublicIpAddress
from .public_ip_prefix_py3 import PublicIPPrefix
from .public_ip_address_py3 import PublicIPAddress
from .ip_configuration_py3 import IPConfiguration
from .resource_navigation_link_py3 import ResourceNavigationLink
Expand Down Expand Up @@ -109,7 +106,7 @@
from .load_balancing_rule_py3 import LoadBalancingRule
from .probe_py3 import Probe
from .inbound_nat_pool_py3 import InboundNatPool
from .outbound_nat_rule_py3 import OutboundNatRule
from .outbound_rule_py3 import OutboundRule
from .load_balancer_py3 import LoadBalancer
from .error_details_py3 import ErrorDetails
from .error_py3 import Error, ErrorException
Expand All @@ -120,6 +117,7 @@
from .effective_network_security_group_list_result_py3 import EffectiveNetworkSecurityGroupListResult
from .effective_route_py3 import EffectiveRoute
from .effective_route_list_result_py3 import EffectiveRouteListResult
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .network_watcher_py3 import NetworkWatcher
from .topology_parameters_py3 import TopologyParameters
from .topology_association_py3 import TopologyAssociation
Expand Down Expand Up @@ -177,13 +175,27 @@
from .connection_monitor_result_py3 import ConnectionMonitorResult
from .connection_state_snapshot_py3 import ConnectionStateSnapshot
from .connection_monitor_query_result_py3 import ConnectionMonitorQueryResult
from .traffic_query_py3 import TrafficQuery
from .network_configuration_diagnostic_parameters_py3 import NetworkConfigurationDiagnosticParameters
from .matched_rule_py3 import MatchedRule
from .network_security_rules_evaluation_result_py3 import NetworkSecurityRulesEvaluationResult
from .evaluated_network_security_group_py3 import EvaluatedNetworkSecurityGroup
from .network_security_group_result_py3 import NetworkSecurityGroupResult
from .network_configuration_diagnostic_result_py3 import NetworkConfigurationDiagnosticResult
from .network_configuration_diagnostic_response_py3 import NetworkConfigurationDiagnosticResponse
from .query_connection_monitors_parameters_py3 import QueryConnectionMonitorsParameters
from .connection_monitors_query_result_item_py3 import ConnectionMonitorsQueryResultItem
from .query_connection_monitors_response_py3 import QueryConnectionMonitorsResponse
from .operation_display_py3 import OperationDisplay
from .availability_py3 import Availability
from .dimension_py3 import Dimension
from .metric_specification_py3 import MetricSpecification
from .log_specification_py3 import LogSpecification
from .operation_properties_format_service_specification_py3 import OperationPropertiesFormatServiceSpecification
from .operation_py3 import Operation
from .public_ip_prefix_sku_py3 import PublicIPPrefixSku
from .referenced_public_ip_address_py3 import ReferencedPublicIpAddress
from .public_ip_prefix_py3 import PublicIPPrefix
from .patch_route_filter_rule_py3 import PatchRouteFilterRule
from .patch_route_filter_py3 import PatchRouteFilter
from .bgp_community_py3 import BGPCommunity
Expand Down Expand Up @@ -255,9 +267,6 @@
from .public_ip_address_sku import PublicIPAddressSku
from .public_ip_address_dns_settings import PublicIPAddressDnsSettings
from .ip_tag import IpTag
from .public_ip_prefix_sku import PublicIPPrefixSku
from .referenced_public_ip_address import ReferencedPublicIpAddress
from .public_ip_prefix import PublicIPPrefix
from .public_ip_address import PublicIPAddress
from .ip_configuration import IPConfiguration
from .resource_navigation_link import ResourceNavigationLink
Expand Down Expand Up @@ -329,7 +338,7 @@
from .load_balancing_rule import LoadBalancingRule
from .probe import Probe
from .inbound_nat_pool import InboundNatPool
from .outbound_nat_rule import OutboundNatRule
from .outbound_rule import OutboundRule
from .load_balancer import LoadBalancer
from .error_details import ErrorDetails
from .error import Error, ErrorException
Expand All @@ -340,6 +349,7 @@
from .effective_network_security_group_list_result import EffectiveNetworkSecurityGroupListResult
from .effective_route import EffectiveRoute
from .effective_route_list_result import EffectiveRouteListResult
from .error_response import ErrorResponse, ErrorResponseException
from .network_watcher import NetworkWatcher
from .topology_parameters import TopologyParameters
from .topology_association import TopologyAssociation
Expand Down Expand Up @@ -397,13 +407,27 @@
from .connection_monitor_result import ConnectionMonitorResult
from .connection_state_snapshot import ConnectionStateSnapshot
from .connection_monitor_query_result import ConnectionMonitorQueryResult
from .traffic_query import TrafficQuery
from .network_configuration_diagnostic_parameters import NetworkConfigurationDiagnosticParameters
from .matched_rule import MatchedRule
from .network_security_rules_evaluation_result import NetworkSecurityRulesEvaluationResult
from .evaluated_network_security_group import EvaluatedNetworkSecurityGroup
from .network_security_group_result import NetworkSecurityGroupResult
from .network_configuration_diagnostic_result import NetworkConfigurationDiagnosticResult
from .network_configuration_diagnostic_response import NetworkConfigurationDiagnosticResponse
from .query_connection_monitors_parameters import QueryConnectionMonitorsParameters
from .connection_monitors_query_result_item import ConnectionMonitorsQueryResultItem
from .query_connection_monitors_response import QueryConnectionMonitorsResponse
from .operation_display import OperationDisplay
from .availability import Availability
from .dimension import Dimension
from .metric_specification import MetricSpecification
from .log_specification import LogSpecification
from .operation_properties_format_service_specification import OperationPropertiesFormatServiceSpecification
from .operation import Operation
from .public_ip_prefix_sku import PublicIPPrefixSku
from .referenced_public_ip_address import ReferencedPublicIpAddress
from .public_ip_prefix import PublicIPPrefix
from .patch_route_filter_rule import PatchRouteFilterRule
from .patch_route_filter import PatchRouteFilter
from .bgp_community import BGPCommunity
Expand Down Expand Up @@ -512,7 +536,6 @@
SecurityRuleDirection,
RouteNextHopType,
PublicIPAddressSkuName,
PublicIPPrefixSkuName,
ApplicationGatewayProtocol,
ApplicationGatewayCookieBasedAffinity,
ApplicationGatewayBackendHealthServerHealth,
Expand Down Expand Up @@ -559,6 +582,7 @@
ConnectionMonitorSourceStatus,
ConnectionState,
EvaluationState,
PublicIPPrefixSkuName,
VirtualNetworkPeeringState,
VirtualNetworkGatewayType,
VpnType,
Expand Down Expand Up @@ -607,9 +631,6 @@
'PublicIPAddressSku',
'PublicIPAddressDnsSettings',
'IpTag',
'PublicIPPrefixSku',
'ReferencedPublicIpAddress',
'PublicIPPrefix',
'PublicIPAddress',
'IPConfiguration',
'ResourceNavigationLink',
Expand Down Expand Up @@ -681,7 +702,7 @@
'LoadBalancingRule',
'Probe',
'InboundNatPool',
'OutboundNatRule',
'OutboundRule',
'LoadBalancer',
'ErrorDetails',
'Error', 'ErrorException',
Expand All @@ -692,6 +713,7 @@
'EffectiveNetworkSecurityGroupListResult',
'EffectiveRoute',
'EffectiveRouteListResult',
'ErrorResponse', 'ErrorResponseException',
'NetworkWatcher',
'TopologyParameters',
'TopologyAssociation',
Expand Down Expand Up @@ -749,13 +771,27 @@
'ConnectionMonitorResult',
'ConnectionStateSnapshot',
'ConnectionMonitorQueryResult',
'TrafficQuery',
'NetworkConfigurationDiagnosticParameters',
'MatchedRule',
'NetworkSecurityRulesEvaluationResult',
'EvaluatedNetworkSecurityGroup',
'NetworkSecurityGroupResult',
'NetworkConfigurationDiagnosticResult',
'NetworkConfigurationDiagnosticResponse',
'QueryConnectionMonitorsParameters',
'ConnectionMonitorsQueryResultItem',
'QueryConnectionMonitorsResponse',
'OperationDisplay',
'Availability',
'Dimension',
'MetricSpecification',
'LogSpecification',
'OperationPropertiesFormatServiceSpecification',
'Operation',
'PublicIPPrefixSku',
'ReferencedPublicIpAddress',
'PublicIPPrefix',
'PatchRouteFilterRule',
'PatchRouteFilter',
'BGPCommunity',
Expand Down Expand Up @@ -863,7 +899,6 @@
'SecurityRuleDirection',
'RouteNextHopType',
'PublicIPAddressSkuName',
'PublicIPPrefixSkuName',
'ApplicationGatewayProtocol',
'ApplicationGatewayCookieBasedAffinity',
'ApplicationGatewayBackendHealthServerHealth',
Expand Down Expand Up @@ -910,6 +945,7 @@
'ConnectionMonitorSourceStatus',
'ConnectionState',
'EvaluationState',
'PublicIPPrefixSkuName',
'VirtualNetworkPeeringState',
'VirtualNetworkGatewayType',
'VpnType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ class BackendAddressPool(SubResource):
backend address pool.
:vartype load_balancing_rules:
list[~azure.mgmt.network.v2018_07_01.models.SubResource]
:ivar outbound_nat_rule: Gets outbound rules that use this backend address
:ivar outbound_rule: Gets outbound rules that use this backend address
pool.
:vartype outbound_nat_rule:
~azure.mgmt.network.v2018_07_01.models.SubResource
:vartype outbound_rule: ~azure.mgmt.network.v2018_07_01.models.SubResource
:param provisioning_state: Get provisioning state of the public IP
resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
:type provisioning_state: str
Expand All @@ -46,14 +45,14 @@ class BackendAddressPool(SubResource):
_validation = {
'backend_ip_configurations': {'readonly': True},
'load_balancing_rules': {'readonly': True},
'outbound_nat_rule': {'readonly': True},
'outbound_rule': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'},
'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'},
'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'},
'outbound_rule': {'key': 'properties.outboundRule', 'type': 'SubResource'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
Expand All @@ -63,7 +62,7 @@ def __init__(self, **kwargs):
super(BackendAddressPool, self).__init__(**kwargs)
self.backend_ip_configurations = None
self.load_balancing_rules = None
self.outbound_nat_rule = None
self.outbound_rule = None
self.provisioning_state = kwargs.get('provisioning_state', None)
self.name = kwargs.get('name', None)
self.etag = kwargs.get('etag', None)
Loading