diff --git a/azurerm/data_source_express_route_circuit.go b/azurerm/data_source_express_route_circuit.go index 8e8f18cfd0dc..9c443ef65e40 100644 --- a/azurerm/data_source_express_route_circuit.go +++ b/azurerm/data_source_express_route_circuit.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/data_source_loadbalancer.go b/azurerm/data_source_loadbalancer.go index cee6def390a9..45c18c9c76c7 100644 --- a/azurerm/data_source_loadbalancer.go +++ b/azurerm/data_source_loadbalancer.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/data_source_private_link_service_endpoint_connections.go b/azurerm/data_source_private_link_service_endpoint_connections.go index 47c37f9cec42..94b43fbe5765 100644 --- a/azurerm/data_source_private_link_service_endpoint_connections.go +++ b/azurerm/data_source_private_link_service_endpoint_connections.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" aznet "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network" diff --git a/azurerm/data_source_public_ips.go b/azurerm/data_source_public_ips.go index 09f46a3f9ffa..d27db91d1242 100644 --- a/azurerm/data_source_public_ips.go +++ b/azurerm/data_source_public_ips.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/data_source_route_table.go b/azurerm/data_source_route_table.go index 6ca4d6730045..8cce06c10449 100644 --- a/azurerm/data_source_route_table.go +++ b/azurerm/data_source_route_table.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/data_source_virtual_hub.go b/azurerm/data_source_virtual_hub.go index 80c98df9fea5..f3e506246587 100644 --- a/azurerm/data_source_virtual_hub.go +++ b/azurerm/data_source_virtual_hub.go @@ -41,70 +41,6 @@ func dataSourceArmVirtualHub() *schema.Resource { Computed: true, }, - "s2s_vpn_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "p2s_vpn_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "express_route_gateway_id": { - Type: schema.TypeString, - Computed: true, - }, - - "virtual_network_connection": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "name": { - Type: schema.TypeString, - Computed: true, - }, - "remote_virtual_network_id": { - Type: schema.TypeString, - Computed: true, - }, - "allow_hub_to_remote_vnet_transit": { - Type: schema.TypeBool, - Computed: true, - }, - "allow_remote_vnet_to_use_hub_vnet_gateways": { - Type: schema.TypeBool, - Computed: true, - }, - "enable_internet_security": { - Type: schema.TypeBool, - Computed: true, - }, - }, - }, - }, - - "route": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "address_prefixes": { - Type: schema.TypeList, - Computed: true, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, - }, - "next_hop_ip_address": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - }, - "tags": tags.SchemaDataSource(), }, } @@ -136,37 +72,11 @@ func dataSourceArmVirtualHubRead(d *schema.ResourceData, meta interface{}) error if props := resp.VirtualHubProperties; props != nil { d.Set("address_prefix", props.AddressPrefix) - var expressRouteGatewayId *string - if props.ExpressRouteGateway != nil { - expressRouteGatewayId = props.ExpressRouteGateway.ID - } - d.Set("express_route_gateway_id", expressRouteGatewayId) - - var p2sVpnGatewayId *string - if props.P2SVpnGateway != nil { - p2sVpnGatewayId = props.P2SVpnGateway.ID - } - d.Set("p2s_vpn_gateway_id", p2sVpnGatewayId) - - if err := d.Set("route", flattenArmVirtualHubRoute(props.RouteTable)); err != nil { - return fmt.Errorf("Error setting `route`: %+v", err) - } - - var vpnGatewayId *string - if props.VpnGateway != nil { - vpnGatewayId = props.VpnGateway.ID - } - d.Set("s2s_vpn_gateway_id", vpnGatewayId) - var virtualWanId *string if props.VirtualWan != nil { virtualWanId = props.VirtualWan.ID } d.Set("virtual_wan_id", virtualWanId) - - if err := d.Set("virtual_network_connection", flattenArmVirtualHubVirtualNetworkConnection(props.VirtualNetworkConnections)); err != nil { - return fmt.Errorf("Error setting `virtual_network_connection`: %+v", err) - } } return tags.FlattenAndSet(d, resp.Tags) diff --git a/azurerm/data_source_virtual_hub_test.go b/azurerm/data_source_virtual_hub_test.go index 3910697624c9..9a1b57c5c44a 100644 --- a/azurerm/data_source_virtual_hub_test.go +++ b/azurerm/data_source_virtual_hub_test.go @@ -34,8 +34,8 @@ func testAccDataSourceVirtualHub_basic(rInt int, location string) string { %s data "azurerm_virtual_hub" "test" { - name = "${azurerm_virtual_hub.test.name}" - resource_group_name = "${azurerm_virtual_hub.test.resource_group_name}" + name = azurerm_virtual_hub.test.name + resource_group_name = azurerm_virtual_hub.test.resource_group_name } `, config) } diff --git a/azurerm/data_source_virtual_network.go b/azurerm/data_source_virtual_network.go index ecf0f09ca1ba..db2c380c10f7 100644 --- a/azurerm/data_source_virtual_network.go +++ b/azurerm/data_source_virtual_network.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/data_source_virtual_network_gateway.go b/azurerm/data_source_virtual_network_gateway.go index 1a7204d4d87e..0e0271e3c595 100644 --- a/azurerm/data_source_virtual_network_gateway.go +++ b/azurerm/data_source_virtual_network_gateway.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/data_source_virtual_network_gateway_connection.go b/azurerm/data_source_virtual_network_gateway_connection.go index 2e24a8fd009b..f10f8171e1f5 100644 --- a/azurerm/data_source_virtual_network_gateway_connection.go +++ b/azurerm/data_source_virtual_network_gateway_connection.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" diff --git a/azurerm/data_source_virtual_network_gateway_connection_test.go b/azurerm/data_source_virtual_network_gateway_connection_test.go index 49009dbb0bba..6795cc6ffe88 100644 --- a/azurerm/data_source_virtual_network_gateway_connection_test.go +++ b/azurerm/data_source_virtual_network_gateway_connection_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/helpers/azure/network_interface.go b/azurerm/helpers/azure/network_interface.go index 5c3e5aba06eb..a81db0bef256 100644 --- a/azurerm/helpers/azure/network_interface.go +++ b/azurerm/helpers/azure/network_interface.go @@ -1,6 +1,6 @@ package azure -import "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" +import "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" func FindNetworkInterfaceIPConfiguration(input *[]network.InterfaceIPConfiguration, name string) *network.InterfaceIPConfiguration { if input == nil { diff --git a/azurerm/internal/services/network/client.go b/azurerm/internal/services/network/client.go index 1a4f87591ff2..cd4da497417a 100644 --- a/azurerm/internal/services/network/client.go +++ b/azurerm/internal/services/network/client.go @@ -1,7 +1,7 @@ package network import ( - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common" ) @@ -18,6 +18,7 @@ type Client struct { InterfacesClient *network.InterfacesClient LoadBalancersClient *network.LoadBalancersClient LocalNetworkGatewaysClient *network.LocalNetworkGatewaysClient + PointToSiteVpnGatewaysClient *network.P2sVpnGatewaysClient ProfileClient *network.ProfilesClient PacketCapturesClient *network.PacketCapturesClient PublicIPsClient *network.PublicIPAddressesClient @@ -33,6 +34,8 @@ type Client struct { VnetPeeringsClient *network.VirtualNetworkPeeringsClient VirtualWanClient *network.VirtualWansClient VirtualHubClient *network.VirtualHubsClient + VpnGatewaysClient *network.VpnGatewaysClient + VpnServerConfigurationsClient *network.VpnServerConfigurationsClient WatcherClient *network.WatchersClient WebApplicationFirewallPoliciesClient *network.WebApplicationFirewallPoliciesClient PrivateLinkServiceClient *network.PrivateLinkServicesClient @@ -75,6 +78,12 @@ func BuildClient(o *common.ClientOptions) *Client { LocalNetworkGatewaysClient := network.NewLocalNetworkGatewaysClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&LocalNetworkGatewaysClient.Client, o.ResourceManagerAuthorizer) + pointToSiteVpnGatewaysClient := network.NewP2sVpnGatewaysClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + o.ConfigureClient(&pointToSiteVpnGatewaysClient.Client, o.ResourceManagerAuthorizer) + + vpnServerConfigurationsClient := network.NewVpnServerConfigurationsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + o.ConfigureClient(&vpnServerConfigurationsClient.Client, o.ResourceManagerAuthorizer) + ProfileClient := network.NewProfilesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&ProfileClient.Client, o.ResourceManagerAuthorizer) @@ -123,6 +132,9 @@ func BuildClient(o *common.ClientOptions) *Client { VirtualHubClient := network.NewVirtualHubsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&VirtualHubClient.Client, o.ResourceManagerAuthorizer) + vpnGatewaysClient := network.NewVpnGatewaysClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + o.ConfigureClient(&vpnGatewaysClient.Client, o.ResourceManagerAuthorizer) + WatcherClient := network.NewWatchersClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&WatcherClient.Client, o.ResourceManagerAuthorizer) @@ -142,6 +154,7 @@ func BuildClient(o *common.ClientOptions) *Client { InterfacesClient: &InterfacesClient, LoadBalancersClient: &LoadBalancersClient, LocalNetworkGatewaysClient: &LocalNetworkGatewaysClient, + PointToSiteVpnGatewaysClient: &pointToSiteVpnGatewaysClient, ProfileClient: &ProfileClient, PacketCapturesClient: &PacketCapturesClient, PublicIPsClient: &PublicIPsClient, @@ -157,6 +170,8 @@ func BuildClient(o *common.ClientOptions) *Client { VnetPeeringsClient: &VnetPeeringsClient, VirtualWanClient: &VirtualWanClient, VirtualHubClient: &VirtualHubClient, + VpnGatewaysClient: &vpnGatewaysClient, + VpnServerConfigurationsClient: &vpnServerConfigurationsClient, WatcherClient: &WatcherClient, WebApplicationFirewallPoliciesClient: &WebApplicationFirewallPoliciesClient, PrivateLinkServiceClient: &PrivateLinkServiceClient, diff --git a/azurerm/internal/services/network/point_to_site_vpn_gateway.go b/azurerm/internal/services/network/point_to_site_vpn_gateway.go new file mode 100644 index 000000000000..3004cf960e2c --- /dev/null +++ b/azurerm/internal/services/network/point_to_site_vpn_gateway.go @@ -0,0 +1,31 @@ +package network + +import ( + "fmt" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +type PointToSiteVPNGatewayResourceID struct { + Base azure.ResourceID + + Name string +} + +func ParsePointToSiteVPNGatewayID(input string) (*PointToSiteVPNGatewayResourceID, error) { + id, err := azure.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("[ERROR] Unable to parse Point-to-Site VPN Gateway ID %q: %+v", input, err) + } + + routeTable := PointToSiteVPNGatewayResourceID{ + Base: *id, + Name: id.Path["p2sVpnGateways"], + } + + if routeTable.Name == "" { + return nil, fmt.Errorf("ID was missing the `p2sVpnGateways` element") + } + + return &routeTable, nil +} diff --git a/azurerm/internal/services/network/point_to_site_vpn_gateway_test.go b/azurerm/internal/services/network/point_to_site_vpn_gateway_test.go new file mode 100644 index 000000000000..2c605de0f838 --- /dev/null +++ b/azurerm/internal/services/network/point_to_site_vpn_gateway_test.go @@ -0,0 +1,62 @@ +package network + +import ( + "testing" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +func TestParsePointToSiteVPNGateway(t *testing.T) { + testData := []struct { + Name string + Input string + Expected *PointToSiteVPNGatewayResourceID + }{ + { + Name: "Empty", + Input: "", + Expected: nil, + }, + { + Name: "No Point-to-Site VPN Gateways Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Expected: nil, + }, + { + Name: "No Point-to-Site VPN Gateways Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/p2sVpnGateways/", + Expected: nil, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/p2sVpnGateways/example", + Expected: &PointToSiteVPNGatewayResourceID{ + Name: "example", + Base: azure.ResourceID{ + ResourceGroup: "foo", + }, + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Name) + + actual, err := ParsePointToSiteVPNGatewayID(v.Input) + if err != nil { + if v.Expected == nil { + continue + } + + t.Fatalf("Expected a value but got an error: %s", err) + } + + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + + if actual.Base.ResourceGroup != v.Expected.Base.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.Base.ResourceGroup, actual.Base.ResourceGroup) + } + } +} diff --git a/azurerm/internal/services/network/virtual_hub.go b/azurerm/internal/services/network/virtual_hub.go new file mode 100644 index 000000000000..b17026e19dbb --- /dev/null +++ b/azurerm/internal/services/network/virtual_hub.go @@ -0,0 +1,44 @@ +package network + +import ( + "fmt" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +type VirtualHubResourceID struct { + Base azure.ResourceID + + Name string +} + +func ParseVirtualHubID(input string) (*VirtualHubResourceID, error) { + id, err := azure.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("[ERROR] Unable to parse Virtual Hub ID %q: %+v", input, err) + } + + virtualHub := VirtualHubResourceID{ + Base: *id, + Name: id.Path["virtualHubs"], + } + + if virtualHub.Name == "" { + return nil, fmt.Errorf("ID was missing the `virtualHubs` element") + } + + return &virtualHub, nil +} + +func ValidateVirtualHubID(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + return nil, []error{fmt.Errorf("expected type of %q to be string", k)} + } + + if _, err := ParseVirtualHubID(v); err != nil { + return nil, []error{err} + } + + return nil, nil +} diff --git a/azurerm/internal/services/network/virtual_hub_test.go b/azurerm/internal/services/network/virtual_hub_test.go new file mode 100644 index 000000000000..32f06498c2aa --- /dev/null +++ b/azurerm/internal/services/network/virtual_hub_test.go @@ -0,0 +1,101 @@ +package network + +import ( + "testing" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +func TestParseVirtualHub(t *testing.T) { + testData := []struct { + Name string + Input string + Expected *VirtualHubResourceID + }{ + { + Name: "Empty", + Input: "", + Expected: nil, + }, + { + Name: "No Virtual Hubs Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Expected: nil, + }, + { + Name: "No Virtual Hubs Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualHubs/", + Expected: nil, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualHubs/example", + Expected: &VirtualHubResourceID{ + Name: "example", + Base: azure.ResourceID{ + ResourceGroup: "foo", + }, + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Name) + + actual, err := ParseVirtualHubID(v.Input) + if err != nil { + if v.Expected == nil { + continue + } + + t.Fatalf("Expected a value but got an error: %s", err) + } + + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + + if actual.Base.ResourceGroup != v.Expected.Base.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.Base.ResourceGroup, actual.Base.ResourceGroup) + } + } +} + +func TestValidateVirtualHub(t *testing.T) { + testData := []struct { + Name string + Input string + Valid bool + }{ + { + Name: "Empty", + Input: "", + Valid: false, + }, + { + Name: "No Virtual Hubs Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Valid: false, + }, + { + Name: "No Virtual Hubs Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualHubs/", + Valid: false, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualHubs/example", + Valid: true, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + _, errors := ValidateVirtualHubID(v.Input, "virtual_hub_id") + isValid := len(errors) == 0 + if v.Valid != isValid { + t.Fatalf("Expected %t but got %t", v.Valid, isValid) + } + } +} diff --git a/azurerm/internal/services/network/virtual_wan.go b/azurerm/internal/services/network/virtual_wan.go new file mode 100644 index 000000000000..2613d4c461ef --- /dev/null +++ b/azurerm/internal/services/network/virtual_wan.go @@ -0,0 +1,44 @@ +package network + +import ( + "fmt" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +type VirtualWanResourceID struct { + Base azure.ResourceID + + Name string +} + +func ParseVirtualWanID(input string) (*VirtualWanResourceID, error) { + id, err := azure.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("[ERROR] Unable to parse Virtual Wan ID %q: %+v", input, err) + } + + virtualWan := VirtualWanResourceID{ + Base: *id, + Name: id.Path["virtualWans"], + } + + if virtualWan.Name == "" { + return nil, fmt.Errorf("ID was missing the `virtualWans` element") + } + + return &virtualWan, nil +} + +func ValidateVirtualWanID(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + return nil, []error{fmt.Errorf("expected type of %q to be string", k)} + } + + if _, err := ParseVirtualWanID(v); err != nil { + return nil, []error{err} + } + + return nil, nil +} diff --git a/azurerm/internal/services/network/virtual_wan_test.go b/azurerm/internal/services/network/virtual_wan_test.go new file mode 100644 index 000000000000..dfc4f75e2283 --- /dev/null +++ b/azurerm/internal/services/network/virtual_wan_test.go @@ -0,0 +1,101 @@ +package network + +import ( + "testing" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +func TestParseVirtualWan(t *testing.T) { + testData := []struct { + Name string + Input string + Expected *VirtualWanResourceID + }{ + { + Name: "Empty", + Input: "", + Expected: nil, + }, + { + Name: "No Virtual Wans Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Expected: nil, + }, + { + Name: "No Virtual Wans Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualWans/", + Expected: nil, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualWans/example", + Expected: &VirtualWanResourceID{ + Name: "example", + Base: azure.ResourceID{ + ResourceGroup: "foo", + }, + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Name) + + actual, err := ParseVirtualWanID(v.Input) + if err != nil { + if v.Expected == nil { + continue + } + + t.Fatalf("Expected a value but got an error: %s", err) + } + + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + + if actual.Base.ResourceGroup != v.Expected.Base.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.Base.ResourceGroup, actual.Base.ResourceGroup) + } + } +} + +func TestValidateVirtualWan(t *testing.T) { + testData := []struct { + Name string + Input string + Valid bool + }{ + { + Name: "Empty", + Input: "", + Valid: false, + }, + { + Name: "No Virtual Wans Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Valid: false, + }, + { + Name: "No Virtual Wans Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualWans/", + Valid: false, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/virtualWans/example", + Valid: true, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + _, errors := ValidateVirtualWanID(v.Input, "virtual_wan_id") + isValid := len(errors) == 0 + if v.Valid != isValid { + t.Fatalf("Expected %t but got %t", v.Valid, isValid) + } + } +} diff --git a/azurerm/internal/services/network/vpn_gateway.go b/azurerm/internal/services/network/vpn_gateway.go new file mode 100644 index 000000000000..82dd61fb2448 --- /dev/null +++ b/azurerm/internal/services/network/vpn_gateway.go @@ -0,0 +1,31 @@ +package network + +import ( + "fmt" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +type VPNGatewayResourceID struct { + Base azure.ResourceID + + Name string +} + +func ParseVPNGatewayID(input string) (*VPNGatewayResourceID, error) { + id, err := azure.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("[ERROR] Unable to parse VPN Gateway ID %q: %+v", input, err) + } + + gateway := VPNGatewayResourceID{ + Base: *id, + Name: id.Path["vpnGateways"], + } + + if gateway.Name == "" { + return nil, fmt.Errorf("ID was missing the `vpnGateways` element") + } + + return &gateway, nil +} diff --git a/azurerm/internal/services/network/vpn_gateway_test.go b/azurerm/internal/services/network/vpn_gateway_test.go new file mode 100644 index 000000000000..67654596aa0f --- /dev/null +++ b/azurerm/internal/services/network/vpn_gateway_test.go @@ -0,0 +1,62 @@ +package network + +import ( + "testing" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +func TestParseVPNGateway(t *testing.T) { + testData := []struct { + Name string + Input string + Expected *VPNGatewayResourceID + }{ + { + Name: "Empty", + Input: "", + Expected: nil, + }, + { + Name: "No VPN Gateways Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Expected: nil, + }, + { + Name: "No VPN Gateways Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnGateways/", + Expected: nil, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnGateways/example", + Expected: &VPNGatewayResourceID{ + Name: "example", + Base: azure.ResourceID{ + ResourceGroup: "foo", + }, + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Name) + + actual, err := ParseVPNGatewayID(v.Input) + if err != nil { + if v.Expected == nil { + continue + } + + t.Fatalf("Expected a value but got an error: %s", err) + } + + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + + if actual.Base.ResourceGroup != v.Expected.Base.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.Base.ResourceGroup, actual.Base.ResourceGroup) + } + } +} diff --git a/azurerm/internal/services/network/vpn_server_configuration.go b/azurerm/internal/services/network/vpn_server_configuration.go new file mode 100644 index 000000000000..3da806c153d3 --- /dev/null +++ b/azurerm/internal/services/network/vpn_server_configuration.go @@ -0,0 +1,43 @@ +package network + +import ( + "fmt" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +type VpnServerConfigurationResourceID struct { + Base azure.ResourceID + + Name string +} + +func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationResourceID, error) { + id, err := azure.ParseAzureResourceID(input) + if err != nil { + return nil, fmt.Errorf("[ERROR] Unable to parse VPN Server Configuration ID %q: %+v", input, err) + } + + vpnServerConfigurationResourceID := VpnServerConfigurationResourceID{ + Base: *id, + Name: id.Path["vpnServerConfigurations"], + } + if vpnServerConfigurationResourceID.Name == "" { + return nil, fmt.Errorf("ID was missing the `vpnServerConfigurations` element") + } + + return &vpnServerConfigurationResourceID, nil +} + +func ValidateVpnServerConfigurationID(i interface{}, k string) (warnings []string, errors []error) { + v, ok := i.(string) + if !ok { + return nil, []error{fmt.Errorf("expected type of %q to be string", k)} + } + + if _, err := ParseVpnServerConfigurationID(v); err != nil { + return nil, []error{err} + } + + return nil, nil +} diff --git a/azurerm/internal/services/network/vpn_server_configuration_test.go b/azurerm/internal/services/network/vpn_server_configuration_test.go new file mode 100644 index 000000000000..ab6b8ff6019e --- /dev/null +++ b/azurerm/internal/services/network/vpn_server_configuration_test.go @@ -0,0 +1,101 @@ +package network + +import ( + "testing" + + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" +) + +func TestParseVpnServerConfiguration(t *testing.T) { + testData := []struct { + Name string + Input string + Expected *VpnServerConfigurationResourceID + }{ + { + Name: "Empty", + Input: "", + Expected: nil, + }, + { + Name: "No VPN Server Configurations Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Expected: nil, + }, + { + Name: "No VPN Server Configurations Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnServerConfigurations/", + Expected: nil, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnServerConfigurations/example", + Expected: &VpnServerConfigurationResourceID{ + Name: "example", + Base: azure.ResourceID{ + ResourceGroup: "foo", + }, + }, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Name) + + actual, err := ParseVpnServerConfigurationID(v.Input) + if err != nil { + if v.Expected == nil { + continue + } + + t.Fatalf("Expected a value but got an error: %s", err) + } + + if actual.Name != v.Expected.Name { + t.Fatalf("Expected %q but got %q for Name", v.Expected.Name, actual.Name) + } + + if actual.Base.ResourceGroup != v.Expected.Base.ResourceGroup { + t.Fatalf("Expected %q but got %q for ResourceGroup", v.Expected.Base.ResourceGroup, actual.Base.ResourceGroup) + } + } +} + +func TestValidateVpnServerConfiguration(t *testing.T) { + testData := []struct { + Name string + Input string + Valid bool + }{ + { + Name: "Empty", + Input: "", + Valid: false, + }, + { + Name: "No VPN Server Configurations Segment", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo", + Valid: false, + }, + { + Name: "No VPN Server Configurations Value", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnServerConfigurations/", + Valid: false, + }, + { + Name: "Completed", + Input: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/vpnServerConfigurations/example", + Valid: true, + }, + } + + for _, v := range testData { + t.Logf("[DEBUG] Testing %q", v.Input) + + _, errors := ValidateVpnServerConfigurationID(v.Input, "vpn_server_configuration_id") + isValid := len(errors) == 0 + if v.Valid != isValid { + t.Fatalf("Expected %t but got %t", v.Valid, isValid) + } + } +} diff --git a/azurerm/loadbalancer.go b/azurerm/loadbalancer.go index d43ca723e5d1..19d27807158c 100644 --- a/azurerm/loadbalancer.go +++ b/azurerm/loadbalancer.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" diff --git a/azurerm/provider.go b/azurerm/provider.go index 23fa669aca27..f38eaaf682e8 100644 --- a/azurerm/provider.go +++ b/azurerm/provider.go @@ -388,6 +388,7 @@ func Provider() terraform.ResourceProvider { "azurerm_policy_assignment": resourceArmPolicyAssignment(), "azurerm_policy_definition": resourceArmPolicyDefinition(), "azurerm_policy_set_definition": resourceArmPolicySetDefinition(), + "azurerm_point_to_site_vpn_gateway": resourceArmPointToSiteVPNGateway(), "azurerm_postgresql_configuration": resourceArmPostgreSQLConfiguration(), "azurerm_postgresql_database": resourceArmPostgreSQLDatabase(), "azurerm_postgresql_firewall_rule": resourceArmPostgreSQLFirewallRule(), @@ -477,6 +478,7 @@ func Provider() terraform.ResourceProvider { "azurerm_traffic_manager_endpoint": resourceArmTrafficManagerEndpoint(), "azurerm_traffic_manager_profile": resourceArmTrafficManagerProfile(), "azurerm_user_assigned_identity": resourceArmUserAssignedIdentity(), + "azurerm_virtual_hub": resourceArmVirtualHub(), "azurerm_virtual_machine_data_disk_attachment": resourceArmVirtualMachineDataDiskAttachment(), "azurerm_virtual_machine_extension": resourceArmVirtualMachineExtensions(), "azurerm_virtual_machine_scale_set": resourceArmVirtualMachineScaleSet(), @@ -486,6 +488,8 @@ func Provider() terraform.ResourceProvider { "azurerm_virtual_network_peering": resourceArmVirtualNetworkPeering(), "azurerm_virtual_network": resourceArmVirtualNetwork(), "azurerm_virtual_wan": resourceArmVirtualWan(), + "azurerm_vpn_gateway": resourceArmVPNGateway(), + "azurerm_vpn_server_configuration": resourceArmVPNServerConfiguration(), "azurerm_web_application_firewall_policy": resourceArmWebApplicationFirewallPolicy(), } @@ -495,11 +499,6 @@ func Provider() terraform.ResourceProvider { resources["azurerm_windows_virtual_machine_scale_set"] = resourceArmWindowsVirtualMachineScaleSet() } - // NOTE: these resources have been pulled since they require rework - if false { - resources["azurerm_virtual_hub"] = resourceArmVirtualHub() - } - // avoids this showing up in test output var debugLog = func(f string, v ...interface{}) { if os.Getenv("TF_LOG") == "" { diff --git a/azurerm/resource_arm_application_gateway.go b/azurerm/resource_arm_application_gateway.go index 1b3fd3dbb012..e428f9d81084 100644 --- a/azurerm/resource_arm_application_gateway.go +++ b/azurerm/resource_arm_application_gateway.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_application_security_group.go b/azurerm/resource_arm_application_security_group.go index c7520bc0a526..f276d8530724 100644 --- a/azurerm/resource_arm_application_security_group.go +++ b/azurerm/resource_arm_application_security_group.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" diff --git a/azurerm/resource_arm_bastion_host.go b/azurerm/resource_arm_bastion_host.go index e5bc608d5f00..c75cbf262d4e 100644 --- a/azurerm/resource_arm_bastion_host.go +++ b/azurerm/resource_arm_bastion_host.go @@ -6,7 +6,7 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" diff --git a/azurerm/resource_arm_connection_monitor.go b/azurerm/resource_arm_connection_monitor.go index ac48ea30c11b..0374081439f7 100644 --- a/azurerm/resource_arm_connection_monitor.go +++ b/azurerm/resource_arm_connection_monitor.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_container_group.go b/azurerm/resource_arm_container_group.go index 80a538da3f4c..334a651123cd 100644 --- a/azurerm/resource_arm_container_group.go +++ b/azurerm/resource_arm_container_group.go @@ -9,7 +9,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" diff --git a/azurerm/resource_arm_ddos_protection_plan.go b/azurerm/resource_arm_ddos_protection_plan.go index c681f8f0c97d..ea6ed4fc7596 100644 --- a/azurerm/resource_arm_ddos_protection_plan.go +++ b/azurerm/resource_arm_ddos_protection_plan.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_express_route_circuit.go b/azurerm/resource_arm_express_route_circuit.go index 3fed28157160..d86e68a8952a 100644 --- a/azurerm/resource_arm_express_route_circuit.go +++ b/azurerm/resource_arm_express_route_circuit.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_express_route_circuit_authorization.go b/azurerm/resource_arm_express_route_circuit_authorization.go index 53978422add9..fc3740011178 100644 --- a/azurerm/resource_arm_express_route_circuit_authorization.go +++ b/azurerm/resource_arm_express_route_circuit_authorization.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" diff --git a/azurerm/resource_arm_express_route_circuit_peering.go b/azurerm/resource_arm_express_route_circuit_peering.go index 8c118734c0fe..00244792fb21 100644 --- a/azurerm/resource_arm_express_route_circuit_peering.go +++ b/azurerm/resource_arm_express_route_circuit_peering.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_express_route_circuit_test.go b/azurerm/resource_arm_express_route_circuit_test.go index 28d7032c16f1..6d27b0e6f67d 100644 --- a/azurerm/resource_arm_express_route_circuit_test.go +++ b/azurerm/resource_arm_express_route_circuit_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_firewall.go b/azurerm/resource_arm_firewall.go index 429e90e133d2..ddbe1ae97477 100644 --- a/azurerm/resource_arm_firewall.go +++ b/azurerm/resource_arm_firewall.go @@ -6,7 +6,7 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_firewall_application_rule_collection.go b/azurerm/resource_arm_firewall_application_rule_collection.go index 80c7fe157fad..64726d28519b 100644 --- a/azurerm/resource_arm_firewall_application_rule_collection.go +++ b/azurerm/resource_arm_firewall_application_rule_collection.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_firewall_application_rule_collection_test.go b/azurerm/resource_arm_firewall_application_rule_collection_test.go index 11cb149f6654..4275693524cf 100644 --- a/azurerm/resource_arm_firewall_application_rule_collection_test.go +++ b/azurerm/resource_arm_firewall_application_rule_collection_test.go @@ -7,7 +7,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" ) diff --git a/azurerm/resource_arm_firewall_nat_rule_collection.go b/azurerm/resource_arm_firewall_nat_rule_collection.go index 6050b9577be9..c4fbca61ef4c 100644 --- a/azurerm/resource_arm_firewall_nat_rule_collection.go +++ b/azurerm/resource_arm_firewall_nat_rule_collection.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_firewall_nat_rule_collection_test.go b/azurerm/resource_arm_firewall_nat_rule_collection_test.go index 6f1951a2eb06..6a500d01abab 100644 --- a/azurerm/resource_arm_firewall_nat_rule_collection_test.go +++ b/azurerm/resource_arm_firewall_nat_rule_collection_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_firewall_network_rule_collection.go b/azurerm/resource_arm_firewall_network_rule_collection.go index e3eaf8e90625..0763226c55c8 100644 --- a/azurerm/resource_arm_firewall_network_rule_collection.go +++ b/azurerm/resource_arm_firewall_network_rule_collection.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_firewall_network_rule_collection_test.go b/azurerm/resource_arm_firewall_network_rule_collection_test.go index 7856ef81ceee..2ef7b3616425 100644 --- a/azurerm/resource_arm_firewall_network_rule_collection_test.go +++ b/azurerm/resource_arm_firewall_network_rule_collection_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_loadbalancer.go b/azurerm/resource_arm_loadbalancer.go index 540ccd6c2cca..13cbd3e54723 100644 --- a/azurerm/resource_arm_loadbalancer.go +++ b/azurerm/resource_arm_loadbalancer.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_backend_address_pool.go b/azurerm/resource_arm_loadbalancer_backend_address_pool.go index 48dc8df0829e..e71d813d4b8a 100644 --- a/azurerm/resource_arm_loadbalancer_backend_address_pool.go +++ b/azurerm/resource_arm_loadbalancer_backend_address_pool.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go b/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go index aae35dc2ed3c..626aaf47d078 100644 --- a/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go +++ b/azurerm/resource_arm_loadbalancer_backend_address_pool_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_nat_pool.go b/azurerm/resource_arm_loadbalancer_nat_pool.go index 5ecde6ee01eb..5442697573a0 100644 --- a/azurerm/resource_arm_loadbalancer_nat_pool.go +++ b/azurerm/resource_arm_loadbalancer_nat_pool.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_nat_pool_test.go b/azurerm/resource_arm_loadbalancer_nat_pool_test.go index 9599901fad86..7285be12de62 100644 --- a/azurerm/resource_arm_loadbalancer_nat_pool_test.go +++ b/azurerm/resource_arm_loadbalancer_nat_pool_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_nat_rule.go b/azurerm/resource_arm_loadbalancer_nat_rule.go index e2e560b693c9..3ca1bb7915f6 100644 --- a/azurerm/resource_arm_loadbalancer_nat_rule.go +++ b/azurerm/resource_arm_loadbalancer_nat_rule.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_nat_rule_test.go b/azurerm/resource_arm_loadbalancer_nat_rule_test.go index 03c706d072f5..61d17f3515d0 100644 --- a/azurerm/resource_arm_loadbalancer_nat_rule_test.go +++ b/azurerm/resource_arm_loadbalancer_nat_rule_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_outbound_rule.go b/azurerm/resource_arm_loadbalancer_outbound_rule.go index 9427e3a2516e..04381d690071 100644 --- a/azurerm/resource_arm_loadbalancer_outbound_rule.go +++ b/azurerm/resource_arm_loadbalancer_outbound_rule.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_outbound_rule_test.go b/azurerm/resource_arm_loadbalancer_outbound_rule_test.go index ab017ca1fd6a..8a7e493684f1 100644 --- a/azurerm/resource_arm_loadbalancer_outbound_rule_test.go +++ b/azurerm/resource_arm_loadbalancer_outbound_rule_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_probe.go b/azurerm/resource_arm_loadbalancer_probe.go index c8649cc930c8..4519e5f604c9 100644 --- a/azurerm/resource_arm_loadbalancer_probe.go +++ b/azurerm/resource_arm_loadbalancer_probe.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_probe_test.go b/azurerm/resource_arm_loadbalancer_probe_test.go index 80756aa1d609..3520a96ae88d 100644 --- a/azurerm/resource_arm_loadbalancer_probe_test.go +++ b/azurerm/resource_arm_loadbalancer_probe_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_rule.go b/azurerm/resource_arm_loadbalancer_rule.go index 85b08685fb04..16cc5fe78003 100644 --- a/azurerm/resource_arm_loadbalancer_rule.go +++ b/azurerm/resource_arm_loadbalancer_rule.go @@ -6,7 +6,7 @@ import ( "regexp" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_loadbalancer_rule_test.go b/azurerm/resource_arm_loadbalancer_rule_test.go index 4dba19d21d9c..f1719925fdcb 100644 --- a/azurerm/resource_arm_loadbalancer_rule_test.go +++ b/azurerm/resource_arm_loadbalancer_rule_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" diff --git a/azurerm/resource_arm_loadbalancer_test.go b/azurerm/resource_arm_loadbalancer_test.go index 12c27b2e8561..f16d56bfb275 100644 --- a/azurerm/resource_arm_loadbalancer_test.go +++ b/azurerm/resource_arm_loadbalancer_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_local_network_gateway.go b/azurerm/resource_arm_local_network_gateway.go index 1a3e68c8dbf3..494abfe1a170 100644 --- a/azurerm/resource_arm_local_network_gateway.go +++ b/azurerm/resource_arm_local_network_gateway.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" diff --git a/azurerm/resource_arm_network_connection_monitor.go b/azurerm/resource_arm_network_connection_monitor.go index 3f776a479a0f..33b6a395c952 100644 --- a/azurerm/resource_arm_network_connection_monitor.go +++ b/azurerm/resource_arm_network_connection_monitor.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_ddos_protection_plan.go b/azurerm/resource_arm_network_ddos_protection_plan.go index 43602bea2fc4..0c04bd4f7ebc 100644 --- a/azurerm/resource_arm_network_ddos_protection_plan.go +++ b/azurerm/resource_arm_network_ddos_protection_plan.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_interface.go b/azurerm/resource_arm_network_interface.go index 1a402aae4658..6a9df0bbf0e1 100644 --- a/azurerm/resource_arm_network_interface.go +++ b/azurerm/resource_arm_network_interface.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_interface_application_gateway_association.go b/azurerm/resource_arm_network_interface_application_gateway_association.go index 94a3ee8e56b9..afdf6dd7ff00 100644 --- a/azurerm/resource_arm_network_interface_application_gateway_association.go +++ b/azurerm/resource_arm_network_interface_application_gateway_association.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_interface_application_gateway_association_test.go b/azurerm/resource_arm_network_interface_application_gateway_association_test.go index 1117f8b05898..b6f77c01d633 100644 --- a/azurerm/resource_arm_network_interface_application_gateway_association_test.go +++ b/azurerm/resource_arm_network_interface_application_gateway_association_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_interface_application_security_group_association.go b/azurerm/resource_arm_network_interface_application_security_group_association.go index 9d54d9577663..f0af70da4864 100644 --- a/azurerm/resource_arm_network_interface_application_security_group_association.go +++ b/azurerm/resource_arm_network_interface_application_security_group_association.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_interface_application_security_group_association_test.go b/azurerm/resource_arm_network_interface_application_security_group_association_test.go index 90fd26068829..fdcb9f1245c6 100644 --- a/azurerm/resource_arm_network_interface_application_security_group_association_test.go +++ b/azurerm/resource_arm_network_interface_application_security_group_association_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_interface_backend_address_pool_association.go b/azurerm/resource_arm_network_interface_backend_address_pool_association.go index 575d25f4a353..69979db817a3 100644 --- a/azurerm/resource_arm_network_interface_backend_address_pool_association.go +++ b/azurerm/resource_arm_network_interface_backend_address_pool_association.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go b/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go index 190a0758a34c..77b6137a8c0f 100644 --- a/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go +++ b/azurerm/resource_arm_network_interface_backend_address_pool_association_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_interface_nat_rule_association.go b/azurerm/resource_arm_network_interface_nat_rule_association.go index dea2b305f80c..8fe0c1956b70 100644 --- a/azurerm/resource_arm_network_interface_nat_rule_association.go +++ b/azurerm/resource_arm_network_interface_nat_rule_association.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_interface_nat_rule_association_test.go b/azurerm/resource_arm_network_interface_nat_rule_association_test.go index fc58e28d439b..c8db80171209 100644 --- a/azurerm/resource_arm_network_interface_nat_rule_association_test.go +++ b/azurerm/resource_arm_network_interface_nat_rule_association_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_packet_capture.go b/azurerm/resource_arm_network_packet_capture.go index 454e4ef34fde..a233d77b704e 100644 --- a/azurerm/resource_arm_network_packet_capture.go +++ b/azurerm/resource_arm_network_packet_capture.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_profile.go b/azurerm/resource_arm_network_profile.go index 6200e9147ffb..6a97d958655a 100644 --- a/azurerm/resource_arm_network_profile.go +++ b/azurerm/resource_arm_network_profile.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_network_security_group.go b/azurerm/resource_arm_network_security_group.go index f77b542aea5c..cfa504f7554d 100644 --- a/azurerm/resource_arm_network_security_group.go +++ b/azurerm/resource_arm_network_security_group.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" diff --git a/azurerm/resource_arm_network_security_rule.go b/azurerm/resource_arm_network_security_rule.go index f70a7c75ee7b..03fa0aebde0d 100644 --- a/azurerm/resource_arm_network_security_rule.go +++ b/azurerm/resource_arm_network_security_rule.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_network_watcher.go b/azurerm/resource_arm_network_watcher.go index b94e54a10251..36fab8470ed4 100644 --- a/azurerm/resource_arm_network_watcher.go +++ b/azurerm/resource_arm_network_watcher.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" diff --git a/azurerm/resource_arm_packet_capture.go b/azurerm/resource_arm_packet_capture.go index 0f7ebe710601..e55bc078f6cb 100644 --- a/azurerm/resource_arm_packet_capture.go +++ b/azurerm/resource_arm_packet_capture.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_point_to_site_vpn_gateway.go b/azurerm/resource_arm_point_to_site_vpn_gateway.go new file mode 100644 index 000000000000..30b421b0a1d8 --- /dev/null +++ b/azurerm/resource_arm_point_to_site_vpn_gateway.go @@ -0,0 +1,324 @@ +package azurerm + +import ( + "fmt" + "log" + "time" + + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" + "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features" + networkSvc "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func resourceArmPointToSiteVPNGateway() *schema.Resource { + return &schema.Resource{ + Create: resourceArmPointToSiteVPNGatewayCreateUpdate, + Read: resourceArmPointToSiteVPNGatewayRead, + Update: resourceArmPointToSiteVPNGatewayCreateUpdate, + Delete: resourceArmPointToSiteVPNGatewayDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(90 * time.Minute), + Read: schema.DefaultTimeout(5 * time.Minute), + Update: schema.DefaultTimeout(90 * time.Minute), + Delete: schema.DefaultTimeout(90 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.NoEmptyStrings, + }, + + "resource_group_name": azure.SchemaResourceGroupName(), + + "location": azure.SchemaLocation(), + + "virtual_hub_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: networkSvc.ValidateVirtualHubID, + }, + + "vpn_server_configuration_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: networkSvc.ValidateVpnServerConfigurationID, + }, + + "connection_configuration": { + Type: schema.TypeList, + Required: true, + // Code="P2SVpnGatewayCanHaveOnlyOneP2SConnectionConfiguration" + // Message="Currently, P2SVpnGateway [ID] can have only one P2SConnectionConfiguration. Specified number of P2SConnectionConfiguration are 2. + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validate.NoEmptyStrings, + }, + + "vpn_client_address_pool": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "address_prefixes": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validate.CIDR, + }, + }, + }, + }, + }, + }, + }, + }, + + "scale_unit": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(0), + }, + + "tags": tags.Schema(), + }, + } +} + +func resourceArmPointToSiteVPNGatewayCreateUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).Network.PointToSiteVpnGatewaysClient + ctx, cancel := timeouts.ForCreateUpdate(meta.(*ArmClient).StopContext, d) + defer cancel() + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + + if features.ShouldResourcesBeImported() && d.IsNewResource() { + existing, err := client.Get(ctx, resourceGroup, name) + if err != nil { + if !utils.ResponseWasNotFound(existing.Response) { + return fmt.Errorf("Error checking for presence of existing Point-to-Site VPN Gateway %q (Resource Group %q): %+v", name, resourceGroup, err) + } + } + + if existing.ID != nil && *existing.ID != "" { + return tf.ImportAsExistsError("azurerm_point_to_site_vpn_gateway", *existing.ID) + } + } + + location := azure.NormalizeLocation(d.Get("location").(string)) + scaleUnit := d.Get("scale_unit").(int) + virtualHubId := d.Get("virtual_hub_id").(string) + vpnServerConfigurationId := d.Get("vpn_server_configuration_id").(string) + t := d.Get("tags").(map[string]interface{}) + + connectionConfigurationsRaw := d.Get("connection_configuration").([]interface{}) + connectionConfigurations := expandPointToSiteVPNGatewayConnectionConfiguration(connectionConfigurationsRaw) + + parameters := network.P2SVpnGateway{ + Location: utils.String(location), + P2SVpnGatewayProperties: &network.P2SVpnGatewayProperties{ + P2SConnectionConfigurations: connectionConfigurations, + VpnServerConfiguration: &network.SubResource{ + ID: utils.String(vpnServerConfigurationId), + }, + VirtualHub: &network.SubResource{ + ID: utils.String(virtualHubId), + }, + VpnGatewayScaleUnit: utils.Int32(int32(scaleUnit)), + }, + Tags: tags.Expand(t), + } + + future, err := client.CreateOrUpdate(ctx, resourceGroup, name, parameters) + if err != nil { + return fmt.Errorf("Error creating/updating Point-to-Site VPN Gateway %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { + return fmt.Errorf("Error waiting for creation/update of Point-to-Site VPN Gateway %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + resp, err := client.Get(ctx, resourceGroup, name) + if err != nil { + return fmt.Errorf("Error retrieving Point-to-Site VPN Gateway %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.SetId(*resp.ID) + + return resourceArmPointToSiteVPNGatewayRead(d, meta) +} + +func resourceArmPointToSiteVPNGatewayRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).Network.PointToSiteVpnGatewaysClient + ctx, cancel := timeouts.ForRead(meta.(*ArmClient).StopContext, d) + defer cancel() + + id, err := networkSvc.ParsePointToSiteVPNGatewayID(d.Id()) + if err != nil { + return err + } + + resourceGroup := id.Base.ResourceGroup + + resp, err := client.Get(ctx, resourceGroup, id.Name) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + log.Printf("[DEBUG] Point-to-Site VPN Gateway %q was not found in Resource Group %q - removing from state!", id.Name, resourceGroup) + d.SetId("") + return nil + } + + return fmt.Errorf("Error retrieving Point-to-Site VPN Gateway %q (Resource Group %q): %+v", id.Name, resourceGroup, err) + } + + d.Set("name", id.Name) + d.Set("resource_group_name", resourceGroup) + + if location := resp.Location; location != nil { + d.Set("location", azure.NormalizeLocation(*location)) + } + + if props := resp.P2SVpnGatewayProperties; props != nil { + flattenedConfigurations := flattenPointToSiteVPNGatewayConnectionConfiguration(props.P2SConnectionConfigurations) + if err := d.Set("connection_configuration", flattenedConfigurations); err != nil { + return fmt.Errorf("Error setting `connection_configuration`: %+v", err) + } + + scaleUnit := 0 + if props.VpnGatewayScaleUnit != nil { + scaleUnit = int(*props.VpnGatewayScaleUnit) + } + d.Set("scale_unit", scaleUnit) + + virtualHubId := "" + if props.VirtualHub != nil && props.VirtualHub.ID != nil { + virtualHubId = *props.VirtualHub.ID + } + d.Set("virtual_hub_id", virtualHubId) + + vpnServerConfigurationId := "" + if props.VpnServerConfiguration != nil && props.VpnServerConfiguration.ID != nil { + vpnServerConfigurationId = *props.VpnServerConfiguration.ID + } + d.Set("vpn_server_configuration_id", vpnServerConfigurationId) + } + + return tags.FlattenAndSet(d, resp.Tags) +} + +func resourceArmPointToSiteVPNGatewayDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).Network.PointToSiteVpnGatewaysClient + ctx, cancel := timeouts.ForDelete(meta.(*ArmClient).StopContext, d) + defer cancel() + + id, err := networkSvc.ParsePointToSiteVPNGatewayID(d.Id()) + if err != nil { + return err + } + resourceGroup := id.Base.ResourceGroup + + future, err := client.Delete(ctx, resourceGroup, id.Name) + if err != nil { + return fmt.Errorf("Error deleting Point-to-Site VPN Gateway %q (Resource Group %q): %+v", id.Name, resourceGroup, err) + } + + if err := future.WaitForCompletionRef(ctx, client.Client); err != nil { + return fmt.Errorf("Error waiting for deletion of Point-to-Site VPN Gateway %q (Resource Group %q): %+v", id.Name, resourceGroup, err) + } + + return nil +} + +func expandPointToSiteVPNGatewayConnectionConfiguration(input []interface{}) *[]network.P2SConnectionConfiguration { + configurations := make([]network.P2SConnectionConfiguration, 0) + + for _, v := range input { + raw := v.(map[string]interface{}) + + addressPrefixes := make([]string, 0) + name := raw["name"].(string) + + clientAddressPoolsRaw := raw["vpn_client_address_pool"].([]interface{}) + for _, clientV := range clientAddressPoolsRaw { + clientRaw := clientV.(map[string]interface{}) + + addressPrefixesRaw := clientRaw["address_prefixes"].(*schema.Set).List() + for _, prefix := range addressPrefixesRaw { + addressPrefixes = append(addressPrefixes, prefix.(string)) + } + } + + configurations = append(configurations, network.P2SConnectionConfiguration{ + Name: utils.String(name), + P2SConnectionConfigurationProperties: &network.P2SConnectionConfigurationProperties{ + VpnClientAddressPool: &network.AddressSpace{ + AddressPrefixes: &addressPrefixes, + }, + }, + }) + } + + return &configurations +} + +func flattenPointToSiteVPNGatewayConnectionConfiguration(input *[]network.P2SConnectionConfiguration) []interface{} { + if input == nil { + return []interface{}{} + } + + output := make([]interface{}, 0) + + for _, v := range *input { + name := "" + if v.Name != nil { + name = *v.Name + } + + addressPrefixes := make([]interface{}, 0) + if props := v.P2SConnectionConfigurationProperties; props != nil { + if props.VpnClientAddressPool == nil { + continue + } + + if props.VpnClientAddressPool.AddressPrefixes != nil { + for _, prefix := range *props.VpnClientAddressPool.AddressPrefixes { + addressPrefixes = append(addressPrefixes, prefix) + } + } + } + + output = append(output, map[string]interface{}{ + "name": name, + "vpn_client_address_pool": []interface{}{ + map[string]interface{}{ + "address_prefixes": addressPrefixes, + }, + }, + }) + } + + return output +} diff --git a/azurerm/resource_arm_point_to_site_vpn_gateway_test.go b/azurerm/resource_arm_point_to_site_vpn_gateway_test.go new file mode 100644 index 000000000000..fd7585c565a3 --- /dev/null +++ b/azurerm/resource_arm_point_to_site_vpn_gateway_test.go @@ -0,0 +1,328 @@ +package azurerm + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func TestAccAzureRMPointToSiteVPNGateway_basic(t *testing.T) { + resourceName := "azurerm_point_to_site_vpn_gateway.test" + ri := tf.AccRandTimeInt() + location := testLocation() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMPointToSiteVPNGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_basic(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMPointToSiteVPNGatewayExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAzureRMPointToSiteVPNGateway_requiresImport(t *testing.T) { + if !features.ShouldResourcesBeImported() { + t.Skip("Skipping since resources aren't required to be imported") + return + } + + resourceName := "azurerm_point_to_site_vpn_gateway.test" + ri := tf.AccRandTimeInt() + location := testLocation() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMPointToSiteVPNGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_basic(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMPointToSiteVPNGatewayExists(resourceName), + ), + }, + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_requiresImport(ri, location), + ExpectError: testRequiresImportError("azurerm_point_to_site_vpn_gateway"), + }, + }, + }) +} + +func TestAccAzureRMPointToSiteVPNGateway_update(t *testing.T) { + resourceName := "azurerm_point_to_site_vpn_gateway.test" + ri := tf.AccRandTimeInt() + location := testLocation() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMPointToSiteVPNGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_basic(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMPointToSiteVPNGatewayExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_updated(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMPointToSiteVPNGatewayExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccAzureRMPointToSiteVPNGateway_tags(t *testing.T) { + resourceName := "azurerm_point_to_site_vpn_gateway.test" + ri := tf.AccRandTimeInt() + location := testLocation() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMPointToSiteVPNGatewayDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAzureRMAzureRMPointToSiteVPNGateway_tags(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMPointToSiteVPNGatewayExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testCheckAzureRMPointToSiteVPNGatewayExists(resourceName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resourceName] + if !ok { + return fmt.Errorf("VPN Gateway Server Configuration not found: %s", resourceName) + } + + name := rs.Primary.Attributes["name"] + resourceGroup := rs.Primary.Attributes["resource_group_name"] + + client := testAccProvider.Meta().(*ArmClient).Network.PointToSiteVpnGatewaysClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + + if resp, err := client.Get(ctx, resourceGroup, name); err != nil { + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Bad: VPN Gateway %q (Resource Group %q) does not exist", name, resourceGroup) + } + + return fmt.Errorf("Bad: Get on network.PointToSiteVpnGatewaysClient: %+v", err) + } + + return nil + } +} + +func testCheckAzureRMPointToSiteVPNGatewayDestroy(s *terraform.State) error { + for _, rs := range s.RootModule().Resources { + if rs.Type != "azurerm_vpn_server_configuration" { + continue + } + + client := testAccProvider.Meta().(*ArmClient).Network.PointToSiteVpnGatewaysClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + name := rs.Primary.Attributes["name"] + resourceGroup := rs.Primary.Attributes["resource_group_name"] + + if resp, err := client.Get(ctx, resourceGroup, name); err != nil { + if !utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Bad: Get on network.PointToSiteVpnGatewaysClient: %+v", err) + } + } + + return nil + } + + return nil +} + +func testAccAzureRMAzureRMPointToSiteVPNGateway_basic(rInt int, location string) string { + template := testAccAzureRMAzureRMPointToSiteVPNGateway_template(rInt, location) + return fmt.Sprintf(` +%s + +resource "azurerm_point_to_site_vpn_gateway" "test" { + name = "acctestp2sVPNG-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + virtual_hub_id = azurerm_virtual_hub.test.id + vpn_server_configuration_id = azurerm_vpn_server_configuration.test.id + scale_unit = 1 + + connection_configuration { + name = "first" + vpn_client_address_pool { + address_prefixes = [ "172.100.0.0/14" ] + } + } +} +`, template, rInt) +} + +func testAccAzureRMAzureRMPointToSiteVPNGateway_updated(rInt int, location string) string { + template := testAccAzureRMAzureRMPointToSiteVPNGateway_template(rInt, location) + return fmt.Sprintf(` +%s + +resource "azurerm_point_to_site_vpn_gateway" "test" { + name = "acctestp2sVPNG-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + virtual_hub_id = azurerm_virtual_hub.test.id + vpn_server_configuration_id = azurerm_vpn_server_configuration.test.id + scale_unit = 2 + + connection_configuration { + name = "first" + vpn_client_address_pool { + address_prefixes = [ "172.100.0.0/14", "10.100.0.0/14" ] + } + } +} +`, template, rInt) +} + +func testAccAzureRMAzureRMPointToSiteVPNGateway_requiresImport(rInt int, location string) string { + template := testAccAzureRMAzureRMPointToSiteVPNGateway_basic(rInt, location) + return fmt.Sprintf(` +%s + +resource "azurerm_point_to_site_vpn_gateway" "import" { + name = azurerm_point_to_site_vpn_gateway.test.name + location = azurerm_point_to_site_vpn_gateway.test.location + resource_group_name = azurerm_point_to_site_vpn_gateway.test.resource_group_name + virtual_hub_id = azurerm_point_to_site_vpn_gateway.test.virtual_hub_id + vpn_server_configuration_id = azurerm_point_to_site_vpn_gateway.test.vpn_server_configuration_id + scale_unit = azurerm_point_to_site_vpn_gateway.test.scale_unit + + connection_configuration { + name = "first" + vpn_client_address_pool { + address_prefixes = [ "172.100.0.0/14" ] + } + } +} +`, template) +} + +func testAccAzureRMAzureRMPointToSiteVPNGateway_tags(rInt int, location string) string { + template := testAccAzureRMAzureRMPointToSiteVPNGateway_template(rInt, location) + return fmt.Sprintf(` +%s + +resource "azurerm_point_to_site_vpn_gateway" "test" { + name = "acctestp2sVPNG-%d" + location = azurerm_resource_group.test.location + resource_group_name = azurerm_resource_group.test.name + virtual_hub_id = azurerm_virtual_hub.test.id + vpn_server_configuration_id = azurerm_vpn_server_configuration.test.id + scale_unit = 1 + + connection_configuration { + name = "first" + vpn_client_address_pool { + address_prefixes = [ "172.100.0.0/14" ] + } + } + + tags = { + Hello = "World" + } +} +`, template, rInt) +} + +func testAccAzureRMAzureRMPointToSiteVPNGateway_template(rInt int, location string) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestrg-%d" + location = "%s" +} + +resource "azurerm_virtual_wan" "test" { + name = "acctestvwan-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location +} + +resource "azurerm_virtual_hub" "test" { + name = "acctestvhub-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + virtual_wan_id = azurerm_virtual_wan.test.id + address_prefix = "10.0.1.0/24" +} + +resource "azurerm_vpn_server_configuration" "test" { + name = "acctestvpnsc-%d" + resource_group_name = azurerm_resource_group.test.name + location = azurerm_resource_group.test.location + vpn_authentication_types = ["Certificate"] + + client_root_certificate { + name = "DigiCert-Federated-ID-Root-CA" + + public_cert_data = < 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client IPGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) GetResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all IpGroups in a subscription. +func (client IPGroupsClient) List(ctx context.Context) (result IPGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.List") + defer func() { + sc := -1 + if result.iglr.Response.Response != nil { + sc = result.iglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.iglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", resp, "Failure sending request") + return + } + + result.iglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client IPGroupsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client IPGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client IPGroupsClient) listNextResults(ctx context.Context, lastResults IPGroupListResult) (result IPGroupListResult, err error) { + req, err := lastResults.iPGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPGroupsClient) ListComplete(ctx context.Context) (result IPGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup gets all IpGroups in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client IPGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result IPGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.iglr.Response.Response != nil { + sc = result.iglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.iglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.iglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client IPGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client IPGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result IPGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client IPGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IPGroupListResult) (result IPGroupListResult, err error) { + req, err := lastResults.iPGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.IPGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result IPGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateGroups updates tags of an IpGroups resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// IPGroupsName - the name of the ipGroups. +// parameters - parameters supplied to the update ipGroups operation. +func (client IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters TagsObject) (result IPGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupsClient.UpdateGroups") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateGroupsPreparer(ctx, resourceGroupName, IPGroupsName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateGroupsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", resp, "Failure sending request") + return + } + + result, err = client.UpdateGroupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "UpdateGroups", resp, "Failure responding to request") + } + + return +} + +// UpdateGroupsPreparer prepares the UpdateGroups request. +func (client IPGroupsClient) UpdateGroupsPreparer(ctx context.Context, resourceGroupName string, IPGroupsName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipGroupsName": autorest.Encode("path", IPGroupsName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateGroupsSender sends the UpdateGroups request. The method will close the +// http.Response Body if it receives an error. +func (client IPGroupsClient) UpdateGroupsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateGroupsResponder handles the response to the UpdateGroups request. The method always +// closes the http.Response Body. +func (client IPGroupsClient) UpdateGroupsResponder(resp *http.Response) (result IPGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go index 3933ca803600..3a313c458b60 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerbackendaddresspools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerbackendaddresspools.go @@ -87,7 +87,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go index f3fe42a2b741..6a4ac7319d2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerfrontendipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerfrontendipconfigurations.go @@ -88,7 +88,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go index 2f1f6ec2c1fb..3905fe084dcd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerloadbalancingrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerloadbalancingrules.go @@ -87,7 +87,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go index 477f3ba9a1bf..0a311ef156df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancernetworkinterfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancernetworkinterfaces.go @@ -86,7 +86,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go index 82eff1e212e4..3fb4c68dec82 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalanceroutboundrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalanceroutboundrules.go @@ -86,7 +86,7 @@ func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go index 46cab6e35822..0b741a93e012 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancerprobes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancerprobes.go @@ -86,7 +86,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go index dd1934505b96..471324a5395f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/loadbalancers.go @@ -79,11 +79,12 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,13 +506,13 @@ func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result L // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. // parameters - parameters supplied to update load balancer tags. -func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancersUpdateTagsFuture, err error) { +func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancer, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -522,12 +523,18 @@ func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupN return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -539,7 +546,7 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -556,15 +563,9 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) { +func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/localnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go index be6bced47194..ba4d9f315ba2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/localnetworkgateways.go @@ -88,11 +88,12 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -173,7 +174,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -261,7 +262,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +338,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -412,13 +413,13 @@ func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resou // resourceGroupName - the name of the resource group. // localNetworkGatewayName - the name of the local network gateway. // parameters - parameters supplied to update local network gateway tags. -func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGatewaysUpdateTagsFuture, err error) { +func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGateway, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -435,12 +436,18 @@ func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourc return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -452,7 +459,7 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -469,15 +476,9 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) { +func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go index 17577eee7046..087ff4995acf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network" // Access enumerates the values for access. type Access string @@ -455,6 +455,34 @@ func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} } +// AzureFirewallSkuName enumerates the values for azure firewall sku name. +type AzureFirewallSkuName string + +const ( + // AZFWHub ... + AZFWHub AzureFirewallSkuName = "AZFW_Hub" + // AZFWVNet ... + AZFWVNet AzureFirewallSkuName = "AZFW_VNet" +) + +// PossibleAzureFirewallSkuNameValues returns an array of possible values for the AzureFirewallSkuName const type. +func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { + return []AzureFirewallSkuName{AZFWHub, AZFWVNet} +} + +// AzureFirewallSkuTier enumerates the values for azure firewall sku tier. +type AzureFirewallSkuTier string + +const ( + // Standard ... + Standard AzureFirewallSkuTier = "Standard" +) + +// PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. +func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { + return []AzureFirewallSkuTier{Standard} +} + // AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. type AzureFirewallThreatIntelMode string @@ -890,8 +918,6 @@ func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsula type FirewallPolicyFilterRuleActionType string const ( - // FirewallPolicyFilterRuleActionTypeAlert ... - FirewallPolicyFilterRuleActionTypeAlert FirewallPolicyFilterRuleActionType = "Alert " // FirewallPolicyFilterRuleActionTypeAllow ... FirewallPolicyFilterRuleActionTypeAllow FirewallPolicyFilterRuleActionType = "Allow" // FirewallPolicyFilterRuleActionTypeDeny ... @@ -900,7 +926,7 @@ const ( // PossibleFirewallPolicyFilterRuleActionTypeValues returns an array of possible values for the FirewallPolicyFilterRuleActionType const type. func PossibleFirewallPolicyFilterRuleActionTypeValues() []FirewallPolicyFilterRuleActionType { - return []FirewallPolicyFilterRuleActionType{FirewallPolicyFilterRuleActionTypeAlert, FirewallPolicyFilterRuleActionTypeAllow, FirewallPolicyFilterRuleActionTypeDeny} + return []FirewallPolicyFilterRuleActionType{FirewallPolicyFilterRuleActionTypeAllow, FirewallPolicyFilterRuleActionTypeDeny} } // FirewallPolicyNatRuleActionType enumerates the values for firewall policy nat rule action type. @@ -909,13 +935,11 @@ type FirewallPolicyNatRuleActionType string const ( // DNAT ... DNAT FirewallPolicyNatRuleActionType = "DNAT" - // SNAT ... - SNAT FirewallPolicyNatRuleActionType = "SNAT" ) // PossibleFirewallPolicyNatRuleActionTypeValues returns an array of possible values for the FirewallPolicyNatRuleActionType const type. func PossibleFirewallPolicyNatRuleActionTypeValues() []FirewallPolicyNatRuleActionType { - return []FirewallPolicyNatRuleActionType{DNAT, SNAT} + return []FirewallPolicyNatRuleActionType{DNAT} } // FirewallPolicyRuleConditionApplicationProtocolType enumerates the values for firewall policy rule condition @@ -1222,17 +1246,30 @@ func PossibleLoadDistributionValues() []LoadDistribution { return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol} } +// ManagedRuleEnabledState enumerates the values for managed rule enabled state. +type ManagedRuleEnabledState string + +const ( + // ManagedRuleEnabledStateDisabled ... + ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" +) + +// PossibleManagedRuleEnabledStateValues returns an array of possible values for the ManagedRuleEnabledState const type. +func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { + return []ManagedRuleEnabledState{ManagedRuleEnabledStateDisabled} +} + // NatGatewaySkuName enumerates the values for nat gateway sku name. type NatGatewaySkuName string const ( - // Standard ... - Standard NatGatewaySkuName = "Standard" + // NatGatewaySkuNameStandard ... + NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" ) // PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { - return []NatGatewaySkuName{Standard} + return []NatGatewaySkuName{NatGatewaySkuNameStandard} } // NextHopType enumerates the values for next hop type. @@ -1311,6 +1348,45 @@ func PossibleOriginValues() []Origin { return []Origin{OriginInbound, OriginLocal, OriginOutbound} } +// OwaspCrsExclusionEntryMatchVariable enumerates the values for owasp crs exclusion entry match variable. +type OwaspCrsExclusionEntryMatchVariable string + +const ( + // RequestArgNames ... + RequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + // RequestCookieNames ... + RequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + // RequestHeaderNames ... + RequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" +) + +// PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. +func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { + return []OwaspCrsExclusionEntryMatchVariable{RequestArgNames, RequestCookieNames, RequestHeaderNames} +} + +// OwaspCrsExclusionEntrySelectorMatchOperator enumerates the values for owasp crs exclusion entry selector +// match operator. +type OwaspCrsExclusionEntrySelectorMatchOperator string + +const ( + // OwaspCrsExclusionEntrySelectorMatchOperatorContains ... + OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" + // OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" + // OwaspCrsExclusionEntrySelectorMatchOperatorEquals ... + OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" + // OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny ... + OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" + // OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith ... + OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" +) + +// PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues returns an array of possible values for the OwaspCrsExclusionEntrySelectorMatchOperator const type. +func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclusionEntrySelectorMatchOperator { + return []OwaspCrsExclusionEntrySelectorMatchOperator{OwaspCrsExclusionEntrySelectorMatchOperatorContains, OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, OwaspCrsExclusionEntrySelectorMatchOperatorEquals, OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith} +} + // PcError enumerates the values for pc error. type PcError string @@ -1605,6 +1681,8 @@ func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { type SecurityRuleProtocol string const ( + // SecurityRuleProtocolAh ... + SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" // SecurityRuleProtocolAsterisk ... SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" // SecurityRuleProtocolEsp ... @@ -1619,7 +1697,7 @@ const ( // PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { - return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} + return []SecurityRuleProtocol{SecurityRuleProtocolAh, SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} } // ServiceProviderProvisioningState enumerates the values for service provider provisioning state. @@ -1900,6 +1978,23 @@ func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProvider return []VirtualWanSecurityProviderType{External, Native} } +// VpnAuthenticationType enumerates the values for vpn authentication type. +type VpnAuthenticationType string + +const ( + // AAD ... + AAD VpnAuthenticationType = "AAD" + // Certificate ... + Certificate VpnAuthenticationType = "Certificate" + // Radius ... + Radius VpnAuthenticationType = "Radius" +) + +// PossibleVpnAuthenticationTypeValues returns an array of possible values for the VpnAuthenticationType const type. +func PossibleVpnAuthenticationTypeValues() []VpnAuthenticationType { + return []VpnAuthenticationType{AAD, Certificate, Radius} +} + // VpnClientProtocol enumerates the values for vpn client protocol. type VpnClientProtocol string @@ -2069,6 +2164,8 @@ const ( WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" // WebApplicationFirewallOperatorEqual ... WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" + // WebApplicationFirewallOperatorGeoMatch ... + WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" // WebApplicationFirewallOperatorGreaterThan ... WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" // WebApplicationFirewallOperatorGreaterThanOrEqual ... @@ -2085,7 +2182,7 @@ const ( // PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type. func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { - return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} + return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGeoMatch, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} } // WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource @@ -2150,6 +2247,16 @@ func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTra return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode} } +// AadAuthenticationParameters AAD Vpn authentication type related parameters. +type AadAuthenticationParameters struct { + // AadTenant - AAD Vpn authentication parameter AAD tenant. + AadTenant *string `json:"aadTenant,omitempty"` + // AadAudience - AAD Vpn authentication parameter AAD audience. + AadAudience *string `json:"aadAudience,omitempty"` + // AadIssuer - AAD Vpn authentication parameter AAD issuer. + AadIssuer *string `json:"aadIssuer,omitempty"` +} + // AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the // virtual network. type AddressSpace struct { @@ -2162,7 +2269,7 @@ type ApplicationGateway struct { autorest.Response `json:"-"` // ApplicationGatewayPropertiesFormat - Properties of the application gateway. *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Zones - A list of availability zones denoting where the resource needs to come from. Zones *[]string `json:"zones,omitempty"` @@ -2186,9 +2293,6 @@ func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { if ag.ApplicationGatewayPropertiesFormat != nil { objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat } - if ag.Etag != nil { - objectMap["etag"] = ag.Etag - } if ag.Zones != nil { objectMap["zones"] = ag.Zones } @@ -2309,9 +2413,9 @@ type ApplicationGatewayAuthenticationCertificate struct { *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the authentication certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -2326,12 +2430,6 @@ func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, e if agac.Name != nil { objectMap["name"] = agac.Name } - if agac.Etag != nil { - objectMap["etag"] = agac.Etag - } - if agac.Type != nil { - objectMap["type"] = agac.Type - } if agac.ID != nil { objectMap["id"] = agac.ID } @@ -2403,7 +2501,7 @@ func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []by type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { // Data - Certificate public data. Data *string `json:"data,omitempty"` - // ProvisioningState - The provisioning state of the authentication certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the authentication certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -2704,9 +2802,9 @@ type ApplicationGatewayBackendAddressPool struct { *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` // Name - Name of the backend address pool that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -2721,12 +2819,6 @@ func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) if agbap.Name != nil { objectMap["name"] = agbap.Name } - if agbap.Etag != nil { - objectMap["etag"] = agbap.Etag - } - if agbap.Type != nil { - objectMap["type"] = agbap.Type - } if agbap.ID != nil { objectMap["id"] = agbap.ID } @@ -2796,11 +2888,11 @@ func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) er // ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an // application gateway. type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. + // BackendIPConfigurations - READ-ONLY; Collection of references to IPs defined in network interfaces. BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` // BackendAddresses - Backend addresses. BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - // ProvisioningState - The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -2854,9 +2946,9 @@ type ApplicationGatewayBackendHTTPSettings struct { *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` // Name - Name of the backend http settings that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -2871,12 +2963,6 @@ func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) if agbhs.Name != nil { objectMap["name"] = agbhs.Name } - if agbhs.Etag != nil { - objectMap["etag"] = agbhs.Etag - } - if agbhs.Type != nil { - objectMap["type"] = agbhs.Type - } if agbhs.ID != nil { objectMap["id"] = agbhs.ID } @@ -2972,7 +3058,7 @@ type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { ProbeEnabled *bool `json:"probeEnabled,omitempty"` // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null. Path *string `json:"path,omitempty"` - // ProvisioningState - The provisioning state of the backend HTTP settings resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the backend HTTP settings resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -3136,7 +3222,7 @@ func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error // ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set. type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - // ProvisioningState - The provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the web application firewall rule set. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // RuleSetType - The type of the web application firewall rule set. RuleSetType *string `json:"ruleSetType,omitempty"` @@ -3152,9 +3238,9 @@ type ApplicationGatewayFrontendIPConfiguration struct { *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the frontend IP configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3169,12 +3255,6 @@ func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, er if agfic.Name != nil { objectMap["name"] = agfic.Name } - if agfic.Etag != nil { - objectMap["etag"] = agfic.Etag - } - if agfic.Type != nil { - objectMap["type"] = agfic.Type - } if agfic.ID != nil { objectMap["id"] = agfic.ID } @@ -3252,7 +3332,7 @@ type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { Subnet *SubResource `json:"subnet,omitempty"` // PublicIPAddress - Reference of the PublicIP resource. PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -3262,9 +3342,9 @@ type ApplicationGatewayFrontendPort struct { *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` // Name - Name of the frontend port that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3279,12 +3359,6 @@ func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { if agfp.Name != nil { objectMap["name"] = agfp.Name } - if agfp.Etag != nil { - objectMap["etag"] = agfp.Etag - } - if agfp.Type != nil { - objectMap["type"] = agfp.Type - } if agfp.ID != nil { objectMap["id"] = agfp.ID } @@ -3355,7 +3429,7 @@ func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error { type ApplicationGatewayFrontendPortPropertiesFormat struct { // Port - Frontend port. Port *int32 `json:"port,omitempty"` - // ProvisioningState - The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the frontend port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -3373,9 +3447,9 @@ type ApplicationGatewayHTTPListener struct { *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` // Name - Name of the HTTP listener that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3390,12 +3464,6 @@ func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { if aghl.Name != nil { objectMap["name"] = aghl.Name } - if aghl.Etag != nil { - objectMap["etag"] = aghl.Etag - } - if aghl.Type != nil { - objectMap["type"] = aghl.Type - } if aghl.ID != nil { objectMap["id"] = aghl.ID } @@ -3476,10 +3544,14 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { SslCertificate *SubResource `json:"sslCertificate,omitempty"` // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting. RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - // ProvisioningState - The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the HTTP listener resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // CustomErrorConfigurations - Custom error configurations of the HTTP listener. CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` + // Hostnames - List of Host names for HTTP Listener that allows special wildcard characters as well. + Hostnames *[]string `json:"hostnames,omitempty"` } // ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 @@ -3489,9 +3561,9 @@ type ApplicationGatewayIPConfiguration struct { *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the IP configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3506,12 +3578,6 @@ func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { if agic.Name != nil { objectMap["name"] = agic.Name } - if agic.Etag != nil { - objectMap["etag"] = agic.Etag - } - if agic.Type != nil { - objectMap["type"] = agic.Type - } if agic.ID != nil { objectMap["id"] = agic.ID } @@ -3583,7 +3649,7 @@ func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error type ApplicationGatewayIPConfigurationPropertiesFormat struct { // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address. Subnet *SubResource `json:"subnet,omitempty"` - // ProvisioningState - The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -3759,9 +3825,9 @@ type ApplicationGatewayPathRule struct { *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` // Name - Name of the path rule that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3776,12 +3842,6 @@ func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { if agpr.Name != nil { objectMap["name"] = agpr.Name } - if agpr.Etag != nil { - objectMap["etag"] = agpr.Etag - } - if agpr.Type != nil { - objectMap["type"] = agpr.Type - } if agpr.ID != nil { objectMap["id"] = agpr.ID } @@ -3860,8 +3920,10 @@ type ApplicationGatewayPathRulePropertiesFormat struct { RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` // RewriteRuleSet - Rewrite rule set resource of URL path map path rule. RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - // ProvisioningState - The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // FirewallPolicy - Reference to the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` } // ApplicationGatewayProbe probe of the application gateway. @@ -3870,9 +3932,9 @@ type ApplicationGatewayProbe struct { *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` // Name - Name of the probe that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -3887,12 +3949,6 @@ func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { if agp.Name != nil { objectMap["name"] = agp.Name } - if agp.Etag != nil { - objectMap["etag"] = agp.Etag - } - if agp.Type != nil { - objectMap["type"] = agp.Type - } if agp.ID != nil { objectMap["id"] = agp.ID } @@ -3987,7 +4043,7 @@ type ApplicationGatewayProbePropertiesFormat struct { MinServers *int32 `json:"minServers,omitempty"` // Match - Criterion for classifying a healthy probe response. Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - // ProvisioningState - The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. Port *int32 `json:"port,omitempty"` @@ -4039,9 +4095,9 @@ type ApplicationGatewayPropertiesFormat struct { EnableFips *bool `json:"enableFips,omitempty"` // AutoscaleConfiguration - Autoscale Configuration. AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - // ResourceGUID - The resource GUID property of the application gateway resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the application gateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the application gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // CustomErrorConfigurations - Custom error configurations of the application gateway resource. CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` @@ -4053,9 +4109,9 @@ type ApplicationGatewayRedirectConfiguration struct { *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the redirect configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4070,12 +4126,6 @@ func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error if agrc.Name != nil { objectMap["name"] = agrc.Name } - if agrc.Etag != nil { - objectMap["etag"] = agrc.Etag - } - if agrc.Type != nil { - objectMap["type"] = agrc.Type - } if agrc.ID != nil { objectMap["id"] = agrc.ID } @@ -4169,9 +4219,9 @@ type ApplicationGatewayRequestRoutingRule struct { *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` // Name - Name of the request routing rule that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4186,12 +4236,6 @@ func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) if agrrr.Name != nil { objectMap["name"] = agrrr.Name } - if agrrr.Etag != nil { - objectMap["etag"] = agrrr.Etag - } - if agrrr.Type != nil { - objectMap["type"] = agrrr.Type - } if agrrr.ID != nil { objectMap["id"] = agrrr.ID } @@ -4277,7 +4321,7 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` // RedirectConfiguration - Redirect configuration resource of the application gateway. RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - // ProvisioningState - The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -4526,9 +4570,9 @@ type ApplicationGatewaySslCertificate struct { *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the SSL certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4543,12 +4587,6 @@ func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) { if agsc.Name != nil { objectMap["name"] = agsc.Name } - if agsc.Etag != nil { - objectMap["etag"] = agsc.Etag - } - if agsc.Type != nil { - objectMap["type"] = agsc.Type - } if agsc.ID != nil { objectMap["id"] = agsc.ID } @@ -4622,11 +4660,11 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` // Password - Password for the pfx file specified in data. Only applicable in PUT request. Password *string `json:"password,omitempty"` - // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. + // PublicCertData - READ-ONLY; Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. PublicCertData *string `json:"publicCertData,omitempty"` // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - // ProvisioningState - The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the SSL certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -4767,44 +4805,15 @@ func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCl return } -// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationGatewaysUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent { - ag, err = client.UpdateTagsResponder(ag.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request") - } - } - return -} - // ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway. type ApplicationGatewayTrustedRootCertificate struct { // ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate. *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the trusted root certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4819,12 +4828,6 @@ func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, err if agtrc.Name != nil { objectMap["name"] = agtrc.Name } - if agtrc.Etag != nil { - objectMap["etag"] = agtrc.Etag - } - if agtrc.Type != nil { - objectMap["type"] = agtrc.Type - } if agtrc.ID != nil { objectMap["id"] = agtrc.ID } @@ -4898,7 +4901,7 @@ type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` - // ProvisioningState - The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the trusted root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -4909,9 +4912,9 @@ type ApplicationGatewayURLPathMap struct { *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` // Name - Name of the URL path map that is unique within an Application Gateway. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Type of the resource. + // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4926,12 +4929,6 @@ func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { if agupm.Name != nil { objectMap["name"] = agupm.Name } - if agupm.Etag != nil { - objectMap["etag"] = agupm.Etag - } - if agupm.Type != nil { - objectMap["type"] = agupm.Type - } if agupm.ID != nil { objectMap["id"] = agupm.ID } @@ -5010,7 +5007,7 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` // PathRules - Path rule of URL path map resource. PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - // ProvisioningState - The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -5432,35 +5429,6 @@ func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSe return } -// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ApplicationSecurityGroupsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ApplicationSecurityGroupsUpdateTagsFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { - asg, err = client.UpdateTagsResponder(asg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request") - } - } - return -} - // AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations // that belongs to an ExpressRouteCircuit. type AuthorizationListResult struct { @@ -5611,11 +5579,11 @@ func NewAuthorizationListResultPage(getNextPage func(context.Context, Authorizat // AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. type AuthorizationPropertiesFormat struct { - // AuthorizationKey - The authorization key. + // AuthorizationKey - READ-ONLY; The authorization key. AuthorizationKey *string `json:"authorizationKey,omitempty"` - // AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse' + // AuthorizationUseStatus - READ-ONLY; The authorization use status. Possible values include: 'Available', 'InUse' AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - // ProvisioningState - The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -6151,6 +6119,165 @@ type AvailableProvidersListState struct { Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` } +// AvailableServiceAlias the available service alias. +type AvailableServiceAlias struct { + // Name - The name of the service alias. + Name *string `json:"name,omitempty"` + // ID - The ID of the service alias. + ID *string `json:"id,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` + // ResourceName - The resource name of the service alias. + ResourceName *string `json:"resourceName,omitempty"` +} + +// AvailableServiceAliasesResult an array of available service aliases. +type AvailableServiceAliasesResult struct { + autorest.Response `json:"-"` + // Value - An array of available service aliases. + Value *[]AvailableServiceAlias `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AvailableServiceAliasesResultIterator provides access to a complete listing of AvailableServiceAlias +// values. +type AvailableServiceAliasesResultIterator struct { + i int + page AvailableServiceAliasesResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AvailableServiceAliasesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AvailableServiceAliasesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailableServiceAliasesResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AvailableServiceAliasesResultIterator) Response() AvailableServiceAliasesResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AvailableServiceAliasesResultIterator) Value() AvailableServiceAlias { + if !iter.page.NotDone() { + return AvailableServiceAlias{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailableServiceAliasesResultIterator type. +func NewAvailableServiceAliasesResultIterator(page AvailableServiceAliasesResultPage) AvailableServiceAliasesResultIterator { + return AvailableServiceAliasesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (asar AvailableServiceAliasesResult) IsEmpty() bool { + return asar.Value == nil || len(*asar.Value) == 0 +} + +// availableServiceAliasesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (asar AvailableServiceAliasesResult) availableServiceAliasesResultPreparer(ctx context.Context) (*http.Request, error) { + if asar.NextLink == nil || len(to.String(asar.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(asar.NextLink))) +} + +// AvailableServiceAliasesResultPage contains a page of AvailableServiceAlias values. +type AvailableServiceAliasesResultPage struct { + fn func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error) + asar AvailableServiceAliasesResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AvailableServiceAliasesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailableServiceAliasesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.asar) + if err != nil { + return err + } + page.asar = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AvailableServiceAliasesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailableServiceAliasesResultPage) NotDone() bool { + return !page.asar.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailableServiceAliasesResultPage) Response() AvailableServiceAliasesResult { + return page.asar +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailableServiceAliasesResultPage) Values() []AvailableServiceAlias { + if page.asar.IsEmpty() { + return nil + } + return *page.asar.Value +} + +// Creates a new instance of the AvailableServiceAliasesResultPage type. +func NewAvailableServiceAliasesResultPage(getNextPage func(context.Context, AvailableServiceAliasesResult) (AvailableServiceAliasesResult, error)) AvailableServiceAliasesResultPage { + return AvailableServiceAliasesResultPage{fn: getNextPage} +} + // AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation, // indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct // from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous @@ -6307,6 +6434,8 @@ type AzureFirewallApplicationRule struct { TargetFqdns *[]string `json:"targetFqdns,omitempty"` // FqdnTags - List of FQDN Tags for this rule. FqdnTags *[]string `json:"fqdnTags,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` } // AzureFirewallApplicationRuleCollection application rule collection resource. @@ -6395,7 +6524,7 @@ type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { Action *AzureFirewallRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a application rule collection. Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the application rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -6762,7 +6891,7 @@ type AzureFirewallIPConfigurationPropertiesFormat struct { Subnet *SubResource `json:"subnet,omitempty"` // PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null. PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -6936,6 +7065,10 @@ type AzureFirewallNatRule struct { TranslatedAddress *string `json:"translatedAddress,omitempty"` // TranslatedPort - The translated port for this NAT rule. TranslatedPort *string `json:"translatedPort,omitempty"` + // TranslatedFqdn - The translated FQDN for this NAT rule. + TranslatedFqdn *string `json:"translatedFqdn,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` } // AzureFirewallNatRuleCollection NAT rule collection resource. @@ -7024,7 +7157,7 @@ type AzureFirewallNatRuleCollectionProperties struct { Action *AzureFirewallNatRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a NAT rule collection. Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the NAT rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -7042,6 +7175,12 @@ type AzureFirewallNetworkRule struct { DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` // DestinationPorts - List of destination ports. DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // DestinationFqdns - List of destination FQDNs. + DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` + // SourceIPGroups - List of source IpGroups for this rule. + SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` + // DestinationIPGroups - List of destination IpGroups for this rule. + DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` } // AzureFirewallNetworkRuleCollection network rule collection resource. @@ -7130,7 +7269,7 @@ type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { Action *AzureFirewallRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a network rule collection. Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the network rule collection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -7144,7 +7283,7 @@ type AzureFirewallPropertiesFormat struct { NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` // IPConfigurations - IP configuration of the Azure Firewall resource. IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` - // ProvisioningState - The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the Azure firewall resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` @@ -7154,6 +7293,43 @@ type AzureFirewallPropertiesFormat struct { FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` // HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall. HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"` + // Sku - The Azure Firewall Resource SKU. + Sku *AzureFirewallSku `json:"sku,omitempty"` + // AdditionalProperties - The additional properties used to further config this azure firewall. + AdditionalProperties map[string]*string `json:"additionalProperties"` +} + +// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat. +func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if afpf.ApplicationRuleCollections != nil { + objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections + } + if afpf.NatRuleCollections != nil { + objectMap["natRuleCollections"] = afpf.NatRuleCollections + } + if afpf.NetworkRuleCollections != nil { + objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections + } + if afpf.IPConfigurations != nil { + objectMap["ipConfigurations"] = afpf.IPConfigurations + } + if afpf.ThreatIntelMode != "" { + objectMap["threatIntelMode"] = afpf.ThreatIntelMode + } + if afpf.VirtualHub != nil { + objectMap["virtualHub"] = afpf.VirtualHub + } + if afpf.FirewallPolicy != nil { + objectMap["firewallPolicy"] = afpf.FirewallPolicy + } + if afpf.Sku != nil { + objectMap["sku"] = afpf.Sku + } + if afpf.AdditionalProperties != nil { + objectMap["additionalProperties"] = afpf.AdditionalProperties + } + return json.Marshal(objectMap) } // AzureFirewallPublicIPAddress public IP Address associated with azure firewall. @@ -7220,6 +7396,14 @@ func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (a return } +// AzureFirewallSku SKU of an Azure Firewall. +type AzureFirewallSku struct { + // Name - Name of an Azure Firewall SKU. Possible values include: 'AZFWVNet', 'AZFWHub' + Name AzureFirewallSkuName `json:"name,omitempty"` + // Tier - Tier of an Azure Firewall. Possible values include: 'Standard' + Tier AzureFirewallSkuTier `json:"tier,omitempty"` +} + // AzureReachabilityReport azure reachability report details. type AzureReachabilityReport struct { autorest.Response `json:"-"` @@ -7280,7 +7464,7 @@ type BackendAddressPool struct { *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -7297,9 +7481,6 @@ func (bap BackendAddressPool) MarshalJSON() ([]byte, error) { if bap.Name != nil { objectMap["name"] = bap.Name } - if bap.Etag != nil { - objectMap["etag"] = bap.Etag - } if bap.ID != nil { objectMap["id"] = bap.ID } @@ -7376,7 +7557,7 @@ type BackendAddressPoolPropertiesFormat struct { OutboundRule *SubResource `json:"outboundRule,omitempty"` // OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool. OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - // ProvisioningState - The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -7590,7 +7771,7 @@ type BastionHostIPConfigurationPropertiesFormat struct { Subnet *SubResource `json:"subnet,omitempty"` // PublicIPAddress - Reference of the PublicIP resource. PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the bastion host IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic' PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` @@ -7748,7 +7929,7 @@ type BastionHostPropertiesFormat struct { IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` // DNSName - FQDN for the endpoint on which bastion host is accessible. DNSName *string `json:"dnsName,omitempty"` - // ProvisioningState - The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -8122,13 +8303,13 @@ type CheckPrivateLinkServiceVisibilityRequest struct { PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` } -// CloudError an error response from the Batch service. +// CloudError an error response from the service. type CloudError struct { // Error - Cloud error body. Error *CloudErrorBody `json:"error,omitempty"` } -// CloudErrorBody an error response from the Batch service. +// CloudErrorBody an error response from the service. type CloudErrorBody struct { // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string `json:"code,omitempty"` @@ -8160,7 +8341,7 @@ type ConfigurationDiagnosticProfile struct { Source *string `json:"source,omitempty"` // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. Destination *string `json:"destination,omitempty"` - // DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). + // DestinationPort - Traffic destination port. Accepted values are '*' and a single port in the range (0 - 65535). DestinationPort *string `json:"destinationPort,omitempty"` } @@ -8684,7 +8865,7 @@ type ContainerNetworkInterface struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -8699,9 +8880,6 @@ func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) { if cni.Name != nil { objectMap["name"] = cni.Name } - if cni.Etag != nil { - objectMap["etag"] = cni.Etag - } if cni.ID != nil { objectMap["id"] = cni.ID } @@ -8776,7 +8954,7 @@ type ContainerNetworkInterfaceConfiguration struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -8791,9 +8969,6 @@ func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) if cnic.Name != nil { objectMap["name"] = cnic.Name } - if cnic.Etag != nil { - objectMap["etag"] = cnic.Etag - } if cnic.ID != nil { objectMap["id"] = cnic.ID } @@ -8879,7 +9054,7 @@ type ContainerNetworkInterfaceIPConfiguration struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` } @@ -8892,9 +9067,6 @@ func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, err if cniic.Name != nil { objectMap["name"] = cniic.Name } - if cniic.Etag != nil { - objectMap["etag"] = cniic.Etag - } return json.Marshal(objectMap) } @@ -8958,11 +9130,11 @@ type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { // ContainerNetworkInterfacePropertiesFormat properties of container network interface. type ContainerNetworkInterfacePropertiesFormat struct { - // ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created. + // ContainerNetworkInterfaceConfiguration - READ-ONLY; Container network interface configuration from which this container network interface is created. ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` // Container - Reference to the container to which this container network interface is attached. Container *Container `json:"container,omitempty"` - // IPConfigurations - Reference to the ip configuration on this container nic. + // IPConfigurations - READ-ONLY; Reference to the ip configuration on this container nic. IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the container network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -9020,35 +9192,6 @@ func (future *DdosCustomPoliciesDeleteFuture) Result(client DdosCustomPoliciesCl return } -// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosCustomPoliciesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *DdosCustomPoliciesUpdateTagsFuture) Result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { - dcp, err = client.UpdateTagsResponder(dcp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request") - } - } - return -} - // DdosCustomPolicy a DDoS custom policy in a resource group. type DdosCustomPolicy struct { autorest.Response `json:"-"` @@ -9496,35 +9639,6 @@ func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlans return } -// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *DdosProtectionPlansUpdateTagsFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { - dpp, err = client.UpdateTagsResponder(dpp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request") - } - } - return -} - // DdosSettings contains the DDoS protection settings of the public IP. type DdosSettings struct { // DdosCustomPolicy - The DDoS custom policy associated with the public IP. @@ -9539,7 +9653,7 @@ type Delegation struct { *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -9554,9 +9668,6 @@ func (d Delegation) MarshalJSON() ([]byte, error) { if d.Name != nil { objectMap["name"] = d.Name } - if d.Etag != nil { - objectMap["etag"] = d.Etag - } if d.ID != nil { objectMap["id"] = d.ID } @@ -10488,7 +10599,7 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct { AddressPrefix *string `json:"addressPrefix,omitempty"` // AuthorizationKey - The authorization key. AuthorizationKey *string `json:"authorizationKey,omitempty"` - // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + // CircuitConnectionStatus - READ-ONLY; Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -10789,7 +10900,7 @@ type ExpressRouteCircuitPeeringConfig struct { AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering. AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - // AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' + // AdvertisedPublicPrefixesState - READ-ONLY; The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` // LegacyMode - The legacy mode of the peering. LegacyMode *int32 `json:"legacyMode,omitempty"` @@ -10959,7 +11070,7 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - The Azure ASN. + // AzureASN - READ-ONLY; The Azure ASN. AzureASN *int32 `json:"azureASN,omitempty"` // PeerASN - The peer ASN. PeerASN *int64 `json:"peerASN,omitempty"` @@ -10967,9 +11078,9 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` // SecondaryPeerAddressPrefix - The secondary address prefix. SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - The primary port. + // PrimaryAzurePort - READ-ONLY; The primary port. PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The secondary port. + // SecondaryAzurePort - READ-ONLY; The secondary port. SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` // SharedKey - The shared key. SharedKey *string `json:"sharedKey,omitempty"` @@ -10979,11 +11090,11 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` // Stats - The peering stats of express route circuit. Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - // ProvisioningState - The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // GatewayManagerEtag - The GatewayManager Etag. GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Who was the last to modify the peering. + // LastModifiedBy - READ-ONLY; Who was the last to modify the peering. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // RouteFilter - The reference of the RouteFilter resource. RouteFilter *SubResource `json:"routeFilter,omitempty"` @@ -10991,7 +11102,7 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` // ExpressRouteConnection - The ExpressRoute connection. ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` - // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. + // Connections - READ-ONLY; The list of circuit connections associated with Azure Private Peering for this circuit. Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` // PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` @@ -11053,15 +11164,15 @@ func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRout type ExpressRouteCircuitPropertiesFormat struct { // AllowClassicOperations - Allow classic operations. AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - // CircuitProvisioningState - The CircuitProvisioningState state of the resource. + // CircuitProvisioningState - READ-ONLY; The CircuitProvisioningState state of the resource. CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + // ServiceProviderProvisioningState - READ-ONLY; The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` // Authorizations - The list of authorizations. Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` // Peerings - The list of peerings. Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // ServiceKey - The ServiceKey. + // ServiceKey - READ-ONLY; The ServiceKey. ServiceKey *string `json:"serviceKey,omitempty"` // ServiceProviderNotes - The ServiceProviderNotes. ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` @@ -11073,11 +11184,11 @@ type ExpressRouteCircuitPropertiesFormat struct { BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. Stag *int32 `json:"stag,omitempty"` - // ProvisioningState - The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the express route circuit resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // GatewayManagerEtag - The GatewayManager Etag. GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // GlobalReachEnabled - Flag denoting Global reach status. + // GlobalReachEnabled - READ-ONLY; Flag denoting Global reach status. GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` } @@ -11318,35 +11429,6 @@ type ExpressRouteCircuitStats struct { SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` } -// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.UpdateTagsResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return -} - // ExpressRouteConnection expressRouteConnection resource. type ExpressRouteConnection struct { autorest.Response `json:"-"` @@ -11430,7 +11512,7 @@ type ExpressRouteConnectionList struct { // ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource. type ExpressRouteConnectionProperties struct { - // ProvisioningState - The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the express route connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // ExpressRouteCircuitPeering - The ExpressRoute circuit peering. ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` @@ -11438,6 +11520,8 @@ type ExpressRouteConnectionProperties struct { AuthorizationKey *string `json:"authorizationKey,omitempty"` // RoutingWeight - The routing weight associated to the connection. RoutingWeight *int32 `json:"routingWeight,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` } // ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of @@ -12009,7 +12093,7 @@ type ExpressRouteCrossConnectionPeeringProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // GatewayManagerEtag - The GatewayManager Etag. GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Who was the last to modify the peering. + // LastModifiedBy - READ-ONLY; Who was the last to modify the peering. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // Ipv6PeeringConfig - The IPv6 peering configuration. Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` @@ -12229,35 +12313,6 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ExpressRouteCrossConnectionsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.UpdateTagsResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return -} - // ExpressRouteGateway expressRoute gateway resource. type ExpressRouteGateway struct { autorest.Response `json:"-"` @@ -12386,7 +12441,7 @@ type ExpressRouteGatewayProperties struct { AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - // ProvisioningState - The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` @@ -13011,7 +13066,7 @@ type ExpressRoutePortPropertiesFormat struct { Circuits *[]SubResource `json:"circuits,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the express route port resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ResourceGUID - The resource GUID property of the express route port resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the express route port resource. ResourceGUID *string `json:"resourceGuid,omitempty"` } @@ -13339,35 +13394,6 @@ type ExpressRoutePortsLocationPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRoutePortsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRoutePortsUpdateTagsFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { - erp, err = client.UpdateTagsResponder(erp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request") - } - } - return -} - // ExpressRouteServiceProvider a ExpressRouteResourceProvider object. type ExpressRouteServiceProvider struct { // ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider. @@ -13633,7 +13659,7 @@ type ExpressRouteServiceProviderPropertiesFormat struct { PeeringLocations *[]string `json:"peeringLocations,omitempty"` // BandwidthsOffered - A list of bandwidths offered. BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - // ProvisioningState - The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the express route service provider resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -13921,7 +13947,7 @@ func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error { // FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction. type FirewallPolicyFilterRuleAction struct { - // Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny', 'FirewallPolicyFilterRuleActionTypeAlert' + // Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny' Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"` } @@ -14214,7 +14240,7 @@ func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error { // FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction. type FirewallPolicyNatRuleAction struct { - // Type - The type of action. Possible values include: 'DNAT', 'SNAT' + // Type - The type of action. Possible values include: 'DNAT' Type FirewallPolicyNatRuleActionType `json:"type,omitempty"` } @@ -14222,7 +14248,7 @@ type FirewallPolicyNatRuleAction struct { type FirewallPolicyPropertiesFormat struct { // RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups. RuleGroups *[]SubResource `json:"ruleGroups,omitempty"` - // ProvisioningState - The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // BasePolicy - The parent firewall policy from which rules are inherited. BasePolicy *SubResource `json:"basePolicy,omitempty"` @@ -14673,7 +14699,7 @@ type FirewallPolicyRuleGroupProperties struct { Priority *int32 `json:"priority,omitempty"` // Rules - Group of Firewall Policy rules. Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"` - // ProvisioningState - The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the firewall policy rule group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -14872,7 +14898,7 @@ type FrontendIPConfiguration struct { *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -14891,9 +14917,6 @@ func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { if fic.Name != nil { objectMap["name"] = fic.Name } - if fic.Etag != nil { - objectMap["etag"] = fic.Etag - } if fic.Zones != nil { objectMap["zones"] = fic.Zones } @@ -14994,7 +15017,7 @@ type FrontendIPConfigurationPropertiesFormat struct { PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` // PublicIPPrefix - The reference of the Public IP Prefix resource. PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - // ProvisioningState - The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -15023,6 +15046,35 @@ type GatewayRouteListResult struct { Value *[]GatewayRoute `json:"value,omitempty"` } +// GeneratevirtualwanvpnserverconfigurationvpnprofileFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type GeneratevirtualwanvpnserverconfigurationvpnprofileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GeneratevirtualwanvpnserverconfigurationvpnprofileFuture) Result(client BaseClient) (vpr VpnProfileResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { + vpr, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileResponder(vpr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.GeneratevirtualwanvpnserverconfigurationvpnprofileFuture", "Result", vpr.Response.Response, "Failure responding to request") + } + } + return +} + // GetVpnSitesConfigurationRequest list of Vpn-Sites. type GetVpnSitesConfigurationRequest struct { // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. @@ -15146,7 +15198,7 @@ type HubVirtualNetworkConnectionProperties struct { AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` // EnableInternetSecurity - Enable internet security. EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - // ProvisioningState - The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the hub virtual network connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -15156,7 +15208,7 @@ type InboundNatPool struct { *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -15173,9 +15225,6 @@ func (inp InboundNatPool) MarshalJSON() ([]byte, error) { if inp.Name != nil { objectMap["name"] = inp.Name } - if inp.Etag != nil { - objectMap["etag"] = inp.Etag - } if inp.ID != nil { objectMap["id"] = inp.ID } @@ -15260,7 +15309,7 @@ type InboundNatPoolPropertiesFormat struct { EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT pool resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -15271,7 +15320,7 @@ type InboundNatRule struct { *InboundNatRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -15288,9 +15337,6 @@ func (inr InboundNatRule) MarshalJSON() ([]byte, error) { if inr.Name != nil { objectMap["name"] = inr.Name } - if inr.Etag != nil { - objectMap["etag"] = inr.Etag - } if inr.ID != nil { objectMap["id"] = inr.ID } @@ -15521,7 +15567,7 @@ type InboundNatRulePropertiesFormat struct { EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -15579,7 +15625,7 @@ func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) // IntentPolicy network Intent Policy resource. type IntentPolicy struct { - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -15596,9 +15642,6 @@ type IntentPolicy struct { // MarshalJSON is the custom marshaler for IntentPolicy. func (IP IntentPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if IP.Etag != nil { - objectMap["etag"] = IP.Etag - } if IP.ID != nil { objectMap["id"] = IP.ID } @@ -15624,7 +15667,7 @@ type Interface struct { autorest.Response `json:"-"` // InterfacePropertiesFormat - Properties of the network interface. *InterfacePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -15644,9 +15687,6 @@ func (i Interface) MarshalJSON() ([]byte, error) { if i.InterfacePropertiesFormat != nil { objectMap["properties"] = i.InterfacePropertiesFormat } - if i.Etag != nil { - objectMap["etag"] = i.Etag - } if i.ID != nil { objectMap["id"] = i.ID } @@ -15749,13 +15789,13 @@ type InterfaceAssociation struct { type InterfaceDNSSettings struct { // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. DNSServers *[]string `json:"dnsServers,omitempty"` - // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. + // AppliedDNSServers - READ-ONLY; If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` - // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. + // InternalFqdn - READ-ONLY; Fully qualified DNS name supporting internal communications between VMs in the same virtual network. InternalFqdn *string `json:"internalFqdn,omitempty"` - // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. + // InternalDomainNameSuffix - READ-ONLY; Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` } @@ -15766,7 +15806,7 @@ type InterfaceIPConfiguration struct { *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -15781,9 +15821,6 @@ func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { if iic.Name != nil { objectMap["name"] = iic.Name } - if iic.Etag != nil { - objectMap["etag"] = iic.Etag - } if iic.ID != nil { objectMap["id"] = iic.ID } @@ -16023,7 +16060,7 @@ type InterfaceIPConfigurationPropertiesFormat struct { PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the network interface IP configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateLinkConnectionProperties - READ-ONLY; PrivateLinkConnection properties for the network interface. PrivateLinkConnectionProperties *InterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` @@ -16331,13 +16368,13 @@ type InterfacePropertiesFormat struct { PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // IPConfigurations - A list of IPConfigurations of the network interface. IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // TapConfigurations - A list of TapConfigurations of the network interface. + // TapConfigurations - READ-ONLY; A list of TapConfigurations of the network interface. TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"` // DNSSettings - The DNS settings in network interface. DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` - // MacAddress - The MAC address of the network interface. + // MacAddress - READ-ONLY; The MAC address of the network interface. MacAddress *string `json:"macAddress,omitempty"` - // Primary - Whether this is a primary network interface on a virtual machine. + // Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine. Primary *bool `json:"primary,omitempty"` // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` @@ -16345,9 +16382,9 @@ type InterfacePropertiesFormat struct { EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources. HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - // ResourceGUID - The resource GUID property of the network interface resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -16461,35 +16498,6 @@ func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client return } -// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.UpdateTagsResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - // InterfaceTapConfiguration tap configuration in a Network Interface. type InterfaceTapConfiguration struct { autorest.Response `json:"-"` @@ -16497,7 +16505,7 @@ type InterfaceTapConfiguration struct { *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` @@ -16514,9 +16522,6 @@ func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { if itc.Name != nil { objectMap["name"] = itc.Name } - if itc.Etag != nil { - objectMap["etag"] = itc.Etag - } if itc.ID != nil { objectMap["id"] = itc.ID } @@ -16805,7 +16810,7 @@ type IPConfiguration struct { *IPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -16820,9 +16825,6 @@ func (ic IPConfiguration) MarshalJSON() ([]byte, error) { if ic.Name != nil { objectMap["name"] = ic.Name } - if ic.Etag != nil { - objectMap["etag"] = ic.Etag - } if ic.ID != nil { objectMap["id"] = ic.ID } @@ -16888,7 +16890,7 @@ type IPConfigurationProfile struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -16903,9 +16905,6 @@ func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) { if icp.Name != nil { objectMap["name"] = icp.Name } - if icp.Etag != nil { - objectMap["etag"] = icp.Etag - } if icp.ID != nil { objectMap["id"] = icp.ID } @@ -16990,74 +16989,397 @@ type IPConfigurationPropertiesFormat struct { Subnet *Subnet `json:"subnet,omitempty"` // PublicIPAddress - The reference of the public IP resource. PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ProvisioningState - The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection. -type IpsecPolicy struct { - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +// IPGroup the IpGroups resource information. +type IPGroup struct { + autorest.Response `json:"-"` + // IPGroupPropertiesFormat - Properties of the IpGroups. + *IPGroupPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// IPTag contains the IpTag associated with the object. -type IPTag struct { - // IPTagType - The IP tag type. Example: FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - // Tag - The value of the IP tag associated with the public IP. Example: SQL. - Tag *string `json:"tag,omitempty"` +// MarshalJSON is the custom marshaler for IPGroup. +func (ig IPGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ig.IPGroupPropertiesFormat != nil { + objectMap["properties"] = ig.IPGroupPropertiesFormat + } + if ig.ID != nil { + objectMap["id"] = ig.ID + } + if ig.Location != nil { + objectMap["location"] = ig.Location + } + if ig.Tags != nil { + objectMap["tags"] = ig.Tags + } + return json.Marshal(objectMap) } -// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. -type Ipv6ExpressRouteCircuitPeeringConfig struct { - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *SubResource `json:"routeFilter,omitempty"` - // State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' - State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +// UnmarshalJSON is the custom unmarshaler for IPGroup struct. +func (ig *IPGroup) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var IPGroupPropertiesFormat IPGroupPropertiesFormat + err = json.Unmarshal(*v, &IPGroupPropertiesFormat) + if err != nil { + return err + } + ig.IPGroupPropertiesFormat = &IPGroupPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ig.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ig.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ig.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ig.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ig.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ig.Tags = tags + } + } + } + + return nil } -// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get -// the next set of results. -type ListHubVirtualNetworkConnectionsResult struct { +// IPGroupListResult response for the ListIpGroups API service call. +type IPGroupListResult struct { autorest.Response `json:"-"` - // Value - List of HubVirtualNetworkConnections. - Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - The list of IpGroups information resources. + Value *[]IPGroup `json:"value,omitempty"` + // NextLink - URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of -// HubVirtualNetworkConnection values. -type ListHubVirtualNetworkConnectionsResultIterator struct { +// IPGroupListResultIterator provides access to a complete listing of IPGroup values. +type IPGroupListResultIterator struct { i int - page ListHubVirtualNetworkConnectionsResultPage + page IPGroupListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *IPGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *IPGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter IPGroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter IPGroupListResultIterator) Response() IPGroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter IPGroupListResultIterator) Value() IPGroup { + if !iter.page.NotDone() { + return IPGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the IPGroupListResultIterator type. +func NewIPGroupListResultIterator(page IPGroupListResultPage) IPGroupListResultIterator { + return IPGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (iglr IPGroupListResult) IsEmpty() bool { + return iglr.Value == nil || len(*iglr.Value) == 0 +} + +// iPGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (iglr IPGroupListResult) iPGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if iglr.NextLink == nil || len(to.String(iglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(iglr.NextLink))) +} + +// IPGroupListResultPage contains a page of IPGroup values. +type IPGroupListResultPage struct { + fn func(context.Context, IPGroupListResult) (IPGroupListResult, error) + iglr IPGroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *IPGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IPGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.iglr) + if err != nil { + return err + } + page.iglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *IPGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page IPGroupListResultPage) NotDone() bool { + return !page.iglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page IPGroupListResultPage) Response() IPGroupListResult { + return page.iglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page IPGroupListResultPage) Values() []IPGroup { + if page.iglr.IsEmpty() { + return nil + } + return *page.iglr.Value +} + +// Creates a new instance of the IPGroupListResultPage type. +func NewIPGroupListResultPage(getNextPage func(context.Context, IPGroupListResult) (IPGroupListResult, error)) IPGroupListResultPage { + return IPGroupListResultPage{fn: getNextPage} +} + +// IPGroupPropertiesFormat the IpGroups property information. +type IPGroupPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the IpGroups resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // IPAddresses - IpAddresses/IpAddressPrefixes in the IpGroups resource. + IPAddresses *[]string `json:"ipAddresses,omitempty"` + // Firewalls - READ-ONLY; List of references to Azure resources that this IpGroups is associated with. + Firewalls *[]SubResource `json:"firewalls,omitempty"` +} + +// IPGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *IPGroupsCreateOrUpdateFuture) Result(client IPGroupsClient) (ig IPGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.IPGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ig.Response.Response, err = future.GetResult(sender); err == nil && ig.Response.Response.StatusCode != http.StatusNoContent { + ig, err = client.CreateOrUpdateResponder(ig.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsCreateOrUpdateFuture", "Result", ig.Response.Response, "Failure responding to request") + } + } + return +} + +// IPGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IPGroupsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *IPGroupsDeleteFuture) Result(client IPGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.IPGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.IPGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection. +type IpsecPolicy struct { + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +} + +// IPTag contains the IpTag associated with the object. +type IPTag struct { + // IPTagType - The IP tag type. Example: FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - The value of the IP tag associated with the public IP. Example: SQL. + Tag *string `json:"tag,omitempty"` +} + +// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. +type Ipv6ExpressRouteCircuitPeeringConfig struct { + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // RouteFilter - The reference of the RouteFilter resource. + RouteFilter *SubResource `json:"routeFilter,omitempty"` + // State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +} + +// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get +// the next set of results. +type ListHubVirtualNetworkConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of HubVirtualNetworkConnections. + Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of +// HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultIterator struct { + i int + page ListHubVirtualNetworkConnectionsResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -17331,29 +17653,34 @@ func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVp return ListP2SVpnGatewaysResultPage{fn: getNextPage} } -// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations -// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get -// the next set of results. -type ListP2SVpnServerConfigurationsResult struct { +// ListString ... +type ListString struct { + autorest.Response `json:"-"` + Value *[]string `json:"value,omitempty"` +} + +// ListVirtualHubRouteTableV2sResult list of VirtualHubRouteTableV2s and a URL nextLink to get the next set +// of results. +type ListVirtualHubRouteTableV2sResult struct { autorest.Response `json:"-"` - // Value - List of P2SVpnServerConfigurations. - Value *[]P2SVpnServerConfiguration `json:"value,omitempty"` + // Value - List of VirtualHubRouteTableV2s. + Value *[]VirtualHubRouteTableV2 `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of -// P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultIterator struct { +// ListVirtualHubRouteTableV2sResultIterator provides access to a complete listing of +// VirtualHubRouteTableV2 values. +type ListVirtualHubRouteTableV2sResultIterator struct { i int - page ListP2SVpnServerConfigurationsResultPage + page ListVirtualHubRouteTableV2sResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVirtualHubRouteTableV2sResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -17378,62 +17705,62 @@ func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx co // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error { +func (iter *ListVirtualHubRouteTableV2sResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool { +func (iter ListVirtualHubRouteTableV2sResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult { +func (iter ListVirtualHubRouteTableV2sResultIterator) Response() ListVirtualHubRouteTableV2sResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration { +func (iter ListVirtualHubRouteTableV2sResultIterator) Value() VirtualHubRouteTableV2 { if !iter.page.NotDone() { - return P2SVpnServerConfiguration{} + return VirtualHubRouteTableV2{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type. -func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator { - return ListP2SVpnServerConfigurationsResultIterator{page: page} +// Creates a new instance of the ListVirtualHubRouteTableV2sResultIterator type. +func NewListVirtualHubRouteTableV2sResultIterator(page ListVirtualHubRouteTableV2sResultPage) ListVirtualHubRouteTableV2sResultIterator { + return ListVirtualHubRouteTableV2sResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool { - return lpvscr.Value == nil || len(*lpvscr.Value) == 0 +func (lvhrtvr ListVirtualHubRouteTableV2sResult) IsEmpty() bool { + return lvhrtvr.Value == nil || len(*lvhrtvr.Value) == 0 } -// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. +// listVirtualHubRouteTableV2sResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { - if lpvscr.NextLink == nil || len(to.String(lpvscr.NextLink)) < 1 { +func (lvhrtvr ListVirtualHubRouteTableV2sResult) listVirtualHubRouteTableV2sResultPreparer(ctx context.Context) (*http.Request, error) { + if lvhrtvr.NextLink == nil || len(to.String(lvhrtvr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lpvscr.NextLink))) + autorest.WithBaseURL(to.String(lvhrtvr.NextLink))) } -// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultPage struct { - fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error) - lpvscr ListP2SVpnServerConfigurationsResult +// ListVirtualHubRouteTableV2sResultPage contains a page of VirtualHubRouteTableV2 values. +type ListVirtualHubRouteTableV2sResultPage struct { + fn func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error) + lvhrtvr ListVirtualHubRouteTableV2sResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVirtualHubRouteTableV2sResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubRouteTableV2sResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -17442,48 +17769,42 @@ func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lpvscr) + next, err := page.fn(ctx, page.lvhrtvr) if err != nil { return err } - page.lpvscr = next + page.lvhrtvr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ListP2SVpnServerConfigurationsResultPage) Next() error { +func (page *ListVirtualHubRouteTableV2sResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool { - return !page.lpvscr.IsEmpty() +func (page ListVirtualHubRouteTableV2sResultPage) NotDone() bool { + return !page.lvhrtvr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult { - return page.lpvscr +func (page ListVirtualHubRouteTableV2sResultPage) Response() ListVirtualHubRouteTableV2sResult { + return page.lvhrtvr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration { - if page.lpvscr.IsEmpty() { +func (page ListVirtualHubRouteTableV2sResultPage) Values() []VirtualHubRouteTableV2 { + if page.lvhrtvr.IsEmpty() { return nil } - return *page.lpvscr.Value + return *page.lvhrtvr.Value } -// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type. -func NewListP2SVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage { - return ListP2SVpnServerConfigurationsResultPage{fn: getNextPage} -} - -// ListString ... -type ListString struct { - autorest.Response `json:"-"` - Value *[]string `json:"value,omitempty"` +// Creates a new instance of the ListVirtualHubRouteTableV2sResultPage type. +func NewListVirtualHubRouteTableV2sResultPage(getNextPage func(context.Context, ListVirtualHubRouteTableV2sResult) (ListVirtualHubRouteTableV2sResult, error)) ListVirtualHubRouteTableV2sResultPage { + return ListVirtualHubRouteTableV2sResultPage{fn: getNextPage} } // ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a @@ -18074,28 +18395,28 @@ func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatew return ListVpnGatewaysResultPage{fn: getNextPage} } -// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn -// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVpnSiteLinkConnectionsResult struct { +// ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains +// a list of VpnServerConfigurations and a URL nextLink to get the next set of results. +type ListVpnServerConfigurationsResult struct { autorest.Response `json:"-"` - // Value - List of VpnSiteLinkConnections. - Value *[]VpnSiteLinkConnection `json:"value,omitempty"` + // Value - List of VpnServerConfigurations. + Value *[]VpnServerConfiguration `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection -// values. -type ListVpnSiteLinkConnectionsResultIterator struct { +// ListVpnServerConfigurationsResultIterator provides access to a complete listing of +// VpnServerConfiguration values. +type ListVpnServerConfigurationsResultIterator struct { i int - page ListVpnSiteLinkConnectionsResultPage + page ListVpnServerConfigurationsResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -18120,62 +18441,62 @@ func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error { +func (iter *ListVpnServerConfigurationsResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool { +func (iter ListVpnServerConfigurationsResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult { +func (iter ListVpnServerConfigurationsResultIterator) Response() ListVpnServerConfigurationsResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection { +func (iter ListVpnServerConfigurationsResultIterator) Value() VpnServerConfiguration { if !iter.page.NotDone() { - return VpnSiteLinkConnection{} + return VpnServerConfiguration{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type. -func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator { - return ListVpnSiteLinkConnectionsResultIterator{page: page} +// Creates a new instance of the ListVpnServerConfigurationsResultIterator type. +func NewListVpnServerConfigurationsResultIterator(page ListVpnServerConfigurationsResultPage) ListVpnServerConfigurationsResultIterator { + return ListVpnServerConfigurationsResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool { - return lvslcr.Value == nil || len(*lvslcr.Value) == 0 +func (lvscr ListVpnServerConfigurationsResult) IsEmpty() bool { + return lvscr.Value == nil || len(*lvscr.Value) == 0 } -// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// listVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvslcr.NextLink == nil || len(to.String(lvslcr.NextLink)) < 1 { +func (lvscr ListVpnServerConfigurationsResult) listVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvscr.NextLink == nil || len(to.String(lvscr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvslcr.NextLink))) + autorest.WithBaseURL(to.String(lvscr.NextLink))) } -// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values. -type ListVpnSiteLinkConnectionsResultPage struct { - fn func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error) - lvslcr ListVpnSiteLinkConnectionsResult +// ListVpnServerConfigurationsResultPage contains a page of VpnServerConfiguration values. +type ListVpnServerConfigurationsResultPage struct { + fn func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error) + lvscr ListVpnServerConfigurationsResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationsResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -18184,65 +18505,213 @@ func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Co tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvslcr) + next, err := page.fn(ctx, page.lvscr) if err != nil { return err } - page.lvslcr = next + page.lvscr = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ListVpnSiteLinkConnectionsResultPage) Next() error { +func (page *ListVpnServerConfigurationsResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool { - return !page.lvslcr.IsEmpty() +func (page ListVpnServerConfigurationsResultPage) NotDone() bool { + return !page.lvscr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult { - return page.lvslcr +func (page ListVpnServerConfigurationsResultPage) Response() ListVpnServerConfigurationsResult { + return page.lvscr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection { - if page.lvslcr.IsEmpty() { +func (page ListVpnServerConfigurationsResultPage) Values() []VpnServerConfiguration { + if page.lvscr.IsEmpty() { return nil } - return *page.lvslcr.Value + return *page.lvscr.Value } -// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. -func NewListVpnSiteLinkConnectionsResultPage(getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { - return ListVpnSiteLinkConnectionsResultPage{fn: getNextPage} +// Creates a new instance of the ListVpnServerConfigurationsResultPage type. +func NewListVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListVpnServerConfigurationsResult) (ListVpnServerConfigurationsResult, error)) ListVpnServerConfigurationsResultPage { + return ListVpnServerConfigurationsResultPage{fn: getNextPage} } -// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks -// and a URL nextLink to get the next set of results. -type ListVpnSiteLinksResult struct { +// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn +// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnSiteLinkConnectionsResult struct { autorest.Response `json:"-"` - // Value - List of VpnSitesLinks. - Value *[]VpnSiteLink `json:"value,omitempty"` + // Value - List of VpnSiteLinkConnections. + Value *[]VpnSiteLinkConnection `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values. -type ListVpnSiteLinksResultIterator struct { +// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection +// values. +type ListVpnSiteLinkConnectionsResultIterator struct { i int - page ListVpnSiteLinksResultPage + page ListVpnSiteLinkConnectionsResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection { + if !iter.page.NotDone() { + return VpnSiteLinkConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type. +func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator { + return ListVpnSiteLinkConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool { + return lvslcr.Value == nil || len(*lvslcr.Value) == 0 +} + +// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvslcr.NextLink == nil || len(to.String(lvslcr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvslcr.NextLink))) +} + +// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values. +type ListVpnSiteLinkConnectionsResultPage struct { + fn func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error) + lvslcr ListVpnSiteLinkConnectionsResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lvslcr) + if err != nil { + return err + } + page.lvslcr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListVpnSiteLinkConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool { + return !page.lvslcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult { + return page.lvslcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection { + if page.lvslcr.IsEmpty() { + return nil + } + return *page.lvslcr.Value +} + +// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. +func NewListVpnSiteLinkConnectionsResultPage(getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { + return ListVpnSiteLinkConnectionsResultPage{fn: getNextPage} +} + +// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks +// and a URL nextLink to get the next set of results. +type ListVpnSiteLinksResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSitesLinks. + Value *[]VpnSiteLink `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values. +type ListVpnSiteLinksResultIterator struct { + i int + page ListVpnSiteLinksResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -18523,7 +18992,7 @@ type LoadBalancer struct { Sku *LoadBalancerSku `json:"sku,omitempty"` // LoadBalancerPropertiesFormat - Properties of load balancer. *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -18546,9 +19015,6 @@ func (lb LoadBalancer) MarshalJSON() ([]byte, error) { if lb.LoadBalancerPropertiesFormat != nil { objectMap["properties"] = lb.LoadBalancerPropertiesFormat } - if lb.Etag != nil { - objectMap["etag"] = lb.Etag - } if lb.ID != nil { objectMap["id"] = lb.ID } @@ -19543,9 +20009,9 @@ type LoadBalancerPropertiesFormat struct { InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` // OutboundRules - The outbound rules. OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - // ResourceGUID - The resource GUID property of the load balancer resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the load balancer resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the load balancer resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -19607,35 +20073,6 @@ type LoadBalancerSku struct { Name LoadBalancerSkuName `json:"name,omitempty"` } -// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.UpdateTagsResponder(lb.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") - } - } - return -} - // LoadBalancingRule a load balancing rule for a load balancer. type LoadBalancingRule struct { autorest.Response `json:"-"` @@ -19643,7 +20080,7 @@ type LoadBalancingRule struct { *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -19660,9 +20097,6 @@ func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { if lbr.Name != nil { objectMap["name"] = lbr.Name } - if lbr.Etag != nil { - objectMap["etag"] = lbr.Etag - } if lbr.ID != nil { objectMap["id"] = lbr.ID } @@ -19753,7 +20187,7 @@ type LoadBalancingRulePropertiesFormat struct { EnableTCPReset *bool `json:"enableTcpReset,omitempty"` // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - // ProvisioningState - The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the load balancing rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -19762,7 +20196,7 @@ type LocalNetworkGateway struct { autorest.Response `json:"-"` // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -19782,9 +20216,6 @@ func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { if lng.LocalNetworkGatewayPropertiesFormat != nil { objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat } - if lng.Etag != nil { - objectMap["etag"] = lng.Etag - } if lng.ID != nil { objectMap["id"] = lng.ID } @@ -20030,7 +20461,7 @@ type LocalNetworkGatewayPropertiesFormat struct { GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` // BgpSettings - Local network gateway's BGP speaker settings. BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ResourceGUID - The resource GUID property of the local network gateway resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the local network gateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the local network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -20088,35 +20519,6 @@ func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewa return } -// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.UpdateTagsResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") - } - } - return -} - // LogSpecification description of logging specification. type LogSpecification struct { // Name - The name of the specification. @@ -20127,6 +20529,40 @@ type LogSpecification struct { BlobDuration *string `json:"blobDuration,omitempty"` } +// ManagedRuleGroupOverride defines a managed rule group override setting. +type ManagedRuleGroupOverride struct { + // RuleGroupName - Describes the managed rule group to override. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Rules - List of rules that will be disabled. If none specified, all rules in the group will be disabled. + Rules *[]ManagedRuleOverride `json:"rules,omitempty"` +} + +// ManagedRuleOverride defines a managed rule group override setting. +type ManagedRuleOverride struct { + // RuleID - Identifier for the managed rule. + RuleID *string `json:"ruleId,omitempty"` + // State - Describes the state of the managed rule. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled' + State ManagedRuleEnabledState `json:"state,omitempty"` +} + +// ManagedRulesDefinition allow to exclude some variable satisfy the condition for the WAF check. +type ManagedRulesDefinition struct { + // Exclusions - Describes the Exclusions that are applied on the policy. + Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"` + // ManagedRuleSets - Describes the ruleSets that are associated with the policy. + ManagedRuleSets *[]ManagedRuleSet `json:"managedRuleSets,omitempty"` +} + +// ManagedRuleSet defines a managed rule set. +type ManagedRuleSet struct { + // RuleSetType - Defines the rule set type to use. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - Defines the version of the rule set to use. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // RuleGroupOverrides - Defines the rule group overrides to apply to the rule set. + RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` +} + // ManagedServiceIdentity identity for the resource. type ManagedServiceIdentity struct { // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity. @@ -20163,7 +20599,7 @@ type ManagedServiceIdentityUserAssignedIdentitiesValue struct { type MatchCondition struct { // MatchVariables - List of match variables. MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"` - // Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex' + // Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex', 'WebApplicationFirewallOperatorGeoMatch' Operator WebApplicationFirewallOperator `json:"operator,omitempty"` // NegationConditon - Describes if this is negate condition or not. NegationConditon *bool `json:"negationConditon,omitempty"` @@ -20230,7 +20666,7 @@ type NatGateway struct { *NatGatewayPropertiesFormat `json:"properties,omitempty"` // Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed. Zones *[]string `json:"zones,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -20256,9 +20692,6 @@ func (ng NatGateway) MarshalJSON() ([]byte, error) { if ng.Zones != nil { objectMap["zones"] = ng.Zones } - if ng.Etag != nil { - objectMap["etag"] = ng.Etag - } if ng.ID != nil { objectMap["id"] = ng.ID } @@ -20523,9 +20956,9 @@ type NatGatewayPropertiesFormat struct { PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` // Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource. Subnets *[]SubResource `json:"subnets,omitempty"` - // ResourceGUID - The resource GUID property of the NAT gateway resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the NAT gateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the NAT gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -20583,7 +21016,7 @@ func (future *NatGatewaysDeleteFuture) Result(client NatGatewaysClient) (ar auto // NatGatewaySku SKU of nat gateway. type NatGatewaySku struct { - // Name - Name of Nat Gateway SKU. Possible values include: 'Standard' + // Name - Name of Nat Gateway SKU. Possible values include: 'NatGatewaySkuNameStandard' Name NatGatewaySkuName `json:"name,omitempty"` } @@ -20871,7 +21304,7 @@ type OutboundRule struct { *OutboundRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -20888,9 +21321,6 @@ func (or OutboundRule) MarshalJSON() ([]byte, error) { if or.Name != nil { objectMap["name"] = or.Name } - if or.Etag != nil { - objectMap["etag"] = or.Etag - } if or.ID != nil { objectMap["id"] = or.ID } @@ -20965,7 +21395,7 @@ type OutboundRulePropertiesFormat struct { FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // ProvisioningState - The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the outbound rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll' Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"` @@ -20975,6 +21405,117 @@ type OutboundRulePropertiesFormat struct { IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` } +// OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check. +type OwaspCrsExclusionEntry struct { + // MatchVariable - The variable to be excluded. Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'RequestArgNames' + MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"` + // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'OwaspCrsExclusionEntrySelectorMatchOperatorEquals', 'OwaspCrsExclusionEntrySelectorMatchOperatorContains', 'OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny' + SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"` + // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. + Selector *string `json:"selector,omitempty"` +} + +// P2SConnectionConfiguration p2SConnectionConfiguration Resource. +type P2SConnectionConfiguration struct { + // P2SConnectionConfigurationProperties - Properties of the P2S connection configuration. + *P2SConnectionConfigurationProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for P2SConnectionConfiguration. +func (pcc P2SConnectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcc.P2SConnectionConfigurationProperties != nil { + objectMap["properties"] = pcc.P2SConnectionConfigurationProperties + } + if pcc.Name != nil { + objectMap["name"] = pcc.Name + } + if pcc.ID != nil { + objectMap["id"] = pcc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for P2SConnectionConfiguration struct. +func (pcc *P2SConnectionConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var p2SConnectionConfigurationProperties P2SConnectionConfigurationProperties + err = json.Unmarshal(*v, &p2SConnectionConfigurationProperties) + if err != nil { + return err + } + pcc.P2SConnectionConfigurationProperties = &p2SConnectionConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pcc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcc.ID = &ID + } + } + } + + return nil +} + +// P2SConnectionConfigurationProperties parameters for P2SConnectionConfiguration. +type P2SConnectionConfigurationProperties struct { + // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. + VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// P2SVpnConnectionHealth p2S Vpn connection detailed health written to sas url. +type P2SVpnConnectionHealth struct { + autorest.Response `json:"-"` + // SasURL - Returned sas url of the blob to which the p2s vpn connection detailed health will be written. + SasURL *string `json:"sasUrl,omitempty"` +} + +// P2SVpnConnectionHealthRequest list of P2S Vpn connection health request. +type P2SVpnConnectionHealthRequest struct { + // VpnUserNamesFilter - The list of p2s vpn user names whose p2s vpn connection detailed health to retrieve for. + VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"` + // OutputBlobSasURL - The sas-url to download the P2S Vpn connection health detail. + OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` +} + // P2SVpnGateway p2SVpnGateway Resource. type P2SVpnGateway struct { autorest.Response `json:"-"` @@ -21094,16 +21635,14 @@ func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { type P2SVpnGatewayProperties struct { // VirtualHub - The VirtualHub to which the gateway belongs. VirtualHub *SubResource `json:"virtualHub,omitempty"` - // ProvisioningState - The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // P2SConnectionConfigurations - List of all p2s connection configurations of the gateway. + P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` - // P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. - P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"` - // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - // CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient. - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` + // VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to. + VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` } @@ -21189,59 +21728,59 @@ func (future *P2sVpnGatewaysGenerateVpnProfileFuture) Result(client P2sVpnGatewa return } -// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct { +// P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture) Result(client P2sVpnGatewaysClient) (pvch P2SVpnConnectionHealth, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture") + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response) + if pvch.Response.Response, err = future.GetResult(sender); err == nil && pvch.Response.Response.StatusCode != http.StatusNoContent { + pvch, err = client.GetP2sVpnConnectionHealthDetailedResponder(pvch.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture", "Result", pvch.Response.Response, "Failure responding to request") } } return } -// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysUpdateTagsFuture struct { +// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysUpdateTagsFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.UpdateTagsResponder(pvg.Response.Response) + pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request") } } return @@ -21253,528 +21792,6 @@ type P2SVpnProfileParameters struct { AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` } -// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificate struct { - // P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate. - *P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate. -func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - } - if pvscrcrc.Name != nil { - objectMap["name"] = pvscrcrc.Name - } - if pvscrcrc.Etag != nil { - objectMap["etag"] = pvscrcrc.Etag - } - if pvscrcrc.ID != nil { - objectMap["id"] = pvscrcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct. -func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscrcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscrcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscrcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct { - // Thumbprint - The Radius client root certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the radius client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificate struct { - // P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate. - *P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate. -func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - } - if pvscrsrc.Name != nil { - objectMap["name"] = pvscrsrc.Name - } - if pvscrsrc.Etag != nil { - objectMap["etag"] = pvscrsrc.Etag - } - if pvscrsrc.ID != nil { - objectMap["id"] = pvscrsrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct. -func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscrsrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscrsrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscrsrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the radius server root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource. -type P2SVpnServerConfiguration struct { - autorest.Response `json:"-"` - // P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration. - *P2SVpnServerConfigurationProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration. -func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvsc.P2SVpnServerConfigurationProperties != nil { - objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties - } - if pvsc.Name != nil { - objectMap["name"] = pvsc.Name - } - if pvsc.ID != nil { - objectMap["id"] = pvsc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct. -func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties - err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties) - if err != nil { - return err - } - pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvsc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvsc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvsc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration. -type P2SVpnServerConfigurationProperties struct { - // Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name. - Name *string `json:"name,omitempty"` - // VpnProtocols - VPN protocols for the P2SVpnServerConfiguration. - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` - // P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"` - // P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"` - // P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"` - // P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"` - // VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration. - VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - // RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - // RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2S VPN server configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. - P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` -} - -// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type P2sVpnServerConfigurationsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) Result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent { - pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request") - } - } - return -} - -// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnServerConfigurationsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnServerConfigurationsDeleteFuture) Result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificate struct { - // P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. - *P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name - } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag - } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscvcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscvcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscvcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct { - // Thumbprint - The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificate struct { - // P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate. - *P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name - } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag - } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pvscvcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscvcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscvcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - // PacketCapture parameters that define the create packet capture operation. type PacketCapture struct { // PacketCaptureParameters - Properties of the packet capture. @@ -21875,7 +21892,7 @@ type PacketCaptureResult struct { Name *string `json:"name,omitempty"` // ID - READ-ONLY; ID of the packet capture operation. ID *string `json:"id,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // PacketCaptureResultProperties - Properties of the packet capture result. *PacketCaptureResultProperties `json:"properties,omitempty"` @@ -21884,9 +21901,6 @@ type PacketCaptureResult struct { // MarshalJSON is the custom marshaler for PacketCaptureResult. func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pcr.Etag != nil { - objectMap["etag"] = pcr.Etag - } if pcr.PacketCaptureResultProperties != nil { objectMap["properties"] = pcr.PacketCaptureResultProperties } @@ -21946,7 +21960,7 @@ func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { // PacketCaptureResultProperties describes the properties of a packet capture session. type PacketCaptureResultProperties struct { - // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Target - The ID of the targeted resource, only VM is currently supported. Target *string `json:"target,omitempty"` @@ -22513,10 +22527,16 @@ type PeerExpressRouteCircuitConnectionPropertiesFormat struct { // PolicySettings defines contents of a web application firewall global configuration. type PolicySettings struct { - // EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' - EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"` + // State - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' + State WebApplicationFirewallEnabledState `json:"state,omitempty"` // Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection' Mode WebApplicationFirewallMode `json:"mode,omitempty"` + // RequestBodyCheck - Whether to allow WAF to check request Body. + RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` + // MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF. + MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"` + // FileUploadLimitInMb - Maximum file upload size in Mb for WAF. + FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"` } // PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet. @@ -22532,7 +22552,7 @@ type PrivateEndpoint struct { autorest.Response `json:"-"` // PrivateEndpointProperties - Properties of the private endpoint. *PrivateEndpointProperties `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -22552,9 +22572,6 @@ func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { if peVar.PrivateEndpointProperties != nil { objectMap["properties"] = peVar.PrivateEndpointProperties } - if peVar.Etag != nil { - objectMap["etag"] = peVar.Etag - } if peVar.ID != nil { objectMap["id"] = peVar.ID } @@ -22735,14 +22752,163 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { return nil } +// PrivateEndpointConnectionListResult response for the ListPrivateEndpointConnection API service call. +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - A list of PrivateEndpointConnection resources for a specific private link service. + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PrivateEndpointConnectionListResultIterator provides access to a complete listing of +// PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultIterator struct { + i int + page PrivateEndpointConnectionListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *PrivateEndpointConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { + if !iter.page.NotDone() { + return PrivateEndpointConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return PrivateEndpointConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { + return peclr.Value == nil || len(*peclr.Value) == 0 +} + +// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if peclr.NextLink == nil || len(to.String(peclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(peclr.NextLink))) +} + +// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultPage struct { + fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) + peclr PrivateEndpointConnectionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.peclr) + if err != nil { + return err + } + page.peclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *PrivateEndpointConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointConnectionListResultPage) NotDone() bool { + return !page.peclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { + return page.peclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { + if page.peclr.IsEmpty() { + return nil + } + return *page.peclr.Value +} + +// Creates a new instance of the PrivateEndpointConnectionListResultPage type. +func NewPrivateEndpointConnectionListResultPage(getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{fn: getNextPage} +} + // PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. type PrivateEndpointConnectionProperties struct { - // PrivateEndpoint - The resource of private end point. + // PrivateEndpoint - READ-ONLY; The resource of private end point. PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // LinkIdentifier - READ-ONLY; The consumer link id. + LinkIdentifier *string `json:"linkIdentifier,omitempty"` } // PrivateEndpointListResult response for the ListPrivateEndpoints API service call. @@ -22897,7 +23063,7 @@ type PrivateEndpointProperties struct { Subnet *Subnet `json:"subnet,omitempty"` // NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private endpoint. NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the private endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` @@ -22962,7 +23128,7 @@ type PrivateLinkService struct { autorest.Response `json:"-"` // PrivateLinkServiceProperties - Properties of the private link service. *PrivateLinkServiceProperties `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -22982,9 +23148,6 @@ func (pls PrivateLinkService) MarshalJSON() ([]byte, error) { if pls.PrivateLinkServiceProperties != nil { objectMap["properties"] = pls.PrivateLinkServiceProperties } - if pls.Etag != nil { - objectMap["etag"] = pls.Etag - } if pls.ID != nil { objectMap["id"] = pls.ID } @@ -23166,7 +23329,7 @@ func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error { // PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection. type PrivateLinkServiceConnectionProperties struct { - // ProvisioningState - The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the private link service connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateLinkServiceID - The resource id of private link service. PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"` @@ -23288,7 +23451,7 @@ type PrivateLinkServiceIPConfigurationProperties struct { Subnet *Subnet `json:"subnet,omitempty"` // Primary - Whether the ip configuration is primary or not. Primary *bool `json:"primary,omitempty"` - // ProvisioningState - The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the private link service IP configuration resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateIPAddressVersion - Whether the specific IP configuration is IPv4 or IPv6. Default is IPv4. Possible values include: 'IPv4', 'IPv6' PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` @@ -23448,9 +23611,9 @@ type PrivateLinkServiceProperties struct { IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` // NetworkInterfaces - READ-ONLY; An array of references to the network interfaces created for this private link service. NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // ProvisioningState - The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the private link service resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // PrivateEndpointConnections - An array of list about connections to the private endpoint. + // PrivateEndpointConnections - READ-ONLY; An array of list about connections to the private endpoint. PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` // Visibility - The visibility list of the private link service. Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"` @@ -23460,6 +23623,8 @@ type PrivateLinkServiceProperties struct { Fqdns *[]string `json:"fqdns,omitempty"` // Alias - READ-ONLY; The alias of the private link service. Alias *string `json:"alias,omitempty"` + // EnableProxyProtocol - Whether the private link service is enabled for proxy protocol or not. + EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` } // PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service. @@ -23563,7 +23728,7 @@ type Probe struct { *ProbePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Type of the resource. Type *string `json:"type,omitempty"` @@ -23580,9 +23745,6 @@ func (p Probe) MarshalJSON() ([]byte, error) { if p.Name != nil { objectMap["name"] = p.Name } - if p.Etag != nil { - objectMap["etag"] = p.Etag - } if p.ID != nil { objectMap["id"] = p.ID } @@ -23663,7 +23825,7 @@ type ProbePropertiesFormat struct { NumberOfProbes *int32 `json:"numberOfProbes,omitempty"` // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. RequestPath *string `json:"requestPath,omitempty"` - // ProvisioningState - The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the probe resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -23672,7 +23834,7 @@ type Profile struct { autorest.Response `json:"-"` // ProfilePropertiesFormat - Network profile properties. *ProfilePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -23692,9 +23854,6 @@ func (p Profile) MarshalJSON() ([]byte, error) { if p.ProfilePropertiesFormat != nil { objectMap["properties"] = p.ProfilePropertiesFormat } - if p.Etag != nil { - objectMap["etag"] = p.Etag - } if p.ID != nil { objectMap["id"] = p.ID } @@ -23933,7 +24092,7 @@ func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResul // ProfilePropertiesFormat network profile properties. type ProfilePropertiesFormat struct { - // ContainerNetworkInterfaces - List of child container network interfaces. + // ContainerNetworkInterfaces - READ-ONLY; List of child container network interfaces. ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` // ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations. ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` @@ -23991,7 +24150,7 @@ type PublicIPAddress struct { Sku *PublicIPAddressSku `json:"sku,omitempty"` // PublicIPAddressPropertiesFormat - Public IP address properties. *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. Zones *[]string `json:"zones,omitempty"` @@ -24016,9 +24175,6 @@ func (pia PublicIPAddress) MarshalJSON() ([]byte, error) { if pia.PublicIPAddressPropertiesFormat != nil { objectMap["properties"] = pia.PublicIPAddressPropertiesFormat } - if pia.Etag != nil { - objectMap["etag"] = pia.Etag - } if pia.Zones != nil { objectMap["zones"] = pia.Zones } @@ -24192,35 +24348,6 @@ func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClie return } -// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPAddressesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent { - pia, err = client.UpdateTagsResponder(pia.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request") - } - } - return -} - // PublicIPAddressListResult response for ListPublicIpAddresses API service call. type PublicIPAddressListResult struct { autorest.Response `json:"-"` @@ -24387,9 +24514,9 @@ type PublicIPAddressPropertiesFormat struct { PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` // IdleTimeoutInMinutes - The idle timeout of the public IP address. IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // ResourceGUID - The resource GUID property of the public IP address resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the public IP address resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the public IP address resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -24406,7 +24533,7 @@ type PublicIPPrefix struct { Sku *PublicIPPrefixSku `json:"sku,omitempty"` // PublicIPPrefixPropertiesFormat - Public IP prefix properties. *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. Zones *[]string `json:"zones,omitempty"` @@ -24431,9 +24558,6 @@ func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) { if pip.PublicIPPrefixPropertiesFormat != nil { objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat } - if pip.Etag != nil { - objectMap["etag"] = pip.Etag - } if pip.Zones != nil { objectMap["zones"] = pip.Zones } @@ -24597,35 +24721,6 @@ func (future *PublicIPPrefixesDeleteFuture) Result(client PublicIPPrefixesClient return } -// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PublicIPPrefixesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PublicIPPrefixesUpdateTagsFuture) Result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent { - pip, err = client.UpdateTagsResponder(pip.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request") - } - } - return -} - // PublicIPPrefixListResult response for ListPublicIpPrefixes API service call. type PublicIPPrefixListResult struct { autorest.Response `json:"-"` @@ -24780,15 +24875,15 @@ type PublicIPPrefixPropertiesFormat struct { IPTags *[]IPTag `json:"ipTags,omitempty"` // PrefixLength - The Length of the Public IP Prefix. PrefixLength *int32 `json:"prefixLength,omitempty"` - // IPPrefix - The allocated Prefix. + // IPPrefix - READ-ONLY; The allocated Prefix. IPPrefix *string `json:"ipPrefix,omitempty"` - // PublicIPAddresses - The list of all referenced PublicIPAddresses. + // PublicIPAddresses - READ-ONLY; The list of all referenced PublicIPAddresses. PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` // LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix. LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"` - // ResourceGUID - The resource GUID property of the public IP prefix resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the public IP prefix resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the public IP prefix resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -24968,7 +25063,7 @@ type Route struct { *RoutePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -24983,9 +25078,6 @@ func (r Route) MarshalJSON() ([]byte, error) { if r.Name != nil { objectMap["name"] = r.Name } - if r.Etag != nil { - objectMap["etag"] = r.Etag - } if r.ID != nil { objectMap["id"] = r.ID } @@ -25308,9 +25400,9 @@ func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterL type RouteFilterPropertiesFormat struct { // Rules - Collection of RouteFilterRules contained within a route filter. Rules *[]RouteFilterRule `json:"rules,omitempty"` - // Peerings - A collection of references to express route circuit peerings. + // Peerings - READ-ONLY; A collection of references to express route circuit peerings. Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // Ipv6Peerings - A collection of references to express route circuit ipv6 peerings. + // Ipv6Peerings - READ-ONLY; A collection of references to express route circuit ipv6 peerings. Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the route filter resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -25619,35 +25711,6 @@ func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient return } -// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFilterRulesUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent { - rfr, err = client.UpdateResponder(rfr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request") - } - } - return -} - // RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type RouteFiltersCreateOrUpdateFuture struct { @@ -25700,35 +25763,6 @@ func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar au return } -// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteFiltersUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent { - rf, err = client.UpdateResponder(rf.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request") - } - } - return -} - // RouteListResult response for the ListRoute API service call. type RouteListResult struct { autorest.Response `json:"-"` @@ -25883,7 +25917,7 @@ type RoutePropertiesFormat struct { NextHopType RouteNextHopType `json:"nextHopType,omitempty"` // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the route resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -25943,7 +25977,7 @@ type RouteTable struct { autorest.Response `json:"-"` // RouteTablePropertiesFormat - Properties of the route table. *RouteTablePropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -25963,9 +25997,6 @@ func (rt RouteTable) MarshalJSON() ([]byte, error) { if rt.RouteTablePropertiesFormat != nil { objectMap["properties"] = rt.RouteTablePropertiesFormat } - if rt.Etag != nil { - objectMap["etag"] = rt.Etag - } if rt.ID != nil { objectMap["id"] = rt.ID } @@ -26210,7 +26241,7 @@ type RouteTablePropertiesFormat struct { Subnets *[]Subnet `json:"subnets,omitempty"` // DisableBgpRoutePropagation - Whether to disable the routes learned by BGP on that route table. True means disable. DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - // ProvisioningState - The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the route table resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -26266,35 +26297,6 @@ func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar auto return } -// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type RouteTablesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent { - rt, err = client.UpdateTagsResponder(rt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request") - } - } - return -} - // RuleCondition rule condition of type network. type RuleCondition struct { // IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols. @@ -26366,7 +26368,7 @@ type SecurityGroup struct { autorest.Response `json:"-"` // SecurityGroupPropertiesFormat - Properties of the network security group. *SecurityGroupPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -26386,9 +26388,6 @@ func (sg SecurityGroup) MarshalJSON() ([]byte, error) { if sg.SecurityGroupPropertiesFormat != nil { objectMap["properties"] = sg.SecurityGroupPropertiesFormat } - if sg.Etag != nil { - objectMap["etag"] = sg.Etag - } if sg.ID != nil { objectMap["id"] = sg.ID } @@ -26637,15 +26636,15 @@ type SecurityGroupNetworkInterface struct { type SecurityGroupPropertiesFormat struct { // SecurityRules - A collection of security rules of the network security group. SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - // DefaultSecurityRules - The default security rules of network security group. + // DefaultSecurityRules - READ-ONLY; The default security rules of network security group. DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces. NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` // Subnets - READ-ONLY; A collection of references to subnets. Subnets *[]Subnet `json:"subnets,omitempty"` - // ResourceGUID - The resource GUID property of the network security group resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the network security group resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the network security group resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -26709,35 +26708,6 @@ func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (a return } -// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type SecurityGroupsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent { - sg, err = client.UpdateTagsResponder(sg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request") - } - } - return -} - // SecurityGroupViewParameters parameters that define the VM to check security groups for. type SecurityGroupViewParameters struct { // TargetResourceID - ID of the target VM. @@ -26758,7 +26728,7 @@ type SecurityRule struct { *SecurityRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -26773,9 +26743,6 @@ func (sr SecurityRule) MarshalJSON() ([]byte, error) { if sr.Name != nil { objectMap["name"] = sr.Name } - if sr.Etag != nil { - objectMap["etag"] = sr.Etag - } if sr.ID != nil { objectMap["id"] = sr.ID } @@ -26996,7 +26963,7 @@ func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRul type SecurityRulePropertiesFormat struct { // Description - A description for this rule. Restricted to 140 chars. Description *string `json:"description,omitempty"` - // Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk' + // Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk', 'SecurityRuleProtocolAh' Protocol SecurityRuleProtocol `json:"protocol,omitempty"` // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. SourcePortRange *string `json:"sourcePortRange,omitempty"` @@ -27024,7 +26991,7 @@ type SecurityRulePropertiesFormat struct { Priority *int32 `json:"priority,omitempty"` // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' Direction SecurityRuleDirection `json:"direction,omitempty"` - // ProvisioningState - The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the security rule resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -27104,7 +27071,7 @@ type ServiceAssociationLink struct { Name *string `json:"name,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // Type - Resource type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -27119,9 +27086,6 @@ func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) { if sal.Name != nil { objectMap["name"] = sal.Name } - if sal.Type != nil { - objectMap["type"] = sal.Type - } if sal.ID != nil { objectMap["id"] = sal.ID } @@ -27215,7 +27179,7 @@ type ServiceAssociationLinksListResult struct { type ServiceDelegationPropertiesFormat struct { // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). ServiceName *string `json:"serviceName,omitempty"` - // Actions - Describes the actions permitted to the service upon delegation. + // Actions - READ-ONLY; Describes the actions permitted to the service upon delegation. Actions *[]string `json:"actions,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the service delegation resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -27273,41 +27237,12 @@ func (future *ServiceEndpointPoliciesDeleteFuture) Result(client ServiceEndpoint return } -// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ServiceEndpointPoliciesUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServiceEndpointPoliciesUpdateFuture) Result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent { - sep, err = client.UpdateResponder(sep.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request") - } - } - return -} - // ServiceEndpointPolicy service End point policy resource. type ServiceEndpointPolicy struct { autorest.Response `json:"-"` // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy. *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -27327,9 +27262,6 @@ func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { if sep.ServiceEndpointPolicyPropertiesFormat != nil { objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat } - if sep.Etag != nil { - objectMap["etag"] = sep.Etag - } if sep.ID != nil { objectMap["id"] = sep.ID } @@ -27427,7 +27359,7 @@ type ServiceEndpointPolicyDefinition struct { *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -27442,9 +27374,6 @@ func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { if sepd.Name != nil { objectMap["name"] = sepd.Name } - if sepd.Etag != nil { - objectMap["etag"] = sepd.Etag - } if sepd.ID != nil { objectMap["id"] = sepd.ID } @@ -27879,7 +27808,7 @@ type ServiceEndpointPropertiesFormat struct { Service *string `json:"service,omitempty"` // Locations - A list of locations. Locations *[]string `json:"locations,omitempty"` - // ProvisioningState - The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -27935,7 +27864,7 @@ type Subnet struct { *SubnetPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -27950,9 +27879,6 @@ func (s Subnet) MarshalJSON() ([]byte, error) { if s.Name != nil { objectMap["name"] = s.Name } - if s.Etag != nil { - objectMap["etag"] = s.Etag - } if s.ID != nil { objectMap["id"] = s.ID } @@ -28187,15 +28113,15 @@ type SubnetPropertiesFormat struct { IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` // IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet. IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - // ResourceNavigationLinks - An array of references to the external resources using subnet. + // ResourceNavigationLinks - READ-ONLY; An array of references to the external resources using subnet. ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - // ServiceAssociationLinks - An array of references to services injecting into this subnet. + // ServiceAssociationLinks - READ-ONLY; An array of references to services injecting into this subnet. ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` // Delegations - An array of references to the delegations on the subnet. Delegations *[]Delegation `json:"delegations,omitempty"` // Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties. Purpose *string `json:"purpose,omitempty"` - // ProvisioningState - The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the subnet resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"` @@ -28389,9 +28315,9 @@ type TrafficAnalyticsProperties struct { // TrafficSelectorPolicy an traffic selector policy for a virtual network gateway connection. type TrafficSelectorPolicy struct { - // LocalAddressRanges - A collection of local address spaces in CIDR format + // LocalAddressRanges - A collection of local address spaces in CIDR format. LocalAddressRanges *[]string `json:"localAddressRanges,omitempty"` - // RemoteAddressRanges - A collection of remote address spaces in CIDR format + // RemoteAddressRanges - A collection of remote address spaces in CIDR format. RemoteAddressRanges *[]string `json:"remoteAddressRanges,omitempty"` } @@ -28843,14 +28769,22 @@ type VirtualHubProperties struct { P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub. ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` + // AzureFirewall - The azureFirewall associated with this VirtualHub. + AzureFirewall *SubResource `json:"azureFirewall,omitempty"` // VirtualNetworkConnections - List of all vnet connections with this VirtualHub. VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"` // AddressPrefix - Address-prefix for this VirtualHub. AddressPrefix *string `json:"addressPrefix,omitempty"` // RouteTable - The routeTable associated with this virtual hub. RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` - // ProvisioningState - The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the virtual hub resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // SecurityProviderName - The Security Provider name. + SecurityProviderName *string `json:"securityProviderName,omitempty"` + // VirtualHubRouteTableV2s - List of all virtual hub route table v2s associated with this VirtualHub. + VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"` + // Sku - The sku of this VirtualHub. + Sku *string `json:"sku,omitempty"` } // VirtualHubRoute virtualHub route. @@ -28867,93 +28801,217 @@ type VirtualHubRouteTable struct { Routes *[]VirtualHubRoute `json:"routes,omitempty"` } -// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualHubsCreateOrUpdateFuture struct { +// VirtualHubRouteTableV2 virtualHubRouteTableV2 Resource. +type VirtualHubRouteTableV2 struct { + autorest.Response `json:"-"` + // VirtualHubRouteTableV2Properties - Properties of the virtual hub route table v2. + *VirtualHubRouteTableV2Properties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualHubRouteTableV2. +func (vhrtv VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vhrtv.VirtualHubRouteTableV2Properties != nil { + objectMap["properties"] = vhrtv.VirtualHubRouteTableV2Properties + } + if vhrtv.Name != nil { + objectMap["name"] = vhrtv.Name + } + if vhrtv.ID != nil { + objectMap["id"] = vhrtv.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualHubRouteTableV2 struct. +func (vhrtv *VirtualHubRouteTableV2) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var virtualHubRouteTableV2Properties VirtualHubRouteTableV2Properties + err = json.Unmarshal(*v, &virtualHubRouteTableV2Properties) + if err != nil { + return err + } + vhrtv.VirtualHubRouteTableV2Properties = &virtualHubRouteTableV2Properties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vhrtv.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vhrtv.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vhrtv.ID = &ID + } + } + } + + return nil +} + +// VirtualHubRouteTableV2Properties parameters for VirtualHubRouteTableV2. +type VirtualHubRouteTableV2Properties struct { + // Routes - List of all routes. + Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"` + // AttachedConnections - List of all connections attached to this route table v2. + AttachedConnections *[]string `json:"attachedConnections,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the virtual hub route table v2 resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VirtualHubRouteTableV2sCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualHubRouteTableV2sCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) { +func (future *VirtualHubRouteTableV2sCreateOrUpdateFuture) Result(client VirtualHubRouteTableV2sClient) (vhrtv VirtualHubRouteTableV2, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { - vh, err = client.CreateOrUpdateResponder(vh.Response.Response) + if vhrtv.Response.Response, err = future.GetResult(sender); err == nil && vhrtv.Response.Response.StatusCode != http.StatusNoContent { + vhrtv, err = client.CreateOrUpdateResponder(vhrtv.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sCreateOrUpdateFuture", "Result", vhrtv.Response.Response, "Failure responding to request") } } return } -// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualHubsDeleteFuture struct { +// VirtualHubRouteTableV2sDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubRouteTableV2sDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) { +func (future *VirtualHubRouteTableV2sDeleteFuture) Result(client VirtualHubRouteTableV2sClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualHubRouteTableV2sDeleteFuture") return } ar.Response = future.Response() return } -// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualHubsUpdateTagsFuture struct { +// VirtualHubRouteV2 virtualHubRouteTableV2 route. +type VirtualHubRouteV2 struct { + // DestinationType - The type of destinations. + DestinationType *string `json:"destinationType,omitempty"` + // Destinations - List of all destinations. + Destinations *[]string `json:"destinations,omitempty"` + // NextHopType - The type of next hops. + NextHopType *string `json:"nextHopType,omitempty"` + // NextHops - NextHops ip address. + NextHops *[]string `json:"nextHops,omitempty"` +} + +// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualHubsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *VirtualHubsUpdateTagsFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) { +func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture") + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent { - vh, err = client.UpdateTagsResponder(vh.Response.Response) + vh, err = client.CreateOrUpdateResponder(vh.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request") } } return } +// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VirtualHubsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // VirtualNetwork virtual Network resource. type VirtualNetwork struct { autorest.Response `json:"-"` // VirtualNetworkPropertiesFormat - Properties of the virtual network. *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -28973,9 +29031,6 @@ func (vn VirtualNetwork) MarshalJSON() ([]byte, error) { if vn.VirtualNetworkPropertiesFormat != nil { objectMap["properties"] = vn.VirtualNetworkPropertiesFormat } - if vn.Etag != nil { - objectMap["etag"] = vn.Etag - } if vn.ID != nil { objectMap["id"] = vn.ID } @@ -29066,6 +29121,15 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error { return nil } +// VirtualNetworkBgpCommunities bgp Communities sent over ExpressRoute with each route corresponding to a +// prefix in this VNET. +type VirtualNetworkBgpCommunities struct { + // VirtualNetworkCommunity - The BGP community associated with the virtual network. + VirtualNetworkCommunity *string `json:"virtualNetworkCommunity,omitempty"` + // RegionalCommunity - READ-ONLY; The BGP community associated with the region of the virtual network. + RegionalCommunity *string `json:"regionalCommunity,omitempty"` +} + // VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway // resource. type VirtualNetworkConnectionGatewayReference struct { @@ -29078,7 +29142,7 @@ type VirtualNetworkGateway struct { autorest.Response `json:"-"` // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -29098,9 +29162,6 @@ func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { if vng.VirtualNetworkGatewayPropertiesFormat != nil { objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat } - if vng.Etag != nil { - objectMap["etag"] = vng.Etag - } if vng.ID != nil { objectMap["id"] = vng.ID } @@ -29196,7 +29257,7 @@ type VirtualNetworkGatewayConnection struct { autorest.Response `json:"-"` // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -29216,9 +29277,6 @@ func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil { objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat } - if vngc.Etag != nil { - objectMap["etag"] = vngc.Etag - } if vngc.ID != nil { objectMap["id"] = vngc.ID } @@ -29313,7 +29371,7 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { type VirtualNetworkGatewayConnectionListEntity struct { // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -29333,9 +29391,6 @@ func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, e if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil { objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat } - if vngcle.Etag != nil { - objectMap["etag"] = vngcle.Etag - } if vngcle.ID != nil { objectMap["id"] = vngcle.ID } @@ -29462,7 +29517,7 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` // TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection. TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the virtual network gateway connection resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -29654,7 +29709,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` // TrafficSelectorPolicies - The Traffic Selector Policies to be considered by this connection. TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - // ResourceGUID - The resource GUID property of the virtual network gateway connection resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway connection resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -29865,7 +29920,7 @@ type VirtualNetworkGatewayIPConfiguration struct { *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -29880,9 +29935,6 @@ func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) if vngic.Name != nil { objectMap["name"] = vngic.Name } - if vngic.Etag != nil { - objectMap["etag"] = vngic.Etag - } if vngic.ID != nil { objectMap["id"] = vngic.ID } @@ -30272,10 +30324,14 @@ type VirtualNetworkGatewayPropertiesFormat struct { BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` // CustomRoutes - The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - // ResourceGUID - The resource GUID property of the virtual network gateway resource. + // ResourceGUID - READ-ONLY; The resource GUID property of the virtual network gateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the virtual network gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // EnableDNSForwarding - Whether dns forwarding is enabled or not. + EnableDNSForwarding *bool `json:"enableDnsForwarding,omitempty"` + // InboundDNSForwardingEndpoint - READ-ONLY; The IP address allocated by the gateway to which dns requests can be sent. + InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` } // VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -30568,7 +30624,7 @@ type VirtualNetworkGatewaySku struct { Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw4', 'VirtualNetworkGatewaySkuTierVpnGw5', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierVpnGw4AZ', 'VirtualNetworkGatewaySkuTierVpnGw5AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ' Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` - // Capacity - The capacity. + // Capacity - READ-ONLY; The capacity. Capacity *int32 `json:"capacity,omitempty"` } @@ -31040,7 +31096,7 @@ type VirtualNetworkPeering struct { *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -31055,9 +31111,6 @@ func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) { if vnp.Name != nil { objectMap["name"] = vnp.Name } - if vnp.Etag != nil { - objectMap["etag"] = vnp.Etag - } if vnp.ID != nil { objectMap["id"] = vnp.ID } @@ -31279,7 +31332,7 @@ type VirtualNetworkPeeringPropertiesFormat struct { RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` - // ProvisioningState - The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -31345,9 +31398,9 @@ type VirtualNetworkPropertiesFormat struct { Subnets *[]Subnet `json:"subnets,omitempty"` // VirtualNetworkPeerings - A list of peerings in a Virtual Network. VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` - // ResourceGUID - The resourceGuid property of the Virtual Network resource. + // ResourceGUID - READ-ONLY; The resourceGuid property of the Virtual Network resource. ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the virtual network resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource. EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` @@ -31355,6 +31408,8 @@ type VirtualNetworkPropertiesFormat struct { EnableVMProtection *bool `json:"enableVmProtection,omitempty"` // DdosProtectionPlan - The DDoS protection plan associated with the virtual network. DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` + // BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` } // VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -31409,41 +31464,12 @@ func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) return } -// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworksUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent { - vn, err = client.UpdateTagsResponder(vn.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request") - } - } - return -} - // VirtualNetworkTap virtual Network Tap resource. type VirtualNetworkTap struct { autorest.Response `json:"-"` // VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties. *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -31463,9 +31489,6 @@ func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) { if vnt.VirtualNetworkTapPropertiesFormat != nil { objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat } - if vnt.Etag != nil { - objectMap["etag"] = vnt.Etag - } if vnt.ID != nil { objectMap["id"] = vnt.ID } @@ -31770,35 +31793,6 @@ func (future *VirtualNetworkTapsDeleteFuture) Result(client VirtualNetworkTapsCl return } -// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkTapsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualNetworkTapsUpdateTagsFuture) Result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent { - vnt, err = client.UpdateTagsResponder(vnt.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request") - } - } - return -} - // VirtualNetworkUsage usage details for subnet. type VirtualNetworkUsage struct { // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet. @@ -31826,7 +31820,7 @@ type VirtualRouter struct { autorest.Response `json:"-"` // VirtualRouterPropertiesFormat - Properties of the Virtual Router. *VirtualRouterPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -32082,14 +32076,14 @@ func NewVirtualRouterListResultPage(getNextPage func(context.Context, VirtualRou return VirtualRouterListResultPage{fn: getNextPage} } -// VirtualRouterPeering virtual Router Peering resource +// VirtualRouterPeering virtual Router Peering resource. type VirtualRouterPeering struct { autorest.Response `json:"-"` // VirtualRouterPeeringProperties - The properties of the Virtual Router Peering. *VirtualRouterPeeringProperties `json:"properties,omitempty"` - // Name - Gets name of the peering unique to VirtualRouter. This name can be used to access the resource. + // Name - Name of the virtual router peering that is unique within a virtual router. Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Type - READ-ONLY; Peering type. Type *string `json:"type,omitempty"` @@ -32381,17 +32375,17 @@ func (future *VirtualRouterPeeringsDeleteFuture) Result(client VirtualRouterPeer return } -// VirtualRouterPropertiesFormat virtual Router definition +// VirtualRouterPropertiesFormat virtual Router definition. type VirtualRouterPropertiesFormat struct { // VirtualRouterAsn - VirtualRouter ASN. VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - // VirtualRouterIps - VirtualRouter IPs + // VirtualRouterIps - VirtualRouter IPs. VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"` // HostedSubnet - The Subnet on which VirtualRouter is hosted. HostedSubnet *SubResource `json:"hostedSubnet,omitempty"` // HostedGateway - The Gateway on which VirtualRouter is hosted. HostedGateway *SubResource `json:"hostedGateway,omitempty"` - // Peerings - READ-ONLY; List of references to VirtualRouterPeerings + // Peerings - READ-ONLY; List of references to VirtualRouterPeerings. Peerings *[]SubResource `json:"peerings,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -32572,18 +32566,16 @@ type VirtualWanProperties struct { VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` // VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN. VpnSites *[]SubResource `json:"vpnSites,omitempty"` - // SecurityProviderName - The Security Provider name. - SecurityProviderName *string `json:"securityProviderName,omitempty"` // AllowBranchToBranchTraffic - True if branch to branch traffic is allowed. AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` // AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed. AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` // Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone' Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` - // P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan. - P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"` - // ProvisioningState - The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the virtual WAN resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of the VirtualWAN. + Type *string `json:"type,omitempty"` } // VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -32655,33 +32647,12 @@ type VirtualWanSecurityProviders struct { SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` } -// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VirtualWansUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VirtualWansUpdateTagsFuture) Result(client VirtualWansClient) (vw VirtualWAN, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent { - vw, err = client.UpdateTagsResponder(vw.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request") - } - } - return +// VirtualWanVpnProfileParameters virtual Wan Vpn profile parameters Vpn profile generation. +type VirtualWanVpnProfileParameters struct { + // VpnServerConfigurationResourceID - VpnServerConfiguration partial resource uri with which VirtualWan is associated to. + VpnServerConfigurationResourceID *string `json:"vpnServerConfigurationResourceId,omitempty"` + // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` } // VpnClientConfiguration vpnClientConfiguration for P2S client. @@ -32794,7 +32765,7 @@ type VpnClientRevokedCertificate struct { *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -32809,9 +32780,6 @@ func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { if vcrc.Name != nil { objectMap["name"] = vcrc.Name } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag - } if vcrc.ID != nil { objectMap["id"] = vcrc.ID } @@ -32884,7 +32852,7 @@ type VpnClientRootCertificate struct { *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -32899,9 +32867,6 @@ func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) { if vcrc.Name != nil { objectMap["name"] = vcrc.Name } - if vcrc.Etag != nil { - objectMap["etag"] = vcrc.Etag - } if vcrc.ID != nil { objectMap["id"] = vcrc.ID } @@ -33076,7 +33041,7 @@ type VpnConnectionProperties struct { EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` // UseLocalAzureIPAddress - Use local azure ip to initiate connection. UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the VPN connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // VpnLinkConnections - List of all vpn site link connections to the gateway. VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` @@ -33267,7 +33232,7 @@ type VpnGatewayProperties struct { Connections *[]VpnConnection `json:"connections,omitempty"` // BgpSettings - Local network gateway's BGP speaker settings. BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ProvisioningState - The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // VpnGatewayScaleUnit - The scale unit for this vpn gateway. VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` @@ -33354,35 +33319,6 @@ func (future *VpnGatewaysResetFuture) Result(client VpnGatewaysClient) (vg VpnGa return } -// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnGatewaysUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { - vg, err = client.UpdateTagsResponder(vg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request") - } - } - return -} - // VpnLinkBgpSettings BGP settings details for a link. type VpnLinkBgpSettings struct { // Asn - The BGP speaker's ASN. @@ -33418,6 +33354,277 @@ type VpnProfileResponse struct { ProfileURL *string `json:"profileUrl,omitempty"` } +// VpnServerConfigRadiusClientRootCertificate properties of the Radius client root certificate of +// VpnServerConfiguration. +type VpnServerConfigRadiusClientRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // Thumbprint - The Radius client root certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// VpnServerConfigRadiusServerRootCertificate properties of Radius Server root certificate of +// VpnServerConfiguration. +type VpnServerConfigRadiusServerRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` +} + +// VpnServerConfiguration vpnServerConfiguration Resource. +type VpnServerConfiguration struct { + autorest.Response `json:"-"` + // VpnServerConfigurationProperties - Properties of the P2SVpnServer configuration. + *VpnServerConfigurationProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for VpnServerConfiguration. +func (vsc VpnServerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsc.VpnServerConfigurationProperties != nil { + objectMap["properties"] = vsc.VpnServerConfigurationProperties + } + if vsc.ID != nil { + objectMap["id"] = vsc.ID + } + if vsc.Location != nil { + objectMap["location"] = vsc.Location + } + if vsc.Tags != nil { + objectMap["tags"] = vsc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnServerConfiguration struct. +func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vpnServerConfigurationProperties VpnServerConfigurationProperties + err = json.Unmarshal(*v, &vpnServerConfigurationProperties) + if err != nil { + return err + } + vsc.VpnServerConfigurationProperties = &vpnServerConfigurationProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vsc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vsc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vsc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vsc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + vsc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + vsc.Tags = tags + } + } + } + + return nil +} + +// VpnServerConfigurationProperties parameters for VpnServerConfiguration. +type VpnServerConfigurationProperties struct { + // Name - The name of the VpnServerConfiguration that is unique within a resource group. + Name *string `json:"name,omitempty"` + // VpnProtocols - VPN protocols for the VpnServerConfiguration. + VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` + // VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration. + VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` + // VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration. + VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` + // VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration. + VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` + // RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration. + RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` + // RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration. + RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` + // VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration. + VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` + // RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerSecret - The radius secret property of the VpnServerConfiguration resource for point to site client connection. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` + // AadAuthenticationParameters - The set of aad vpn authentication parameters. + AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. + P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// VpnServerConfigurationsAssociatedWithVirtualWanListFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VpnServerConfigurationsAssociatedWithVirtualWanListFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnServerConfigurationsAssociatedWithVirtualWanListFuture) Result(client VpnServerConfigurationsAssociatedWithVirtualWanClient) (vscr VpnServerConfigurationsResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vscr.Response.Response, err = future.GetResult(sender); err == nil && vscr.Response.Response.StatusCode != http.StatusNoContent { + vscr, err = client.ListResponder(vscr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanListFuture", "Result", vscr.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VpnServerConfigurationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnServerConfigurationsCreateOrUpdateFuture) Result(client VpnServerConfigurationsClient) (vsc VpnServerConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vsc.Response.Response, err = future.GetResult(sender); err == nil && vsc.Response.Response.StatusCode != http.StatusNoContent { + vsc, err = client.CreateOrUpdateResponder(vsc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsCreateOrUpdateFuture", "Result", vsc.Response.Response, "Failure responding to request") + } + } + return +} + +// VpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VpnServerConfigurationsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnServerConfigurationsDeleteFuture) Result(client VpnServerConfigurationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnServerConfigurationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// VpnServerConfigurationsResponse vpnServerConfigurations list associated with VirtualWan Response. +type VpnServerConfigurationsResponse struct { + autorest.Response `json:"-"` + // VpnServerConfigurationResourceIds - List of VpnServerConfigurations associated with VirtualWan. + VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"` +} + +// VpnServerConfigVpnClientRevokedCertificate properties of the revoked VPN client certificate of +// VpnServerConfiguration. +type VpnServerConfigVpnClientRevokedCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // Thumbprint - The revoked VPN client certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// VpnServerConfigVpnClientRootCertificate properties of VPN client root certificate of +// VpnServerConfiguration. +type VpnServerConfigVpnClientRootCertificate struct { + // Name - The certificate name. + Name *string `json:"name,omitempty"` + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` +} + // VpnSite vpnSite Resource. type VpnSite struct { autorest.Response `json:"-"` @@ -33747,7 +33954,7 @@ type VpnSiteLinkConnectionProperties struct { EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` // UseLocalAzureIPAddress - Use local azure ip to initiate connection. UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - // ProvisioningState - The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site link connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -33759,7 +33966,7 @@ type VpnSiteLinkProperties struct { IPAddress *string `json:"ipAddress,omitempty"` // BgpProperties - The set of bgp properties. BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - // ProvisioningState - The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site link resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -33777,7 +33984,7 @@ type VpnSiteProperties struct { AddressSpace *AddressSpace `json:"addressSpace,omitempty"` // BgpProperties - The set of bgp properties. BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - // ProvisioningState - The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the VPN site resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // IsSecuritySite - IsSecuritySite flag. IsSecuritySite *bool `json:"isSecuritySite,omitempty"` @@ -33860,39 +34067,10 @@ func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.R return } -// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type VpnSitesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSite, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent { - vs, err = client.UpdateTagsResponder(vs.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request") - } - } - return -} - // Watcher network watcher in a resource group. type Watcher struct { autorest.Response `json:"-"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // WatcherPropertiesFormat - Properties of the network watcher. *WatcherPropertiesFormat `json:"properties,omitempty"` @@ -33911,9 +34089,6 @@ type Watcher struct { // MarshalJSON is the custom marshaler for Watcher. func (w Watcher) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if w.Etag != nil { - objectMap["etag"] = w.Etag - } if w.WatcherPropertiesFormat != nil { objectMap["properties"] = w.WatcherPropertiesFormat } @@ -34016,7 +34191,7 @@ type WatcherListResult struct { // WatcherPropertiesFormat the network watcher properties. type WatcherPropertiesFormat struct { - // ProvisioningState - The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - READ-ONLY; The provisioning state of the network watcher resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -34406,7 +34581,7 @@ type WebApplicationFirewallPolicy struct { autorest.Response `json:"-"` // WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy. *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -34426,9 +34601,6 @@ func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil { objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat } - if wafp.Etag != nil { - objectMap["etag"] = wafp.Etag - } if wafp.ID != nil { objectMap["id"] = wafp.ID } @@ -34679,4 +34851,10 @@ type WebApplicationFirewallPolicyPropertiesFormat struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting' ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"` + // ManagedRules - Describes the managedRules structure. + ManagedRules *ManagedRulesDefinition `json:"managedRules,omitempty"` + // HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners. + HTTPListeners *[]SubResource `json:"httpListeners,omitempty"` + // PathBasedRules - READ-ONLY; A collection of references to application gateway path rules. + PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/natgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go index 834037bf49f4..6062fe5018a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/natgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/natgateways.go @@ -79,11 +79,12 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client NatGatewaysClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -545,7 +546,7 @@ func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go index 8ab2f808e085..9ff7ba899c26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/operations.go @@ -76,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/p2svpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go index f7eaa1985de8..e6ce519a6921 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/p2svpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/p2svpngateways.go @@ -79,7 +79,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +236,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -321,7 +321,7 @@ func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -393,7 +393,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,6 +432,87 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthResponder(resp *http return } +// GetP2sVpnConnectionHealthDetailed gets the sas url to get the connection health detail of P2S clients of the virtual +// wan P2SVpnGateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the P2SVpnGateway. +// request - request parameters supplied to get p2s vpn connections detailed health. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVpnConnectionHealthRequest) (result P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealthDetailed") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetP2sVpnConnectionHealthDetailedPreparer(ctx, resourceGroupName, gatewayName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", nil, "Failure preparing request") + return + } + + result, err = client.GetP2sVpnConnectionHealthDetailedSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", result.Response(), "Failure sending request") + return + } + + return +} + +// GetP2sVpnConnectionHealthDetailedPreparer prepares the GetP2sVpnConnectionHealthDetailed request. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedPreparer(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVpnConnectionHealthRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetP2sVpnConnectionHealthDetailedSender sends the GetP2sVpnConnectionHealthDetailed request. The method will close the +// http.Response Body if it receives an error. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// GetP2sVpnConnectionHealthDetailedResponder handles the response to the GetP2sVpnConnectionHealthDetailed request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedResponder(resp *http.Response) (result P2SVpnConnectionHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List lists all the P2SVpnGateways in a subscription. func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) { if tracing.IsEnabled() { @@ -472,7 +553,7 @@ func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -585,7 +666,7 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -660,13 +741,13 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Conte // resourceGroupName - the resource group name of the P2SVpnGateway. // gatewayName - the name of the gateway. // p2SVpnGatewayParameters - parameters supplied to update a virtual wan p2s vpn gateway tags. -func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2sVpnGatewaysUpdateTagsFuture, err error) { +func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2SVpnGateway, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -677,12 +758,18 @@ func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroup return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -694,7 +781,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -711,15 +798,9 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) { +func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -728,7 +809,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/packetcaptures.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go index c9a392e95c63..66849468a82b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/packetcaptures.go @@ -91,7 +91,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,7 +172,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -412,7 +412,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -485,7 +485,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go index 99ba04971a24..463a28627bdf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/peerexpressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/peerexpressroutecircuitconnections.go @@ -90,7 +90,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privateendpoints.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go index ecd68601f8c9..88e6404315eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privateendpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privateendpoints.go @@ -79,11 +79,12 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privatelinkservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go index 6c7e9e90c85a..b720d3016ac4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/privatelinkservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/privatelinkservices.go @@ -83,7 +83,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -238,11 +238,12 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -317,7 +318,7 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -395,7 +396,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -478,7 +479,7 @@ func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -514,6 +515,90 @@ func (client PrivateLinkServicesClient) GetResponder(resp *http.Response) (resul return } +// GetPrivateEndpointConnection get the specific private end point connection by specific private link service in the +// resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +// expand - expands referenced resources. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, expand string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.GetPrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", nil, "Failure preparing request") + return + } + + resp, err := client.GetPrivateEndpointConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", resp, "Failure sending request") + return + } + + result, err = client.GetPrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "GetPrivateEndpointConnection", resp, "Failure responding to request") + } + + return +} + +// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets all private link services in a resource group. // Parameters: // resourceGroupName - the name of the resource group. @@ -557,7 +642,7 @@ func (client PrivateLinkServicesClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -671,7 +756,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -787,7 +872,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByRes "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -897,7 +982,7 @@ func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -967,6 +1052,121 @@ func (client PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.C return } +// ListPrivateEndpointConnections gets all private end point connections for a specific private link service. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListPrivateEndpointConnections") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listPrivateEndpointConnectionsNextResults + req, err := client.ListPrivateEndpointConnectionsPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListPrivateEndpointConnections", resp, "Failure responding to request") + } + + return +} + +// ListPrivateEndpointConnectionsPreparer prepares the ListPrivateEndpointConnections request. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListPrivateEndpointConnectionsSender sends the ListPrivateEndpointConnections request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListPrivateEndpointConnectionsResponder handles the response to the ListPrivateEndpointConnections request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listPrivateEndpointConnectionsNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listPrivateEndpointConnectionsNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListPrivateEndpointConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListPrivateEndpointConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListPrivateEndpointConnectionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListPrivateEndpointConnections") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListPrivateEndpointConnections(ctx, resourceGroupName, serviceName) + return +} + // UpdatePrivateEndpointConnection approve or reject private end point connection for a private link service in a // subscription. // Parameters: @@ -1015,7 +1215,7 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/profiles.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go index 470be1127a5c..5ced517fd52b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/profiles.go @@ -85,11 +85,12 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -545,7 +546,7 @@ func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipaddresses.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go index 011ceb875cfb..d6def66f39c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipaddresses.go @@ -91,11 +91,12 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -170,7 +171,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -253,7 +254,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -421,7 +422,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +532,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -844,13 +845,13 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres // resourceGroupName - the name of the resource group. // publicIPAddressName - the name of the public IP address. // parameters - parameters supplied to update public IP address tags. -func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddressesUpdateTagsFuture, err error) { +func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddress, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -861,12 +862,18 @@ func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGr return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -878,7 +885,7 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -895,15 +902,9 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) { +func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipprefixes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go index 0d92dea80fdd..e9c290bda0de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/publicipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/publicipprefixes.go @@ -79,11 +79,12 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,13 +506,13 @@ func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (resul // resourceGroupName - the name of the resource group. // publicIPPrefixName - the name of the public IP prefix. // parameters - parameters supplied to update public IP prefix tags. -func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefixesUpdateTagsFuture, err error) { +func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefix, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -522,12 +523,18 @@ func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGro return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -539,7 +546,7 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -556,15 +563,9 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) { +func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go index 2740bb8d9899..465305198d67 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/resourcenavigationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/resourcenavigationlinks.go @@ -86,7 +86,7 @@ func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, re "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilterrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go index 72c1bddaaf8c..0a72eab675a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilterrules.go @@ -91,7 +91,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +335,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -404,87 +404,3 @@ func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Conte result.page, err = client.ListByRouteFilter(ctx, resourceGroupName, routeFilterName) return } - -// Update updates a route in the specified route filter. -// Parameters: -// resourceGroupName - the name of the resource group. -// routeFilterName - the name of the route filter. -// ruleName - the name of the route filter rule. -// routeFilterRuleParameters - parameters supplied to the update route filter rule operation. -func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (result RouteFilterRulesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Update") - defer func() { - sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "routeFilterName": autorest.Encode("path", routeFilterName), - "ruleName": autorest.Encode("path", ruleName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-07-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - routeFilterRuleParameters.Name = nil - routeFilterRuleParameters.Etag = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters), - autorest.WithJSON(routeFilterRuleParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RouteFilterRulesClient) UpdateResponder(resp *http.Response) (result RouteFilterRule, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilters.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go index 959c43982388..0cf33cff6e54 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routefilters.go @@ -79,7 +79,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +242,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -318,7 +318,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -431,7 +431,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -501,79 +501,76 @@ func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context return } -// Update updates a route filter in a specified resource group. +// UpdateTags updates tags of a route filter. // Parameters: // resourceGroupName - the name of the resource group. // routeFilterName - the name of the route filter. -// routeFilterParameters - parameters supplied to the update route filter operation. -func (client RouteFiltersClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (result RouteFiltersUpdateFuture, err error) { +// parameters - parameters supplied to update route filter tags. +func (client RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject) (result RouteFilter, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Update") + ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters) + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeFilterName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", nil, "Failure preparing request") return } - result, err = client.UpdateSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "UpdateTags", resp, "Failure responding to request") + } + return } -// UpdatePreparer prepares the Update request. -func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (*http.Request, error) { +// UpdateTagsPreparer prepares the UpdateTags request. +func (client RouteFiltersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "routeFilterName": autorest.Encode("path", routeFilterName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - routeFilterParameters.Name = nil - routeFilterParameters.Etag = nil - routeFilterParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}", pathParameters), - autorest.WithJSON(routeFilterParameters), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSender sends the Update request. The method will close the +// UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) { +func (client RouteFiltersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// UpdateResponder handles the response to the Update request. The method always +// UpdateTagsResponder handles the response to the UpdateTags request. The method always // closes the http.Response Body. -func (client RouteFiltersClient) UpdateResponder(resp *http.Response) (result RouteFilter, err error) { +func (client RouteFiltersClient) UpdateTagsResponder(resp *http.Response) (result RouteFilter, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go index 10905c1b06f0..f5ac2576c739 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routes.go @@ -81,11 +81,12 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + routeParameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -162,7 +163,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +247,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +325,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routetables.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go index 98a6b10e4546..a7df1c0b6f03 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/routetables.go @@ -79,11 +79,12 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,13 +506,13 @@ func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result Rou // resourceGroupName - the name of the resource group. // routeTableName - the name of the route table. // parameters - parameters supplied to update route table tags. -func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTablesUpdateTagsFuture, err error) { +func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTable, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -522,12 +523,18 @@ func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupNam return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -539,7 +546,7 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -556,15 +563,9 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) { +func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securitygroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go index 3df3e1de9ed0..8ec0a4a4158a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securitygroups.go @@ -79,11 +79,12 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +321,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,13 +506,13 @@ func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result // resourceGroupName - the name of the resource group. // networkSecurityGroupName - the name of the network security group. // parameters - parameters supplied to update network security group tags. -func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroupsUpdateTagsFuture, err error) { +func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroup, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -522,12 +523,18 @@ func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroup return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -539,7 +546,7 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -556,15 +563,9 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) { +func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securityrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go index ab7c6a3ff491..b3ce9a155428 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/securityrules.go @@ -81,11 +81,12 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + securityRuleParameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -162,7 +163,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +247,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +325,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go index de5889ad3039..afb9d5c59d73 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceassociationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceassociationlinks.go @@ -86,7 +86,7 @@ func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, re "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go index 6e6865aed65d..8f3a89785c42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicies.go @@ -79,11 +79,12 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -158,7 +159,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +242,7 @@ func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +318,7 @@ func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +431,7 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -500,46 +501,52 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx cont return } -// Update updates service Endpoint Policies. +// UpdateTags updates tags of a service endpoint policy. // Parameters: // resourceGroupName - the name of the resource group. // serviceEndpointPolicyName - the name of the service endpoint policy. // parameters - parameters supplied to update service endpoint policy tags. -func (client ServiceEndpointPoliciesClient) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPoliciesUpdateFuture, err error) { +func (client ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPolicy, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Update") + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", nil, "Failure preparing request") return } - result, err = client.UpdateSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "UpdateTags", resp, "Failure responding to request") + } + return } -// UpdatePreparer prepares the Update request. -func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (*http.Request, error) { +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ServiceEndpointPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -554,22 +561,16 @@ func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSender sends the Update request. The method will close the +// UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client ServiceEndpointPoliciesClient) UpdateSender(req *http.Request) (future ServiceEndpointPoliciesUpdateFuture, err error) { +func (client ServiceEndpointPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// UpdateResponder handles the response to the Update request. The method always +// UpdateTagsResponder handles the response to the UpdateTags request. The method always // closes the http.Response Body. -func (client ServiceEndpointPoliciesClient) UpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { +func (client ServiceEndpointPoliciesClient) UpdateTagsResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go index daad64b9a503..222d07dcd4ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/serviceendpointpolicydefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/serviceendpointpolicydefinitions.go @@ -83,11 +83,12 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + serviceEndpointPolicyDefinitions.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -164,7 +165,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +249,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +327,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/servicetags.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go index 1ef9e377ef3c..cbbd7d0fbde3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/servicetags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/servicetags.go @@ -84,7 +84,7 @@ func (client ServiceTagsClient) ListPreparer(ctx context.Context, location strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/subnets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go index 6bec2ff1f18c..96ab7b847dbe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/subnets.go @@ -81,11 +81,12 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + subnetParameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -162,7 +163,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +248,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +329,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,7 +441,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -522,7 +523,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go index 0b954738e1eb..c658a631cf95 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/usages.go @@ -90,7 +90,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go index 1b17eb868793..5fab6002e2a1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " network/2019-07-01" + return "Azure-SDK-For-Go/" + version.Number + " network/2019-09-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go new file mode 100644 index 000000000000..a95c5cb00bfb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubroutetablev2s.go @@ -0,0 +1,397 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VirtualHubRouteTableV2sClient is the network Client +type VirtualHubRouteTableV2sClient struct { + BaseClient +} + +// NewVirtualHubRouteTableV2sClient creates an instance of the VirtualHubRouteTableV2sClient client. +func NewVirtualHubRouteTableV2sClient(subscriptionID string) VirtualHubRouteTableV2sClient { + return NewVirtualHubRouteTableV2sClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualHubRouteTableV2sClientWithBaseURI creates an instance of the VirtualHubRouteTableV2sClient client. +func NewVirtualHubRouteTableV2sClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubRouteTableV2sClient { + return VirtualHubRouteTableV2sClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing +// VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +// virtualHubRouteTableV2Parameters - parameters supplied to create or update VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2) (result VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + virtualHubRouteTableV2Parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", pathParameters), + autorest.WithJSON(virtualHubRouteTableV2Parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubRouteTableV2. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result VirtualHubRouteTableV2sDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualHubRouteTableV2sClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubRouteTableV2sClient) DeleteSender(req *http.Request) (future VirtualHubRouteTableV2sDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VirtualHubRouteTableV2. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHubRouteTableV2. +// virtualHubName - the name of the VirtualHub. +// routeTableName - the name of the VirtualHubRouteTableV2. +func (client VirtualHubRouteTableV2sClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (result VirtualHubRouteTableV2, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName, routeTableName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualHubRouteTableV2sClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routeTableName": autorest.Encode("path", routeTableName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubRouteTableV2sClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) GetResponder(resp *http.Response) (result VirtualHubRouteTableV2, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all VirtualHubRouteTableV2s. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client VirtualHubRouteTableV2sClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubRouteTableV2sResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.List") + defer func() { + sc := -1 + if result.lvhrtvr.Response.Response != nil { + sc = result.lvhrtvr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvhrtvr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", resp, "Failure sending request") + return + } + + result.lvhrtvr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualHubRouteTableV2sClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualHubRouteTableV2sClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualHubRouteTableV2sClient) ListResponder(resp *http.Response) (result ListVirtualHubRouteTableV2sResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client VirtualHubRouteTableV2sClient) listNextResults(ctx context.Context, lastResults ListVirtualHubRouteTableV2sResult) (result ListVirtualHubRouteTableV2sResult, err error) { + req, err := lastResults.listVirtualHubRouteTableV2sResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualHubRouteTableV2sClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListVirtualHubRouteTableV2sResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubRouteTableV2sClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, virtualHubName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualhubs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go index b5c34858dd97..4106182e4972 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualhubs.go @@ -79,7 +79,7 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupNa "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -502,13 +502,13 @@ func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, // resourceGroupName - the resource group name of the VirtualHub. // virtualHubName - the name of the VirtualHub. // virtualHubParameters - parameters supplied to update VirtualHub tags. -func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHubsUpdateTagsFuture, err error) { +func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHub, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -519,12 +519,18 @@ func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupNam return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -536,7 +542,7 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,15 +559,9 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) { +func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -570,7 +570,7 @@ func (client VirtualHubsClient) UpdateTagsResponder(resp *http.Response) (result err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go index c020c80cfa13..6e5d3efc3f2d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go @@ -94,11 +94,12 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -173,7 +174,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context. "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -255,7 +256,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -333,7 +334,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -410,7 +411,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +532,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -620,7 +621,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -701,7 +702,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapturePreparer( "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -785,7 +786,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapturePreparer(c "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -865,7 +866,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go index 43f9e9507e15..f7780bd49cfd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkgateways.go @@ -86,11 +86,12 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -165,7 +166,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +244,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +325,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -409,7 +410,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -482,7 +483,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "peer": autorest.Encode("query", peer), @@ -561,7 +562,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -642,7 +643,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -720,7 +721,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer( "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +800,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -877,7 +878,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -959,7 +960,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1074,7 +1075,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1184,7 +1185,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1265,7 +1266,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1351,7 +1352,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1431,7 +1432,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapturePreparer(ctx contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1514,7 +1515,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapturePreparer(ctx context "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1599,7 +1600,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1671,7 +1672,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1758,7 +1759,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer( "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go index e0c5c4454288..717551401a73 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworkpeerings.go @@ -82,11 +82,12 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + virtualNetworkPeeringParameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -163,7 +164,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +248,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +326,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go index 6c8c869bf294..d024e61f0082 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworks.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -85,7 +86,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "ipAddress": autorest.Encode("query", IPAddress), @@ -135,6 +136,15 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("network.VirtualNetworksClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -158,11 +168,12 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -237,7 +248,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +331,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -399,7 +410,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -509,7 +520,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -624,7 +635,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -699,13 +710,13 @@ func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resou // resourceGroupName - the name of the resource group. // virtualNetworkName - the name of the virtual network. // parameters - parameters supplied to update virtual network tags. -func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetworksUpdateTagsFuture, err error) { +func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetwork, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -716,12 +727,18 @@ func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGrou return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -733,7 +750,7 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -750,15 +767,9 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) { +func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go index b0928942fbc0..a4374217dea1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualnetworktaps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualnetworktaps.go @@ -111,11 +111,12 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -190,7 +191,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -272,7 +273,7 @@ func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resource "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -345,7 +346,7 @@ func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -458,7 +459,7 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -533,13 +534,13 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.C // resourceGroupName - the name of the resource group. // tapName - the name of the tap. // tapParameters - parameters supplied to update VirtualNetworkTap tags. -func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTapsUpdateTagsFuture, err error) { +func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTap, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -550,12 +551,18 @@ func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceG return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -567,7 +574,7 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -584,15 +591,9 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkTapsUpdateTagsFuture, err error) { +func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go index 2d1a6c78ce06..dde9185772d7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go @@ -63,7 +63,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRouterPeeringsClient", "CreateOrUpdate", err.Error()) @@ -93,7 +93,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdatePreparer(ctx context.Con "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,7 +176,7 @@ func (client VirtualRouterPeeringsClient) DeletePreparer(ctx context.Context, re "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +260,7 @@ func (client VirtualRouterPeeringsClient) GetPreparer(ctx context.Context, resou "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -338,7 +338,7 @@ func (client VirtualRouterPeeringsClient) ListPreparer(ctx context.Context, reso "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -407,87 +407,3 @@ func (client VirtualRouterPeeringsClient) ListComplete(ctx context.Context, reso result.page, err = client.List(ctx, resourceGroupName, virtualRouterName) return } - -// Update updates a Virtual Router Peering. -// Parameters: -// resourceGroupName - the resource group name of the Virtual Router Peering. -// virtualRouterName - the name of the Virtual Router. -// peeringName - the name of the Virtual Router Peering being updated. -// parameters - parameters supplied to update Virtual Router Peering operation. -func (client VirtualRouterPeeringsClient) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering) (result VirtualRouterPeering, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRouterPeeringsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, virtualRouterName, peeringName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualRouterPeeringsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "peeringName": autorest.Encode("path", peeringName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualRouterName": autorest.Encode("path", virtualRouterName), - } - - const APIVersion = "2019-07-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.Etag = nil - parameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualRouterPeeringsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualRouterPeeringsClient) UpdateResponder(resp *http.Response) (result VirtualRouterPeering, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouters.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go index 247dd594efe3..5235125ca060 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualrouters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualrouters.go @@ -62,7 +62,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRoutersClient", "CreateOrUpdate", err.Error()) @@ -91,7 +91,7 @@ func (client VirtualRoutersClient) CreateOrUpdatePreparer(ctx context.Context, r "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client VirtualRoutersClient) DeletePreparer(ctx context.Context, resourceG "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +254,7 @@ func (client VirtualRoutersClient) GetPreparer(ctx context.Context, resourceGrou "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +330,7 @@ func (client VirtualRoutersClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +443,7 @@ func (client VirtualRoutersClient) ListByResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -512,83 +512,3 @@ func (client VirtualRoutersClient) ListByResourceGroupComplete(ctx context.Conte result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } - -// Update updates a Virtual Router. -// Parameters: -// resourceGroupName - the resource group name of the Virtual Router. -// virtualRouterName - the name of the Virtual Router being updated. -// parameters - parameters supplied to Update Virtual Router Tags. -func (client VirtualRoutersClient) Update(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters TagsObject) (result VirtualRouter, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualRoutersClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, virtualRouterName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualRoutersClient) UpdatePreparer(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters TagsObject) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualRouterName": autorest.Encode("path", virtualRouterName), - } - - const APIVersion = "2019-07-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualRoutersClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualRoutersClient) UpdateResponder(resp *http.Response) (result VirtualRouter, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualwans.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go index 4b79e591e8fc..7361f96c4328 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/virtualwans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/virtualwans.go @@ -79,7 +79,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupNa "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -502,13 +502,13 @@ func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context, // resourceGroupName - the resource group name of the VirtualWan. // virtualWANName - the name of the VirtualWAN being updated. // wANParameters - parameters supplied to Update VirtualWAN tags. -func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWansUpdateTagsFuture, err error) { +func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWAN, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -519,12 +519,18 @@ func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupNam return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -536,7 +542,7 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,15 +559,9 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (future VirtualWansUpdateTagsFuture, err error) { +func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -570,7 +570,7 @@ func (client VirtualWansClient) UpdateTagsResponder(resp *http.Response) (result err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go index 1e399227d50e..993de186d960 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnconnections.go @@ -82,7 +82,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go index fb0329af6d91..f08842016690 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpngateways.go @@ -79,7 +79,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -535,7 +535,7 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -579,13 +579,13 @@ func (client VpnGatewaysClient) ResetResponder(resp *http.Response) (result VpnG // resourceGroupName - the resource group name of the VpnGateway. // gatewayName - the name of the gateway. // vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags. -func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) { +func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGateway, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -596,12 +596,18 @@ func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupNam return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -613,7 +619,7 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -630,15 +636,9 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) { +func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -647,7 +647,7 @@ func (client VpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go index e3eb45fac8ea..8bc32e604e95 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnlinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnlinkconnections.go @@ -87,7 +87,7 @@ func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go new file mode 100644 index 000000000000..cc734dd887f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurations.go @@ -0,0 +1,579 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VpnServerConfigurationsClient is the network Client +type VpnServerConfigurationsClient struct { + BaseClient +} + +// NewVpnServerConfigurationsClient creates an instance of the VpnServerConfigurationsClient client. +func NewVpnServerConfigurationsClient(subscriptionID string) VpnServerConfigurationsClient { + return NewVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnServerConfigurationsClientWithBaseURI creates an instance of the VpnServerConfigurationsClient client. +func NewVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) VpnServerConfigurationsClient { + return VpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a VpnServerConfiguration resource if it doesn't exist else updates the existing +// VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being created or updated. +// vpnServerConfigurationParameters - parameters supplied to create or update VpnServerConfiguration. +func (client VpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VpnServerConfiguration) (result VpnServerConfigurationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VpnServerConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnServerConfigurationParameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithJSON(vpnServerConfigurationParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future VpnServerConfigurationsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being deleted. +func (client VpnServerConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result VpnServerConfigurationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, vpnServerConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VpnServerConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) DeleteSender(req *http.Request) (future VpnServerConfigurationsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a VpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being retrieved. +func (client VpnServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result VpnServerConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, vpnServerConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnServerConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) GetResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the VpnServerConfigurations in a subscription. +func (client VpnServerConfigurationsClient) List(ctx context.Context) (result ListVpnServerConfigurationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.List") + defer func() { + sc := -1 + if result.lvscr.Response.Response != nil { + sc = result.lvscr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lvscr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result.lvscr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnServerConfigurationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client VpnServerConfigurationsClient) listNextResults(ctx context.Context, lastResults ListVpnServerConfigurationsResult) (result ListVpnServerConfigurationsResult, err error) { + req, err := lastResults.listVpnServerConfigurationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnServerConfigurationsClient) ListComplete(ctx context.Context) (result ListVpnServerConfigurationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists all the vpnServerConfigurations in a resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +func (client VpnServerConfigurationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnServerConfigurationsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lvscr.Response.Response != nil { + sc = result.lvscr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lvscr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lvscr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client VpnServerConfigurationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnServerConfigurationsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client VpnServerConfigurationsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnServerConfigurationsResult) (result ListVpnServerConfigurationsResult, err error) { + req, err := lastResults.listVpnServerConfigurationsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnServerConfigurationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnServerConfigurationsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates VpnServerConfiguration tags. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration being updated. +// vpnServerConfigurationParameters - parameters supplied to update VpnServerConfiguration tags. +func (client VpnServerConfigurationsClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject) (result VpnServerConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "UpdateTags", resp, "Failure responding to request") + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client VpnServerConfigurationsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}", pathParameters), + autorest.WithJSON(vpnServerConfigurationParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsClient) UpdateTagsResponder(resp *http.Response) (result VpnServerConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go new file mode 100644 index 000000000000..5213d528a99b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -0,0 +1,120 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VpnServerConfigurationsAssociatedWithVirtualWanClient is the network Client +type VpnServerConfigurationsAssociatedWithVirtualWanClient struct { + BaseClient +} + +// NewVpnServerConfigurationsAssociatedWithVirtualWanClient creates an instance of the +// VpnServerConfigurationsAssociatedWithVirtualWanClient client. +func NewVpnServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string) VpnServerConfigurationsAssociatedWithVirtualWanClient { + return NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI creates an instance of the +// VpnServerConfigurationsAssociatedWithVirtualWanClient client. +func NewVpnServerConfigurationsAssociatedWithVirtualWanClientWithBaseURI(baseURI string, subscriptionID string) VpnServerConfigurationsAssociatedWithVirtualWanClient { + return VpnServerConfigurationsAssociatedWithVirtualWanClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. +// Parameters: +// resourceGroupName - the resource group name. +// virtualWANName - the name of the VirtualWAN whose associated VpnServerConfigurations is needed. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) List(ctx context.Context, resourceGroupName string, virtualWANName string) (result VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnServerConfigurationsAssociatedWithVirtualWanClient.List") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, resourceGroupName, virtualWANName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", nil, "Failure preparing request") + return + } + + result, err = client.ListSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", result.Response(), "Failure sending request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualWANName": autorest.Encode("path", virtualWANName), + } + + const APIVersion = "2019-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListSender(req *http.Request) (future VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListResponder(resp *http.Response) (result VpnServerConfigurationsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go index 1db1031dedbc..8db1c30b9af2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinkconnections.go @@ -88,7 +88,7 @@ func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go index ddc90350866a..b3cc45a2ad05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitelinks.go @@ -86,7 +86,7 @@ func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupN "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, reso "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsites.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go index e414f46bf941..7bba492f7ea5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsites.go @@ -79,7 +79,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -502,13 +502,13 @@ func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, re // resourceGroupName - the resource group name of the VpnSite. // vpnSiteName - the name of the VpnSite being updated. // vpnSiteParameters - parameters supplied to update VpnSite tags. -func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSitesUpdateTagsFuture, err error) { +func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSite, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.UpdateTags") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -519,12 +519,18 @@ func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName s return } - result, err = client.UpdateTagsSender(req) + resp, err := client.UpdateTagsSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", resp, "Failure sending request") return } + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", resp, "Failure responding to request") + } + return } @@ -536,7 +542,7 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,15 +559,9 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. -func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) { +func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -570,7 +570,7 @@ func (client VpnSitesClient) UpdateTagsResponder(resp *http.Response) (result Vp err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go index 898417fad1e1..4baf61776b10 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/vpnsitesconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/vpnsitesconfiguration.go @@ -86,7 +86,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/watchers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go index fd1b6d95fc2f..2965b624be69 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/watchers.go @@ -89,7 +89,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,11 +175,12 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -248,7 +249,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +331,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -412,7 +413,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -498,7 +499,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -589,7 +590,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -677,7 +678,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -763,7 +764,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -847,7 +848,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -933,7 +934,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1019,7 +1020,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1102,7 +1103,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1174,7 +1175,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1246,7 +1247,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1340,7 +1341,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1426,7 +1427,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1510,7 +1511,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go index 795632fc59f7..94d0bd6e1614 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network/webapplicationfirewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go @@ -60,7 +60,20 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Co } if err := validation.Validate([]validation.Validation{ {TargetValue: policyName, - Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + }}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + }}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules.ManagedRuleSets", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", err.Error()) } @@ -93,11 +106,12 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.Etag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -172,7 +186,7 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +274,7 @@ func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -336,7 +350,7 @@ func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -446,7 +460,7 @@ func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/modules.txt b/vendor/modules.txt index bec16dcf70cf..d7f0baaa485c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -41,7 +41,7 @@ github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/m github.com/Azure/azure-sdk-for-go/services/mediaservices/mgmt/2018-07-01/media github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql github.com/Azure/azure-sdk-for-go/services/netapp/mgmt/2019-06-01/netapp -github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-07-01/network +github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-09-01/network github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization diff --git a/website/azurerm.erb b/website/azurerm.erb index 72cdf92edba4..40616f76f93e 100644 --- a/website/azurerm.erb +++ b/website/azurerm.erb @@ -318,6 +318,14 @@ azurerm_proximity_placement_group +
  • + azurerm_private_link_service_endpoint_connections +
  • + +
  • + azurerm_private_link_service +
  • +
  • azurerm_public_ip_prefix
  • @@ -435,26 +443,22 @@
  • - azurerm_virtual_machine -
  • - -
  • - azurerm_virtual_network + azurerm_virtual_hub
  • - azurerm_private_link_service_endpoint_connections + azurerm_virtual_machine
  • - azurerm_private_link_service + azurerm_virtual_network
  • azurerm_virtual_network_gateway
  • - > +
  • azurerm_virtual_network_gateway_connection
  • @@ -1616,6 +1620,10 @@ azurerm_network_interface_nat_rule_association +
  • + azurerm_network_packet_capture +
  • +
  • azurerm_network_profile
  • @@ -1637,7 +1645,11 @@
  • - azurerm_network_packet_capture + azurerm_point_to_site_vpn_gateway +
  • + +
  • + azurerm_private_link_service
  • @@ -1676,6 +1688,10 @@ azurerm_traffic_manager_profile
  • +
  • + azurerm_virtual_hub +
  • +
  • azurerm_virtual_network
  • @@ -1693,15 +1709,19 @@
  • - azurerm_web_application_firewall_policy + azurerm_virtual_wan
  • - azurerm_private_link_service + azurerm_vpn_gateway
  • - > - azurerm_virtual_wan +
  • + azurerm_vpn_server_configuration +
  • + +
  • + azurerm_web_application_firewall_policy
  • diff --git a/website/docs/d/virtual_hub.html.markdown b/website/docs/d/virtual_hub.html.markdown index 5ea0b05438bd..0d485bcb355c 100644 --- a/website/docs/d/virtual_hub.html.markdown +++ b/website/docs/d/virtual_hub.html.markdown @@ -11,16 +11,16 @@ description: |- Uses this data source to access information about an existing Virtual Hub. - ## Virtual Hub Usage ```hcl data "azurerm_virtual_hub" "example" { - resource_group = "acctestRG" - name = "acctestvirtualhub" + name = "example-hub" + resource_group = "example-resources" } + output "virtual_hub_id" { - value = "${data.azurerm_virtual_hub.example.id}" + value = data.azurerm_virtual_hub.example.id } ``` @@ -40,40 +40,8 @@ The following attributes are exported: * `location` - The Azure Region where the Virtual Hub exists. -* `address_prefix` - Address-prefix for this Virtual Hub. - -* `virtual_wan_id` - The resource id of virtual wan. - -* `s2s_vpn_gateway_id` - The resource id of s2s vpn gateway. - -* `p2s_vpn_gateway_id` - The resource id of p2s vpn gateway. - -* `express_route_gateway_id` - The resource id of express route gateway. - -* `route` - One `route` block defined below. - -* `virtual_network_connection` - One or more `virtual_network_connection` block defined below. - -* `tags` - Resource tags. - ---- - -The `route` block contains the following: - -* `address_prefixes` - List of all addressPrefixes. - -* `next_hop_ip_address` - NextHop ip address. - ---- - -The `virtual_network_connection` block contains the following: - -* `name` - The name of the resource that is unique within a resource group. This name can be used to access the resource. - -* `remote_virtual_network_id` - The resource id of remote virtual network. - -* `allow_hub_to_remote_vnet_transit` - VirtualHub to RemoteVnet transit to enabled or not. +* `address_prefix` - The Address Prefix used for this Virtual Hub. -* `allow_remote_vnet_to_use_hub_vnet_gateways` - Allow RemoteVnet to use Virtual Hub's gateways. +* `tags` - A mapping of tags assigned to the Virtual Hub. -* `enable_internet_security` - Enable internet security. +* `virtual_wan_id` - The ID of the Virtual WAN within which the Virtual Hub exists. diff --git a/website/docs/guides/2.0-upgrade-guide.html.markdown b/website/docs/guides/2.0-upgrade-guide.html.markdown index b7c94bbf63b4..ccf8ac0722d4 100644 --- a/website/docs/guides/2.0-upgrade-guide.html.markdown +++ b/website/docs/guides/2.0-upgrade-guide.html.markdown @@ -436,6 +436,10 @@ Splitting the Virtual Machine Scale Set resource in two allows us to both provid The existing `azurerm_virtual_machine_scale_set` Resource will continue to be available in it's current form, however it will eventually be deprecated and we recommend using the new resources going forward. +### Resource: `azurerm_virtual_wan` + +The deprecated `security_provider_name` field will be removed, since this option is no longer supported by Azure. + --- We've spent the past few months laying the groundwork for these changes - and whilst we appreciate that your Terraform Configurations may require code changes to upgrade to 2.0 - we take Semantic Versioning seriously and so try our best to limit these changes to major versions. diff --git a/website/docs/r/point_to_site_vpn_gateway.html.markdown b/website/docs/r/point_to_site_vpn_gateway.html.markdown new file mode 100644 index 000000000000..91ceda30db16 --- /dev/null +++ b/website/docs/r/point_to_site_vpn_gateway.html.markdown @@ -0,0 +1,80 @@ +--- +subcategory: "Network" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_point_to_site_vpn_gateway" +sidebar_current: "docs-azurerm-resource-network-point-to-site-vpn-gateway" +description: |- + Manages a Point-to-Site VPN Gateway. + +--- + +# azurerm_point_to_site_vpn_gateway + +Manages a Point-to-Site VPN Gateway. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { ... } +resource "azurerm_virtual_wan" "example" { ... } +resource "azurerm_virtual_hub" "example" { ... } +resource "azurerm_vpn_server_configuration" "example" { ... } + +resource "azurerm_point_to_site_vpn_gateway" "example" { + name = "example-vpn-gateway" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.resource_group_name + virtual_hub_id = azurerm_virtual_hub.example.id + vpn_server_configuration_id = azurerm_vpn_server_configuration.example.id + scale_unit = 1 +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. + +* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. + +* `connection_configuration` - (Required) A `connection_configuration` block as defined below. + +* `scale_unit` - (Required) The Scale Unit for this Point-to-Site VPN Gateway. + +* `virtual_hub_id` - (Required) The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. + +* `vpn_server_configuration_id` - (Required) The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. + +* `tags` - (Optional) A mapping of tags to assign to the Point-to-Site VPN Gateway. + +--- + +A `connection_configuration` block supports the following: + +* `name` - (Required) The Name which should be used for this Connection Configuration. + +* `vpn_client_address_pool` - (Required) A `vpn_client_address_pool` block as defined below. + +--- + +A `vpn_client_address_pool` block supports the following: + +* `address_prefixes` - (Required) A list of CIDR Ranges which should be used as Address Prefixes. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the Point-to-Site VPN Gateway. + +## Import + +Point-to-Site VPN Gateway's can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_point_to_site_vpn_gateway.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/p2svpnGateways/gateway1 +``` + diff --git a/website/docs/r/virtual_hub.html.markdown.noregistry b/website/docs/r/virtual_hub.html.markdown similarity index 61% rename from website/docs/r/virtual_hub.html.markdown.noregistry rename to website/docs/r/virtual_hub.html.markdown index 2956916c5be4..3708b17b0c5f 100644 --- a/website/docs/r/virtual_hub.html.markdown.noregistry +++ b/website/docs/r/virtual_hub.html.markdown @@ -29,8 +29,8 @@ resource "azurerm_virtual_hub" "example" { name = "example-virtualhub" resource_group_name = azurerm_resource_group.example.name location = azurerm_resource_group.example.location - address_prefix = "10.0.1.0/24" virtual_wan_id = azurerm_virtual_wan.example.id + address_prefix = "10.0.1.0/24" } ``` @@ -50,20 +50,10 @@ The following arguments are supported: --- -* `express_route_gateway_id` - (Optional) The ID of an Express Route Gateway which should be used for Express Route connections. - -~> **NOTE:** This functionality is in Preview and must be opted into via `az feature register --namespace Microsoft.Network --name AllowCortexExpressRouteGateway` and then `az provider register -n Microsoft.Network`. - -* `p2s_vpn_gateway_id` - (Optional) The ID of a Point-to-Site VPN Gateway which should be used for Point-to-Site connections. - * `route` - (Optional) One or more `route` blocks as defined below. -* `s2s_vpn_gateway_id` - (Optional) The ID of a Site-to-Site VPN Gateway which should be used for Site-to-Site connections. - * `tags` - (Optional) A mapping of tags to assign to the Virtual Hub. -* `virtual_network_connection` - (Optional) One or more `virtual_network_connection` blocks as defined below. - --- The `route` block supports the following: @@ -74,20 +64,6 @@ The `route` block supports the following: --- -The `virtual_network_connection` block supports the following: - -* `name` - (Required) The name of the resource that is unique within a resource group. This name can be used to access the resource. - -* `remote_virtual_network_id` - (Required) The ID of a Virtual Network. - -* `allow_hub_to_remote_vnet_transit` - (Optional) Should the Virtual Hub be able to transit via Remote Virtual Networks? - -* `allow_remote_vnet_to_use_hub_vnet_gateways` - (Optional) Should the Remote Virtual Network be able to use the Hub's Virtual Network Gateways? - -* `enable_internet_security` - (Optional) Should internet security be enabled? - ---- - ## Attributes Reference The following attributes are exported: @@ -96,8 +72,8 @@ The following attributes are exported: ## Import -Virtual Hub can be imported using the `resource id`, e.g. +Virtual Hub's can be imported using the `resource id`, e.g. ```shell -$ terraform import azurerm_virtual_hub.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/vhub1 +$ terraform import azurerm_virtual_hub.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/hub1 ``` diff --git a/website/docs/r/virtual_wan.html.markdown b/website/docs/r/virtual_wan.html.markdown index a069eb7004fb..d34b6e915f4e 100644 --- a/website/docs/r/virtual_wan.html.markdown +++ b/website/docs/r/virtual_wan.html.markdown @@ -39,8 +39,6 @@ The following arguments are supported: * `disable_vpn_encryption` - (Optional) Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. -* `security_provider_name` - (Optional) The name of the Security Provider. - * `allow_branch_to_branch_traffic` - (Optional) Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. * `allow_vnet_to_vnet_traffic` - (Optional) Boolean flag to specify whether VNet to VNet traffic is allowed. Defaults to `false`. diff --git a/website/docs/r/vpn_gateway.html.markdown b/website/docs/r/vpn_gateway.html.markdown new file mode 100644 index 000000000000..afe48a94d230 --- /dev/null +++ b/website/docs/r/vpn_gateway.html.markdown @@ -0,0 +1,99 @@ +--- +subcategory: "Network" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_vpn_gateway" +sidebar_current: "docs-azurerm-network-vpn-gateway" +description: |- + Manages a VPN Gateway within a Virtual Hub. +--- + +# azurerm_vpn_gateway + +Manages a VPN Gateway within a Virtual Hub, which enables Site-to-Site communication. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_virtual_network" "example" { + name = "example-network" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + address_space = ["10.0.0.0/16"] +} + +resource "azurerm_virtual_wan" "example" { + name = "example-vwan" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location +} + +resource "azurerm_virtual_hub" "example" { + name = "example-hub" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + virtual_wan_id = azurerm_virtual_wan.example.id + address_prefix = "10.0.1.0/24" +} + +resource "azurerm_vpn_gateway" "example" { + name = "example-vpng" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + virtual_hub_id = azurerm_virtual_hub.example.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. + +* `resource_group_name` - (Required) The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. + +* `location` - (Required) The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. + +* `virtual_hub_id` - (Required) The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. + +--- + +* `bgp_settings` - (Optional) A `bgp_settings` block as defined below. + +* `scale_unit` - (Optional) The Scale Unit for this VPN Gateway. Defaults to `1`. + +* `tags` - (Optional) A mapping of tags to assign to the VPN Gateway. + +--- + +A `bgp_settings` block supports the following: + +* `asn` - (Required) The ASN of the BGP Speaker. Changing this forces a new resource to be created. + +* `peer_weight` - (Required) The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created. + +## Attributes Reference + +In addition to the arguments above, the following attributes are exported: + +* `id` - The ID of the VPN Gateway. + +* `bgp_settings` - A `bgp_settings` block as defined below. + +--- + +A `bgp_settings` block exports the following: + +* `bgp_peering_address` - The Address which should be used for the BGP Peering. + +## Import + +VPN Gateways can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_vpn_gateway.gateway1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/vpnGateways/gateway1 +``` diff --git a/website/docs/r/vpn_server_configuration.html.markdown b/website/docs/r/vpn_server_configuration.html.markdown new file mode 100644 index 000000000000..9a1cea540cb8 --- /dev/null +++ b/website/docs/r/vpn_server_configuration.html.markdown @@ -0,0 +1,184 @@ +--- +subcategory: "Network" +layout: "azurerm" +page_title: "Azure Resource Manager: azurerm_vpn_server_configuration" +sidebar_current: "docs-azurerm-network-vpn-server-configuration" +description: |- + Manages a VPN Server Configuration. +--- + +# azurerm_vpn_server_configuration + +Manages a VPN Server Configuration. + +## Example Usage + +```hcl +resource "azurerm_resource_group" "example" { + name = "example-resources" + location = "West Europe" +} + +resource "azurerm_vpn_server_configuration" "test" { + name = "example-config" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + vpn_authentication_types = ["Certificate"] + + client_root_certificate { + name = "DigiCert-Federated-ID-Root-CA" + public_cert_data = < **NOTE:** At this time a maximum of one VPN Authentication Types can be specified. + +--- + +* `ipsec_policy` - (Optional) A `ipsec_policy` block as defined below. + +* `vpn_protocols` - (Optional) A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. + +* `tags` - (Optional) A mapping of tags to assign to the resource. + +--- + +When `vpn_authentication_types` contains `AAD` the following arguments are supported: + +* `azure_active_directory_authentication` - (Required) A `azure_active_directory_authentication` block as defined below. + +--- + +When `vpn_authentication_types` contains `Certificate` the following arguments are supported: + +* `client_root_certificate` - (Required) One or more `client_root_certificate` blocks as defined below. + +* `client_revoked_certificate` - (Optional) One or more `client_revoked_certificate` blocks as defined below. + +--- + +When `vpn_authentication_types` contains `Radius` the following arguments are supported: + +* `radius_server` - (Required) A `radius_server` block as defined below. + +--- + +A `azure_active_directory_authentication` block supports the following: + +* `audience` - (Required) The Audience which should be used for authentication. + +* `issuer` - (Required) The Issuer which should be used for authentication. + +* `tenant` - (Required) The Tenant which should be used for authentication. + +--- + +A `client_revoked_certificate` block supports the following: + +* `name` - (Required) A name used to uniquely identify this certificate. + +* `thumbprint` - (Required) The Thumbprint of the Certificate. + +--- + +A `client_root_certificate` block at the root of the resource supports the following: + +* `name` - (Required) A name used to uniquely identify this certificate. + +* `public_cert_data` - (Required) The Public Key Data associated with the Certificate. + +--- + +A `client_root_certificate` block nested within the `radius_server` block supports the following: + +* `name` - (Required) A name used to uniquely identify this certificate. + +* `thumbprint` - (Required) The Thumbprint of the Certificate. + +--- + +A `ipsec_policy` block supports the following: + +* `dh_group` - (Required) The DH Group, used in IKE Phase 1. Possible values include `DHGroup1`, `DHGroup2`, `DHGroup14`, `DHGroup24`, `DHGroup2048`, `ECP256`, `ECP384` and `None`. + +* `ike_encryption` - (Required) The IKE encryption algorithm, used for IKE Phase 2. Possible values include `AES128`, `AES192`, `AES256`, `DES`, `DES3`, `GCMAES128` and `GCMAES256`. + +* `ike_integrity` - (Required) The IKE encryption integrity algorithm, used for IKE Phase 2. Possible values include `GCMAES128`, `GCMAES256`, `MD5`, `SHA1`, `SHA256` and `SHA384`. + +* `ipsec_encryption` - (Required) The IPSec encryption algorithm, used for IKE phase 1. Possible values include `AES128`, `AES192`, `AES256`, `DES`, `DES3`, `GCMAES128`, `GCMAES192`, `GCMAES256` and `None`. + +* `ipsec_integrity` - (Required) The IPSec integrity algorithm, used for IKE phase 1. Possible values include `GCMAES128`, `GCMAES192`, `GCMAES256`, `MD5`, `SHA1` and `SHA256`. + +* `pfs_group` - (Required) The Pfs Group, used in IKE Phase 2. Possible values include `ECP256`, `ECP384`, `PFS1`, `PFS2`, `PFS14`, `PFS24`, `PFS2048`, `PFSMM` and `None`. + +* `sa_lifetime_seconds` - (Required) The IPSec Security Association lifetime in seconds for a Site-to-Site VPN tunnel. + +* `sa_data_size_kilobytes` - (Required) The IPSec Security Association payload size in KB for a Site-to-Site VPN tunnel. + +--- + +A `radius_server` block supports the following: + +* `address` - (Required) The Address of the Radius Server. + +* `secret` - (Required) The Secret used to communicate with the Radius Server. + +* `client_root_certificate` - (Optional) One or more `client_root_certificate` blocks as defined above. + +* `server_root_certificate` - (Optional) One or more `server_root_certificate` blocks as defined below. + +--- + +A `server_root_certificate` block supports the following: + +* `name` - (Required) A name used to uniquely identify this certificate. + +* `public_cert_data` - (Required) The Public Key Data associated with the Certificate. + +## Attributes Reference + +In addition to the arguments above, the following attributes are exported: + +* `id` - The ID of the VPN Server Configuration. + +## Import + +VPN Server Configurations can be imported using the `resource id`, e.g. + +```shell +terraform import azurerm_vpn_server_configuration.config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/vpnServerConfigurations/config1 +```