diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb index 4ced59f048..fb570ff4c6 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network.rb @@ -26,12 +26,20 @@ module Azure::ARM::Network autoload :ExpressRouteCircuits, 'generated/azure_mgmt_network/express_route_circuits.rb' autoload :ExpressRouteServiceProviders, 'generated/azure_mgmt_network/express_route_service_providers.rb' autoload :LoadBalancers, 'generated/azure_mgmt_network/load_balancers.rb' + autoload :LoadBalancerBackendAddressPools, 'generated/azure_mgmt_network/load_balancer_backend_address_pools.rb' + autoload :LoadBalancerFrontendIPConfigurations, 'generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb' + autoload :InboundNatRules, 'generated/azure_mgmt_network/inbound_nat_rules.rb' + autoload :LoadBalancerLoadBalancingRules, 'generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb' + autoload :LoadBalancerNetworkInterfaces, 'generated/azure_mgmt_network/load_balancer_network_interfaces.rb' + autoload :LoadBalancerProbes, 'generated/azure_mgmt_network/load_balancer_probes.rb' autoload :NetworkInterfaces, 'generated/azure_mgmt_network/network_interfaces.rb' + autoload :NetworkInterfaceIPConfigurations, 'generated/azure_mgmt_network/network_interface_ipconfigurations.rb' + autoload :NetworkInterfaceLoadBalancers, 'generated/azure_mgmt_network/network_interface_load_balancers.rb' autoload :NetworkSecurityGroups, 'generated/azure_mgmt_network/network_security_groups.rb' autoload :SecurityRules, 'generated/azure_mgmt_network/security_rules.rb' + autoload :DefaultSecurityRules, 'generated/azure_mgmt_network/default_security_rules.rb' autoload :NetworkWatchers, 'generated/azure_mgmt_network/network_watchers.rb' autoload :PacketCaptures, 'generated/azure_mgmt_network/packet_captures.rb' - autoload :AvailablePrivateAccessServices, 'generated/azure_mgmt_network/available_private_access_services.rb' autoload :PublicIPAddresses, 'generated/azure_mgmt_network/public_ipaddresses.rb' autoload :RouteFilters, 'generated/azure_mgmt_network/route_filters.rb' autoload :RouteFilterRules, 'generated/azure_mgmt_network/route_filter_rules.rb' @@ -48,126 +56,135 @@ module Azure::ARM::Network autoload :NetworkManagementClient, 'generated/azure_mgmt_network/network_management_client.rb' module Models - autoload :EffectiveRoute, 'generated/azure_mgmt_network/models/effective_route.rb' - autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' - autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' - autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' - autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' - autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' - autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' + autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' + autoload :EffectiveNetworkSecurityRule, 'generated/azure_mgmt_network/models/effective_network_security_rule.rb' autoload :ExpressRouteCircuitsRoutesTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb' - autoload :PrivateAccessServicePropertiesFormat, 'generated/azure_mgmt_network/models/private_access_service_properties_format.rb' autoload :ExpressRouteCircuitRoutesTableSummary, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb' - autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' + autoload :VirtualNetworkGatewayListConnectionsResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb' autoload :ExpressRouteCircuitsRoutesTableSummaryListResult, 'generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb' - autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' + autoload :VirtualNetworkConnectionGatewayReference, 'generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb' autoload :ExpressRouteCircuitListResult, 'generated/azure_mgmt_network/models/express_route_circuit_list_result.rb' - autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' + autoload :ConnectionSharedKey, 'generated/azure_mgmt_network/models/connection_shared_key.rb' autoload :ExpressRouteServiceProviderBandwidthsOffered, 'generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb' - autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' - autoload :RouteFilterRuleListResult, 'generated/azure_mgmt_network/models/route_filter_rule_list_result.rb' - autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' + autoload :PublicIPAddressSku, 'generated/azure_mgmt_network/models/public_ipaddress_sku.rb' + autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' + autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' autoload :ExpressRouteServiceProviderListResult, 'generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb' - autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' + autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :LoadBalancerSku, 'generated/azure_mgmt_network/models/load_balancer_sku.rb' + autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' + autoload :RouteFilterRuleListResult, 'generated/azure_mgmt_network/models/route_filter_rule_list_result.rb' + autoload :VirtualNetworkGatewayListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb' autoload :RouteFilterListResult, 'generated/azure_mgmt_network/models/route_filter_list_result.rb' - autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' + autoload :VpnClientParameters, 'generated/azure_mgmt_network/models/vpn_client_parameters.rb' autoload :PublicIPAddressListResult, 'generated/azure_mgmt_network/models/public_ipaddress_list_result.rb' - autoload :ApplicationGatewaySslPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb' - autoload :PrivateAccessServicesListResult, 'generated/azure_mgmt_network/models/private_access_services_list_result.rb' - autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' + autoload :ApplicationGatewayBackendHealthHttpSettings, 'generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb' autoload :ConnectivityInformation, 'generated/azure_mgmt_network/models/connectivity_information.rb' - autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' + autoload :ApplicationGatewayBackendHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health.rb' autoload :ConnectivityHop, 'generated/azure_mgmt_network/models/connectivity_hop.rb' - autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' + autoload :ApplicationGatewaySslPolicy, 'generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb' autoload :ConnectivityIssue, 'generated/azure_mgmt_network/models/connectivity_issue.rb' - autoload :ApplicationGatewayProbeHealthResponseMatch, 'generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb' + autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' autoload :LoadBalancerListResult, 'generated/azure_mgmt_network/models/load_balancer_list_result.rb' - autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' - autoload :ErrorDetails, 'generated/azure_mgmt_network/models/error_details.rb' - autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' - autoload :Error, 'generated/azure_mgmt_network/models/error.rb' + autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :InboundNatRuleListResult, 'generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb' + autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :LoadBalancerBackendAddressPoolListResult, 'generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb' + autoload :ApplicationGatewayProbeHealthResponseMatch, 'generated/azure_mgmt_network/models/application_gateway_probe_health_response_match.rb' + autoload :LoadBalancerFrontendIPConfigurationListResult, 'generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb' + autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' + autoload :LoadBalancerLoadBalancingRuleListResult, 'generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb' + autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' + autoload :LoadBalancerProbeListResult, 'generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb' autoload :ApplicationGatewayWebApplicationFirewallConfiguration, 'generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb' - autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_network/models/azure_async_operation_result.rb' - autoload :ApplicationGatewayListResult, 'generated/azure_mgmt_network/models/application_gateway_list_result.rb' autoload :NetworkInterfaceListResult, 'generated/azure_mgmt_network/models/network_interface_list_result.rb' + autoload :ApplicationGatewayListResult, 'generated/azure_mgmt_network/models/application_gateway_list_result.rb' + autoload :ErrorDetails, 'generated/azure_mgmt_network/models/error_details.rb' autoload :ApplicationGatewayFirewallRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule_group.rb' - autoload :EffectiveNetworkSecurityGroupAssociation, 'generated/azure_mgmt_network/models/effective_network_security_group_association.rb' + autoload :Error, 'generated/azure_mgmt_network/models/error.rb' autoload :ApplicationGatewayAvailableWafRuleSetsResult, 'generated/azure_mgmt_network/models/application_gateway_available_waf_rule_sets_result.rb' - autoload :EffectiveNetworkSecurityRule, 'generated/azure_mgmt_network/models/effective_network_security_rule.rb' + autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_network/models/azure_async_operation_result.rb' + autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' + autoload :NetworkInterfaceIPConfigurationListResult, 'generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb' + autoload :NetworkInterfaceLoadBalancerListResult, 'generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb' autoload :Usage, 'generated/azure_mgmt_network/models/usage.rb' - autoload :EffectiveNetworkSecurityGroup, 'generated/azure_mgmt_network/models/effective_network_security_group.rb' - autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' - autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' - autoload :AuthorizationListResult, 'generated/azure_mgmt_network/models/authorization_list_result.rb' - autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' - autoload :BgpServiceCommunityListResult, 'generated/azure_mgmt_network/models/bgp_service_community_list_result.rb' + autoload :ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb' autoload :ConnectivityParameters, 'generated/azure_mgmt_network/models/connectivity_parameters.rb' + autoload :ExpressRouteCircuitStats, 'generated/azure_mgmt_network/models/express_route_circuit_stats.rb' + autoload :EffectiveNetworkSecurityGroup, 'generated/azure_mgmt_network/models/effective_network_security_group.rb' autoload :BGPCommunity, 'generated/azure_mgmt_network/models/bgpcommunity.rb' + autoload :EffectiveNetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb' + autoload :ExpressRouteCircuitPeeringListResult, 'generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb' + autoload :EffectiveRoute, 'generated/azure_mgmt_network/models/effective_route.rb' + autoload :ExpressRouteCircuitServiceProviderProperties, 'generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb' + autoload :EffectiveRouteListResult, 'generated/azure_mgmt_network/models/effective_route_list_result.rb' + autoload :ExpressRouteCircuitArpTable, 'generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb' autoload :SecurityRuleListResult, 'generated/azure_mgmt_network/models/security_rule_list_result.rb' - autoload :Ipv6ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb' + autoload :ExpressRouteCircuitRoutesTable, 'generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb' autoload :NetworkSecurityGroupListResult, 'generated/azure_mgmt_network/models/network_security_group_list_result.rb' - autoload :ExpressRouteCircuitSku, 'generated/azure_mgmt_network/models/express_route_circuit_sku.rb' + autoload :NetworkInterfaceDnsSettings, 'generated/azure_mgmt_network/models/network_interface_dns_settings.rb' autoload :ConnectivityDestination, 'generated/azure_mgmt_network/models/connectivity_destination.rb' - autoload :RouteTableListResult, 'generated/azure_mgmt_network/models/route_table_list_result.rb' + autoload :ConnectionResetSharedKey, 'generated/azure_mgmt_network/models/connection_reset_shared_key.rb' autoload :NetworkWatcherListResult, 'generated/azure_mgmt_network/models/network_watcher_list_result.rb' - autoload :ConnectionSharedKey, 'generated/azure_mgmt_network/models/connection_shared_key.rb' + autoload :IpsecPolicy, 'generated/azure_mgmt_network/models/ipsec_policy.rb' autoload :TopologyParameters, 'generated/azure_mgmt_network/models/topology_parameters.rb' - autoload :PublicIPAddressDnsSettings, 'generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb' + autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' autoload :TopologyAssociation, 'generated/azure_mgmt_network/models/topology_association.rb' - autoload :BgpPeerStatusListResult, 'generated/azure_mgmt_network/models/bgp_peer_status_list_result.rb' + autoload :ApplicationGatewayBackendHealthServer, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb' autoload :TopologyResource, 'generated/azure_mgmt_network/models/topology_resource.rb' - autoload :ApplicationGatewayConnectionDraining, 'generated/azure_mgmt_network/models/application_gateway_connection_draining.rb' + autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' autoload :Topology, 'generated/azure_mgmt_network/models/topology.rb' - autoload :ApplicationGatewayBackendHealthPool, 'generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb' + autoload :BgpSettings, 'generated/azure_mgmt_network/models/bgp_settings.rb' autoload :VerificationIPFlowParameters, 'generated/azure_mgmt_network/models/verification_ipflow_parameters.rb' - autoload :BgpPeerStatus, 'generated/azure_mgmt_network/models/bgp_peer_status.rb' + autoload :VirtualNetworkUsage, 'generated/azure_mgmt_network/models/virtual_network_usage.rb' autoload :VerificationIPFlowResult, 'generated/azure_mgmt_network/models/verification_ipflow_result.rb' - autoload :VirtualNetworkListUsageResult, 'generated/azure_mgmt_network/models/virtual_network_list_usage_result.rb' + autoload :VirtualNetworkListResult, 'generated/azure_mgmt_network/models/virtual_network_list_result.rb' autoload :NextHopParameters, 'generated/azure_mgmt_network/models/next_hop_parameters.rb' - autoload :IPAddressAvailabilityResult, 'generated/azure_mgmt_network/models/ipaddress_availability_result.rb' + autoload :AddressSpace, 'generated/azure_mgmt_network/models/address_space.rb' autoload :NextHopResult, 'generated/azure_mgmt_network/models/next_hop_result.rb' - autoload :ApplicationGatewayFirewallDisabledRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb' + autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' autoload :SecurityGroupViewParameters, 'generated/azure_mgmt_network/models/security_group_view_parameters.rb' - autoload :ApplicationGatewayFirewallRule, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb' + autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' autoload :NetworkInterfaceAssociation, 'generated/azure_mgmt_network/models/network_interface_association.rb' - autoload :UsagesListResult, 'generated/azure_mgmt_network/models/usages_list_result.rb' + autoload :AuthorizationListResult, 'generated/azure_mgmt_network/models/authorization_list_result.rb' autoload :SubnetAssociation, 'generated/azure_mgmt_network/models/subnet_association.rb' - autoload :DnsNameAvailabilityResult, 'generated/azure_mgmt_network/models/dns_name_availability_result.rb' + autoload :BgpServiceCommunityListResult, 'generated/azure_mgmt_network/models/bgp_service_community_list_result.rb' autoload :SecurityRuleAssociations, 'generated/azure_mgmt_network/models/security_rule_associations.rb' - autoload :ExpressRouteCircuitStats, 'generated/azure_mgmt_network/models/express_route_circuit_stats.rb' + autoload :ExpressRouteCircuitSku, 'generated/azure_mgmt_network/models/express_route_circuit_sku.rb' autoload :SecurityGroupNetworkInterface, 'generated/azure_mgmt_network/models/security_group_network_interface.rb' - autoload :ExpressRouteCircuitPeeringListResult, 'generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb' + autoload :ExpressRouteCircuitsArpTableListResult, 'generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb' autoload :SecurityGroupViewResult, 'generated/azure_mgmt_network/models/security_group_view_result.rb' - autoload :NetworkInterfaceDnsSettings, 'generated/azure_mgmt_network/models/network_interface_dns_settings.rb' + autoload :LocalNetworkGatewayListResult, 'generated/azure_mgmt_network/models/local_network_gateway_list_result.rb' autoload :PacketCaptureStorageLocation, 'generated/azure_mgmt_network/models/packet_capture_storage_location.rb' - autoload :TunnelConnectionHealth, 'generated/azure_mgmt_network/models/tunnel_connection_health.rb' + autoload :GatewayRouteListResult, 'generated/azure_mgmt_network/models/gateway_route_list_result.rb' autoload :PacketCaptureFilter, 'generated/azure_mgmt_network/models/packet_capture_filter.rb' - autoload :ApplicationGatewayBackendHealthServer, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb' + autoload :ApplicationGatewayBackendHealthPool, 'generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb' autoload :PacketCaptureParameters, 'generated/azure_mgmt_network/models/packet_capture_parameters.rb' - autoload :VpnClientConfiguration, 'generated/azure_mgmt_network/models/vpn_client_configuration.rb' + autoload :VirtualNetworkGatewaySku, 'generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb' autoload :PacketCapture, 'generated/azure_mgmt_network/models/packet_capture.rb' - autoload :DhcpOptions, 'generated/azure_mgmt_network/models/dhcp_options.rb' + autoload :ApplicationGatewayFirewallDisabledRuleGroup, 'generated/azure_mgmt_network/models/application_gateway_firewall_disabled_rule_group.rb' autoload :PacketCaptureResult, 'generated/azure_mgmt_network/models/packet_capture_result.rb' autoload :SubnetListResult, 'generated/azure_mgmt_network/models/subnet_list_result.rb' autoload :PacketCaptureListResult, 'generated/azure_mgmt_network/models/packet_capture_list_result.rb' - autoload :ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb' + autoload :UsageName, 'generated/azure_mgmt_network/models/usage_name.rb' autoload :PacketCaptureQueryStatusResult, 'generated/azure_mgmt_network/models/packet_capture_query_status_result.rb' - autoload :ExpressRouteCircuitServiceProviderProperties, 'generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb' + autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' autoload :TroubleshootingParameters, 'generated/azure_mgmt_network/models/troubleshooting_parameters.rb' - autoload :ApplicationGatewayBackendAddress, 'generated/azure_mgmt_network/models/application_gateway_backend_address.rb' + autoload :PublicIPAddressDnsSettings, 'generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb' autoload :QueryTroubleshootingParameters, 'generated/azure_mgmt_network/models/query_troubleshooting_parameters.rb' - autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' + autoload :GatewayRoute, 'generated/azure_mgmt_network/models/gateway_route.rb' autoload :TroubleshootingRecommendedActions, 'generated/azure_mgmt_network/models/troubleshooting_recommended_actions.rb' - autoload :ApplicationGatewayAvailableSslPredefinedPolicies, 'generated/azure_mgmt_network/models/application_gateway_available_ssl_predefined_policies.rb' + autoload :ApplicationGatewayFirewallRule, 'generated/azure_mgmt_network/models/application_gateway_firewall_rule.rb' autoload :TroubleshootingDetails, 'generated/azure_mgmt_network/models/troubleshooting_details.rb' - autoload :VirtualNetworkGatewayConnectionListResult, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb' + autoload :Ipv6ExpressRouteCircuitPeeringConfig, 'generated/azure_mgmt_network/models/ipv6express_route_circuit_peering_config.rb' autoload :TroubleshootingResult, 'generated/azure_mgmt_network/models/troubleshooting_result.rb' - autoload :VirtualNetworkPeeringListResult, 'generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb' + autoload :ApplicationGatewayConnectionDraining, 'generated/azure_mgmt_network/models/application_gateway_connection_draining.rb' autoload :RetentionPolicyParameters, 'generated/azure_mgmt_network/models/retention_policy_parameters.rb' - autoload :ApplicationGatewaySku, 'generated/azure_mgmt_network/models/application_gateway_sku.rb' + autoload :DnsNameAvailabilityResult, 'generated/azure_mgmt_network/models/dns_name_availability_result.rb' autoload :FlowLogStatusParameters, 'generated/azure_mgmt_network/models/flow_log_status_parameters.rb' - autoload :RouteListResult, 'generated/azure_mgmt_network/models/route_list_result.rb' + autoload :VirtualNetworkUsageName, 'generated/azure_mgmt_network/models/virtual_network_usage_name.rb' autoload :FlowLogInformation, 'generated/azure_mgmt_network/models/flow_log_information.rb' + autoload :ConnectivitySource, 'generated/azure_mgmt_network/models/connectivity_source.rb' autoload :BackendAddressPool, 'generated/azure_mgmt_network/models/backend_address_pool.rb' autoload :InboundNatRule, 'generated/azure_mgmt_network/models/inbound_nat_rule.rb' autoload :SecurityRule, 'generated/azure_mgmt_network/models/security_rule.rb' @@ -210,7 +227,6 @@ module Models autoload :OutboundNatRule, 'generated/azure_mgmt_network/models/outbound_nat_rule.rb' autoload :LoadBalancer, 'generated/azure_mgmt_network/models/load_balancer.rb' autoload :NetworkWatcher, 'generated/azure_mgmt_network/models/network_watcher.rb' - autoload :PrivateAccessServiceResult, 'generated/azure_mgmt_network/models/private_access_service_result.rb' autoload :PatchRouteFilterRule, 'generated/azure_mgmt_network/models/patch_route_filter_rule.rb' autoload :PatchRouteFilter, 'generated/azure_mgmt_network/models/patch_route_filter.rb' autoload :BgpServiceCommunity, 'generated/azure_mgmt_network/models/bgp_service_community.rb' @@ -222,6 +238,7 @@ module Models autoload :VirtualNetworkGateway, 'generated/azure_mgmt_network/models/virtual_network_gateway.rb' autoload :LocalNetworkGateway, 'generated/azure_mgmt_network/models/local_network_gateway.rb' autoload :VirtualNetworkGatewayConnection, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb' + autoload :VirtualNetworkGatewayConnectionListEntity, 'generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb' autoload :TransportProtocol, 'generated/azure_mgmt_network/models/transport_protocol.rb' autoload :IPAllocationMethod, 'generated/azure_mgmt_network/models/ipallocation_method.rb' autoload :IPVersion, 'generated/azure_mgmt_network/models/ipversion.rb' @@ -229,6 +246,7 @@ module Models autoload :SecurityRuleAccess, 'generated/azure_mgmt_network/models/security_rule_access.rb' autoload :SecurityRuleDirection, 'generated/azure_mgmt_network/models/security_rule_direction.rb' autoload :RouteNextHopType, 'generated/azure_mgmt_network/models/route_next_hop_type.rb' + autoload :PublicIPAddressSkuName, 'generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb' autoload :ApplicationGatewayProtocol, 'generated/azure_mgmt_network/models/application_gateway_protocol.rb' autoload :ApplicationGatewayCookieBasedAffinity, 'generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb' autoload :ApplicationGatewayBackendHealthServerHealth, 'generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb' @@ -250,9 +268,11 @@ module Models autoload :ExpressRouteCircuitSkuTier, 'generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb' autoload :ExpressRouteCircuitSkuFamily, 'generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb' autoload :ServiceProviderProvisioningState, 'generated/azure_mgmt_network/models/service_provider_provisioning_state.rb' + autoload :LoadBalancerSkuName, 'generated/azure_mgmt_network/models/load_balancer_sku_name.rb' autoload :LoadDistribution, 'generated/azure_mgmt_network/models/load_distribution.rb' autoload :ProbeProtocol, 'generated/azure_mgmt_network/models/probe_protocol.rb' autoload :NetworkOperationStatus, 'generated/azure_mgmt_network/models/network_operation_status.rb' + autoload :EffectiveSecurityRuleProtocol, 'generated/azure_mgmt_network/models/effective_security_rule_protocol.rb' autoload :EffectiveRouteSource, 'generated/azure_mgmt_network/models/effective_route_source.rb' autoload :EffectiveRouteState, 'generated/azure_mgmt_network/models/effective_route_state.rb' autoload :ProvisioningState, 'generated/azure_mgmt_network/models/provisioning_state.rb' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb index 2f713f19e4..1f7fd6285a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/application_gateways.rb @@ -101,7 +101,7 @@ def get_with_http_info(resource_group_name, application_gateway_name, custom_hea def get_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -234,7 +234,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -317,7 +317,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -523,7 +523,7 @@ def list_available_waf_rule_sets_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_waf_rule_sets_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -606,7 +606,7 @@ def list_available_ssl_options_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_ssl_options_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -689,7 +689,7 @@ def list_available_ssl_predefined_policies_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_available_ssl_predefined_policies_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -775,7 +775,7 @@ def get_ssl_predefined_policy_with_http_info(predefined_policy_name, custom_head # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def get_ssl_predefined_policy_async(predefined_policy_name, custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'predefined_policy_name is nil' if predefined_policy_name.nil? @@ -866,7 +866,7 @@ def begin_delete_with_http_info(resource_group_name, application_gateway_name, c def begin_delete_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -954,7 +954,7 @@ def begin_create_or_update_async(resource_group_name, application_gateway_name, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1063,7 +1063,7 @@ def begin_start_with_http_info(resource_group_name, application_gateway_name, cu def begin_start_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1143,7 +1143,7 @@ def begin_stop_with_http_info(resource_group_name, application_gateway_name, cus def begin_stop_async(resource_group_name, application_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1233,7 +1233,7 @@ def begin_backend_health_with_http_info(resource_group_name, application_gateway def begin_backend_health_async(resource_group_name, application_gateway_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'application_gateway_name is nil' if application_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb index 6d7fbfd698..c9be3f0512 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/bgp_service_communities.rb @@ -55,7 +55,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb new file mode 100644 index 0000000000..df336a89d1 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/default_security_rules.rb @@ -0,0 +1,330 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class DefaultSecurityRules + include MsRestAzure + + # + # Creates and initializes a new instance of the DefaultSecurityRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_security_group_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_security_group_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil) + list_async(resource_group_name, network_security_group_name, custom_headers).value! + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_security_group_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRule] operation results. + # + def get(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + response = get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers).value! + end + + # + # Get the specified default network security rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param default_security_rule_name [String] The name of the default security + # rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_security_group_name, default_security_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? + fail ArgumentError, 'default_security_rule_name is nil' if default_security_rule_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'defaultSecurityRuleName' => default_security_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all default security rules in a network security group. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::SecurityRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all default security rules in a network security group. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_security_group_name [String] The name of the network security + # group. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [SecurityRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, network_security_group_name, custom_headers = nil) + response = list_async(resource_group_name, network_security_group_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb index 9f927fda25..2300fbe5fe 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb @@ -107,7 +107,7 @@ def get_async(resource_group_name, circuit_name, authorization_name, custom_head fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -248,7 +248,7 @@ def list_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def list_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -342,7 +342,7 @@ def begin_delete_async(resource_group_name, circuit_name, authorization_name, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -437,7 +437,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, authorizatio fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'authorization_name is nil' if authorization_name.nil? fail ArgumentError, 'authorization_parameters is nil' if authorization_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb index 90036de289..76f825de7d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb @@ -107,7 +107,7 @@ def get_async(resource_group_name, circuit_name, peering_name, custom_headers = fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -246,7 +246,7 @@ def list_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def list_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -340,7 +340,7 @@ def begin_delete_async(resource_group_name, circuit_name, peering_name, custom_h fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -432,7 +432,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, peering_name fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'peering_parameters is nil' if peering_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb index 9113f173ab..88fb55f25d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_circuits.rb @@ -101,7 +101,7 @@ def get_with_http_info(resource_group_name, circuit_name, custom_headers = nil) def get_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -379,7 +379,7 @@ def get_stats_with_http_info(resource_group_name, circuit_name, custom_headers = def get_stats_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -474,7 +474,7 @@ def get_peering_stats_async(resource_group_name, circuit_name, peering_name, cus fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -561,7 +561,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -644,7 +644,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -734,7 +734,7 @@ def begin_delete_with_http_info(resource_group_name, circuit_name, custom_header def begin_delete_async(resource_group_name, circuit_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -822,7 +822,7 @@ def begin_create_or_update_async(resource_group_name, circuit_name, parameters, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -943,7 +943,7 @@ def begin_list_arp_table_async(resource_group_name, circuit_name, peering_name, fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1045,7 +1045,7 @@ def begin_list_routes_table_async(resource_group_name, circuit_name, peering_nam fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1147,7 +1147,7 @@ def begin_list_routes_table_summary_async(resource_group_name, circuit_name, pee fail ArgumentError, 'circuit_name is nil' if circuit_name.nil? fail ArgumentError, 'peering_name is nil' if peering_name.nil? fail ArgumentError, 'device_path is nil' if device_path.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb index 86d676501a..f7443f5bb4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/express_route_service_providers.rb @@ -55,7 +55,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb new file mode 100644 index 0000000000..ac2c17ccc5 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/inbound_nat_rules.rb @@ -0,0 +1,616 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class InboundNatRules + include MsRestAzure + + # + # Creates and initializes a new instance of the InboundNatRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + def delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + # Send request + promise = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def get(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand, custom_headers).value! + end + + # + # Gets the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param expand [String] Expands referenced resources. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, expand = nil, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version,'$expand' => expand}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + # Send request + promise = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def begin_delete(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + response = begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + nil + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_delete_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers).value! + end + + # + # Deletes the specified load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_delete_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 204 || status_code == 202 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRule] operation results. + # + def begin_create_or_update(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + response = begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_or_update_with_http_info(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers).value! + end + + # + # Creates or updates a load balancer inbound nat rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param inbound_nat_rule_name [String] The name of the inbound nat rule. + # @param inbound_nat_rule_parameters [InboundNatRule] Parameters supplied to + # the create or update inbound nat rule operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_or_update_async(resource_group_name, load_balancer_name, inbound_nat_rule_name, inbound_nat_rule_parameters, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'inbound_nat_rule_name is nil' if inbound_nat_rule_name.nil? + fail ArgumentError, 'inbound_nat_rule_parameters is nil' if inbound_nat_rule_parameters.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Serialize Request + request_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + request_content = @client.serialize(request_mapper, inbound_nat_rule_parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'inboundNatRuleName' => inbound_nat_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 || status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::InboundNatRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the inbound nat rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [InboundNatRuleListResult] which provide lazy access to pages of the + # response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb new file mode 100644 index 0000000000..2677d60641 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_backend_address_pools.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerBackendAddressPools + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerBackendAddressPools class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BackendAddressPool] operation results. + # + def get(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers).value! + end + + # + # Gets load balancer backend address pool. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param backend_address_pool_name [String] The name of the backend address + # pool. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, backend_address_pool_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'backend_address_pool_name is nil' if backend_address_pool_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'backendAddressPoolName' => backend_address_pool_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::BackendAddressPool.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerBackendAddressPoolListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer backed address pools. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerBackendAddressPoolListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer backed address pools. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerBackendAddressPoolListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb new file mode 100644 index 0000000000..1bd354c947 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_frontend_ipconfigurations.rb @@ -0,0 +1,323 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerFrontendIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerFrontendIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [FrontendIPConfiguration] operation results. + # + def get(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers).value! + end + + # + # Gets load balancer frontend IP configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param frontend_ipconfiguration_name [String] The name of the frontend IP + # configuration. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, frontend_ipconfiguration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'frontend_ipconfiguration_name is nil' if frontend_ipconfiguration_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'frontendIPConfigurationName' => frontend_ipconfiguration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::FrontendIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerFrontendIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer frontend IP configurations. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] which provide lazy + # access to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb new file mode 100644 index 0000000000..4d92c418bd --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_load_balancing_rules.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerLoadBalancingRules + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerLoadBalancingRules class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancingRule] operation results. + # + def get(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers).value! + end + + # + # Gets the specified load balancer load balancing rule. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param load_balancing_rule_name [String] The name of the load balancing rule. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, load_balancing_rule_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'load_balancing_rule_name is nil' if load_balancing_rule_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'loadBalancingRuleName' => load_balancing_rule_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancingRule.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerLoadBalancingRuleListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerLoadBalancingRuleListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancing rules in a load balancer. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerLoadBalancingRuleListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb similarity index 70% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb index 229be36f42..c856ae6cfc 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/available_private_access_services.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_network_interfaces.rb @@ -7,11 +7,11 @@ module Azure::ARM::Network # # Network Client # - class AvailablePrivateAccessServices + class LoadBalancerNetworkInterfaces include MsRestAzure # - # Creates and initializes a new instance of the AvailablePrivateAccessServices class. + # Creates and initializes a new instance of the LoadBalancerNetworkInterfaces class. # @param client service class for accessing basic functionality. # def initialize(client) @@ -22,47 +22,48 @@ def initialize(client) attr_reader :client # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # - # @param location [String] The location to check available private access - # values. + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [Array] operation results. + # @return [Array] operation results. # - def list(location, custom_headers = nil) - first_page = list_as_lazy(location, custom_headers) + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) first_page.get_all_items end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # - # @param location [String] The location to check available private access - # values. + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # # @return [MsRestAzure::AzureOperationResponse] HTTP response information. # - def list_with_http_info(location, custom_headers = nil) - list_async(location, custom_headers).value! + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # - # @param location [String] The location to check available private access - # values. + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. # @param [Hash{String => String}] A hash of custom headers that will be added # to the HTTP request. # # @return [Concurrent::Promise] Promise object which holds the HTTP response. # - def list_async(location, custom_headers = nil) - fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -71,13 +72,13 @@ def list_async(location, custom_headers = nil) # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? - path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/privateAccessServices' + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], - path_params: {'location' => location,'subscriptionId' => @client.subscription_id}, + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url @@ -98,7 +99,7 @@ def list_async(location, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Network::Models::PrivateAccessServicesListResult.mapper() + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -112,14 +113,14 @@ def list_async(location, custom_headers = nil) end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PrivateAccessServicesListResult] operation results. + # @return [NetworkInterfaceListResult] operation results. # def list_next(next_page_link, custom_headers = nil) response = list_next_async(next_page_link, custom_headers).value! @@ -127,7 +128,7 @@ def list_next(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -141,7 +142,7 @@ def list_next_with_http_info(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # # @param next_page_link [String] The NextLink from the previous successful call # to List operation. @@ -185,7 +186,7 @@ def list_next_async(next_page_link, custom_headers = nil) if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) - result_mapper = Azure::ARM::Network::Models::PrivateAccessServicesListResult.mapper() + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) @@ -199,18 +200,18 @@ def list_next_async(next_page_link, custom_headers = nil) end # - # List what values of private access services are available for use. + # Gets associated load balancer network interfaces. # - # @param location [String] The location to check available private access - # values. + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [PrivateAccessServicesListResult] which provide lazy access to pages - # of the response. + # @return [NetworkInterfaceListResult] which provide lazy access to pages of + # the response. # - def list_as_lazy(location, custom_headers = nil) - response = list_async(location, custom_headers).value! + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb new file mode 100644 index 0000000000..aec06eb921 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancer_probes.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class LoadBalancerProbes + include MsRestAzure + + # + # Creates and initializes a new instance of the LoadBalancerProbes class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, load_balancer_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, load_balancer_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, load_balancer_name, custom_headers = nil) + list_async(resource_group_name, load_balancer_name, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, load_balancer_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Probe] operation results. + # + def get(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + response = get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + get_async(resource_group_name, load_balancer_name, probe_name, custom_headers).value! + end + + # + # Gets load balancer probe. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param probe_name [String] The name of the probe. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, load_balancer_name, probe_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? + fail ArgumentError, 'probe_name is nil' if probe_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'loadBalancerName' => load_balancer_name,'probeName' => probe_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::Probe.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerProbeListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the load balancer probes. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::LoadBalancerProbeListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all the load balancer probes. + # + # @param resource_group_name [String] The name of the resource group. + # @param load_balancer_name [String] The name of the load balancer. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LoadBalancerProbeListResult] which provide lazy access to pages of + # the response. + # + def list_as_lazy(resource_group_name, load_balancer_name, custom_headers = nil) + response = list_async(resource_group_name, load_balancer_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb index 8fa4963039..f76f4928a4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/load_balancers.rb @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, load_balancer_name, expand = nil, cu def get_async(resource_group_name, load_balancer_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -410,7 +410,7 @@ def begin_delete_with_http_info(resource_group_name, load_balancer_name, custom_ def begin_delete_async(resource_group_name, load_balancer_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -498,7 +498,7 @@ def begin_create_or_update_async(resource_group_name, load_balancer_name, parame fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'load_balancer_name is nil' if load_balancer_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb index a91df67865..06a1132a65 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/local_network_gateways.rb @@ -114,7 +114,7 @@ def get_with_http_info(resource_group_name, local_network_gateway_name, custom_h def get_async(resource_group_name, local_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -241,7 +241,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -342,7 +342,7 @@ def begin_create_or_update_async(resource_group_name, local_network_gateway_name fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -454,7 +454,7 @@ def begin_delete_with_http_info(resource_group_name, local_network_gateway_name, def begin_delete_async(resource_group_name, local_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'local_network_gateway_name is nil' if local_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb index e768016067..a3f5f6f385 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb @@ -16,7 +16,8 @@ class EffectiveNetworkSecurityGroup # @return [SubResource] The ID of network security group that is applied. attr_accessor :network_security_group - # @return [EffectiveNetworkSecurityGroupAssociation] + # @return [EffectiveNetworkSecurityGroupAssociation] Associated + # resources. attr_accessor :association # @return [Array] A collection of effective diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb index 4fc86d544d..2d7641517f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb @@ -20,6 +20,38 @@ class EffectiveNetworkSecurityGroupListResult # @return [String] The URL to get the next set of results. attr_accessor :next_link + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [EffectiveNetworkSecurityGroupListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end # # Mapper for EffectiveNetworkSecurityGroupListResult class as Ruby Hash. @@ -50,6 +82,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb index 8077f76556..932eb82ab0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb @@ -17,9 +17,9 @@ class EffectiveNetworkSecurityRule # (if created by the user). attr_accessor :name - # @return [SecurityRuleProtocol] The network protocol this rule applies - # to. Possible values are: 'Tcp', 'Udp', and '*'. Possible values - # include: 'Tcp', 'Udp', '*' + # @return [EffectiveSecurityRuleProtocol] The network protocol this rule + # applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible + # values include: 'Tcp', 'Udp', 'All' attr_accessor :protocol # @return [String] The source port or range. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb index e8b55d4c70..4917f736e2 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb @@ -19,6 +19,37 @@ class EffectiveRouteListResult # @return [String] The URL to get the next set of results. attr_accessor :next_link + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [EffectiveRouteListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end # # Mapper for EffectiveRouteListResult class as Ruby Hash. @@ -49,6 +80,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb new file mode 100644 index 0000000000..847a2dfe48 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/effective_security_rule_protocol.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for EffectiveSecurityRuleProtocol + # + module EffectiveSecurityRuleProtocol + Tcp = "Tcp" + Udp = "Udp" + All = "All" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb index 5ac97b68a4..88dd8bfdc9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb @@ -19,7 +19,7 @@ class InboundNatRule < MsRestAzure::SubResource # @return [NetworkInterfaceIPConfiguration] A reference to a private IP # address defined on a network interface of a VM. Traffic sent to the # frontend port of each of the frontend IP configurations is forwarded to - # the backed IP. + # the backend IP. attr_accessor :backend_ipconfiguration # @return [TransportProtocol] The transport protocol for the endpoint. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb similarity index 73% rename from management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb rename to management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb index e8dc584dc4..3ba6a3e355 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_services_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/inbound_nat_rule_list_result.rb @@ -6,15 +6,15 @@ module Azure::ARM::Network module Models # - # Response for the ListAvailablePrivateAccessServices API service call. + # Response for ListInboundNatRule API service call. # - class PrivateAccessServicesListResult + class InboundNatRuleListResult include MsRestAzure include MsRest::JSONable - # @return [Array] List of available private - # access service values in a region. + # @return [Array] A list of inbound nat rules in a load + # balancer. attr_accessor :value # @return [String] The URL to get the next set of results. @@ -26,7 +26,7 @@ class PrivateAccessServicesListResult # # Gets the rest of the items for the request, enabling auto-pagination. # - # @return [Array] operation results. + # @return [Array] operation results. # def get_all_items items = @value @@ -41,7 +41,7 @@ def get_all_items # # Gets the next page of results. # - # @return [PrivateAccessServicesListResult] with next page content. + # @return [InboundNatRuleListResult] with next page content. # def get_next_page response = @next_method.call(@next_link).value! unless @next_method.nil? @@ -53,16 +53,16 @@ def get_next_page end # - # Mapper for PrivateAccessServicesListResult class as Ruby Hash. + # Mapper for InboundNatRuleListResult class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { required: false, - serialized_name: 'PrivateAccessServicesListResult', + serialized_name: 'InboundNatRuleListResult', type: { name: 'Composite', - class_name: 'PrivateAccessServicesListResult', + class_name: 'InboundNatRuleListResult', model_properties: { value: { required: false, @@ -71,16 +71,17 @@ def self.mapper() name: 'Sequence', element: { required: false, - serialized_name: 'PrivateAccessServiceResultElementType', + serialized_name: 'InboundNatRuleElementType', type: { name: 'Composite', - class_name: 'PrivateAccessServiceResult' + class_name: 'InboundNatRule' } } } }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb index b7f6fb58a1..7e681a7af0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/ipconfiguration.rb @@ -6,7 +6,7 @@ module Azure::ARM::Network module Models # - # IPConfiguration + # IP configuration # class IPConfiguration < MsRestAzure::SubResource diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb index a80e1658f4..5c8765cf7c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer.rb @@ -13,6 +13,9 @@ class LoadBalancer < MsRestAzure::Resource include MsRestAzure include MsRest::JSONable + # @return [LoadBalancerSku] The load balancer SKU. + attr_accessor :sku + # @return [Array] Object representing the # frontend IPs to be used for the load balancer attr_accessor :frontend_ipconfigurations @@ -120,6 +123,14 @@ def self.mapper() } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'LoadBalancerSku' + } + }, frontend_ipconfigurations: { required: false, serialized_name: 'properties.frontendIPConfigurations', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb new file mode 100644 index 0000000000..10c3c5aa76 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_backend_address_pool_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListBackendAddressPool API service call. + # + class LoadBalancerBackendAddressPoolListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of backend address pools in + # a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerBackendAddressPoolListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerBackendAddressPoolListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerBackendAddressPoolListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerBackendAddressPoolListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'BackendAddressPoolElementType', + type: { + name: 'Composite', + class_name: 'BackendAddressPool' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..1dd92773dd --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_frontend_ipconfiguration_list_result.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListFrontendIPConfiguration API service call. + # + class LoadBalancerFrontendIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of frontend IP + # configurations in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerFrontendIPConfigurationListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerFrontendIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerFrontendIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerFrontendIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'FrontendIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'FrontendIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb index e200c10c9a..6b1bf22328 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb new file mode 100644 index 0000000000..4ee4f781e8 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_load_balancing_rule_list_result.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListLoadBalancingRule API service call. + # + class LoadBalancerLoadBalancingRuleListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancing rules in a + # load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerLoadBalancingRuleListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerLoadBalancingRuleListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerLoadBalancingRuleListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerLoadBalancingRuleListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancingRuleElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancingRule' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb new file mode 100644 index 0000000000..4e25c489fe --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_probe_list_result.rb @@ -0,0 +1,95 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for ListProbe API service call. + # + class LoadBalancerProbeListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of probes in a load balancer. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [LoadBalancerProbeListResult] with next page content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for LoadBalancerProbeListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerProbeListResult', + type: { + name: 'Composite', + class_name: 'LoadBalancerProbeListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'ProbeElementType', + type: { + name: 'Composite', + class_name: 'Probe' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.rb new file mode 100644 index 0000000000..af516dec85 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku.rb @@ -0,0 +1,46 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # SKU of a load balancer + # + class LoadBalancerSku + + include MsRestAzure + + include MsRest::JSONable + # @return [LoadBalancerSkuName] Name of a load balancer SKU. Possible + # values include: 'Basic', 'Standard' + attr_accessor :name + + + # + # Mapper for LoadBalancerSku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'LoadBalancerSku', + type: { + name: 'Composite', + class_name: 'LoadBalancerSku', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb new file mode 100644 index 0000000000..d7665750e7 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancer_sku_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for LoadBalancerSkuName + # + module LoadBalancerSkuName + Basic = "Basic" + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb index 768f5b11e7..abfa91e169 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb @@ -6,7 +6,7 @@ module Azure::ARM::Network module Models # - # A loag balancing rule for a load balancer. + # A load balancing rule for a load balancer. # class LoadBalancingRule < MsRestAzure::SubResource @@ -55,6 +55,11 @@ class LoadBalancingRule < MsRestAzure::SubResource # changed after you create the endpoint. attr_accessor :enable_floating_ip + # @return [Boolean] Configures SNAT for the VMs in the backend pool to + # use the publicIP address specified in the frontend of the load + # balancing rule. + attr_accessor :disable_outbound_snat + # @return [String] Gets the provisioning state of the PublicIP resource. # Possible values are: 'Updating', 'Deleting', and 'Failed'. attr_accessor :provisioning_state @@ -153,6 +158,13 @@ def self.mapper() name: 'Boolean' } }, + disable_outbound_snat: { + required: false, + serialized_name: 'properties.disableOutboundSnat', + type: { + name: 'Boolean' + } + }, provisioning_state: { required: false, serialized_name: 'properties.provisioningState', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb index 35213fe6ee..7a3ef1e816 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb index bdf6f54709..b4a6470bb8 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb @@ -25,7 +25,7 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # LoadBalancerInboundNatRules. attr_accessor :load_balancer_inbound_nat_rules - # @return [String] + # @return [String] Private IP address of the IP configuration. attr_accessor :private_ipaddress # @return [IPAllocationMethod] Defines how a private IP address is @@ -39,17 +39,20 @@ class NetworkInterfaceIPConfiguration < MsRestAzure::SubResource # Possible values include: 'IPv4', 'IPv6' attr_accessor :private_ipaddress_version - # @return [Subnet] + # @return [Subnet] Subnet bound to the IP configuration. attr_accessor :subnet # @return [Boolean] Gets whether this is a primary customer address on # the network interface. attr_accessor :primary - # @return [PublicIPAddress] + # @return [PublicIPAddress] Public IP address bound to the IP + # configuration. attr_accessor :public_ipaddress - # @return [String] + # @return [String] The provisioning state of the network interface IP + # configuration. Possible values are: 'Updating', 'Deleting', and + # 'Failed'. attr_accessor :provisioning_state # @return [String] The name of the resource that is unique within a diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb new file mode 100644 index 0000000000..74edecad0a --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration_list_result.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceIPConfigurationListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of ip + # configurations. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceIPConfigurationListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for NetworkInterfaceIPConfigurationListResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfigurationListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'NetworkInterfaceIPConfigurationElementType', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceIPConfiguration' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb index 3631658947..89a6555c4d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb new file mode 100644 index 0000000000..69fe60e924 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/network_interface_load_balancer_list_result.rb @@ -0,0 +1,96 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for list ip configurations API service call. + # + class NetworkInterfaceLoadBalancerListResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] A list of load balancers. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [NetworkInterfaceLoadBalancerListResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for NetworkInterfaceLoadBalancerListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'NetworkInterfaceLoadBalancerListResult', + type: { + name: 'Composite', + class_name: 'NetworkInterfaceLoadBalancerListResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'LoadBalancerElementType', + type: { + name: 'Composite', + class_name: 'LoadBalancer' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb deleted file mode 100644 index fd1c4a9895..0000000000 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_properties_format.rb +++ /dev/null @@ -1,72 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Network - module Models - # - # The private access service properties. - # - class PrivateAccessServicePropertiesFormat - - include MsRestAzure - - include MsRest::JSONable - # @return [String] The type of the private access. - attr_accessor :service - - # @return [Array] A list of locations. - attr_accessor :locations - - # @return [String] The provisioning state of the resource. - attr_accessor :provisioning_state - - - # - # Mapper for PrivateAccessServicePropertiesFormat class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'PrivateAccessServicePropertiesFormat', - type: { - name: 'Composite', - class_name: 'PrivateAccessServicePropertiesFormat', - model_properties: { - service: { - required: false, - serialized_name: 'service', - type: { - name: 'String' - } - }, - locations: { - required: false, - serialized_name: 'locations', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - provisioning_state: { - required: false, - serialized_name: 'provisioningState', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb deleted file mode 100644 index 456528a804..0000000000 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/private_access_service_result.rb +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. - -module Azure::ARM::Network - module Models - # - # Private access service. - # - class PrivateAccessServiceResult < MsRestAzure::SubResource - - include MsRestAzure - - include MsRest::JSONable - # @return [String] Name of the private access value. - attr_accessor :name - - # @return [String] Type of the private access value. - attr_accessor :type - - - # - # Mapper for PrivateAccessServiceResult class as Ruby Hash. - # This will be used for serialization/deserialization. - # - def self.mapper() - { - required: false, - serialized_name: 'PrivateAccessServiceResult', - type: { - name: 'Composite', - class_name: 'PrivateAccessServiceResult', - model_properties: { - id: { - required: false, - serialized_name: 'id', - type: { - name: 'String' - } - }, - name: { - required: false, - read_only: true, - serialized_name: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - read_only: true, - serialized_name: 'type', - type: { - name: 'String' - } - } - } - } - } - end - end - end -end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb index aa86809ef1..734383e280 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress.rb @@ -13,6 +13,9 @@ class PublicIPAddress < MsRestAzure::Resource include MsRestAzure include MsRest::JSONable + # @return [PublicIPAddressSku] The public IP address SKU. + attr_accessor :sku + # @return [IPAllocationMethod] The public IP allocation method. Possible # values are: 'Static' and 'Dynamic'. Possible values include: 'Static', # 'Dynamic' @@ -22,14 +25,16 @@ class PublicIPAddress < MsRestAzure::Resource # 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' attr_accessor :public_ipaddress_version - # @return [IPConfiguration] + # @return [IPConfiguration] The IP configuration associated with the + # public IP address. attr_accessor :ip_configuration # @return [PublicIPAddressDnsSettings] The FQDN of the DNS record # associated with the public IP address. attr_accessor :dns_settings - # @return [String] + # @return [String] The IP address associated with the public IP address + # resource. attr_accessor :ip_address # @return [Integer] The idle timeout of the public IP address. @@ -103,6 +108,14 @@ def self.mapper() } } }, + sku: { + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'PublicIPAddressSku' + } + }, public_ipallocation_method: { required: false, serialized_name: 'properties.publicIPAllocationMethod', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.rb new file mode 100644 index 0000000000..e6c5910c5c --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku.rb @@ -0,0 +1,46 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # SKU of a public IP address + # + class PublicIPAddressSku + + include MsRestAzure + + include MsRest::JSONable + # @return [PublicIPAddressSkuName] Name of a public IP address SKU. + # Possible values include: 'Basic', 'Standard' + attr_accessor :name + + + # + # Mapper for PublicIPAddressSku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'PublicIPAddressSku', + type: { + name: 'Composite', + class_name: 'PublicIPAddressSku', + model_properties: { + name: { + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb new file mode 100644 index 0000000000..a604c4789e --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/public_ipaddress_sku_name.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Defines values for PublicIPAddressSkuName + # + module PublicIPAddressSkuName + Basic = "Basic" + Standard = "Standard" + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb index 4185c531c5..f77fa35c4a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/security_rule.rb @@ -45,9 +45,15 @@ class SecurityRule < MsRestAzure::SubResource attr_accessor :destination_address_prefix # @return [Array] The destination address prefixes. CIDR or - # destination IP rangees. + # destination IP ranges. attr_accessor :destination_address_prefixes + # @return [Array] The source port ranges. + attr_accessor :source_port_ranges + + # @return [Array] The destination port ranges. + attr_accessor :destination_port_ranges + # @return [SecurityRuleAccess] The network traffic is allowed or denied. # Possible values are: 'Allow' and 'Deny'. Possible values include: # 'Allow', 'Deny' @@ -167,6 +173,34 @@ def self.mapper() } } }, + source_port_ranges: { + required: false, + serialized_name: 'properties.sourcePortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + destination_port_ranges: { + required: false, + serialized_name: 'properties.destinationPortRanges', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, access: { required: true, serialized_name: 'properties.access', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb index 0f3e8555ba..2828f7507c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/subnet.rb @@ -23,10 +23,6 @@ class Subnet < MsRestAzure::SubResource # @return [RouteTable] The reference of the RouteTable resource. attr_accessor :route_table - # @return [Array] An array of - # private access services values. - attr_accessor :private_access_services - # @return [Array] Gets an array of references to the # network interface IP configurations using subnet. attr_accessor :ip_configurations @@ -89,21 +85,6 @@ def self.mapper() class_name: 'RouteTable' } }, - private_access_services: { - required: false, - serialized_name: 'properties.privateAccessServices', - type: { - name: 'Sequence', - element: { - required: false, - serialized_name: 'PrivateAccessServicePropertiesFormatElementType', - type: { - name: 'Composite', - class_name: 'PrivateAccessServicePropertiesFormat' - } - } - } - }, ip_configurations: { required: false, read_only: true, diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb new file mode 100644 index 0000000000..37129d0c7c --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_connection_gateway_reference.rb @@ -0,0 +1,46 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + # + class VirtualNetworkConnectionGatewayReference + + include MsRestAzure + + include MsRest::JSONable + # @return [String] The ID of VirtualNetworkGateway or LocalNetworkGateway + # resource. + attr_accessor :id + + + # + # Mapper for VirtualNetworkConnectionGatewayReference class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'virtualNetworkConnectionGatewayReference', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference', + model_properties: { + id: { + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb index 6ec37c0b9d..86e95a951c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb @@ -52,14 +52,6 @@ class VirtualNetworkGateway < MsRestAzure::Resource # @return [BgpSettings] Virtual network gateway's BGP speaker settings. attr_accessor :bgp_settings - # @return [String] The radius server address property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_server - - # @return [String] The radius secret property of the - # VirtualNetworkGateway resource for vpn client connection. - attr_accessor :radius_secret - # @return [String] The resource GUID property of the # VirtualNetworkGateway resource. attr_accessor :resource_guid @@ -204,20 +196,6 @@ def self.mapper() class_name: 'BgpSettings' } }, - radius_server: { - required: false, - serialized_name: 'properties.radiusServer', - type: { - name: 'String' - } - }, - radius_secret: { - required: false, - serialized_name: 'properties.radiusSecret', - type: { - name: 'String' - } - }, resource_guid: { required: false, serialized_name: 'properties.resourceGuid', diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb index c6ed76e26d..6e84ac7514 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb @@ -16,13 +16,16 @@ class VirtualNetworkGatewayConnection < MsRestAzure::Resource # @return [String] The authorizationKey. attr_accessor :authorization_key - # @return [VirtualNetworkGateway] + # @return [VirtualNetworkGateway] The reference to virtual network + # gateway resource. attr_accessor :virtual_network_gateway1 - # @return [VirtualNetworkGateway] + # @return [VirtualNetworkGateway] The reference to virtual network + # gateway resource. attr_accessor :virtual_network_gateway2 - # @return [LocalNetworkGateway] + # @return [LocalNetworkGateway] The reference to local network gateway + # resource. attr_accessor :local_network_gateway2 # @return [VirtualNetworkGatewayConnectionType] Gateway connection type. diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb new file mode 100644 index 0000000000..01bf9586cf --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_entity.rb @@ -0,0 +1,300 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # A common class for general resource information + # + class VirtualNetworkGatewayConnectionListEntity < MsRestAzure::Resource + + include MsRestAzure + + include MsRest::JSONable + # @return [String] The authorizationKey. + attr_accessor :authorization_key + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # virtual network gateway resource. + attr_accessor :virtual_network_gateway1 + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # virtual network gateway resource. + attr_accessor :virtual_network_gateway2 + + # @return [VirtualNetworkConnectionGatewayReference] The reference to + # local network gateway resource. + attr_accessor :local_network_gateway2 + + # @return [VirtualNetworkGatewayConnectionType] Gateway connection type. + # Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and + # 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', + # 'ExpressRoute', 'VPNClient' + attr_accessor :connection_type + + # @return [Integer] The routing weight. + attr_accessor :routing_weight + + # @return [String] The IPSec shared key. + attr_accessor :shared_key + + # @return [VirtualNetworkGatewayConnectionStatus] Virtual network Gateway + # connection status. Possible values are 'Unknown', 'Connecting', + # 'Connected' and 'NotConnected'. Possible values include: 'Unknown', + # 'Connecting', 'Connected', 'NotConnected' + attr_accessor :connection_status + + # @return [Array] Collection of all tunnels' + # connection health status. + attr_accessor :tunnel_connection_status + + # @return [Integer] The egress bytes transferred in this connection. + attr_accessor :egress_bytes_transferred + + # @return [Integer] The ingress bytes transferred in this connection. + attr_accessor :ingress_bytes_transferred + + # @return [SubResource] The reference to peerings resource. + attr_accessor :peer + + # @return [Boolean] EnableBgp flag + attr_accessor :enable_bgp + + # @return [Boolean] Enable policy-based traffic selectors. + attr_accessor :use_policy_based_traffic_selectors + + # @return [Array] The IPSec Policies to be considered by + # this connection. + attr_accessor :ipsec_policies + + # @return [String] The resource GUID property of the + # VirtualNetworkGatewayConnection resource. + attr_accessor :resource_guid + + # @return [String] The provisioning state of the + # VirtualNetworkGatewayConnection resource. Possible values are: + # 'Updating', 'Deleting', and 'Failed'. + attr_accessor :provisioning_state + + # @return [String] Gets a unique read-only string that changes whenever + # the resource is updated. + attr_accessor :etag + + + # + # Mapper for VirtualNetworkGatewayConnectionListEntity class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualNetworkGatewayConnectionListEntity', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayConnectionListEntity', + model_properties: { + id: { + required: false, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + authorization_key: { + required: false, + serialized_name: 'properties.authorizationKey', + type: { + name: 'String' + } + }, + virtual_network_gateway1: { + required: true, + serialized_name: 'properties.virtualNetworkGateway1', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + virtual_network_gateway2: { + required: false, + serialized_name: 'properties.virtualNetworkGateway2', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + local_network_gateway2: { + required: false, + serialized_name: 'properties.localNetworkGateway2', + type: { + name: 'Composite', + class_name: 'VirtualNetworkConnectionGatewayReference' + } + }, + connection_type: { + required: true, + serialized_name: 'properties.connectionType', + type: { + name: 'String' + } + }, + routing_weight: { + required: false, + serialized_name: 'properties.routingWeight', + type: { + name: 'Number' + } + }, + shared_key: { + required: false, + serialized_name: 'properties.sharedKey', + type: { + name: 'String' + } + }, + connection_status: { + required: false, + read_only: true, + serialized_name: 'properties.connectionStatus', + type: { + name: 'String' + } + }, + tunnel_connection_status: { + required: false, + read_only: true, + serialized_name: 'properties.tunnelConnectionStatus', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'TunnelConnectionHealthElementType', + type: { + name: 'Composite', + class_name: 'TunnelConnectionHealth' + } + } + } + }, + egress_bytes_transferred: { + required: false, + read_only: true, + serialized_name: 'properties.egressBytesTransferred', + type: { + name: 'Number' + } + }, + ingress_bytes_transferred: { + required: false, + read_only: true, + serialized_name: 'properties.ingressBytesTransferred', + type: { + name: 'Number' + } + }, + peer: { + required: false, + serialized_name: 'properties.peer', + type: { + name: 'Composite', + class_name: 'SubResource' + } + }, + enable_bgp: { + required: false, + serialized_name: 'properties.enableBgp', + type: { + name: 'Boolean' + } + }, + use_policy_based_traffic_selectors: { + required: false, + serialized_name: 'properties.usePolicyBasedTrafficSelectors', + type: { + name: 'Boolean' + } + }, + ipsec_policies: { + required: false, + serialized_name: 'properties.ipsecPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'IpsecPolicyElementType', + type: { + name: 'Composite', + class_name: 'IpsecPolicy' + } + } + } + }, + resource_guid: { + required: false, + serialized_name: 'properties.resourceGuid', + type: { + name: 'String' + } + }, + provisioning_state: { + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'String' + } + }, + etag: { + required: false, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb index 9104d1410b..a34d44f03e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb @@ -84,6 +84,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb new file mode 100644 index 0000000000..fa21888d31 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_connections_result.rb @@ -0,0 +1,100 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + module Models + # + # Response for the VirtualNetworkGatewayListConnections API service call + # + class VirtualNetworkGatewayListConnectionsResult + + include MsRestAzure + + include MsRest::JSONable + # @return [Array] Gets a list + # of VirtualNetworkGatewayConnection resources that exists in a resource + # group. + attr_accessor :value + + # @return [String] The URL to get the next set of results. + attr_accessor :next_link + + # return [Proc] with next page method call. + attr_accessor :next_method + + # + # Gets the rest of the items for the request, enabling auto-pagination. + # + # @return [Array] operation + # results. + # + def get_all_items + items = @value + page = self + while page.next_link != nil do + page = page.get_next_page + items.concat(page.value) + end + items + end + + # + # Gets the next page of results. + # + # @return [VirtualNetworkGatewayListConnectionsResult] with next page + # content. + # + def get_next_page + response = @next_method.call(@next_link).value! unless @next_method.nil? + unless response.nil? + @next_link = response.body.next_link + @value = response.body.value + self + end + end + + # + # Mapper for VirtualNetworkGatewayListConnectionsResult class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + required: false, + serialized_name: 'VirtualNetworkGatewayListConnectionsResult', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayListConnectionsResult', + model_properties: { + value: { + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serialized_name: 'VirtualNetworkGatewayConnectionListEntityElementType', + type: { + name: 'Composite', + class_name: 'VirtualNetworkGatewayConnectionListEntity' + } + } + } + }, + next_link: { + required: false, + read_only: true, + serialized_name: 'nextLink', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb index bcea63eb67..2d094c29b0 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb @@ -81,6 +81,7 @@ def self.mapper() }, next_link: { required: false, + read_only: true, serialized_name: 'nextLink', type: { name: 'String' diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb index 8f4347460a..023d0b85e4 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb @@ -29,6 +29,14 @@ class VpnClientConfiguration # network gateway. attr_accessor :vpn_client_protocols + # @return [String] The radius server address property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_address + + # @return [String] The radius secret property of the + # VirtualNetworkGateway resource for vpn client connection. + attr_accessor :radius_server_secret + # # Mapper for VpnClientConfiguration class as Ruby Hash. @@ -93,6 +101,20 @@ def self.mapper() } } } + }, + radius_server_address: { + required: false, + serialized_name: 'radiusServerAddress', + type: { + name: 'String' + } + }, + radius_server_secret: { + required: false, + serialized_name: 'radiusServerSecret', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb new file mode 100644 index 0000000000..20cb076104 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_ipconfigurations.rb @@ -0,0 +1,320 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class NetworkInterfaceIPConfigurations + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceIPConfigurations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfiguration] operation results. + # + def get(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + response = get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers).value! + end + + # + # Gets the specified network interface ip configuration. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param ip_configuration_name [String] The name of the ip configuration name. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, network_interface_name, ip_configuration_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + fail ArgumentError, 'ip_configuration_name is nil' if ip_configuration_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'ipConfigurationName' => ip_configuration_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfiguration.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfigurationListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Get all ip configurations in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceIPConfigurationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all ip configurations in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceIPConfigurationListResult] which provide lazy access + # to pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb new file mode 100644 index 0000000000..9926c12ef0 --- /dev/null +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interface_load_balancers.rb @@ -0,0 +1,225 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::ARM::Network + # + # Network Client + # + class NetworkInterfaceLoadBalancers + include MsRestAzure + + # + # Creates and initializes a new instance of the NetworkInterfaceLoadBalancers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [NetworkManagementClient] reference to the NetworkManagementClient + attr_reader :client + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) + list_async(resource_group_name, network_interface_name, custom_headers).value! + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, network_interface_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceLoadBalancerListResult] operation results. + # + def list_next(next_page_link, custom_headers = nil) + response = list_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_next_with_http_info(next_page_link, custom_headers = nil) + list_next_async(next_page_link, custom_headers).value! + end + + # + # Get all load balancers in a network interface + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::NetworkInterfaceLoadBalancerListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Get all load balancers in a network interface + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [NetworkInterfaceLoadBalancerListResult] which provide lazy access to + # pages of the response. + # + def list_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = list_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_next_async(next_page_link, custom_headers) + end + page + end + end + + end +end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb index 73d79fdb86..e4547c7cdd 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_interfaces.rb @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, network_interface_name, expand = nil def get_async(resource_group_name, network_interface_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -377,11 +377,32 @@ def list_async(resource_group_name, custom_headers = nil) # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveRouteListResult] operation results. + # @return [Array] which provide lazy access to pages of the + # response. # def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) response = get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + get_effective_route_table_next_async(next_page_link, custom_headers) + end + page + end + end + # + # Gets all route tables applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) + first_page = get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -419,11 +440,32 @@ def get_effective_route_table_async(resource_group_name, network_interface_name, # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # @return [Array] which provide lazy access to + # pages of the response. # def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) response = list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_effective_network_security_groups_next_async(next_page_link, custom_headers) + end + page + end + end + # + # Gets all network security groups applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) + first_page = list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -794,7 +836,7 @@ def begin_delete_with_http_info(resource_group_name, network_interface_name, cus def begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -882,7 +924,7 @@ def begin_create_or_update_async(resource_group_name, network_interface_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -958,11 +1000,11 @@ def begin_create_or_update_async(resource_group_name, network_interface_name, pa # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveRouteListResult] operation results. + # @return [Array] operation results. # def begin_get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) - response = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + first_page = begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -992,7 +1034,7 @@ def begin_get_effective_route_table_with_http_info(resource_group_name, network_ def begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1049,11 +1091,11 @@ def begin_get_effective_route_table_async(resource_group_name, network_interface # @param custom_headers [Hash{String => String}] A hash of custom headers that # will be added to the HTTP request. # - # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # @return [Array] operation results. # def begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) - response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! - response.body unless response.nil? + first_page = begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers) + first_page.get_all_items end # @@ -1083,7 +1125,7 @@ def begin_list_effective_network_security_groups_with_http_info(resource_group_n def begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1306,6 +1348,90 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] operation results. + # + def get_effective_route_table_next(next_page_link, custom_headers = nil) + response = get_effective_route_table_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def get_effective_route_table_next_async(next_page_link, custom_headers = nil) + # Send request + promise = begin_get_effective_route_table_next_async(next_page_link, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::EffectiveRouteListResult.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # + def list_effective_network_security_groups_next(next_page_link, custom_headers = nil) + response = list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) + # Send request + promise = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::ARM::Network::Models::EffectiveNetworkSecurityGroupListResult.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + # # Gets information about all network interfaces in a virtual machine in a # virtual machine scale set. @@ -1483,6 +1609,180 @@ def list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, promise.execute end + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] operation results. + # + def begin_get_effective_route_table_next(next_page_link, custom_headers = nil) + response = begin_get_effective_route_table_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_get_effective_route_table_next_with_http_info(next_page_link, custom_headers = nil) + begin_get_effective_route_table_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all route tables applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_get_effective_route_table_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::EffectiveRouteListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] operation results. + # + def begin_list_effective_network_security_groups_next(next_page_link, custom_headers = nil) + response = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_list_effective_network_security_groups_next_with_http_info(next_page_link, custom_headers = nil) + begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all network security groups applied to a network interface. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::EffectiveNetworkSecurityGroupListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all network interfaces in a subscription. # @@ -1572,5 +1872,49 @@ def list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_nam end end + # + # Gets all route tables applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveRouteListResult] which provide lazy access to pages of the + # response. + # + def begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + begin_get_effective_route_table_next_async(next_page_link, custom_headers) + end + page + end + end + + # + # Gets all network security groups applied to a network interface. + # + # @param resource_group_name [String] The name of the resource group. + # @param network_interface_name [String] The name of the network interface. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [EffectiveNetworkSecurityGroupListResult] which provide lazy access + # to pages of the response. + # + def begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) + response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb index 870dc97ff4..fb01df9a4b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_management_client.rb @@ -52,25 +52,52 @@ class NetworkManagementClient < MsRestAzure::AzureServiceClient # @return [LoadBalancers] load_balancers attr_reader :load_balancers + # @return [LoadBalancerBackendAddressPools] + # load_balancer_backend_address_pools + attr_reader :load_balancer_backend_address_pools + + # @return [LoadBalancerFrontendIPConfigurations] + # load_balancer_frontend_ipconfigurations + attr_reader :load_balancer_frontend_ipconfigurations + + # @return [InboundNatRules] inbound_nat_rules + attr_reader :inbound_nat_rules + + # @return [LoadBalancerLoadBalancingRules] + # load_balancer_load_balancing_rules + attr_reader :load_balancer_load_balancing_rules + + # @return [LoadBalancerNetworkInterfaces] load_balancer_network_interfaces + attr_reader :load_balancer_network_interfaces + + # @return [LoadBalancerProbes] load_balancer_probes + attr_reader :load_balancer_probes + # @return [NetworkInterfaces] network_interfaces attr_reader :network_interfaces + # @return [NetworkInterfaceIPConfigurations] + # network_interface_ipconfigurations + attr_reader :network_interface_ipconfigurations + + # @return [NetworkInterfaceLoadBalancers] network_interface_load_balancers + attr_reader :network_interface_load_balancers + # @return [NetworkSecurityGroups] network_security_groups attr_reader :network_security_groups # @return [SecurityRules] security_rules attr_reader :security_rules + # @return [DefaultSecurityRules] default_security_rules + attr_reader :default_security_rules + # @return [NetworkWatchers] network_watchers attr_reader :network_watchers # @return [PacketCaptures] packet_captures attr_reader :packet_captures - # @return [AvailablePrivateAccessServices] - # available_private_access_services - attr_reader :available_private_access_services - # @return [PublicIPAddresses] public_ipaddresses attr_reader :public_ipaddresses @@ -130,12 +157,20 @@ def initialize(credentials = nil, base_url = nil, options = nil) @express_route_circuits = ExpressRouteCircuits.new(self) @express_route_service_providers = ExpressRouteServiceProviders.new(self) @load_balancers = LoadBalancers.new(self) + @load_balancer_backend_address_pools = LoadBalancerBackendAddressPools.new(self) + @load_balancer_frontend_ipconfigurations = LoadBalancerFrontendIPConfigurations.new(self) + @inbound_nat_rules = InboundNatRules.new(self) + @load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRules.new(self) + @load_balancer_network_interfaces = LoadBalancerNetworkInterfaces.new(self) + @load_balancer_probes = LoadBalancerProbes.new(self) @network_interfaces = NetworkInterfaces.new(self) + @network_interface_ipconfigurations = NetworkInterfaceIPConfigurations.new(self) + @network_interface_load_balancers = NetworkInterfaceLoadBalancers.new(self) @network_security_groups = NetworkSecurityGroups.new(self) @security_rules = SecurityRules.new(self) + @default_security_rules = DefaultSecurityRules.new(self) @network_watchers = NetworkWatchers.new(self) @packet_captures = PacketCaptures.new(self) - @available_private_access_services = AvailablePrivateAccessServices.new(self) @public_ipaddresses = PublicIPAddresses.new(self) @route_filters = RouteFilters.new(self) @route_filter_rules = RouteFilterRules.new(self) @@ -254,7 +289,7 @@ def check_dns_name_availability_with_http_info(location, domain_name_label = nil # def check_dns_name_availability_async(location, domain_name_label = nil, custom_headers = nil) fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, 'subscription_id is nil' if subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb index de705f5cff..1d084abf19 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_security_groups.rb @@ -109,7 +109,7 @@ def get_with_http_info(resource_group_name, network_security_group_name, expand def get_async(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -240,7 +240,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -327,7 +327,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -420,7 +420,7 @@ def begin_delete_with_http_info(resource_group_name, network_security_group_name def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -511,7 +511,7 @@ def begin_create_or_update_async(resource_group_name, network_security_group_nam fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb index 25b89e23b6..a97e21d5a5 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/network_watchers.rb @@ -70,7 +70,7 @@ def create_or_update_async(resource_group_name, network_watcher_name, parameters fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -180,7 +180,7 @@ def get_with_http_info(resource_group_name, network_watcher_name, custom_headers def get_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -305,7 +305,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -388,7 +388,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -486,7 +486,7 @@ def get_topology_async(resource_group_name, network_watcher_name, parameters, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -972,7 +972,7 @@ def begin_delete_with_http_info(resource_group_name, network_watcher_name, custo def begin_delete_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1063,7 +1063,7 @@ def begin_verify_ipflow_async(resource_group_name, network_watcher_name, paramet fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1180,7 +1180,7 @@ def begin_get_next_hop_async(resource_group_name, network_watcher_name, paramete fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1297,7 +1297,7 @@ def begin_get_vmsecurity_rules_async(resource_group_name, network_watcher_name, fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1417,7 +1417,7 @@ def begin_get_troubleshooting_async(resource_group_name, network_watcher_name, p fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1537,7 +1537,7 @@ def begin_get_troubleshooting_result_async(resource_group_name, network_watcher_ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1660,7 +1660,7 @@ def begin_set_flow_log_configuration_async(resource_group_name, network_watcher_ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1783,7 +1783,7 @@ def begin_get_flow_log_status_async(resource_group_name, network_watcher_name, p fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1912,7 +1912,7 @@ def begin_check_connectivity_async(resource_group_name, network_watcher_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb index cdd1e0be35..1c5dc0e89e 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/packet_captures.rb @@ -115,7 +115,7 @@ def get_async(resource_group_name, network_watcher_name, packet_capture_name, cu fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -337,7 +337,7 @@ def list_with_http_info(resource_group_name, network_watcher_name, custom_header def list_async(resource_group_name, network_watcher_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -439,7 +439,7 @@ def begin_create_async(resource_group_name, network_watcher_name, packet_capture fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -542,7 +542,7 @@ def begin_delete_async(resource_group_name, network_watcher_name, packet_capture fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -626,7 +626,7 @@ def begin_stop_async(resource_group_name, network_watcher_name, packet_capture_n fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -717,7 +717,7 @@ def begin_get_status_async(resource_group_name, network_watcher_name, packet_cap fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_watcher_name is nil' if network_watcher_name.nil? fail ArgumentError, 'packet_capture_name is nil' if packet_capture_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb index b83664be16..cb9d5ffb0d 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/public_ipaddresses.rb @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, public_ip_address_name, expand = nil def get_async(resource_group_name, public_ip_address_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -729,7 +729,7 @@ def begin_delete_with_http_info(resource_group_name, public_ip_address_name, cus def begin_delete_async(resource_group_name, public_ip_address_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -817,7 +817,7 @@ def begin_create_or_update_async(resource_group_name, public_ip_address_name, pa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb index 6c10f94e47..560e05402c 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filter_rules.rb @@ -107,7 +107,7 @@ def get_async(resource_group_name, route_filter_name, rule_name, custom_headers fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -294,7 +294,7 @@ def list_by_route_filter_with_http_info(resource_group_name, route_filter_name, def list_by_route_filter_async(resource_group_name, route_filter_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -388,7 +388,7 @@ def begin_delete_async(resource_group_name, route_filter_name, rule_name, custom fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -480,7 +480,7 @@ def begin_create_or_update_async(resource_group_name, route_filter_name, rule_na fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -601,7 +601,7 @@ def begin_update_async(resource_group_name, route_filter_name, rule_name, route_ fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'rule_name is nil' if rule_name.nil? fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb index e043e265f8..4563f34c9a 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_filters.rb @@ -107,7 +107,7 @@ def get_with_http_info(resource_group_name, route_filter_name, expand = nil, cus def get_async(resource_group_name, route_filter_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -286,7 +286,7 @@ def list_by_resource_group_with_http_info(resource_group_name, custom_headers = # def list_by_resource_group_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -369,7 +369,7 @@ def list_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -459,7 +459,7 @@ def begin_delete_with_http_info(resource_group_name, route_filter_name, custom_h def begin_delete_async(resource_group_name, route_filter_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -547,7 +547,7 @@ def begin_create_or_update_async(resource_group_name, route_filter_name, route_f fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'route_filter_parameters is nil' if route_filter_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -664,7 +664,7 @@ def begin_update_async(resource_group_name, route_filter_name, route_filter_para fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil? fail ArgumentError, 'route_filter_parameters is nil' if route_filter_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb index c77ec11d45..8d01932aa9 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/route_tables.rb @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, route_table_name, expand = nil, cust def get_async(resource_group_name, route_table_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -237,7 +237,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -410,7 +410,7 @@ def begin_delete_with_http_info(resource_group_name, route_table_name, custom_he def begin_delete_async(resource_group_name, route_table_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -498,7 +498,7 @@ def begin_create_or_update_async(resource_group_name, route_table_name, paramete fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb index ee99260f57..5e6d744900 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/routes.rb @@ -107,7 +107,7 @@ def get_async(resource_group_name, route_table_name, route_name, custom_headers fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -246,7 +246,7 @@ def list_with_http_info(resource_group_name, route_table_name, custom_headers = def list_async(resource_group_name, route_table_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -340,7 +340,7 @@ def begin_delete_async(resource_group_name, route_table_name, route_name, custom fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -432,7 +432,7 @@ def begin_create_or_update_async(resource_group_name, route_table_name, route_na fail ArgumentError, 'route_table_name is nil' if route_table_name.nil? fail ArgumentError, 'route_name is nil' if route_name.nil? fail ArgumentError, 'route_parameters is nil' if route_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb index 77980315a1..68c445432b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/security_rules.rb @@ -112,7 +112,7 @@ def get_async(resource_group_name, network_security_group_name, security_rule_na fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -256,7 +256,7 @@ def list_with_http_info(resource_group_name, network_security_group_name, custom def list_async(resource_group_name, network_security_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -353,7 +353,7 @@ def begin_delete_async(resource_group_name, network_security_group_name, securit fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -448,7 +448,7 @@ def begin_create_or_update_async(resource_group_name, network_security_group_nam fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil? fail ArgumentError, 'security_rule_name is nil' if security_rule_name.nil? fail ArgumentError, 'security_rule_parameters is nil' if security_rule_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb index 81fa36602d..13b33c8dbb 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/subnets.rb @@ -110,7 +110,7 @@ def get_async(resource_group_name, virtual_network_name, subnet_name, expand = n fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -249,7 +249,7 @@ def list_with_http_info(resource_group_name, virtual_network_name, custom_header def list_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -343,7 +343,7 @@ def begin_delete_async(resource_group_name, virtual_network_name, subnet_name, c fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -435,7 +435,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, subn fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'subnet_name is nil' if subnet_name.nil? fail ArgumentError, 'subnet_parameters is nil' if subnet_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb index 9bdf4fdb72..a533cb0a0f 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/usages.rb @@ -59,7 +59,7 @@ def list_with_http_info(location, custom_headers = nil) # def list_async(location, custom_headers = nil) fail ArgumentError, 'location is nil' if location.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb index 74dc975ad4..c7609e88c1 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb @@ -115,7 +115,7 @@ def get_with_http_info(resource_group_name, virtual_network_gateway_connection_n def get_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -307,7 +307,7 @@ def get_shared_key_with_http_info(resource_group_name, virtual_network_gateway_c def get_shared_key_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -397,7 +397,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -554,7 +554,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_gateway_co fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -666,7 +666,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_con def begin_delete_async(resource_group_name, virtual_network_gateway_connection_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -766,7 +766,7 @@ def begin_set_shared_key_async(resource_group_name, virtual_network_gateway_conn fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -898,7 +898,7 @@ def begin_reset_shared_key_async(resource_group_name, virtual_network_gateway_co fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_connection_name is nil' if virtual_network_gateway_connection_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb index 3e2a713113..c149639a22 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_gateways.rb @@ -114,7 +114,7 @@ def get_with_http_info(resource_group_name, virtual_network_gateway_name, custom def get_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -241,7 +241,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -290,6 +290,100 @@ def list_async(resource_group_name, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Array] operation results. + # + def list_connections(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + first_page = list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers) + first_page.get_all_items + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_connections_with_http_info(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? + api_version = '2017-08-01' + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkGatewayName' => virtual_network_gateway_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayListConnectionsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Resets the primary of the virtual network gateway in the specified resource # group. @@ -639,7 +733,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_gateway_na fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -751,7 +845,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_gateway_nam def begin_delete_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -844,7 +938,7 @@ def begin_reset_with_http_info(resource_group_name, virtual_network_gateway_name def begin_reset_async(resource_group_name, virtual_network_gateway_name, gateway_vip = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -948,7 +1042,7 @@ def begin_generatevpnclientpackage_async(resource_group_name, virtual_network_ga fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1067,7 +1161,7 @@ def begin_generate_vpn_profile_async(resource_group_name, virtual_network_gatewa fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1179,7 +1273,7 @@ def begin_get_bgp_peer_status_with_http_info(resource_group_name, virtual_networ def begin_get_bgp_peer_status_async(resource_group_name, virtual_network_gateway_name, peer = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1276,7 +1370,7 @@ def begin_get_learned_routes_with_http_info(resource_group_name, virtual_network def begin_get_learned_routes_async(resource_group_name, virtual_network_gateway_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1377,7 +1471,7 @@ def begin_get_advertised_routes_async(resource_group_name, virtual_network_gatew fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_gateway_name is nil' if virtual_network_gateway_name.nil? fail ArgumentError, 'peer is nil' if peer.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -1513,6 +1607,93 @@ def list_next_async(next_page_link, custom_headers = nil) promise.execute end + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualNetworkGatewayListConnectionsResult] operation results. + # + def list_connections_next(next_page_link, custom_headers = nil) + response = list_connections_next_async(next_page_link, custom_headers).value! + response.body unless response.nil? + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_connections_next_with_http_info(next_page_link, custom_headers = nil) + list_connections_next_async(next_page_link, custom_headers).value! + end + + # + # Gets all the connections in a virtual network gateway. + # + # @param next_page_link [String] The NextLink from the previous successful call + # to List operation. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_connections_next_async(next_page_link, custom_headers = nil) + fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? + + + request_headers = {} + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = '{nextLink}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + skip_encoding_path_params: {'nextLink' => next_page_link}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::ARM::Network::Models::VirtualNetworkGatewayListConnectionsResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + # # Gets all virtual network gateways by resource group. # @@ -1534,5 +1715,28 @@ def list_as_lazy(resource_group_name, custom_headers = nil) end end + # + # Gets all the connections in a virtual network gateway. + # + # @param resource_group_name [String] The name of the resource group. + # @param virtual_network_gateway_name [String] The name of the virtual network + # gateway. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [VirtualNetworkGatewayListConnectionsResult] which provide lazy + # access to pages of the response. + # + def list_connections_as_lazy(resource_group_name, virtual_network_gateway_name, custom_headers = nil) + response = list_connections_async(resource_group_name, virtual_network_gateway_name, custom_headers).value! + unless response.nil? + page = response.body + page.next_method = Proc.new do |next_page_link| + list_connections_next_async(next_page_link, custom_headers) + end + page + end + end + end end diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb index 4dc23305b2..d3d5603c9b 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_network_peerings.rb @@ -112,7 +112,7 @@ def get_async(resource_group_name, virtual_network_name, virtual_network_peering fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -251,7 +251,7 @@ def list_with_http_info(resource_group_name, virtual_network_name, custom_header def list_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -348,7 +348,7 @@ def begin_delete_async(resource_group_name, virtual_network_name, virtual_networ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -440,7 +440,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, virt fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'virtual_network_peering_name is nil' if virtual_network_peering_name.nil? fail ArgumentError, 'virtual_network_peering_parameters is nil' if virtual_network_peering_parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? diff --git a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb index d94fc784d9..60315e4cbf 100644 --- a/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb +++ b/management/azure_mgmt_network/lib/generated/azure_mgmt_network/virtual_networks.rb @@ -104,7 +104,7 @@ def get_with_http_info(resource_group_name, virtual_network_name, expand = nil, def get_async(resource_group_name, virtual_network_name, expand = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -233,7 +233,7 @@ def list_all_with_http_info(custom_headers = nil) # @return [Concurrent::Promise] Promise object which holds the HTTP response. # def list_all_async(custom_headers = nil) - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -320,7 +320,7 @@ def list_with_http_info(resource_group_name, custom_headers = nil) # def list_async(resource_group_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -414,7 +414,7 @@ def check_ipaddress_availability_with_http_info(resource_group_name, virtual_net def check_ipaddress_availability_async(resource_group_name, virtual_network_name, ip_address = nil, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -505,7 +505,7 @@ def list_usage_with_http_info(resource_group_name, virtual_network_name, custom_ def list_usage_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -595,7 +595,7 @@ def begin_delete_with_http_info(resource_group_name, virtual_network_name, custo def begin_delete_async(resource_group_name, virtual_network_name, custom_headers = nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? @@ -683,7 +683,7 @@ def begin_create_or_update_async(resource_group_name, virtual_network_name, para fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? - api_version = '2017-06-01' + api_version = '2017-08-01' fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?