diff --git a/builtin/providers/azurerm/loadbalancer.go b/builtin/providers/azurerm/loadbalancer.go index 9bd3a4875..05803b15a 100644 --- a/builtin/providers/azurerm/loadbalancer.go +++ b/builtin/providers/azurerm/loadbalancer.go @@ -41,11 +41,11 @@ func retrieveLoadBalancerById(loadBalancerId string, meta interface{}) (*network } func findLoadBalancerBackEndAddressPoolByName(lb *network.LoadBalancer, name string) (*network.BackendAddressPool, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.BackendAddressPools == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.BackendAddressPools == nil { return nil, -1, false } - for i, apc := range *lb.Properties.BackendAddressPools { + for i, apc := range *lb.LoadBalancerPropertiesFormat.BackendAddressPools { if apc.Name != nil && *apc.Name == name { return &apc, i, true } @@ -55,11 +55,11 @@ func findLoadBalancerBackEndAddressPoolByName(lb *network.LoadBalancer, name str } func findLoadBalancerFrontEndIpConfigurationByName(lb *network.LoadBalancer, name string) (*network.FrontendIPConfiguration, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.FrontendIPConfigurations == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.FrontendIPConfigurations == nil { return nil, -1, false } - for i, feip := range *lb.Properties.FrontendIPConfigurations { + for i, feip := range *lb.LoadBalancerPropertiesFormat.FrontendIPConfigurations { if feip.Name != nil && *feip.Name == name { return &feip, i, true } @@ -69,11 +69,11 @@ func findLoadBalancerFrontEndIpConfigurationByName(lb *network.LoadBalancer, nam } func findLoadBalancerRuleByName(lb *network.LoadBalancer, name string) (*network.LoadBalancingRule, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.LoadBalancingRules == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.LoadBalancingRules == nil { return nil, -1, false } - for i, lbr := range *lb.Properties.LoadBalancingRules { + for i, lbr := range *lb.LoadBalancerPropertiesFormat.LoadBalancingRules { if lbr.Name != nil && *lbr.Name == name { return &lbr, i, true } @@ -83,11 +83,11 @@ func findLoadBalancerRuleByName(lb *network.LoadBalancer, name string) (*network } func findLoadBalancerNatRuleByName(lb *network.LoadBalancer, name string) (*network.InboundNatRule, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.InboundNatRules == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.InboundNatRules == nil { return nil, -1, false } - for i, nr := range *lb.Properties.InboundNatRules { + for i, nr := range *lb.LoadBalancerPropertiesFormat.InboundNatRules { if nr.Name != nil && *nr.Name == name { return &nr, i, true } @@ -97,11 +97,11 @@ func findLoadBalancerNatRuleByName(lb *network.LoadBalancer, name string) (*netw } func findLoadBalancerNatPoolByName(lb *network.LoadBalancer, name string) (*network.InboundNatPool, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.InboundNatPools == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.InboundNatPools == nil { return nil, -1, false } - for i, np := range *lb.Properties.InboundNatPools { + for i, np := range *lb.LoadBalancerPropertiesFormat.InboundNatPools { if np.Name != nil && *np.Name == name { return &np, i, true } @@ -111,11 +111,11 @@ func findLoadBalancerNatPoolByName(lb *network.LoadBalancer, name string) (*netw } func findLoadBalancerProbeByName(lb *network.LoadBalancer, name string) (*network.Probe, int, bool) { - if lb == nil || lb.Properties == nil || lb.Properties.Probes == nil { + if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.LoadBalancerPropertiesFormat.Probes == nil { return nil, -1, false } - for i, p := range *lb.Properties.Probes { + for i, p := range *lb.LoadBalancerPropertiesFormat.Probes { if p.Name != nil && *p.Name == name { return &p, i, true } @@ -131,7 +131,7 @@ func loadbalancerStateRefreshFunc(client *ArmClient, resourceGroupName string, l return nil, "", fmt.Errorf("Error issuing read request in loadbalancerStateRefreshFunc to Azure ARM for LoadBalancer '%s' (RG: '%s'): %s", loadbalancer, resourceGroupName, err) } - return res, *res.Properties.ProvisioningState, nil + return res, *res.LoadBalancerPropertiesFormat.ProvisioningState, nil } } diff --git a/builtin/providers/azurerm/resource_arm_availability_set.go b/builtin/providers/azurerm/resource_arm_availability_set.go index 11d9a129c..3e5f57d90 100644 --- a/builtin/providers/azurerm/resource_arm_availability_set.go +++ b/builtin/providers/azurerm/resource_arm_availability_set.go @@ -86,7 +86,7 @@ func resourceArmAvailabilitySetCreate(d *schema.ResourceData, meta interface{}) availSet := compute.AvailabilitySet{ Name: &name, Location: &location, - Properties: &compute.AvailabilitySetProperties{ + AvailabilitySetProperties: &compute.AvailabilitySetProperties{ PlatformFaultDomainCount: azure.Int32(int32(faultDomainCount)), PlatformUpdateDomainCount: azure.Int32(int32(updateDomainCount)), }, @@ -122,7 +122,7 @@ func resourceArmAvailabilitySetRead(d *schema.ResourceData, meta interface{}) er return fmt.Errorf("Error making Read request on Azure Availability Set %s: %s", name, err) } - availSet := *resp.Properties + availSet := *resp.AvailabilitySetProperties d.Set("resource_group_name", resGroup) d.Set("platform_update_domain_count", availSet.PlatformUpdateDomainCount) d.Set("platform_fault_domain_count", availSet.PlatformFaultDomainCount) diff --git a/builtin/providers/azurerm/resource_arm_availability_set_test.go b/builtin/providers/azurerm/resource_arm_availability_set_test.go index 235133fd2..257357956 100644 --- a/builtin/providers/azurerm/resource_arm_availability_set_test.go +++ b/builtin/providers/azurerm/resource_arm_availability_set_test.go @@ -194,7 +194,7 @@ func testCheckAzureRMAvailabilitySetDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Availability Set still exists:\n%#v", resp.Properties) + return fmt.Errorf("Availability Set still exists:\n%#v", resp.AvailabilitySetProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_cdn_endpoint.go b/builtin/providers/azurerm/resource_arm_cdn_endpoint.go index 0782a2714..77d8cf29f 100644 --- a/builtin/providers/azurerm/resource_arm_cdn_endpoint.go +++ b/builtin/providers/azurerm/resource_arm_cdn_endpoint.go @@ -148,7 +148,7 @@ func resourceArmCdnEndpointCreate(d *schema.ResourceData, meta interface{}) erro caching_behaviour := d.Get("querystring_caching_behaviour").(string) tags := d.Get("tags").(map[string]interface{}) - properties := cdn.EndpointPropertiesCreateParameters{ + properties := cdn.EndpointProperties{ IsHTTPAllowed: &http_allowed, IsHTTPSAllowed: &https_allowed, IsCompressionEnabled: &compression_enabled, @@ -184,18 +184,18 @@ func resourceArmCdnEndpointCreate(d *schema.ResourceData, meta interface{}) erro properties.ContentTypesToCompress = &content_types } - cdnEndpoint := cdn.EndpointCreateParameters{ - Location: &location, - Properties: &properties, - Tags: expandTags(tags), + cdnEndpoint := cdn.Endpoint{ + Location: &location, + EndpointProperties: &properties, + Tags: expandTags(tags), } - _, err := cdnEndpointsClient.Create(name, cdnEndpoint, profileName, resGroup, make(chan struct{})) + _, err := cdnEndpointsClient.Create(resGroup, profileName, name, cdnEndpoint, make(chan struct{})) if err != nil { return err } - read, err := cdnEndpointsClient.Get(name, profileName, resGroup) + read, err := cdnEndpointsClient.Get(resGroup, profileName, name) if err != nil { return err } @@ -222,7 +222,7 @@ func resourceArmCdnEndpointRead(d *schema.ResourceData, meta interface{}) error profileName = id.Path["Profiles"] } log.Printf("[INFO] Trying to find the AzureRM CDN Endpoint %s (Profile: %s, RG: %s)", name, profileName, resGroup) - resp, err := cdnEndpointsClient.Get(name, profileName, resGroup) + resp, err := cdnEndpointsClient.Get(resGroup, profileName, name) if err != nil { if resp.StatusCode == http.StatusNotFound { d.SetId("") @@ -235,21 +235,21 @@ func resourceArmCdnEndpointRead(d *schema.ResourceData, meta interface{}) error d.Set("resource_group_name", resGroup) d.Set("location", azureRMNormalizeLocation(*resp.Location)) d.Set("profile_name", profileName) - d.Set("host_name", resp.Properties.HostName) - d.Set("is_compression_enabled", resp.Properties.IsCompressionEnabled) - d.Set("is_http_allowed", resp.Properties.IsHTTPAllowed) - d.Set("is_https_allowed", resp.Properties.IsHTTPSAllowed) - d.Set("querystring_caching_behaviour", resp.Properties.QueryStringCachingBehavior) - if resp.Properties.OriginHostHeader != nil && *resp.Properties.OriginHostHeader != "" { - d.Set("origin_host_header", resp.Properties.OriginHostHeader) + d.Set("host_name", resp.EndpointProperties.HostName) + d.Set("is_compression_enabled", resp.EndpointProperties.IsCompressionEnabled) + d.Set("is_http_allowed", resp.EndpointProperties.IsHTTPAllowed) + d.Set("is_https_allowed", resp.EndpointProperties.IsHTTPSAllowed) + d.Set("querystring_caching_behaviour", resp.EndpointProperties.QueryStringCachingBehavior) + if resp.EndpointProperties.OriginHostHeader != nil && *resp.EndpointProperties.OriginHostHeader != "" { + d.Set("origin_host_header", resp.EndpointProperties.OriginHostHeader) } - if resp.Properties.OriginPath != nil && *resp.Properties.OriginPath != "" { - d.Set("origin_path", resp.Properties.OriginPath) + if resp.EndpointProperties.OriginPath != nil && *resp.EndpointProperties.OriginPath != "" { + d.Set("origin_path", resp.EndpointProperties.OriginPath) } - if resp.Properties.ContentTypesToCompress != nil { - d.Set("content_types_to_compress", flattenAzureRMCdnEndpointContentTypes(resp.Properties.ContentTypesToCompress)) + if resp.EndpointProperties.ContentTypesToCompress != nil { + d.Set("content_types_to_compress", flattenAzureRMCdnEndpointContentTypes(resp.EndpointProperties.ContentTypesToCompress)) } - d.Set("origin", flattenAzureRMCdnEndpointOrigin(resp.Properties.Origins)) + d.Set("origin", flattenAzureRMCdnEndpointOrigin(resp.EndpointProperties.Origins)) flattenAndSetTags(d, resp.Tags) @@ -301,11 +301,11 @@ func resourceArmCdnEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } updateProps := cdn.EndpointUpdateParameters{ - Tags: expandTags(newTags), - Properties: &properties, + Tags: expandTags(newTags), + EndpointPropertiesUpdateParameters: &properties, } - _, err := cdnEndpointsClient.Update(name, updateProps, profileName, resGroup, make(chan struct{})) + _, err := cdnEndpointsClient.Update(resGroup, profileName, name, updateProps, make(chan struct{})) if err != nil { return fmt.Errorf("Error issuing Azure ARM update request to update CDN Endpoint %q: %s", name, err) } @@ -327,7 +327,7 @@ func resourceArmCdnEndpointDelete(d *schema.ResourceData, meta interface{}) erro } name := id.Path["endpoints"] - accResp, err := client.DeleteIfExists(name, profileName, resGroup, make(chan struct{})) + accResp, err := client.Delete(resGroup, profileName, name, make(chan struct{})) if err != nil { if accResp.StatusCode == http.StatusNotFound { return nil @@ -388,8 +388,8 @@ func expandAzureRmCdnEndpointOrigins(d *schema.ResourceData) ([]cdn.DeepCreatedO name := data["name"].(string) origin := cdn.DeepCreatedOrigin{ - Name: &name, - Properties: &properties, + Name: &name, + DeepCreatedOriginProperties: &properties, } origins = append(origins, origin) @@ -403,14 +403,14 @@ func flattenAzureRMCdnEndpointOrigin(list *[]cdn.DeepCreatedOrigin) []map[string for _, i := range *list { l := map[string]interface{}{ "name": *i.Name, - "host_name": *i.Properties.HostName, + "host_name": *i.DeepCreatedOriginProperties.HostName, } - if i.Properties.HTTPPort != nil { - l["http_port"] = *i.Properties.HTTPPort + if i.DeepCreatedOriginProperties.HTTPPort != nil { + l["http_port"] = *i.DeepCreatedOriginProperties.HTTPPort } - if i.Properties.HTTPSPort != nil { - l["https_port"] = *i.Properties.HTTPSPort + if i.DeepCreatedOriginProperties.HTTPSPort != nil { + l["https_port"] = *i.DeepCreatedOriginProperties.HTTPSPort } result = append(result, l) } diff --git a/builtin/providers/azurerm/resource_arm_cdn_endpoint_test.go b/builtin/providers/azurerm/resource_arm_cdn_endpoint_test.go index dde2d0299..bebd4d615 100644 --- a/builtin/providers/azurerm/resource_arm_cdn_endpoint_test.go +++ b/builtin/providers/azurerm/resource_arm_cdn_endpoint_test.go @@ -104,7 +104,7 @@ func testCheckAzureRMCdnEndpointExists(name string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*ArmClient).cdnEndpointsClient - resp, err := conn.Get(name, profileName, resourceGroup) + resp, err := conn.Get(resourceGroup, profileName, name) if err != nil { return fmt.Errorf("Bad: Get on cdnEndpointsClient: %s", err) } @@ -134,7 +134,7 @@ func testCheckAzureRMCdnEndpointDisappears(name string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*ArmClient).cdnEndpointsClient - _, err := conn.DeleteIfExists(name, profileName, resourceGroup, make(chan struct{})) + _, err := conn.Delete(resourceGroup, profileName, name, make(chan struct{})) if err != nil { return fmt.Errorf("Bad: Delete on cdnEndpointsClient: %s", err) } @@ -155,14 +155,14 @@ func testCheckAzureRMCdnEndpointDestroy(s *terraform.State) error { resourceGroup := rs.Primary.Attributes["resource_group_name"] profileName := rs.Primary.Attributes["profile_name"] - resp, err := conn.Get(name, profileName, resourceGroup) + resp, err := conn.Get(resourceGroup, profileName, name) if err != nil { return nil } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("CDN Endpoint still exists:\n%#v", resp.Properties) + return fmt.Errorf("CDN Endpoint still exists:\n%#v", resp.EndpointProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_cdn_profile.go b/builtin/providers/azurerm/resource_arm_cdn_profile.go index 5a5498345..6df55a2b4 100644 --- a/builtin/providers/azurerm/resource_arm_cdn_profile.go +++ b/builtin/providers/azurerm/resource_arm_cdn_profile.go @@ -60,7 +60,7 @@ func resourceArmCdnProfileCreate(d *schema.ResourceData, meta interface{}) error sku := d.Get("sku").(string) tags := d.Get("tags").(map[string]interface{}) - cdnProfile := cdn.ProfileCreateParameters{ + cdnProfile := cdn.Profile{ Location: &location, Tags: expandTags(tags), Sku: &cdn.Sku{ @@ -68,12 +68,12 @@ func resourceArmCdnProfileCreate(d *schema.ResourceData, meta interface{}) error }, } - _, err := cdnProfilesClient.Create(name, cdnProfile, resGroup, make(chan struct{})) + _, err := cdnProfilesClient.Create(resGroup, name, cdnProfile, make(chan struct{})) if err != nil { return err } - read, err := cdnProfilesClient.Get(name, resGroup) + read, err := cdnProfilesClient.Get(resGroup, name) if err != nil { return err } @@ -96,7 +96,7 @@ func resourceArmCdnProfileRead(d *schema.ResourceData, meta interface{}) error { resGroup := id.ResourceGroup name := id.Path["profiles"] - resp, err := cdnProfilesClient.Get(name, resGroup) + resp, err := cdnProfilesClient.Get(resGroup, name) if err != nil { if resp.StatusCode == http.StatusNotFound { d.SetId("") @@ -133,7 +133,7 @@ func resourceArmCdnProfileUpdate(d *schema.ResourceData, meta interface{}) error Tags: expandTags(newTags), } - _, err := cdnProfilesClient.Update(name, props, resGroup, make(chan struct{})) + _, err := cdnProfilesClient.Update(resGroup, name, props, make(chan struct{})) if err != nil { return fmt.Errorf("Error issuing Azure ARM update request to update CDN Profile %q: %s", name, err) } @@ -151,7 +151,8 @@ func resourceArmCdnProfileDelete(d *schema.ResourceData, meta interface{}) error resGroup := id.ResourceGroup name := id.Path["profiles"] - _, err = cdnProfilesClient.DeleteIfExists(name, resGroup, make(chan struct{})) + _, err = cdnProfilesClient.Delete(resGroup, name, make(chan struct{})) + // TODO: check the status code return err } diff --git a/builtin/providers/azurerm/resource_arm_cdn_profile_test.go b/builtin/providers/azurerm/resource_arm_cdn_profile_test.go index 7718ac974..98138b447 100644 --- a/builtin/providers/azurerm/resource_arm_cdn_profile_test.go +++ b/builtin/providers/azurerm/resource_arm_cdn_profile_test.go @@ -124,7 +124,7 @@ func testCheckAzureRMCdnProfileExists(name string) resource.TestCheckFunc { conn := testAccProvider.Meta().(*ArmClient).cdnProfilesClient - resp, err := conn.Get(name, resourceGroup) + resp, err := conn.Get(resourceGroup, name) if err != nil { return fmt.Errorf("Bad: Get on cdnProfilesClient: %s", err) } @@ -148,14 +148,14 @@ func testCheckAzureRMCdnProfileDestroy(s *terraform.State) error { name := rs.Primary.Attributes["name"] resourceGroup := rs.Primary.Attributes["resource_group_name"] - resp, err := conn.Get(name, resourceGroup) + resp, err := conn.Get(resourceGroup, name) if err != nil { return nil } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("CDN Profile still exists:\n%#v", resp.Properties) + return fmt.Errorf("CDN Profile still exists:\n%#v", resp.ProfileProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_eventhub_namespace_test.go b/builtin/providers/azurerm/resource_arm_eventhub_namespace_test.go index b6fc57af9..de5de9fb9 100644 --- a/builtin/providers/azurerm/resource_arm_eventhub_namespace_test.go +++ b/builtin/providers/azurerm/resource_arm_eventhub_namespace_test.go @@ -164,7 +164,7 @@ func testCheckAzureRMEventHubNamespaceDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("EventHub Namespace still exists:\n%#v", resp.Properties) + return fmt.Errorf("EventHub Namespace still exists:\n%#v", resp.NamespaceProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer.go b/builtin/providers/azurerm/resource_arm_loadbalancer.go index 193acb128..1c455ed26 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer.go @@ -111,10 +111,10 @@ func resourceArmLoadBalancerCreate(d *schema.ResourceData, meta interface{}) err } loadbalancer := network.LoadBalancer{ - Name: azure.String(name), - Location: azure.String(location), - Tags: expandedTags, - Properties: &properties, + Name: azure.String(name), + Location: azure.String(location), + Tags: expandedTags, + LoadBalancerPropertiesFormat: &properties, } _, err := loadBalancerClient.CreateOrUpdate(resGroup, name, loadbalancer, make(chan struct{})) @@ -157,8 +157,8 @@ func resourecArmLoadBalancerRead(d *schema.ResourceData, meta interface{}) error return nil } - if loadBalancer.Properties != nil && loadBalancer.Properties.FrontendIPConfigurations != nil { - d.Set("frontend_ip_configuration", flattenLoadBalancerFrontendIpConfiguration(loadBalancer.Properties.FrontendIPConfigurations)) + if loadBalancer.LoadBalancerPropertiesFormat != nil && loadBalancer.LoadBalancerPropertiesFormat.FrontendIPConfigurations != nil { + d.Set("frontend_ip_configuration", flattenLoadBalancerFrontendIpConfiguration(loadBalancer.LoadBalancerPropertiesFormat.FrontendIPConfigurations)) } flattenAndSetTags(d, loadBalancer.Tags) @@ -215,8 +215,8 @@ func expandAzureRmLoadBalancerFrontendIpConfigurations(d *schema.ResourceData) * name := data["name"].(string) frontEndConfig := network.FrontendIPConfiguration{ - Name: &name, - Properties: &properties, + Name: &name, + FrontendIPConfigurationPropertiesFormat: &properties, } frontEndConfigs = append(frontEndConfigs, frontEndConfig) @@ -230,23 +230,23 @@ func flattenLoadBalancerFrontendIpConfiguration(ipConfigs *[]network.FrontendIPC for _, config := range *ipConfigs { ipConfig := make(map[string]interface{}) ipConfig["name"] = *config.Name - ipConfig["private_ip_address_allocation"] = config.Properties.PrivateIPAllocationMethod + ipConfig["private_ip_address_allocation"] = config.FrontendIPConfigurationPropertiesFormat.PrivateIPAllocationMethod - if config.Properties.Subnet != nil { - ipConfig["subnet_id"] = *config.Properties.Subnet.ID + if config.FrontendIPConfigurationPropertiesFormat.Subnet != nil { + ipConfig["subnet_id"] = *config.FrontendIPConfigurationPropertiesFormat.Subnet.ID } - if config.Properties.PrivateIPAddress != nil { - ipConfig["private_ip_address"] = *config.Properties.PrivateIPAddress + if config.FrontendIPConfigurationPropertiesFormat.PrivateIPAddress != nil { + ipConfig["private_ip_address"] = *config.FrontendIPConfigurationPropertiesFormat.PrivateIPAddress } - if config.Properties.PublicIPAddress != nil { - ipConfig["public_ip_address_id"] = *config.Properties.PublicIPAddress.ID + if config.FrontendIPConfigurationPropertiesFormat.PublicIPAddress != nil { + ipConfig["public_ip_address_id"] = *config.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ID } - if config.Properties.LoadBalancingRules != nil { - load_balancing_rules := make([]string, 0, len(*config.Properties.LoadBalancingRules)) - for _, rule := range *config.Properties.LoadBalancingRules { + if config.FrontendIPConfigurationPropertiesFormat.LoadBalancingRules != nil { + load_balancing_rules := make([]string, 0, len(*config.FrontendIPConfigurationPropertiesFormat.LoadBalancingRules)) + for _, rule := range *config.FrontendIPConfigurationPropertiesFormat.LoadBalancingRules { load_balancing_rules = append(load_balancing_rules, *rule.ID) } @@ -254,9 +254,9 @@ func flattenLoadBalancerFrontendIpConfiguration(ipConfigs *[]network.FrontendIPC } - if config.Properties.InboundNatRules != nil { - inbound_nat_rules := make([]string, 0, len(*config.Properties.InboundNatRules)) - for _, rule := range *config.Properties.InboundNatRules { + if config.FrontendIPConfigurationPropertiesFormat.InboundNatRules != nil { + inbound_nat_rules := make([]string, 0, len(*config.FrontendIPConfigurationPropertiesFormat.InboundNatRules)) + for _, rule := range *config.FrontendIPConfigurationPropertiesFormat.InboundNatRules { inbound_nat_rules = append(inbound_nat_rules, *rule.ID) } diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_backend_address_pool.go b/builtin/providers/azurerm/resource_arm_loadbalancer_backend_address_pool.go index e6bfe66c7..b85acfdce 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_backend_address_pool.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_backend_address_pool.go @@ -79,8 +79,8 @@ func resourceArmLoadBalancerBackendAddressPoolCreate(d *schema.ResourceData, met return fmt.Errorf("A BackEnd Address Pool with name %q already exists.", d.Get("name").(string)) } - backendAddressPools := append(*loadBalancer.Properties.BackendAddressPools, expandAzureRmLoadBalancerBackendAddressPools(d)) - loadBalancer.Properties.BackendAddressPools = &backendAddressPools + backendAddressPools := append(*loadBalancer.LoadBalancerPropertiesFormat.BackendAddressPools, expandAzureRmLoadBalancerBackendAddressPools(d)) + loadBalancer.LoadBalancerPropertiesFormat.BackendAddressPools = &backendAddressPools resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { return errwrap.Wrapf("Error Getting LoadBalancer Name and Group: {{err}}", err) @@ -100,7 +100,7 @@ func resourceArmLoadBalancerBackendAddressPoolCreate(d *schema.ResourceData, met } var pool_id string - for _, BackendAddressPool := range *(*read.Properties).BackendAddressPools { + for _, BackendAddressPool := range *(*read.LoadBalancerPropertiesFormat).BackendAddressPools { if *BackendAddressPool.Name == d.Get("name").(string) { pool_id = *BackendAddressPool.ID } @@ -137,23 +137,23 @@ func resourceArmLoadBalancerBackendAddressPoolRead(d *schema.ResourceData, meta return nil } - configs := *loadBalancer.Properties.BackendAddressPools + configs := *loadBalancer.LoadBalancerPropertiesFormat.BackendAddressPools for _, config := range configs { if *config.Name == d.Get("name").(string) { d.Set("name", config.Name) - if config.Properties.BackendIPConfigurations != nil { - backend_ip_configurations := make([]string, 0, len(*config.Properties.BackendIPConfigurations)) - for _, backendConfig := range *config.Properties.BackendIPConfigurations { + if config.BackendAddressPoolPropertiesFormat.BackendIPConfigurations != nil { + backend_ip_configurations := make([]string, 0, len(*config.BackendAddressPoolPropertiesFormat.BackendIPConfigurations)) + for _, backendConfig := range *config.BackendAddressPoolPropertiesFormat.BackendIPConfigurations { backend_ip_configurations = append(backend_ip_configurations, *backendConfig.ID) } d.Set("backend_ip_configurations", backend_ip_configurations) } - if config.Properties.LoadBalancingRules != nil { - load_balancing_rules := make([]string, 0, len(*config.Properties.LoadBalancingRules)) - for _, rule := range *config.Properties.LoadBalancingRules { + if config.BackendAddressPoolPropertiesFormat.LoadBalancingRules != nil { + load_balancing_rules := make([]string, 0, len(*config.BackendAddressPoolPropertiesFormat.LoadBalancingRules)) + for _, rule := range *config.BackendAddressPoolPropertiesFormat.LoadBalancingRules { load_balancing_rules = append(load_balancing_rules, *rule.ID) } @@ -189,9 +189,9 @@ func resourceArmLoadBalancerBackendAddressPoolDelete(d *schema.ResourceData, met return nil } - oldBackEndPools := *loadBalancer.Properties.BackendAddressPools + oldBackEndPools := *loadBalancer.LoadBalancerPropertiesFormat.BackendAddressPools newBackEndPools := append(oldBackEndPools[:index], oldBackEndPools[index+1:]...) - loadBalancer.Properties.BackendAddressPools = &newBackEndPools + loadBalancer.LoadBalancerPropertiesFormat.BackendAddressPools = &newBackEndPools resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_nat_pool.go b/builtin/providers/azurerm/resource_arm_loadbalancer_nat_pool.go index 4784b4b86..a869e0a5e 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_nat_pool.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_nat_pool.go @@ -96,7 +96,7 @@ func resourceArmLoadBalancerNatPoolCreate(d *schema.ResourceData, meta interface return errwrap.Wrapf("Error Expanding NAT Pool {{err}}", err) } - natPools := append(*loadBalancer.Properties.InboundNatPools, *newNatPool) + natPools := append(*loadBalancer.LoadBalancerPropertiesFormat.InboundNatPools, *newNatPool) existingNatPool, existingNatPoolIndex, exists := findLoadBalancerNatPoolByName(loadBalancer, d.Get("name").(string)) if exists { @@ -108,7 +108,7 @@ func resourceArmLoadBalancerNatPoolCreate(d *schema.ResourceData, meta interface } } - loadBalancer.Properties.InboundNatPools = &natPools + loadBalancer.LoadBalancerPropertiesFormat.InboundNatPools = &natPools resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { return errwrap.Wrapf("Error Getting LoadBalancer Name and Group: {{err}}", err) @@ -128,7 +128,7 @@ func resourceArmLoadBalancerNatPoolCreate(d *schema.ResourceData, meta interface } var natPool_id string - for _, InboundNatPool := range *(*read.Properties).InboundNatPools { + for _, InboundNatPool := range *(*read.LoadBalancerPropertiesFormat).InboundNatPools { if *InboundNatPool.Name == d.Get("name").(string) { natPool_id = *InboundNatPool.ID } @@ -165,18 +165,18 @@ func resourceArmLoadBalancerNatPoolRead(d *schema.ResourceData, meta interface{} return nil } - configs := *loadBalancer.Properties.InboundNatPools + configs := *loadBalancer.LoadBalancerPropertiesFormat.InboundNatPools for _, config := range configs { if *config.Name == d.Get("name").(string) { d.Set("name", config.Name) - d.Set("protocol", config.Properties.Protocol) - d.Set("frontend_port_start", config.Properties.FrontendPortRangeStart) - d.Set("frontend_port_end", config.Properties.FrontendPortRangeEnd) - d.Set("backend_port", config.Properties.BackendPort) + d.Set("protocol", config.InboundNatPoolPropertiesFormat.Protocol) + d.Set("frontend_port_start", config.InboundNatPoolPropertiesFormat.FrontendPortRangeStart) + d.Set("frontend_port_end", config.InboundNatPoolPropertiesFormat.FrontendPortRangeEnd) + d.Set("backend_port", config.InboundNatPoolPropertiesFormat.BackendPort) - if config.Properties.FrontendIPConfiguration != nil { - d.Set("frontend_ip_configuration_id", config.Properties.FrontendIPConfiguration.ID) + if config.InboundNatPoolPropertiesFormat.FrontendIPConfiguration != nil { + d.Set("frontend_ip_configuration_id", config.InboundNatPoolPropertiesFormat.FrontendIPConfiguration.ID) } break @@ -208,9 +208,9 @@ func resourceArmLoadBalancerNatPoolDelete(d *schema.ResourceData, meta interface return nil } - oldNatPools := *loadBalancer.Properties.InboundNatPools + oldNatPools := *loadBalancer.LoadBalancerPropertiesFormat.InboundNatPools newNatPools := append(oldNatPools[:index], oldNatPools[index+1:]...) - loadBalancer.Properties.InboundNatPools = &newNatPools + loadBalancer.LoadBalancerPropertiesFormat.InboundNatPools = &newNatPools resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { @@ -256,8 +256,8 @@ func expandAzureRmLoadBalancerNatPool(d *schema.ResourceData, lb *network.LoadBa } natPool := network.InboundNatPool{ - Name: azure.String(d.Get("name").(string)), - Properties: &properties, + Name: azure.String(d.Get("name").(string)), + InboundNatPoolPropertiesFormat: &properties, } return &natPool, nil diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_nat_rule.go b/builtin/providers/azurerm/resource_arm_loadbalancer_nat_rule.go index 8353d6b26..ea4d6a735 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_nat_rule.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_nat_rule.go @@ -96,7 +96,7 @@ func resourceArmLoadBalancerNatRuleCreate(d *schema.ResourceData, meta interface return errwrap.Wrapf("Error Expanding NAT Rule {{err}}", err) } - natRules := append(*loadBalancer.Properties.InboundNatRules, *newNatRule) + natRules := append(*loadBalancer.LoadBalancerPropertiesFormat.InboundNatRules, *newNatRule) existingNatRule, existingNatRuleIndex, exists := findLoadBalancerNatRuleByName(loadBalancer, d.Get("name").(string)) if exists { @@ -108,7 +108,7 @@ func resourceArmLoadBalancerNatRuleCreate(d *schema.ResourceData, meta interface } } - loadBalancer.Properties.InboundNatRules = &natRules + loadBalancer.LoadBalancerPropertiesFormat.InboundNatRules = &natRules resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { return errwrap.Wrapf("Error Getting LoadBalancer Name and Group: {{err}}", err) @@ -128,7 +128,7 @@ func resourceArmLoadBalancerNatRuleCreate(d *schema.ResourceData, meta interface } var natRule_id string - for _, InboundNatRule := range *(*read.Properties).InboundNatRules { + for _, InboundNatRule := range *(*read.LoadBalancerPropertiesFormat).InboundNatRules { if *InboundNatRule.Name == d.Get("name").(string) { natRule_id = *InboundNatRule.ID } @@ -165,21 +165,21 @@ func resourceArmLoadBalancerNatRuleRead(d *schema.ResourceData, meta interface{} return nil } - configs := *loadBalancer.Properties.InboundNatRules + configs := *loadBalancer.LoadBalancerPropertiesFormat.InboundNatRules for _, config := range configs { if *config.Name == d.Get("name").(string) { d.Set("name", config.Name) - d.Set("protocol", config.Properties.Protocol) - d.Set("frontend_port", config.Properties.FrontendPort) - d.Set("backend_port", config.Properties.BackendPort) + d.Set("protocol", config.InboundNatRulePropertiesFormat.Protocol) + d.Set("frontend_port", config.InboundNatRulePropertiesFormat.FrontendPort) + d.Set("backend_port", config.InboundNatRulePropertiesFormat.BackendPort) - if config.Properties.FrontendIPConfiguration != nil { - d.Set("frontend_ip_configuration_id", config.Properties.FrontendIPConfiguration.ID) + if config.InboundNatRulePropertiesFormat.FrontendIPConfiguration != nil { + d.Set("frontend_ip_configuration_id", config.InboundNatRulePropertiesFormat.FrontendIPConfiguration.ID) } - if config.Properties.BackendIPConfiguration != nil { - d.Set("backend_ip_configuration_id", config.Properties.BackendIPConfiguration.ID) + if config.InboundNatRulePropertiesFormat.BackendIPConfiguration != nil { + d.Set("backend_ip_configuration_id", config.InboundNatRulePropertiesFormat.BackendIPConfiguration.ID) } break @@ -211,9 +211,9 @@ func resourceArmLoadBalancerNatRuleDelete(d *schema.ResourceData, meta interface return nil } - oldNatRules := *loadBalancer.Properties.InboundNatRules + oldNatRules := *loadBalancer.LoadBalancerPropertiesFormat.InboundNatRules newNatRules := append(oldNatRules[:index], oldNatRules[index+1:]...) - loadBalancer.Properties.InboundNatRules = &newNatRules + loadBalancer.LoadBalancerPropertiesFormat.InboundNatRules = &newNatRules resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { @@ -258,8 +258,8 @@ func expandAzureRmLoadBalancerNatRule(d *schema.ResourceData, lb *network.LoadBa } natRule := network.InboundNatRule{ - Name: azure.String(d.Get("name").(string)), - Properties: &properties, + Name: azure.String(d.Get("name").(string)), + InboundNatRulePropertiesFormat: &properties, } return &natRule, nil diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_probe.go b/builtin/providers/azurerm/resource_arm_loadbalancer_probe.go index 187c42083..9057e0cb8 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_probe.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_probe.go @@ -102,7 +102,7 @@ func resourceArmLoadBalancerProbeCreate(d *schema.ResourceData, meta interface{} return errwrap.Wrapf("Error Expanding Probe {{err}}", err) } - probes := append(*loadBalancer.Properties.Probes, *newProbe) + probes := append(*loadBalancer.LoadBalancerPropertiesFormat.Probes, *newProbe) existingProbe, existingProbeIndex, exists := findLoadBalancerProbeByName(loadBalancer, d.Get("name").(string)) if exists { @@ -114,7 +114,7 @@ func resourceArmLoadBalancerProbeCreate(d *schema.ResourceData, meta interface{} } } - loadBalancer.Properties.Probes = &probes + loadBalancer.LoadBalancerPropertiesFormat.Probes = &probes resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { return errwrap.Wrapf("Error Getting LoadBalancer Name and Group: {{err}}", err) @@ -134,7 +134,7 @@ func resourceArmLoadBalancerProbeCreate(d *schema.ResourceData, meta interface{} } var createdProbe_id string - for _, Probe := range *(*read.Properties).Probes { + for _, Probe := range *(*read.LoadBalancerPropertiesFormat).Probes { if *Probe.Name == d.Get("name").(string) { createdProbe_id = *Probe.ID } @@ -171,16 +171,16 @@ func resourceArmLoadBalancerProbeRead(d *schema.ResourceData, meta interface{}) return nil } - configs := *loadBalancer.Properties.Probes + configs := *loadBalancer.LoadBalancerPropertiesFormat.Probes for _, config := range configs { if *config.Name == d.Get("name").(string) { d.Set("name", config.Name) - d.Set("protocol", config.Properties.Protocol) - d.Set("interval_in_seconds", config.Properties.IntervalInSeconds) - d.Set("number_of_probes", config.Properties.NumberOfProbes) - d.Set("port", config.Properties.Port) - d.Set("request_path", config.Properties.RequestPath) + d.Set("protocol", config.ProbePropertiesFormat.Protocol) + d.Set("interval_in_seconds", config.ProbePropertiesFormat.IntervalInSeconds) + d.Set("number_of_probes", config.ProbePropertiesFormat.NumberOfProbes) + d.Set("port", config.ProbePropertiesFormat.Port) + d.Set("request_path", config.ProbePropertiesFormat.RequestPath) break } @@ -211,9 +211,9 @@ func resourceArmLoadBalancerProbeDelete(d *schema.ResourceData, meta interface{} return nil } - oldProbes := *loadBalancer.Properties.Probes + oldProbes := *loadBalancer.LoadBalancerPropertiesFormat.Probes newProbes := append(oldProbes[:index], oldProbes[index+1:]...) - loadBalancer.Properties.Probes = &newProbes + loadBalancer.LoadBalancerPropertiesFormat.Probes = &newProbes resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { @@ -253,8 +253,8 @@ func expandAzureRmLoadBalancerProbe(d *schema.ResourceData, lb *network.LoadBala } probe := network.Probe{ - Name: azure.String(d.Get("name").(string)), - Properties: &properties, + Name: azure.String(d.Get("name").(string)), + ProbePropertiesFormat: &properties, } return &probe, nil diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_rule.go b/builtin/providers/azurerm/resource_arm_loadbalancer_rule.go index 18e30b059..23b602268 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_rule.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_rule.go @@ -123,7 +123,7 @@ func resourceArmLoadBalancerRuleCreate(d *schema.ResourceData, meta interface{}) return errwrap.Wrapf("Error Exanding LoadBalancer Rule {{err}}", err) } - lbRules := append(*loadBalancer.Properties.LoadBalancingRules, *newLbRule) + lbRules := append(*loadBalancer.LoadBalancerPropertiesFormat.LoadBalancingRules, *newLbRule) existingRule, existingRuleIndex, exists := findLoadBalancerRuleByName(loadBalancer, d.Get("name").(string)) if exists { @@ -135,7 +135,7 @@ func resourceArmLoadBalancerRuleCreate(d *schema.ResourceData, meta interface{}) } } - loadBalancer.Properties.LoadBalancingRules = &lbRules + loadBalancer.LoadBalancerPropertiesFormat.LoadBalancingRules = &lbRules resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { return errwrap.Wrapf("Error Getting LoadBalancer Name and Group: {{err}}", err) @@ -155,7 +155,7 @@ func resourceArmLoadBalancerRuleCreate(d *schema.ResourceData, meta interface{}) } var rule_id string - for _, LoadBalancingRule := range *(*read.Properties).LoadBalancingRules { + for _, LoadBalancingRule := range *(*read.LoadBalancerPropertiesFormat).LoadBalancingRules { if *LoadBalancingRule.Name == d.Get("name").(string) { rule_id = *LoadBalancingRule.ID } @@ -192,37 +192,37 @@ func resourceArmLoadBalancerRuleRead(d *schema.ResourceData, meta interface{}) e return nil } - configs := *loadBalancer.Properties.LoadBalancingRules + configs := *loadBalancer.LoadBalancerPropertiesFormat.LoadBalancingRules for _, config := range configs { if *config.Name == d.Get("name").(string) { d.Set("name", config.Name) - d.Set("protocol", config.Properties.Protocol) - d.Set("frontend_port", config.Properties.FrontendPort) - d.Set("backend_port", config.Properties.BackendPort) + d.Set("protocol", config.LoadBalancingRulePropertiesFormat.Protocol) + d.Set("frontend_port", config.LoadBalancingRulePropertiesFormat.FrontendPort) + d.Set("backend_port", config.LoadBalancingRulePropertiesFormat.BackendPort) - if config.Properties.EnableFloatingIP != nil { - d.Set("enable_floating_ip", config.Properties.EnableFloatingIP) + if config.LoadBalancingRulePropertiesFormat.EnableFloatingIP != nil { + d.Set("enable_floating_ip", config.LoadBalancingRulePropertiesFormat.EnableFloatingIP) } - if config.Properties.IdleTimeoutInMinutes != nil { - d.Set("idle_timeout_in_minutes", config.Properties.IdleTimeoutInMinutes) + if config.LoadBalancingRulePropertiesFormat.IdleTimeoutInMinutes != nil { + d.Set("idle_timeout_in_minutes", config.LoadBalancingRulePropertiesFormat.IdleTimeoutInMinutes) } - if config.Properties.FrontendIPConfiguration != nil { - d.Set("frontend_ip_configuration_id", config.Properties.FrontendIPConfiguration.ID) + if config.LoadBalancingRulePropertiesFormat.FrontendIPConfiguration != nil { + d.Set("frontend_ip_configuration_id", config.LoadBalancingRulePropertiesFormat.FrontendIPConfiguration.ID) } - if config.Properties.BackendAddressPool != nil { - d.Set("backend_address_pool_id", config.Properties.BackendAddressPool.ID) + if config.LoadBalancingRulePropertiesFormat.BackendAddressPool != nil { + d.Set("backend_address_pool_id", config.LoadBalancingRulePropertiesFormat.BackendAddressPool.ID) } - if config.Properties.Probe != nil { - d.Set("probe_id", config.Properties.Probe.ID) + if config.LoadBalancingRulePropertiesFormat.Probe != nil { + d.Set("probe_id", config.LoadBalancingRulePropertiesFormat.Probe.ID) } - if config.Properties.LoadDistribution != "" { - d.Set("load_distribution", config.Properties.LoadDistribution) + if config.LoadBalancingRulePropertiesFormat.LoadDistribution != "" { + d.Set("load_distribution", config.LoadBalancingRulePropertiesFormat.LoadDistribution) } } } @@ -252,9 +252,9 @@ func resourceArmLoadBalancerRuleDelete(d *schema.ResourceData, meta interface{}) return nil } - oldLbRules := *loadBalancer.Properties.LoadBalancingRules + oldLbRules := *loadBalancer.LoadBalancerPropertiesFormat.LoadBalancingRules newLbRules := append(oldLbRules[:index], oldLbRules[index+1:]...) - loadBalancer.Properties.LoadBalancingRules = &newLbRules + loadBalancer.LoadBalancerPropertiesFormat.LoadBalancingRules = &newLbRules resGroup, loadBalancerName, err := resourceGroupAndLBNameFromId(d.Get("loadbalancer_id").(string)) if err != nil { @@ -324,8 +324,8 @@ func expandAzureRmLoadBalancerRule(d *schema.ResourceData, lb *network.LoadBalan } lbRule := network.LoadBalancingRule{ - Name: azure.String(d.Get("name").(string)), - Properties: &properties, + Name: azure.String(d.Get("name").(string)), + LoadBalancingRulePropertiesFormat: &properties, } return &lbRule, nil diff --git a/builtin/providers/azurerm/resource_arm_loadbalancer_test.go b/builtin/providers/azurerm/resource_arm_loadbalancer_test.go index 4a6db29ea..e8d20457b 100644 --- a/builtin/providers/azurerm/resource_arm_loadbalancer_test.go +++ b/builtin/providers/azurerm/resource_arm_loadbalancer_test.go @@ -178,7 +178,7 @@ func testCheckAzureRMLoadBalancerDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("LoadBalancer still exists:\n%#v", resp.Properties) + return fmt.Errorf("LoadBalancer still exists:\n%#v", resp.LoadBalancerPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_local_network_gateway.go b/builtin/providers/azurerm/resource_arm_local_network_gateway.go index 1a172e32a..6287f0ce2 100644 --- a/builtin/providers/azurerm/resource_arm_local_network_gateway.go +++ b/builtin/providers/azurerm/resource_arm_local_network_gateway.go @@ -66,7 +66,7 @@ func resourceArmLocalNetworkGatewayCreate(d *schema.ResourceData, meta interface gateway := network.LocalNetworkGateway{ Name: &name, Location: &location, - Properties: &network.LocalNetworkGatewayPropertiesFormat{ + LocalNetworkGatewayPropertiesFormat: &network.LocalNetworkGatewayPropertiesFormat{ LocalNetworkAddressSpace: &network.AddressSpace{ AddressPrefixes: &prefixes, }, @@ -115,10 +115,10 @@ func resourceArmLocalNetworkGatewayRead(d *schema.ResourceData, meta interface{} d.Set("resource_group_name", resGroup) d.Set("name", resp.Name) d.Set("location", resp.Location) - d.Set("gateway_address", resp.Properties.GatewayIPAddress) + d.Set("gateway_address", resp.LocalNetworkGatewayPropertiesFormat.GatewayIPAddress) prefs := []string{} - if ps := *resp.Properties.LocalNetworkAddressSpace.AddressPrefixes; ps != nil { + if ps := *resp.LocalNetworkGatewayPropertiesFormat.LocalNetworkAddressSpace.AddressPrefixes; ps != nil { prefs = ps } d.Set("address_space", prefs) diff --git a/builtin/providers/azurerm/resource_arm_local_network_gateway_test.go b/builtin/providers/azurerm/resource_arm_local_network_gateway_test.go index fd79c61bb..cfd888b5d 100644 --- a/builtin/providers/azurerm/resource_arm_local_network_gateway_test.go +++ b/builtin/providers/azurerm/resource_arm_local_network_gateway_test.go @@ -137,7 +137,7 @@ func testCheckAzureRMLocalNetworkGatewayDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Local network gateway still exists:\n%#v", resp.Properties) + return fmt.Errorf("Local network gateway still exists:\n%#v", resp.LocalNetworkGatewayPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_network_interface_card.go b/builtin/providers/azurerm/resource_arm_network_interface_card.go index b3ebc3174..e48b5f182 100644 --- a/builtin/providers/azurerm/resource_arm_network_interface_card.go +++ b/builtin/providers/azurerm/resource_arm_network_interface_card.go @@ -205,10 +205,10 @@ func resourceArmNetworkInterfaceCreate(d *schema.ResourceData, meta interface{}) } iface := network.Interface{ - Name: &name, - Location: &location, - Properties: &properties, - Tags: expandTags(tags), + Name: &name, + Location: &location, + InterfacePropertiesFormat: &properties, + Tags: expandTags(tags), } _, err := ifaceClient.CreateOrUpdate(resGroup, name, iface, make(chan struct{})) @@ -248,7 +248,7 @@ func resourceArmNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error making Read request on Azure Network Interface %s: %s", name, err) } - iface := *resp.Properties + iface := *resp.InterfacePropertiesFormat if iface.MacAddress != nil { if *iface.MacAddress != "" { @@ -259,8 +259,8 @@ func resourceArmNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e if iface.IPConfigurations != nil && len(*iface.IPConfigurations) > 0 { var privateIPAddress *string ///TODO: Change this to a loop when https://github.com/Azure/azure-sdk-for-go/issues/259 is fixed - if (*iface.IPConfigurations)[0].Properties != nil { - privateIPAddress = (*iface.IPConfigurations)[0].Properties.PrivateIPAddress + if (*iface.IPConfigurations)[0].InterfaceIPConfigurationPropertiesFormat != nil { + privateIPAddress = (*iface.IPConfigurations)[0].InterfaceIPConfigurationPropertiesFormat.PrivateIPAddress } if *privateIPAddress != "" { @@ -417,8 +417,8 @@ func expandAzureRmNetworkInterfaceIpConfigurations(d *schema.ResourceData) ([]ne name := data["name"].(string) ipConfig := network.InterfaceIPConfiguration{ - Name: &name, - Properties: &properties, + Name: &name, + InterfaceIPConfigurationPropertiesFormat: &properties, } ipConfigs = append(ipConfigs, ipConfig) diff --git a/builtin/providers/azurerm/resource_arm_network_interface_card_test.go b/builtin/providers/azurerm/resource_arm_network_interface_card_test.go index 7dd61715a..003673791 100644 --- a/builtin/providers/azurerm/resource_arm_network_interface_card_test.go +++ b/builtin/providers/azurerm/resource_arm_network_interface_card_test.go @@ -170,7 +170,7 @@ func testCheckAzureRMNetworkInterfaceDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Network Interface still exists:\n%#v", resp.Properties) + return fmt.Errorf("Network Interface still exists:\n%#v", resp.InterfacePropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_network_security_group.go b/builtin/providers/azurerm/resource_arm_network_security_group.go index d23293027..7ba17e8a7 100644 --- a/builtin/providers/azurerm/resource_arm_network_security_group.go +++ b/builtin/providers/azurerm/resource_arm_network_security_group.go @@ -139,7 +139,7 @@ func resourceArmNetworkSecurityGroupCreate(d *schema.ResourceData, meta interfac sg := network.SecurityGroup{ Name: &name, Location: &location, - Properties: &network.SecurityGroupPropertiesFormat{ + SecurityGroupPropertiesFormat: &network.SecurityGroupPropertiesFormat{ SecurityRules: &sgRules, }, Tags: expandTags(tags), @@ -194,8 +194,8 @@ func resourceArmNetworkSecurityGroupRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error making Read request on Azure Network Security Group %s: %s", name, err) } - if resp.Properties.SecurityRules != nil { - d.Set("security_rule", flattenNetworkSecurityRules(resp.Properties.SecurityRules)) + if resp.SecurityGroupPropertiesFormat.SecurityRules != nil { + d.Set("security_rule", flattenNetworkSecurityRules(resp.SecurityGroupPropertiesFormat.SecurityRules)) } d.Set("resource_group_name", resGroup) @@ -241,17 +241,17 @@ func flattenNetworkSecurityRules(rules *[]network.SecurityRule) []map[string]int for _, rule := range *rules { sgRule := make(map[string]interface{}) sgRule["name"] = *rule.Name - sgRule["destination_address_prefix"] = *rule.Properties.DestinationAddressPrefix - sgRule["destination_port_range"] = *rule.Properties.DestinationPortRange - sgRule["source_address_prefix"] = *rule.Properties.SourceAddressPrefix - sgRule["source_port_range"] = *rule.Properties.SourcePortRange - sgRule["priority"] = int(*rule.Properties.Priority) - sgRule["access"] = rule.Properties.Access - sgRule["direction"] = rule.Properties.Direction - sgRule["protocol"] = rule.Properties.Protocol + sgRule["destination_address_prefix"] = *rule.SecurityRulePropertiesFormat.DestinationAddressPrefix + sgRule["destination_port_range"] = *rule.SecurityRulePropertiesFormat.DestinationPortRange + sgRule["source_address_prefix"] = *rule.SecurityRulePropertiesFormat.SourceAddressPrefix + sgRule["source_port_range"] = *rule.SecurityRulePropertiesFormat.SourcePortRange + sgRule["priority"] = int(*rule.SecurityRulePropertiesFormat.Priority) + sgRule["access"] = rule.SecurityRulePropertiesFormat.Access + sgRule["direction"] = rule.SecurityRulePropertiesFormat.Direction + sgRule["protocol"] = rule.SecurityRulePropertiesFormat.Protocol - if rule.Properties.Description != nil { - sgRule["description"] = *rule.Properties.Description + if rule.SecurityRulePropertiesFormat.Description != nil { + sgRule["description"] = *rule.SecurityRulePropertiesFormat.Description } result = append(result, sgRule) @@ -289,8 +289,8 @@ func expandAzureRmSecurityRules(d *schema.ResourceData) ([]network.SecurityRule, name := data["name"].(string) rule := network.SecurityRule{ - Name: &name, - Properties: &properties, + Name: &name, + SecurityRulePropertiesFormat: &properties, } rules = append(rules, rule) @@ -306,6 +306,6 @@ func networkSecurityGroupStateRefreshFunc(client *ArmClient, resourceGroupName s return nil, "", fmt.Errorf("Error issuing read request in networkSecurityGroupStateRefreshFunc to Azure ARM for NSG '%s' (RG: '%s'): %s", sgName, resourceGroupName, err) } - return res, *res.Properties.ProvisioningState, nil + return res, *res.SecurityGroupPropertiesFormat.ProvisioningState, nil } } diff --git a/builtin/providers/azurerm/resource_arm_network_security_group_test.go b/builtin/providers/azurerm/resource_arm_network_security_group_test.go index 353036679..39fa092e0 100644 --- a/builtin/providers/azurerm/resource_arm_network_security_group_test.go +++ b/builtin/providers/azurerm/resource_arm_network_security_group_test.go @@ -180,7 +180,7 @@ func testCheckAzureRMNetworkSecurityGroupDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Network Security Group still exists:\n%#v", resp.Properties) + return fmt.Errorf("Network Security Group still exists:\n%#v", resp.SecurityGroupPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_network_security_rule.go b/builtin/providers/azurerm/resource_arm_network_security_rule.go index ca5e4cbfe..ed7760511 100644 --- a/builtin/providers/azurerm/resource_arm_network_security_rule.go +++ b/builtin/providers/azurerm/resource_arm_network_security_rule.go @@ -140,8 +140,8 @@ func resourceArmNetworkSecurityRuleCreate(d *schema.ResourceData, meta interface } sgr := network.SecurityRule{ - Name: &name, - Properties: &properties, + Name: &name, + SecurityRulePropertiesFormat: &properties, } _, err := secClient.CreateOrUpdate(resGroup, nsgName, name, sgr, make(chan struct{})) @@ -184,16 +184,16 @@ func resourceArmNetworkSecurityRuleRead(d *schema.ResourceData, meta interface{} } d.Set("resource_group_name", resGroup) - d.Set("access", resp.Properties.Access) - d.Set("destination_address_prefix", resp.Properties.DestinationAddressPrefix) - d.Set("destination_port_range", resp.Properties.DestinationPortRange) - d.Set("direction", resp.Properties.Direction) - d.Set("description", resp.Properties.Description) + d.Set("access", resp.SecurityRulePropertiesFormat.Access) + d.Set("destination_address_prefix", resp.SecurityRulePropertiesFormat.DestinationAddressPrefix) + d.Set("destination_port_range", resp.SecurityRulePropertiesFormat.DestinationPortRange) + d.Set("direction", resp.SecurityRulePropertiesFormat.Direction) + d.Set("description", resp.SecurityRulePropertiesFormat.Description) d.Set("name", resp.Name) - d.Set("priority", resp.Properties.Priority) - d.Set("protocol", resp.Properties.Protocol) - d.Set("source_address_prefix", resp.Properties.SourceAddressPrefix) - d.Set("source_port_range", resp.Properties.SourcePortRange) + d.Set("priority", resp.SecurityRulePropertiesFormat.Priority) + d.Set("protocol", resp.SecurityRulePropertiesFormat.Protocol) + d.Set("source_address_prefix", resp.SecurityRulePropertiesFormat.SourceAddressPrefix) + d.Set("source_port_range", resp.SecurityRulePropertiesFormat.SourcePortRange) return nil } diff --git a/builtin/providers/azurerm/resource_arm_network_security_rule_test.go b/builtin/providers/azurerm/resource_arm_network_security_rule_test.go index cb241f312..e0b4d79be 100644 --- a/builtin/providers/azurerm/resource_arm_network_security_rule_test.go +++ b/builtin/providers/azurerm/resource_arm_network_security_rule_test.go @@ -148,7 +148,7 @@ func testCheckAzureRMNetworkSecurityRuleDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Network Security Rule still exists:\n%#v", resp.Properties) + return fmt.Errorf("Network Security Rule still exists:\n%#v", resp.SecurityRulePropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_public_ip.go b/builtin/providers/azurerm/resource_arm_public_ip.go index 127ab92b6..a95534397 100644 --- a/builtin/providers/azurerm/resource_arm_public_ip.go +++ b/builtin/providers/azurerm/resource_arm_public_ip.go @@ -125,10 +125,10 @@ func resourceArmPublicIpCreate(d *schema.ResourceData, meta interface{}) error { } publicIp := network.PublicIPAddress{ - Name: &name, - Location: &location, - Properties: &properties, - Tags: expandTags(tags), + Name: &name, + Location: &location, + PublicIPAddressPropertiesFormat: &properties, + Tags: expandTags(tags), } _, err := publicIPClient.CreateOrUpdate(resGroup, name, publicIp, make(chan struct{})) @@ -171,14 +171,14 @@ func resourceArmPublicIpRead(d *schema.ResourceData, meta interface{}) error { d.Set("resource_group_name", resGroup) d.Set("location", resp.Location) d.Set("name", resp.Name) - d.Set("public_ip_address_allocation", strings.ToLower(string(resp.Properties.PublicIPAllocationMethod))) + d.Set("public_ip_address_allocation", strings.ToLower(string(resp.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod))) - if resp.Properties.DNSSettings != nil && resp.Properties.DNSSettings.Fqdn != nil && *resp.Properties.DNSSettings.Fqdn != "" { - d.Set("fqdn", resp.Properties.DNSSettings.Fqdn) + if resp.PublicIPAddressPropertiesFormat.DNSSettings != nil && resp.PublicIPAddressPropertiesFormat.DNSSettings.Fqdn != nil && *resp.PublicIPAddressPropertiesFormat.DNSSettings.Fqdn != "" { + d.Set("fqdn", resp.PublicIPAddressPropertiesFormat.DNSSettings.Fqdn) } - if resp.Properties.IPAddress != nil && *resp.Properties.IPAddress != "" { - d.Set("ip_address", resp.Properties.IPAddress) + if resp.PublicIPAddressPropertiesFormat.IPAddress != nil && *resp.PublicIPAddressPropertiesFormat.IPAddress != "" { + d.Set("ip_address", resp.PublicIPAddressPropertiesFormat.IPAddress) } flattenAndSetTags(d, resp.Tags) diff --git a/builtin/providers/azurerm/resource_arm_public_ip_test.go b/builtin/providers/azurerm/resource_arm_public_ip_test.go index 892dcc168..65ec91c77 100644 --- a/builtin/providers/azurerm/resource_arm_public_ip_test.go +++ b/builtin/providers/azurerm/resource_arm_public_ip_test.go @@ -305,7 +305,7 @@ func testCheckAzureRMPublicIpDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Public IP still exists:\n%#v", resp.Properties) + return fmt.Errorf("Public IP still exists:\n%#v", resp.PublicIPAddressPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_route.go b/builtin/providers/azurerm/resource_arm_route.go index cc1f2af6e..62d8971c0 100644 --- a/builtin/providers/azurerm/resource_arm_route.go +++ b/builtin/providers/azurerm/resource_arm_route.go @@ -86,8 +86,8 @@ func resourceArmRouteCreate(d *schema.ResourceData, meta interface{}) error { } route := network.Route{ - Name: &name, - Properties: &properties, + Name: &name, + RoutePropertiesFormat: &properties, } _, err := routesClient.CreateOrUpdate(resGroup, rtName, name, route, make(chan struct{})) @@ -130,11 +130,11 @@ func resourceArmRouteRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", routeName) d.Set("resource_group_name", resGroup) d.Set("route_table_name", rtName) - d.Set("address_prefix", resp.Properties.AddressPrefix) - d.Set("next_hop_type", string(resp.Properties.NextHopType)) + d.Set("address_prefix", resp.RoutePropertiesFormat.AddressPrefix) + d.Set("next_hop_type", string(resp.RoutePropertiesFormat.NextHopType)) - if resp.Properties.NextHopIPAddress != nil { - d.Set("next_hop_in_ip_address", resp.Properties.NextHopIPAddress) + if resp.RoutePropertiesFormat.NextHopIPAddress != nil { + d.Set("next_hop_in_ip_address", resp.RoutePropertiesFormat.NextHopIPAddress) } return nil diff --git a/builtin/providers/azurerm/resource_arm_route_table.go b/builtin/providers/azurerm/resource_arm_route_table.go index 750dc6782..6cdfbdf52 100644 --- a/builtin/providers/azurerm/resource_arm_route_table.go +++ b/builtin/providers/azurerm/resource_arm_route_table.go @@ -105,7 +105,7 @@ func resourceArmRouteTableCreate(d *schema.ResourceData, meta interface{}) error } if len(routes) > 0 { - routeSet.Properties = &network.RouteTablePropertiesFormat{ + routeSet.RouteTablePropertiesFormat = &network.RouteTablePropertiesFormat{ Routes: &routes, } } @@ -152,13 +152,13 @@ func resourceArmRouteTableRead(d *schema.ResourceData, meta interface{}) error { d.Set("resource_group_name", resGroup) d.Set("location", resp.Location) - if resp.Properties.Routes != nil { - d.Set("route", schema.NewSet(resourceArmRouteTableRouteHash, flattenAzureRmRouteTableRoutes(resp.Properties.Routes))) + if resp.RouteTablePropertiesFormat.Routes != nil { + d.Set("route", schema.NewSet(resourceArmRouteTableRouteHash, flattenAzureRmRouteTableRoutes(resp.RouteTablePropertiesFormat.Routes))) } subnets := []string{} - if resp.Properties.Subnets != nil { - for _, subnet := range *resp.Properties.Subnets { + if resp.RouteTablePropertiesFormat.Subnets != nil { + for _, subnet := range *resp.RouteTablePropertiesFormat.Subnets { id := subnet.ID subnets = append(subnets, *id) } @@ -206,8 +206,8 @@ func expandAzureRmRouteTableRoutes(d *schema.ResourceData) ([]network.Route, err name := data["name"].(string) route := network.Route{ - Name: &name, - Properties: &properties, + Name: &name, + RoutePropertiesFormat: &properties, } routes = append(routes, route) @@ -222,10 +222,10 @@ func flattenAzureRmRouteTableRoutes(routes *[]network.Route) []interface{} { for _, route := range *routes { r := make(map[string]interface{}) r["name"] = *route.Name - r["address_prefix"] = *route.Properties.AddressPrefix - r["next_hop_type"] = string(route.Properties.NextHopType) - if route.Properties.NextHopIPAddress != nil { - r["next_hop_in_ip_address"] = *route.Properties.NextHopIPAddress + r["address_prefix"] = *route.RoutePropertiesFormat.AddressPrefix + r["next_hop_type"] = string(route.RoutePropertiesFormat.NextHopType) + if route.RoutePropertiesFormat.NextHopIPAddress != nil { + r["next_hop_in_ip_address"] = *route.RoutePropertiesFormat.NextHopIPAddress } results = append(results, r) } diff --git a/builtin/providers/azurerm/resource_arm_route_table_test.go b/builtin/providers/azurerm/resource_arm_route_table_test.go index db274d963..b8164ebdd 100644 --- a/builtin/providers/azurerm/resource_arm_route_table_test.go +++ b/builtin/providers/azurerm/resource_arm_route_table_test.go @@ -242,7 +242,7 @@ func testCheckAzureRMRouteTableDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Route Table still exists:\n%#v", resp.Properties) + return fmt.Errorf("Route Table still exists:\n%#v", resp.RouteTablePropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_route_test.go b/builtin/providers/azurerm/resource_arm_route_test.go index d26f1ccbc..24d7feb43 100644 --- a/builtin/providers/azurerm/resource_arm_route_test.go +++ b/builtin/providers/azurerm/resource_arm_route_test.go @@ -155,7 +155,7 @@ func testCheckAzureRMRouteDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Route still exists:\n%#v", resp.Properties) + return fmt.Errorf("Route still exists:\n%#v", resp.RoutePropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_servicebus_namespace_test.go b/builtin/providers/azurerm/resource_arm_servicebus_namespace_test.go index 8c89df8cb..8f0955511 100644 --- a/builtin/providers/azurerm/resource_arm_servicebus_namespace_test.go +++ b/builtin/providers/azurerm/resource_arm_servicebus_namespace_test.go @@ -140,7 +140,7 @@ func testCheckAzureRMServiceBusNamespaceDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("ServiceBus Namespace still exists:\n%#v", resp.Properties) + return fmt.Errorf("ServiceBus Namespace still exists:\n%#v", resp.NamespaceProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_servicebus_subscription.go b/builtin/providers/azurerm/resource_arm_servicebus_subscription.go index 28517c858..cd2fc6fee 100644 --- a/builtin/providers/azurerm/resource_arm_servicebus_subscription.go +++ b/builtin/providers/azurerm/resource_arm_servicebus_subscription.go @@ -105,16 +105,16 @@ func resourceArmServiceBusSubscriptionCreate(d *schema.ResourceData, meta interf resGroup := d.Get("resource_group_name").(string) parameters := servicebus.SubscriptionCreateOrUpdateParameters{ - Location: &location, - Properties: &servicebus.SubscriptionProperties{}, + Location: &location, + SubscriptionProperties: &servicebus.SubscriptionProperties{}, } if autoDeleteOnIdle := d.Get("auto_delete_on_idle").(string); autoDeleteOnIdle != "" { - parameters.Properties.AutoDeleteOnIdle = &autoDeleteOnIdle + parameters.SubscriptionProperties.AutoDeleteOnIdle = &autoDeleteOnIdle } if lockDuration := d.Get("lock_duration").(string); lockDuration != "" { - parameters.Properties.LockDuration = &lockDuration + parameters.SubscriptionProperties.LockDuration = &lockDuration } deadLetteringFilterExceptions := d.Get("dead_lettering_on_filter_evaluation_exceptions").(bool) @@ -123,11 +123,11 @@ func resourceArmServiceBusSubscriptionCreate(d *schema.ResourceData, meta interf maxDeliveryCount := int32(d.Get("max_delivery_count").(int)) requiresSession := d.Get("requires_session").(bool) - parameters.Properties.DeadLetteringOnFilterEvaluationExceptions = &deadLetteringFilterExceptions - parameters.Properties.DeadLetteringOnMessageExpiration = &deadLetteringExpiration - parameters.Properties.EnableBatchedOperations = &enableBatchedOps - parameters.Properties.MaxDeliveryCount = &maxDeliveryCount - parameters.Properties.RequiresSession = &requiresSession + parameters.SubscriptionProperties.DeadLetteringOnFilterEvaluationExceptions = &deadLetteringFilterExceptions + parameters.SubscriptionProperties.DeadLetteringOnMessageExpiration = &deadLetteringExpiration + parameters.SubscriptionProperties.EnableBatchedOperations = &enableBatchedOps + parameters.SubscriptionProperties.MaxDeliveryCount = &maxDeliveryCount + parameters.SubscriptionProperties.RequiresSession = &requiresSession _, err := client.CreateOrUpdate(resGroup, namespaceName, topicName, name, parameters) if err != nil { @@ -176,7 +176,7 @@ func resourceArmServiceBusSubscriptionRead(d *schema.ResourceData, meta interfac d.Set("topic_name", topicName) d.Set("location", azureRMNormalizeLocation(*resp.Location)) - props := resp.Properties + props := resp.SubscriptionProperties d.Set("auto_delete_on_idle", props.AutoDeleteOnIdle) d.Set("default_message_ttl", props.DefaultMessageTimeToLive) d.Set("lock_duration", props.LockDuration) diff --git a/builtin/providers/azurerm/resource_arm_servicebus_subscription_test.go b/builtin/providers/azurerm/resource_arm_servicebus_subscription_test.go index 98a4049db..23c6f600a 100644 --- a/builtin/providers/azurerm/resource_arm_servicebus_subscription_test.go +++ b/builtin/providers/azurerm/resource_arm_servicebus_subscription_test.go @@ -105,7 +105,7 @@ func testCheckAzureRMServiceBusSubscriptionDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("ServiceBus Subscription still exists:\n%#v", resp.Properties) + return fmt.Errorf("ServiceBus Subscription still exists:\n%#v", resp.SubscriptionProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_servicebus_topic.go b/builtin/providers/azurerm/resource_arm_servicebus_topic.go index 9804cff4d..74787e008 100644 --- a/builtin/providers/azurerm/resource_arm_servicebus_topic.go +++ b/builtin/providers/azurerm/resource_arm_servicebus_topic.go @@ -109,21 +109,21 @@ func resourceArmServiceBusTopicCreate(d *schema.ResourceData, meta interface{}) resGroup := d.Get("resource_group_name").(string) parameters := servicebus.TopicCreateOrUpdateParameters{ - Name: &name, - Location: &location, - Properties: &servicebus.TopicProperties{}, + Name: &name, + Location: &location, + TopicProperties: &servicebus.TopicProperties{}, } if autoDeleteOnIdle := d.Get("auto_delete_on_idle").(string); autoDeleteOnIdle != "" { - parameters.Properties.AutoDeleteOnIdle = &autoDeleteOnIdle + parameters.TopicProperties.AutoDeleteOnIdle = &autoDeleteOnIdle } if defaultTTL := d.Get("default_message_ttl").(string); defaultTTL != "" { - parameters.Properties.DefaultMessageTimeToLive = &defaultTTL + parameters.TopicProperties.DefaultMessageTimeToLive = &defaultTTL } if duplicateWindow := d.Get("duplicate_detection_history_time_window").(string); duplicateWindow != "" { - parameters.Properties.DuplicateDetectionHistoryTimeWindow = &duplicateWindow + parameters.TopicProperties.DuplicateDetectionHistoryTimeWindow = &duplicateWindow } enableBatchedOps := d.Get("enable_batched_operations").(bool) @@ -134,13 +134,13 @@ func resourceArmServiceBusTopicCreate(d *schema.ResourceData, meta interface{}) requiresDuplicateDetection := d.Get("requires_duplicate_detection").(bool) supportOrdering := d.Get("support_ordering").(bool) - parameters.Properties.EnableBatchedOperations = &enableBatchedOps - parameters.Properties.EnableExpress = &enableExpress - parameters.Properties.FilteringMessagesBeforePublishing = &enableFiltering - parameters.Properties.EnablePartitioning = &enablePartitioning - parameters.Properties.MaxSizeInMegabytes = &maxSize - parameters.Properties.RequiresDuplicateDetection = &requiresDuplicateDetection - parameters.Properties.SupportOrdering = &supportOrdering + parameters.TopicProperties.EnableBatchedOperations = &enableBatchedOps + parameters.TopicProperties.EnableExpress = &enableExpress + parameters.TopicProperties.FilteringMessagesBeforePublishing = &enableFiltering + parameters.TopicProperties.EnablePartitioning = &enablePartitioning + parameters.TopicProperties.MaxSizeInMegabytes = &maxSize + parameters.TopicProperties.RequiresDuplicateDetection = &requiresDuplicateDetection + parameters.TopicProperties.SupportOrdering = &supportOrdering _, err := client.CreateOrUpdate(resGroup, namespaceName, name, parameters) if err != nil { @@ -185,7 +185,7 @@ func resourceArmServiceBusTopicRead(d *schema.ResourceData, meta interface{}) er d.Set("namespace_name", namespaceName) d.Set("location", azureRMNormalizeLocation(*resp.Location)) - props := resp.Properties + props := resp.TopicProperties d.Set("auto_delete_on_idle", props.AutoDeleteOnIdle) d.Set("default_message_ttl", props.DefaultMessageTimeToLive) diff --git a/builtin/providers/azurerm/resource_arm_servicebus_topic_test.go b/builtin/providers/azurerm/resource_arm_servicebus_topic_test.go index 71e89d461..1a95866e8 100644 --- a/builtin/providers/azurerm/resource_arm_servicebus_topic_test.go +++ b/builtin/providers/azurerm/resource_arm_servicebus_topic_test.go @@ -136,7 +136,7 @@ func testCheckAzureRMServiceBusTopicDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("ServiceBus Topic still exists:\n%#v", resp.Properties) + return fmt.Errorf("ServiceBus Topic still exists:\n%#v", resp.TopicProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_storage_account.go b/builtin/providers/azurerm/resource_arm_storage_account.go index f9e212558..d47b089f4 100644 --- a/builtin/providers/azurerm/resource_arm_storage_account.go +++ b/builtin/providers/azurerm/resource_arm_storage_account.go @@ -164,7 +164,7 @@ func resourceArmStorageAccountCreate(d *schema.ResourceData, meta interface{}) e Sku: &sku, Tags: expandTags(tags), Kind: storage.Kind(accountKind), - Properties: &storage.AccountPropertiesCreateParameters{ + AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{ Encryption: &storage.Encryption{ Services: &storage.EncryptionServices{ Blob: &storage.EncryptionService{ @@ -184,7 +184,7 @@ func resourceArmStorageAccountCreate(d *schema.ResourceData, meta interface{}) e accessTier = blobStorageAccountDefaultAccessTier } - opts.Properties.AccessTier = storage.AccessTier(accessTier.(string)) + opts.AccountPropertiesCreateParameters.AccessTier = storage.AccessTier(accessTier.(string)) } // Create @@ -272,7 +272,7 @@ func resourceArmStorageAccountUpdate(d *schema.ResourceData, meta interface{}) e accessTier := d.Get("access_tier").(string) opts := storage.AccountUpdateParameters{ - Properties: &storage.AccountPropertiesUpdateParameters{ + AccountPropertiesUpdateParameters: &storage.AccountPropertiesUpdateParameters{ AccessTier: storage.AccessTier(accessTier), }, } @@ -302,7 +302,7 @@ func resourceArmStorageAccountUpdate(d *schema.ResourceData, meta interface{}) e enableBlobEncryption := d.Get("enable_blob_encryption").(bool) opts := storage.AccountUpdateParameters{ - Properties: &storage.AccountPropertiesUpdateParameters{ + AccountPropertiesUpdateParameters: &storage.AccountPropertiesUpdateParameters{ Encryption: &storage.Encryption{ Services: &storage.EncryptionServices{ Blob: &storage.EncryptionService{ @@ -356,41 +356,41 @@ func resourceArmStorageAccountRead(d *schema.ResourceData, meta interface{}) err d.Set("location", resp.Location) d.Set("account_kind", resp.Kind) d.Set("account_type", resp.Sku.Name) - d.Set("primary_location", resp.Properties.PrimaryLocation) - d.Set("secondary_location", resp.Properties.SecondaryLocation) + d.Set("primary_location", resp.AccountProperties.PrimaryLocation) + d.Set("secondary_location", resp.AccountProperties.SecondaryLocation) - if resp.Properties.AccessTier != "" { - d.Set("access_tier", resp.Properties.AccessTier) + if resp.AccountProperties.AccessTier != "" { + d.Set("access_tier", resp.AccountProperties.AccessTier) } - if resp.Properties.PrimaryEndpoints != nil { - d.Set("primary_blob_endpoint", resp.Properties.PrimaryEndpoints.Blob) - d.Set("primary_queue_endpoint", resp.Properties.PrimaryEndpoints.Queue) - d.Set("primary_table_endpoint", resp.Properties.PrimaryEndpoints.Table) - d.Set("primary_file_endpoint", resp.Properties.PrimaryEndpoints.File) + if resp.AccountProperties.PrimaryEndpoints != nil { + d.Set("primary_blob_endpoint", resp.AccountProperties.PrimaryEndpoints.Blob) + d.Set("primary_queue_endpoint", resp.AccountProperties.PrimaryEndpoints.Queue) + d.Set("primary_table_endpoint", resp.AccountProperties.PrimaryEndpoints.Table) + d.Set("primary_file_endpoint", resp.AccountProperties.PrimaryEndpoints.File) } - if resp.Properties.SecondaryEndpoints != nil { - if resp.Properties.SecondaryEndpoints.Blob != nil { - d.Set("secondary_blob_endpoint", resp.Properties.SecondaryEndpoints.Blob) + if resp.AccountProperties.SecondaryEndpoints != nil { + if resp.AccountProperties.SecondaryEndpoints.Blob != nil { + d.Set("secondary_blob_endpoint", resp.AccountProperties.SecondaryEndpoints.Blob) } else { d.Set("secondary_blob_endpoint", "") } - if resp.Properties.SecondaryEndpoints.Queue != nil { - d.Set("secondary_queue_endpoint", resp.Properties.SecondaryEndpoints.Queue) + if resp.AccountProperties.SecondaryEndpoints.Queue != nil { + d.Set("secondary_queue_endpoint", resp.AccountProperties.SecondaryEndpoints.Queue) } else { d.Set("secondary_queue_endpoint", "") } - if resp.Properties.SecondaryEndpoints.Table != nil { - d.Set("secondary_table_endpoint", resp.Properties.SecondaryEndpoints.Table) + if resp.AccountProperties.SecondaryEndpoints.Table != nil { + d.Set("secondary_table_endpoint", resp.AccountProperties.SecondaryEndpoints.Table) } else { d.Set("secondary_table_endpoint", "") } } - if resp.Properties.Encryption != nil { - if resp.Properties.Encryption.Services.Blob != nil { - d.Set("enable_blob_encryption", resp.Properties.Encryption.Services.Blob.Enabled) + if resp.AccountProperties.Encryption != nil { + if resp.AccountProperties.Encryption.Services.Blob != nil { + d.Set("enable_blob_encryption", resp.AccountProperties.Encryption.Services.Blob.Enabled) } } @@ -452,6 +452,6 @@ func storageAccountStateRefreshFunc(client *ArmClient, resourceGroupName string, return nil, "", fmt.Errorf("Error issuing read request in storageAccountStateRefreshFunc to Azure ARM for Storage Account '%s' (RG: '%s'): %s", storageAccountName, resourceGroupName, err) } - return res, string(res.Properties.ProvisioningState), nil + return res, string(res.AccountProperties.ProvisioningState), nil } } diff --git a/builtin/providers/azurerm/resource_arm_storage_account_test.go b/builtin/providers/azurerm/resource_arm_storage_account_test.go index a29074766..b1005530f 100644 --- a/builtin/providers/azurerm/resource_arm_storage_account_test.go +++ b/builtin/providers/azurerm/resource_arm_storage_account_test.go @@ -237,7 +237,7 @@ func testCheckAzureRMStorageAccountDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Storage Account still exists:\n%#v", resp.Properties) + return fmt.Errorf("Storage Account still exists:\n%#v", resp.AccountProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_storage_share.go b/builtin/providers/azurerm/resource_arm_storage_share.go index 62d572210..826bc9b5c 100644 --- a/builtin/providers/azurerm/resource_arm_storage_share.go +++ b/builtin/providers/azurerm/resource_arm_storage_share.go @@ -63,9 +63,10 @@ func resourceArmStorageShareCreate(d *schema.ResourceData, meta interface{}) err } name := d.Get("name").(string) + metaData := make(map[string]string) // TODO: support MetaData log.Printf("[INFO] Creating share %q in storage account %q", name, storageAccountName) - err = fileClient.CreateShare(name) + err = fileClient.CreateShare(name, metaData) log.Printf("[INFO] Setting share %q properties in storage account %q", name, storageAccountName) fileClient.SetShareProperties(name, storage.ShareHeaders{Quota: strconv.Itoa(d.Get("quota").(int))}) diff --git a/builtin/providers/azurerm/resource_arm_subnet.go b/builtin/providers/azurerm/resource_arm_subnet.go index 5b74cff53..c5329b9f8 100644 --- a/builtin/providers/azurerm/resource_arm_subnet.go +++ b/builtin/providers/azurerm/resource_arm_subnet.go @@ -6,7 +6,6 @@ import ( "net/http" "github.com/Azure/azure-sdk-for-go/arm/network" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -100,8 +99,8 @@ func resourceArmSubnetCreate(d *schema.ResourceData, meta interface{}) error { } subnet := network.Subnet{ - Name: &name, - Properties: &properties, + Name: &name, + SubnetPropertiesFormat: &properties, } _, err := subnetClient.CreateOrUpdate(resGroup, vnetName, name, subnet, make(chan struct{})) @@ -146,19 +145,19 @@ func resourceArmSubnetRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", name) d.Set("resource_group_name", resGroup) d.Set("virtual_network_name", vnetName) - d.Set("address_prefix", resp.Properties.AddressPrefix) + d.Set("address_prefix", resp.SubnetPropertiesFormat.AddressPrefix) - if resp.Properties.NetworkSecurityGroup != nil { - d.Set("network_security_group_id", resp.Properties.NetworkSecurityGroup.ID) + if resp.SubnetPropertiesFormat.NetworkSecurityGroup != nil { + d.Set("network_security_group_id", resp.SubnetPropertiesFormat.NetworkSecurityGroup.ID) } - if resp.Properties.RouteTable != nil { - d.Set("route_table_id", resp.Properties.RouteTable.ID) + if resp.SubnetPropertiesFormat.RouteTable != nil { + d.Set("route_table_id", resp.SubnetPropertiesFormat.RouteTable.ID) } - if resp.Properties.IPConfigurations != nil { - ips := make([]string, 0, len(*resp.Properties.IPConfigurations)) - for _, ip := range *resp.Properties.IPConfigurations { + if resp.SubnetPropertiesFormat.IPConfigurations != nil { + ips := make([]string, 0, len(*resp.SubnetPropertiesFormat.IPConfigurations)) + for _, ip := range *resp.SubnetPropertiesFormat.IPConfigurations { ips = append(ips, *ip.ID) } @@ -190,14 +189,3 @@ func resourceArmSubnetDelete(d *schema.ResourceData, meta interface{}) error { return err } - -func subnetRuleStateRefreshFunc(client *ArmClient, resourceGroupName string, virtualNetworkName string, subnetName string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - res, err := client.subnetClient.Get(resourceGroupName, virtualNetworkName, subnetName, "") - if err != nil { - return nil, "", fmt.Errorf("Error issuing read request in subnetRuleStateRefreshFunc to Azure ARM for subnet '%s' (RG: '%s') (VNN: '%s'): %s", subnetName, resourceGroupName, virtualNetworkName, err) - } - - return res, *res.Properties.ProvisioningState, nil - } -} diff --git a/builtin/providers/azurerm/resource_arm_subnet_test.go b/builtin/providers/azurerm/resource_arm_subnet_test.go index d3406718a..5f1f2bcbe 100644 --- a/builtin/providers/azurerm/resource_arm_subnet_test.go +++ b/builtin/providers/azurerm/resource_arm_subnet_test.go @@ -127,7 +127,7 @@ func testCheckAzureRMSubnetDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Subnet still exists:\n%#v", resp.Properties) + return fmt.Errorf("Subnet still exists:\n%#v", resp.SubnetPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_template_deployment_test.go b/builtin/providers/azurerm/resource_arm_template_deployment_test.go index d8aae46f2..3c9b5eb84 100644 --- a/builtin/providers/azurerm/resource_arm_template_deployment_test.go +++ b/builtin/providers/azurerm/resource_arm_template_deployment_test.go @@ -156,7 +156,7 @@ func testCheckAzureRMTemplateDeploymentDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Template Deployment still exists:\n%#v", resp.Properties) + return fmt.Errorf("Template Deployment still exists:\n%#v", resp.VirtualMachineProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go index d2d58d102..062f04e9f 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint.go @@ -108,9 +108,9 @@ func resourceArmTrafficManagerEndpointCreate(d *schema.ResourceData, meta interf resGroup := d.Get("resource_group_name").(string) params := trafficmanager.Endpoint{ - Name: &name, - Type: &fullEndpointType, - Properties: getArmTrafficManagerEndpointProperties(d), + Name: &name, + Type: &fullEndpointType, + EndpointProperties: getArmTrafficManagerEndpointProperties(d), } _, err := client.CreateOrUpdate(resGroup, profileName, endpointType, name, params) @@ -162,7 +162,7 @@ func resourceArmTrafficManagerEndpointRead(d *schema.ResourceData, meta interfac return fmt.Errorf("Error making Read request on TrafficManager Endpoint %s: %s", name, err) } - endpoint := *resp.Properties + endpoint := *resp.EndpointProperties d.Set("resource_group_name", resGroup) d.Set("name", resp.Name) diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint_test.go b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint_test.go index 2d0629868..a4051ec1c 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint_test.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_endpoint_test.go @@ -254,7 +254,7 @@ func testCheckAzureRMTrafficManagerEndpointDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Traffic Manager Endpoint sitll exists:\n%#v", resp.Properties) + return fmt.Errorf("Traffic Manager Endpoint sitll exists:\n%#v", resp.EndpointProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go b/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go index 188cdee9c..c4bf1d05b 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_profile.go @@ -117,10 +117,10 @@ func resourceArmTrafficManagerProfileCreate(d *schema.ResourceData, meta interfa tags := d.Get("tags").(map[string]interface{}) profile := trafficmanager.Profile{ - Name: &name, - Location: &location, - Properties: getArmTrafficManagerProfileProperties(d), - Tags: expandTags(tags), + Name: &name, + Location: &location, + ProfileProperties: getArmTrafficManagerProfileProperties(d), + Tags: expandTags(tags), } _, err := client.CreateOrUpdate(resGroup, name, profile) @@ -160,7 +160,7 @@ func resourceArmTrafficManagerProfileRead(d *schema.ResourceData, meta interface return fmt.Errorf("Error making Read request on Traffic Manager Profile %s: %s", name, err) } - profile := *resp.Properties + profile := *resp.ProfileProperties // update appropriate values d.Set("resource_group_name", resGroup) diff --git a/builtin/providers/azurerm/resource_arm_traffic_manager_profile_test.go b/builtin/providers/azurerm/resource_arm_traffic_manager_profile_test.go index f5282c825..b06fbf6ea 100644 --- a/builtin/providers/azurerm/resource_arm_traffic_manager_profile_test.go +++ b/builtin/providers/azurerm/resource_arm_traffic_manager_profile_test.go @@ -166,7 +166,7 @@ func testCheckAzureRMTrafficManagerProfileDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Traffic Manager profile sitll exists:\n%#v", resp.Properties) + return fmt.Errorf("Traffic Manager profile sitll exists:\n%#v", resp.ProfileProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine.go b/builtin/providers/azurerm/resource_arm_virtual_machine.go index 02434b96d..bb02864a5 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine.go @@ -521,10 +521,10 @@ func resourceArmVirtualMachineCreate(d *schema.ResourceData, meta interface{}) e } vm := compute.VirtualMachine{ - Name: &name, - Location: &location, - Properties: &properties, - Tags: expandedTags, + Name: &name, + Location: &location, + VirtualMachineProperties: &properties, + Tags: expandedTags, } if _, ok := d.GetOk("plan"); ok { @@ -584,58 +584,58 @@ func resourceArmVirtualMachineRead(d *schema.ResourceData, meta interface{}) err } } - if resp.Properties.AvailabilitySet != nil { - d.Set("availability_set_id", strings.ToLower(*resp.Properties.AvailabilitySet.ID)) + if resp.VirtualMachineProperties.AvailabilitySet != nil { + d.Set("availability_set_id", strings.ToLower(*resp.VirtualMachineProperties.AvailabilitySet.ID)) } - d.Set("vm_size", resp.Properties.HardwareProfile.VMSize) + d.Set("vm_size", resp.VirtualMachineProperties.HardwareProfile.VMSize) - if resp.Properties.StorageProfile.ImageReference != nil { - if err := d.Set("storage_image_reference", schema.NewSet(resourceArmVirtualMachineStorageImageReferenceHash, flattenAzureRmVirtualMachineImageReference(resp.Properties.StorageProfile.ImageReference))); err != nil { + if resp.VirtualMachineProperties.StorageProfile.ImageReference != nil { + if err := d.Set("storage_image_reference", schema.NewSet(resourceArmVirtualMachineStorageImageReferenceHash, flattenAzureRmVirtualMachineImageReference(resp.VirtualMachineProperties.StorageProfile.ImageReference))); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage Image Reference error: %#v", err) } } - if err := d.Set("storage_os_disk", schema.NewSet(resourceArmVirtualMachineStorageOsDiskHash, flattenAzureRmVirtualMachineOsDisk(resp.Properties.StorageProfile.OsDisk))); err != nil { + if err := d.Set("storage_os_disk", schema.NewSet(resourceArmVirtualMachineStorageOsDiskHash, flattenAzureRmVirtualMachineOsDisk(resp.VirtualMachineProperties.StorageProfile.OsDisk))); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage OS Disk error: %#v", err) } - if resp.Properties.StorageProfile.DataDisks != nil { - if err := d.Set("storage_data_disk", flattenAzureRmVirtualMachineDataDisk(resp.Properties.StorageProfile.DataDisks)); err != nil { + if resp.VirtualMachineProperties.StorageProfile.DataDisks != nil { + if err := d.Set("storage_data_disk", flattenAzureRmVirtualMachineDataDisk(resp.VirtualMachineProperties.StorageProfile.DataDisks)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage Data Disks error: %#v", err) } } - if err := d.Set("os_profile", schema.NewSet(resourceArmVirtualMachineStorageOsProfileHash, flattenAzureRmVirtualMachineOsProfile(resp.Properties.OsProfile))); err != nil { + if err := d.Set("os_profile", schema.NewSet(resourceArmVirtualMachineStorageOsProfileHash, flattenAzureRmVirtualMachineOsProfile(resp.VirtualMachineProperties.OsProfile))); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage OS Profile: %#v", err) } - if resp.Properties.OsProfile.WindowsConfiguration != nil { - if err := d.Set("os_profile_windows_config", flattenAzureRmVirtualMachineOsProfileWindowsConfiguration(resp.Properties.OsProfile.WindowsConfiguration)); err != nil { + if resp.VirtualMachineProperties.OsProfile.WindowsConfiguration != nil { + if err := d.Set("os_profile_windows_config", flattenAzureRmVirtualMachineOsProfileWindowsConfiguration(resp.VirtualMachineProperties.OsProfile.WindowsConfiguration)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage OS Profile Windows Configuration: %#v", err) } } - if resp.Properties.OsProfile.LinuxConfiguration != nil { - if err := d.Set("os_profile_linux_config", flattenAzureRmVirtualMachineOsProfileLinuxConfiguration(resp.Properties.OsProfile.LinuxConfiguration)); err != nil { + if resp.VirtualMachineProperties.OsProfile.LinuxConfiguration != nil { + if err := d.Set("os_profile_linux_config", flattenAzureRmVirtualMachineOsProfileLinuxConfiguration(resp.VirtualMachineProperties.OsProfile.LinuxConfiguration)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage OS Profile Linux Configuration: %#v", err) } } - if resp.Properties.OsProfile.Secrets != nil { - if err := d.Set("os_profile_secrets", flattenAzureRmVirtualMachineOsProfileSecrets(resp.Properties.OsProfile.Secrets)); err != nil { + if resp.VirtualMachineProperties.OsProfile.Secrets != nil { + if err := d.Set("os_profile_secrets", flattenAzureRmVirtualMachineOsProfileSecrets(resp.VirtualMachineProperties.OsProfile.Secrets)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage OS Profile Secrets: %#v", err) } } - if resp.Properties.DiagnosticsProfile != nil && resp.Properties.DiagnosticsProfile.BootDiagnostics != nil { - if err := d.Set("boot_diagnostics", flattenAzureRmVirtualMachineDiagnosticsProfile(resp.Properties.DiagnosticsProfile.BootDiagnostics)); err != nil { + if resp.VirtualMachineProperties.DiagnosticsProfile != nil && resp.VirtualMachineProperties.DiagnosticsProfile.BootDiagnostics != nil { + if err := d.Set("boot_diagnostics", flattenAzureRmVirtualMachineDiagnosticsProfile(resp.VirtualMachineProperties.DiagnosticsProfile.BootDiagnostics)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Diagnostics Profile: %#v", err) } } - if resp.Properties.NetworkProfile != nil { - if err := d.Set("network_interface_ids", flattenAzureRmVirtualMachineNetworkInterfaces(resp.Properties.NetworkProfile)); err != nil { + if resp.VirtualMachineProperties.NetworkProfile != nil { + if err := d.Set("network_interface_ids", flattenAzureRmVirtualMachineNetworkInterfaces(resp.VirtualMachineProperties.NetworkProfile)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Storage Network Interfaces: %#v", err) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_extension.go b/builtin/providers/azurerm/resource_arm_virtual_machine_extension.go index 801e83e48..b75df50c7 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_extension.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_extension.go @@ -97,7 +97,7 @@ func resourceArmVirtualMachineExtensionsCreate(d *schema.ResourceData, meta inte extension := compute.VirtualMachineExtension{ Location: &location, - Properties: &compute.VirtualMachineExtensionProperties{ + VirtualMachineExtensionProperties: &compute.VirtualMachineExtensionProperties{ Publisher: &publisher, Type: &extensionType, TypeHandlerVersion: &typeHandlerVersion, @@ -111,7 +111,7 @@ func resourceArmVirtualMachineExtensionsCreate(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("unable to parse settings: %s", err) } - extension.Properties.Settings = &settings + extension.VirtualMachineExtensionProperties.Settings = &settings } if protectedSettingsString := d.Get("protected_settings").(string); protectedSettingsString != "" { @@ -119,7 +119,7 @@ func resourceArmVirtualMachineExtensionsCreate(d *schema.ResourceData, meta inte if err != nil { return fmt.Errorf("unable to parse protected_settings: %s", err) } - extension.Properties.ProtectedSettings = &protectedSettings + extension.VirtualMachineExtensionProperties.ProtectedSettings = &protectedSettings } _, err := client.CreateOrUpdate(resGroup, vmName, name, extension, make(chan struct{})) @@ -165,13 +165,13 @@ func resourceArmVirtualMachineExtensionsRead(d *schema.ResourceData, meta interf d.Set("location", azureRMNormalizeLocation(*resp.Location)) d.Set("virtual_machine_name", vmName) d.Set("resource_group_name", resGroup) - d.Set("publisher", resp.Properties.Publisher) - d.Set("type", resp.Properties.Type) - d.Set("type_handler_version", resp.Properties.TypeHandlerVersion) - d.Set("auto_upgrade_minor_version", resp.Properties.AutoUpgradeMinorVersion) + d.Set("publisher", resp.VirtualMachineExtensionProperties.Publisher) + d.Set("type", resp.VirtualMachineExtensionProperties.Type) + d.Set("type_handler_version", resp.VirtualMachineExtensionProperties.TypeHandlerVersion) + d.Set("auto_upgrade_minor_version", resp.VirtualMachineExtensionProperties.AutoUpgradeMinorVersion) - if resp.Properties.Settings != nil { - settings, err := flattenArmVirtualMachineExtensionSettings(*resp.Properties.Settings) + if resp.VirtualMachineExtensionProperties.Settings != nil { + settings, err := flattenArmVirtualMachineExtensionSettings(*resp.VirtualMachineExtensionProperties.Settings) if err != nil { return fmt.Errorf("unable to parse settings from response: %s", err) } diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_extension_test.go b/builtin/providers/azurerm/resource_arm_virtual_machine_extension_test.go index fb7ac488a..37cd0e6cf 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_extension_test.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_extension_test.go @@ -127,7 +127,7 @@ func testCheckAzureRMVirtualMachineExtensionDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Virtual Machine Extension still exists:\n%#v", resp.Properties) + return fmt.Errorf("Virtual Machine Extension still exists:\n%#v", resp.VirtualMachineExtensionProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go index 69b6f0dc5..e26117363 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go @@ -8,7 +8,6 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -391,11 +390,11 @@ func resourceArmVirtualMachineScaleSetCreate(d *schema.ResourceData, meta interf } scaleSetParams := compute.VirtualMachineScaleSet{ - Name: &name, - Location: &location, - Tags: expandTags(tags), - Sku: sku, - Properties: &scaleSetProps, + Name: &name, + Location: &location, + Tags: expandTags(tags), + Sku: sku, + VirtualMachineScaleSetProperties: &scaleSetProps, } _, vmErr := vmScaleSetClient.CreateOrUpdate(resGroup, name, scaleSetParams, make(chan struct{})) if vmErr != nil { @@ -442,41 +441,43 @@ func resourceArmVirtualMachineScaleSetRead(d *schema.ResourceData, meta interfac return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set Sku error: %#v", err) } - d.Set("upgrade_policy_mode", resp.Properties.UpgradePolicy.Mode) + properties := resp.VirtualMachineScaleSetProperties - if err := d.Set("os_profile", flattenAzureRMVirtualMachineScaleSetOsProfile(resp.Properties.VirtualMachineProfile.OsProfile)); err != nil { + d.Set("upgrade_policy_mode", properties.UpgradePolicy.Mode) + + if err := d.Set("os_profile", flattenAzureRMVirtualMachineScaleSetOsProfile(properties.VirtualMachineProfile.OsProfile)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set OS Profile error: %#v", err) } - if resp.Properties.VirtualMachineProfile.OsProfile.Secrets != nil { - if err := d.Set("os_profile_secrets", flattenAzureRmVirtualMachineScaleSetOsProfileSecrets(resp.Properties.VirtualMachineProfile.OsProfile.Secrets)); err != nil { + if properties.VirtualMachineProfile.OsProfile.Secrets != nil { + if err := d.Set("os_profile_secrets", flattenAzureRmVirtualMachineScaleSetOsProfileSecrets(properties.VirtualMachineProfile.OsProfile.Secrets)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set OS Profile Secrets error: %#v", err) } } - if resp.Properties.VirtualMachineProfile.OsProfile.WindowsConfiguration != nil { - if err := d.Set("os_profile_windows_config", flattenAzureRmVirtualMachineScaleSetOsProfileWindowsConfig(resp.Properties.VirtualMachineProfile.OsProfile.WindowsConfiguration)); err != nil { + if properties.VirtualMachineProfile.OsProfile.WindowsConfiguration != nil { + if err := d.Set("os_profile_windows_config", flattenAzureRmVirtualMachineScaleSetOsProfileWindowsConfig(properties.VirtualMachineProfile.OsProfile.WindowsConfiguration)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set OS Profile Windows config error: %#v", err) } } - if resp.Properties.VirtualMachineProfile.OsProfile.LinuxConfiguration != nil { - if err := d.Set("os_profile_linux_config", flattenAzureRmVirtualMachineScaleSetOsProfileLinuxConfig(resp.Properties.VirtualMachineProfile.OsProfile.LinuxConfiguration)); err != nil { + if properties.VirtualMachineProfile.OsProfile.LinuxConfiguration != nil { + if err := d.Set("os_profile_linux_config", flattenAzureRmVirtualMachineScaleSetOsProfileLinuxConfig(properties.VirtualMachineProfile.OsProfile.LinuxConfiguration)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set OS Profile Windows config error: %#v", err) } } - if err := d.Set("network_profile", flattenAzureRmVirtualMachineScaleSetNetworkProfile(resp.Properties.VirtualMachineProfile.NetworkProfile)); err != nil { + if err := d.Set("network_profile", flattenAzureRmVirtualMachineScaleSetNetworkProfile(properties.VirtualMachineProfile.NetworkProfile)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set Network Profile error: %#v", err) } - if resp.Properties.VirtualMachineProfile.StorageProfile.ImageReference != nil { - if err := d.Set("storage_profile_image_reference", flattenAzureRmVirtualMachineScaleSetStorageProfileImageReference(resp.Properties.VirtualMachineProfile.StorageProfile.ImageReference)); err != nil { + if properties.VirtualMachineProfile.StorageProfile.ImageReference != nil { + if err := d.Set("storage_profile_image_reference", flattenAzureRmVirtualMachineScaleSetStorageProfileImageReference(properties.VirtualMachineProfile.StorageProfile.ImageReference)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set Storage Profile Image Reference error: %#v", err) } } - if err := d.Set("storage_profile_os_disk", flattenAzureRmVirtualMachineScaleSetStorageProfileOSDisk(resp.Properties.VirtualMachineProfile.StorageProfile.OsDisk)); err != nil { + if err := d.Set("storage_profile_os_disk", flattenAzureRmVirtualMachineScaleSetStorageProfileOSDisk(properties.VirtualMachineProfile.StorageProfile.OsDisk)); err != nil { return fmt.Errorf("[DEBUG] Error setting Virtual Machine Scale Set Storage Profile OS Disk error: %#v", err) } @@ -602,22 +603,24 @@ func flattenAzureRmVirtualMachineScaleSetNetworkProfile(profile *compute.Virtual for _, netConfig := range *networkConfigurations { s := map[string]interface{}{ "name": *netConfig.Name, - "primary": *netConfig.Properties.Primary, + "primary": *netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.Primary, } - if netConfig.Properties.IPConfigurations != nil { - ipConfigs := make([]map[string]interface{}, 0, len(*netConfig.Properties.IPConfigurations)) - for _, ipConfig := range *netConfig.Properties.IPConfigurations { + if netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.IPConfigurations != nil { + ipConfigs := make([]map[string]interface{}, 0, len(*netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.IPConfigurations)) + for _, ipConfig := range *netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.IPConfigurations { config := make(map[string]interface{}) config["name"] = *ipConfig.Name - if ipConfig.Properties.Subnet != nil { - config["subnet_id"] = *ipConfig.Properties.Subnet.ID + properties := ipConfig.VirtualMachineScaleSetIPConfigurationProperties + + if ipConfig.VirtualMachineScaleSetIPConfigurationProperties.Subnet != nil { + config["subnet_id"] = *properties.Subnet.ID } - if ipConfig.Properties.LoadBalancerBackendAddressPools != nil { - addressPools := make([]string, 0, len(*ipConfig.Properties.LoadBalancerBackendAddressPools)) - for _, pool := range *ipConfig.Properties.LoadBalancerBackendAddressPools { + if properties.LoadBalancerBackendAddressPools != nil { + addressPools := make([]string, 0, len(*properties.LoadBalancerBackendAddressPools)) + for _, pool := range *properties.LoadBalancerBackendAddressPools { addressPools = append(addressPools, *pool.ID) } config["load_balancer_backend_address_pool_ids"] = addressPools @@ -687,17 +690,6 @@ func flattenAzureRmVirtualMachineScaleSetSku(sku *compute.Sku) []interface{} { return []interface{}{result} } -func virtualMachineScaleSetStateRefreshFunc(client *ArmClient, resourceGroupName string, scaleSetName string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - res, err := client.vmScaleSetClient.Get(resourceGroupName, scaleSetName) - if err != nil { - return nil, "", fmt.Errorf("Error issuing read request in virtualMachineScaleSetStateRefreshFunc to Azure ARM for Virtual Machine Scale Set '%s' (RG: '%s'): %s", scaleSetName, resourceGroupName, err) - } - - return res, *res.Properties.ProvisioningState, nil - } -} - func resourceArmVirtualMachineScaleSetStorageProfileImageReferenceHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) @@ -815,7 +807,7 @@ func expandAzureRmVirtualMachineScaleSetNetworkProfile(d *schema.ResourceData) * ipConfiguration := compute.VirtualMachineScaleSetIPConfiguration{ Name: &name, - Properties: &compute.VirtualMachineScaleSetIPConfigurationProperties{ + VirtualMachineScaleSetIPConfigurationProperties: &compute.VirtualMachineScaleSetIPConfigurationProperties{ Subnet: &compute.APIEntityReference{ ID: &subnetId, }, @@ -831,7 +823,7 @@ func expandAzureRmVirtualMachineScaleSetNetworkProfile(d *schema.ResourceData) * nProfile := compute.VirtualMachineScaleSetNetworkConfiguration{ Name: &name, - Properties: &compute.VirtualMachineScaleSetNetworkConfigurationProperties{ + VirtualMachineScaleSetNetworkConfigurationProperties: &compute.VirtualMachineScaleSetNetworkConfigurationProperties{ Primary: &primary, IPConfigurations: &ipConfigurations, }, diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set_test.go b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set_test.go index 440cd7610..55a0b8347 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set_test.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set_test.go @@ -120,7 +120,7 @@ func testCheckAzureRMVirtualMachineScaleSetDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Virtual Machine Scale Set still exists:\n%#v", resp.Properties) + return fmt.Errorf("Virtual Machine Scale Set still exists:\n%#v", resp.VirtualMachineScaleSetProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_test.go b/builtin/providers/azurerm/resource_arm_virtual_machine_test.go index 8767abb53..ada1b4216 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_test.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_test.go @@ -451,7 +451,7 @@ func testCheckAzureRMVirtualMachineDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Virtual Machine still exists:\n%#v", resp.Properties) + return fmt.Errorf("Virtual Machine still exists:\n%#v", resp.VirtualMachineProperties) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_network.go b/builtin/providers/azurerm/resource_arm_virtual_network.go index 623b2d216..5d4ba9a29 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_network.go +++ b/builtin/providers/azurerm/resource_arm_virtual_network.go @@ -7,7 +7,6 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/network" "github.com/hashicorp/terraform/helper/hashcode" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -92,10 +91,10 @@ func resourceArmVirtualNetworkCreate(d *schema.ResourceData, meta interface{}) e tags := d.Get("tags").(map[string]interface{}) vnet := network.VirtualNetwork{ - Name: &name, - Location: &location, - Properties: getVirtualNetworkProperties(d), - Tags: expandTags(tags), + Name: &name, + Location: &location, + VirtualNetworkPropertiesFormat: getVirtualNetworkProperties(d), + Tags: expandTags(tags), } _, err := vnetClient.CreateOrUpdate(resGroup, name, vnet, make(chan struct{})) @@ -135,7 +134,7 @@ func resourceArmVirtualNetworkRead(d *schema.ResourceData, meta interface{}) err return fmt.Errorf("Error making Read request on Azure virtual network %s: %s", name, err) } - vnet := *resp.Properties + vnet := *resp.VirtualNetworkPropertiesFormat // update appropriate values d.Set("resource_group_name", resGroup) @@ -151,9 +150,9 @@ func resourceArmVirtualNetworkRead(d *schema.ResourceData, meta interface{}) err s := map[string]interface{}{} s["name"] = *subnet.Name - s["address_prefix"] = *subnet.Properties.AddressPrefix - if subnet.Properties.NetworkSecurityGroup != nil { - s["security_group"] = *subnet.Properties.NetworkSecurityGroup.ID + s["address_prefix"] = *subnet.SubnetPropertiesFormat.AddressPrefix + if subnet.SubnetPropertiesFormat.NetworkSecurityGroup != nil { + s["security_group"] = *subnet.SubnetPropertiesFormat.NetworkSecurityGroup.ID } subnets.Add(s) @@ -213,11 +212,11 @@ func getVirtualNetworkProperties(d *schema.ResourceData) *network.VirtualNetwork var subnetObj network.Subnet subnetObj.Name = &name - subnetObj.Properties = &network.SubnetPropertiesFormat{} - subnetObj.Properties.AddressPrefix = &prefix + subnetObj.SubnetPropertiesFormat = &network.SubnetPropertiesFormat{} + subnetObj.SubnetPropertiesFormat.AddressPrefix = &prefix if secGroup != "" { - subnetObj.Properties.NetworkSecurityGroup = &network.SecurityGroup{ + subnetObj.SubnetPropertiesFormat.NetworkSecurityGroup = &network.SecurityGroup{ ID: &secGroup, } } @@ -246,14 +245,3 @@ func resourceAzureSubnetHash(v interface{}) int { } return hashcode.String(subnet) } - -func virtualNetworkStateRefreshFunc(client *ArmClient, resourceGroupName string, networkName string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - res, err := client.vnetClient.Get(resourceGroupName, networkName, "") - if err != nil { - return nil, "", fmt.Errorf("Error issuing read request in virtualNetworkStateRefreshFunc to Azure ARM for virtual network '%s' (RG: '%s'): %s", networkName, resourceGroupName, err) - } - - return res, *res.Properties.ProvisioningState, nil - } -} diff --git a/builtin/providers/azurerm/resource_arm_virtual_network_peering.go b/builtin/providers/azurerm/resource_arm_virtual_network_peering.go index 5954882d5..f4d6653fb 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_network_peering.go +++ b/builtin/providers/azurerm/resource_arm_virtual_network_peering.go @@ -86,8 +86,8 @@ func resourceArmVirtualNetworkPeeringCreate(d *schema.ResourceData, meta interfa resGroup := d.Get("resource_group_name").(string) peer := network.VirtualNetworkPeering{ - Name: &name, - Properties: getVirtualNetworkPeeringProperties(d), + Name: &name, + VirtualNetworkPeeringPropertiesFormat: getVirtualNetworkPeeringProperties(d), } peerMutex.Lock() @@ -131,7 +131,7 @@ func resourceArmVirtualNetworkPeeringRead(d *schema.ResourceData, meta interface return fmt.Errorf("Error making Read request on Azure virtual network peering %s: %s", name, err) } - peer := *resp.Properties + peer := *resp.VirtualNetworkPeeringPropertiesFormat // update appropriate values d.Set("resource_group_name", resGroup) diff --git a/builtin/providers/azurerm/resource_arm_virtual_network_peering_test.go b/builtin/providers/azurerm/resource_arm_virtual_network_peering_test.go index d7031c698..eb6bcc102 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_network_peering_test.go +++ b/builtin/providers/azurerm/resource_arm_virtual_network_peering_test.go @@ -181,7 +181,7 @@ func testCheckAzureRMVirtualNetworkPeeringDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Virtual Network Peering sitll exists:\n%#v", resp.Properties) + return fmt.Errorf("Virtual Network Peering sitll exists:\n%#v", resp.VirtualNetworkPeeringPropertiesFormat) } } diff --git a/builtin/providers/azurerm/resource_arm_virtual_network_test.go b/builtin/providers/azurerm/resource_arm_virtual_network_test.go index ef1454840..ecf138148 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_network_test.go +++ b/builtin/providers/azurerm/resource_arm_virtual_network_test.go @@ -164,7 +164,7 @@ func testCheckAzureRMVirtualNetworkDestroy(s *terraform.State) error { } if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("Virtual Network sitll exists:\n%#v", resp.Properties) + return fmt.Errorf("Virtual Network sitll exists:\n%#v", resp.VirtualNetworkPropertiesFormat) } } diff --git a/builtin/providers/dme/resource_dme_record_test.go b/builtin/providers/dme/resource_dme_record_test.go index f1b79292a..9c7c0ffb7 100644 --- a/builtin/providers/dme/resource_dme_record_test.go +++ b/builtin/providers/dme/resource_dme_record_test.go @@ -75,41 +75,6 @@ func TestAccDMERecordCName(t *testing.T) { }) } -/* - -ANAME can't be tested under sandbox, as the value of the ANAME must be a -resolvable address. - -func TestAccDMERecordAName(t *testing.T) { - var record dnsmadeeasy.Record - domainid := os.Getenv("DME_DOMAINID") - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckDMERecordDestroy, - Steps: []resource.TestStep{ - resource.TestStep{ - Config: fmt.Sprintf(testDMERecordConfigAName, domainid), - Check: resource.ComposeTestCheckFunc( - testAccCheckDMERecordExists("dme_record.test", &record), - resource.TestCheckResourceAttr( - "dme_record.test", "domainid", domainid), - resource.TestCheckResourceAttr( - "dme_record.test", "name", "testaname"), - resource.TestCheckResourceAttr( - "dme_record.test", "type", "ANAME"), - resource.TestCheckResourceAttr( - "dme_record.test", "value", "foo"), - resource.TestCheckResourceAttr( - "dme_record.test", "ttl", "2000"), - ), - }, - }, - }) -} -*/ - func TestAccDMERecordMX(t *testing.T) { var record dnsmadeeasy.Record domainid := os.Getenv("DME_DOMAINID") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go index d412fb2e5..90f5ceb6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go @@ -1,9 +1,8 @@ -// Package cdn implements the Azure ARM Cdn service API version 2016-04-02. +// Package cdn implements the Azure ARM Cdn service API version 2016-10-02. // // Use these APIs to manage Azure CDN resources through the Azure Resource // Manager. You must make sure that requests made to these resources are -// secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. +// secure. package cdn // Copyright (c) Microsoft and contributors. All rights reserved. @@ -26,11 +25,14 @@ package cdn import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" ) const ( // APIVersion is the version of the Cdn - APIVersion = "2016-04-02" + APIVersion = "2016-10-02" // DefaultBaseURI is the default URI used for the service Cdn DefaultBaseURI = "https://management.azure.com" @@ -58,3 +60,148 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { SubscriptionID: subscriptionID, } } + +// CheckNameAvailability check the availability of a resource name without +// creating the resource. This is needed for resources where name is globally +// unique, such as a CDN endpoint. +// +// checkNameAvailabilityInput is input to check. +func (client ManagementClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: checkNameAvailabilityInput, + Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "checkNameAvailabilityInput.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ManagementClient", "CheckNameAvailability") + } + + req, err := client.CheckNameAvailabilityPreparer(checkNameAvailabilityInput) + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "CheckNameAvailability", nil, "Failure preparing request") + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "CheckNameAvailability", resp, "Failure sending request") + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client ManagementClient) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": client.APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Cdn/checkNameAvailability"), + autorest.WithJSON(checkNameAvailabilityInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ManagementClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOperations lists all of the available CDN REST API operations. +func (client ManagementClient) ListOperations() (result OperationListResult, err error) { + req, err := client.ListOperationsPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing request") + } + + resp, err := client.ListOperationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending request") + } + + result, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to request") + } + + return +} + +// ListOperationsPreparer prepares the ListOperations request. +func (client ManagementClient) ListOperationsPreparer() (*http.Request, error) { + queryParameters := map[string]interface{}{ + "api-version": client.APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Cdn/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListOperationsSender sends the ListOperations request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) ListOperationsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListOperationsResponder handles the response to the ListOperations request. The method always +// closes the http.Response Body. +func (client ManagementClient) ListOperationsResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOperationsNextResults retrieves the next set of results, if any. +func (client ManagementClient) ListOperationsNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListOperationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending next results request") + } + + result, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to next results request") + } + + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go index 4578d9d12..b5fadf244 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go @@ -27,8 +27,7 @@ import ( // CustomDomainsClient is the use these APIs to manage Azure CDN resources // through the Azure Resource Manager. You must make sure that requests made -// to these resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. +// to these resources are secure. type CustomDomainsClient struct { ManagementClient } @@ -45,24 +44,30 @@ func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) Cu return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create sends the create request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Create creates a new CDN custom domain within an endpoint. This method may +// poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// customDomainName is name of the custom domain within an endpoint. -// customDomainProperties is custom domain properties required for creation. -// endpointName is name of the endpoint within the CDN profile. profileName -// is name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client CustomDomainsClient) Create(customDomainName string, customDomainProperties CustomDomainParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. customDomainName is name of the custom +// domain within an endpoint. customDomainProperties is custom domain +// properties required for creation. +func (client CustomDomainsClient) Create(resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: customDomainProperties, - Constraints: []validation.Constraint{{Target: "customDomainProperties.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "customDomainProperties.Properties.HostName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "customDomainProperties.CustomDomainPropertiesParameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "customDomainProperties.CustomDomainPropertiesParameters.HostName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.CustomDomainsClient", "Create") } - req, err := client.CreatePreparer(customDomainName, customDomainProperties, endpointName, profileName, resourceGroupName, cancel) + req, err := client.CreatePreparer(resourceGroupName, profileName, endpointName, customDomainName, customDomainProperties, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Create", nil, "Failure preparing request") } @@ -82,7 +87,7 @@ func (client CustomDomainsClient) Create(customDomainName string, customDomainPr } // CreatePreparer prepares the Create request. -func (client CustomDomainsClient) CreatePreparer(customDomainName string, customDomainProperties CustomDomainParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client CustomDomainsClient) CreatePreparer(resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "customDomainName": autorest.Encode("path", customDomainName), "endpointName": autorest.Encode("path", endpointName), @@ -125,37 +130,46 @@ func (client CustomDomainsClient) CreateResponder(resp *http.Response) (result a return } -// DeleteIfExists sends the delete if exists request. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes an existing CDN custom domain within an endpoint. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // -// customDomainName is name of the custom domain within an endpoint. -// endpointName is name of the endpoint within the CDN profile. profileName -// is name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client CustomDomainsClient) DeleteIfExists(customDomainName string, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.DeleteIfExistsPreparer(customDomainName, endpointName, profileName, resourceGroupName, cancel) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DeleteIfExists", nil, "Failure preparing request") +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. customDomainName is name of the custom +// domain within an endpoint. +func (client CustomDomainsClient) Delete(resourceGroupName string, profileName string, endpointName string, customDomainName string, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.CustomDomainsClient", "Delete") } - resp, err := client.DeleteIfExistsSender(req) + req, err := client.DeletePreparer(resourceGroupName, profileName, endpointName, customDomainName, cancel) + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Delete", nil, "Failure preparing request") + } + + resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DeleteIfExists", resp, "Failure sending request") + return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Delete", resp, "Failure sending request") } - result, err = client.DeleteIfExistsResponder(resp) + result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "DeleteIfExists", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Delete", resp, "Failure responding to request") } return } -// DeleteIfExistsPreparer prepares the DeleteIfExists request. -func (client CustomDomainsClient) DeleteIfExistsPreparer(customDomainName string, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +// DeletePreparer prepares the Delete request. +func (client CustomDomainsClient) DeletePreparer(resourceGroupName string, profileName string, endpointName string, customDomainName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "customDomainName": autorest.Encode("path", customDomainName), "endpointName": autorest.Encode("path", endpointName), @@ -176,17 +190,17 @@ func (client CustomDomainsClient) DeleteIfExistsPreparer(customDomainName string return preparer.Prepare(&http.Request{Cancel: cancel}) } -// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the +// DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client CustomDomainsClient) DeleteIfExistsSender(req *http.Request) (*http.Response, error) { +func (client CustomDomainsClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoPollForAsynchronous(client.PollingDelay)) } -// DeleteIfExistsResponder handles the response to the DeleteIfExists request. The method always +// DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client CustomDomainsClient) DeleteIfExistsResponder(resp *http.Response) (result autorest.Response, err error) { +func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -196,14 +210,23 @@ func (client CustomDomainsClient) DeleteIfExistsResponder(resp *http.Response) ( return } -// Get sends the get request. +// Get gets an existing CDN custom domain within an endpoint. // -// customDomainName is name of the custom domain within an endpoint. -// endpointName is name of the endpoint within the CDN profile. profileName -// is name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client CustomDomainsClient) Get(customDomainName string, endpointName string, profileName string, resourceGroupName string) (result CustomDomain, err error) { - req, err := client.GetPreparer(customDomainName, endpointName, profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. customDomainName is name of the custom +// domain within an endpoint. +func (client CustomDomainsClient) Get(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.CustomDomainsClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, profileName, endpointName, customDomainName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Get", nil, "Failure preparing request") } @@ -223,7 +246,7 @@ func (client CustomDomainsClient) Get(customDomainName string, endpointName stri } // GetPreparer prepares the Get request. -func (client CustomDomainsClient) GetPreparer(customDomainName string, endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { +func (client CustomDomainsClient) GetPreparer(resourceGroupName string, profileName string, endpointName string, customDomainName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "customDomainName": autorest.Encode("path", customDomainName), "endpointName": autorest.Encode("path", endpointName), @@ -263,13 +286,22 @@ func (client CustomDomainsClient) GetResponder(resp *http.Response) (result Cust return } -// ListByEndpoint sends the list by endpoint request. +// ListByEndpoint lists the existing CDN custom domains within an endpoint. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client CustomDomainsClient) ListByEndpoint(endpointName string, profileName string, resourceGroupName string) (result CustomDomainListResult, err error) { - req, err := client.ListByEndpointPreparer(endpointName, profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client CustomDomainsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result CustomDomainListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.CustomDomainsClient", "ListByEndpoint") + } + + req, err := client.ListByEndpointPreparer(resourceGroupName, profileName, endpointName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "ListByEndpoint", nil, "Failure preparing request") } @@ -289,7 +321,7 @@ func (client CustomDomainsClient) ListByEndpoint(endpointName string, profileNam } // ListByEndpointPreparer prepares the ListByEndpoint request. -func (client CustomDomainsClient) ListByEndpointPreparer(endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { +func (client CustomDomainsClient) ListByEndpointPreparer(resourceGroupName string, profileName string, endpointName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -328,72 +360,26 @@ func (client CustomDomainsClient) ListByEndpointResponder(resp *http.Response) ( return } -// Update sends the update request. -// -// customDomainName is name of the custom domain within an endpoint. -// customDomainProperties is custom domain properties to update. endpointName -// is name of the endpoint within the CDN profile. profileName is name of the -// CDN profile within the resource group. resourceGroupName is name of the -// resource group within the Azure subscription. -func (client CustomDomainsClient) Update(customDomainName string, customDomainProperties CustomDomainParameters, endpointName string, profileName string, resourceGroupName string) (result ErrorResponse, err error) { - req, err := client.UpdatePreparer(customDomainName, customDomainProperties, endpointName, profileName, resourceGroupName) +// ListByEndpointNextResults retrieves the next set of results, if any. +func (client CustomDomainsClient) ListByEndpointNextResults(lastResults CustomDomainListResult) (result CustomDomainListResult, err error) { + req, err := lastResults.CustomDomainListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Update", nil, "Failure preparing request") + return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "ListByEndpoint", nil, "Failure preparing next results request") + } + if req == nil { + return } - resp, err := client.UpdateSender(req) + resp, err := client.ListByEndpointSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Update", resp, "Failure sending request") + return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "ListByEndpoint", resp, "Failure sending next results request") } - result, err = client.UpdateResponder(resp) + result, err = client.ListByEndpointResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "Update", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "ListByEndpoint", resp, "Failure responding to next results request") } return } - -// UpdatePreparer prepares the Update request. -func (client CustomDomainsClient) UpdatePreparer(customDomainName string, customDomainProperties CustomDomainParameters, endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "customDomainName": autorest.Encode("path", customDomainName), - "endpointName": autorest.Encode("path", endpointName), - "profileName": autorest.Encode("path", profileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", pathParameters), - autorest.WithJSON(customDomainProperties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client CustomDomainsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client CustomDomainsClient) UpdateResponder(resp *http.Response) (result ErrorResponse, 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/arm/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go index 2a3c99fb8..102509619 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go @@ -27,8 +27,7 @@ import ( // EndpointsClient is the use these APIs to manage Azure CDN resources through // the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. +// resources are secure. type EndpointsClient struct { ManagementClient } @@ -44,24 +43,32 @@ func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) Endpoi return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create sends the create request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Create creates a new CDN endpoint with the specified parameters. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. -// endpointProperties is endpoint properties profileName is name of the CDN -// profile within the resource group. resourceGroupName is name of the -// resource group within the Azure subscription. -func (client EndpointsClient) Create(endpointName string, endpointProperties EndpointCreateParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. endpoint is endpoint properties +func (client EndpointsClient) Create(resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: endpointProperties, - Constraints: []validation.Constraint{{Target: "endpointProperties.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "endpointProperties.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "endpointProperties.Properties.Origins", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: endpoint, + Constraints: []validation.Constraint{{Target: "endpoint.EndpointProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "endpoint.EndpointProperties.Origins", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "endpoint.EndpointProperties.HostName", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "endpoint.EndpointProperties.ResourceState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "endpoint.EndpointProperties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Create") } - req, err := client.CreatePreparer(endpointName, endpointProperties, profileName, resourceGroupName, cancel) + req, err := client.CreatePreparer(resourceGroupName, profileName, endpointName, endpoint, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Create", nil, "Failure preparing request") } @@ -81,7 +88,7 @@ func (client EndpointsClient) Create(endpointName string, endpointProperties End } // CreatePreparer prepares the Create request. -func (client EndpointsClient) CreatePreparer(endpointName string, endpointProperties EndpointCreateParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) CreatePreparer(resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -98,7 +105,7 @@ func (client EndpointsClient) CreatePreparer(endpointName string, endpointProper autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", pathParameters), - autorest.WithJSON(endpointProperties), + autorest.WithJSON(endpoint), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -123,36 +130,45 @@ func (client EndpointsClient) CreateResponder(resp *http.Response) (result autor return } -// DeleteIfExists sends the delete if exists request. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes an existing CDN endpoint with the specified parameters. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client EndpointsClient) DeleteIfExists(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.DeleteIfExistsPreparer(endpointName, profileName, resourceGroupName, cancel) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "DeleteIfExists", nil, "Failure preparing request") +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Delete") } - resp, err := client.DeleteIfExistsSender(req) + req, err := client.DeletePreparer(resourceGroupName, profileName, endpointName, cancel) + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Delete", nil, "Failure preparing request") + } + + resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "DeleteIfExists", resp, "Failure sending request") + return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Delete", resp, "Failure sending request") } - result, err = client.DeleteIfExistsResponder(resp) + result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.EndpointsClient", "DeleteIfExists", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Delete", resp, "Failure responding to request") } return } -// DeleteIfExistsPreparer prepares the DeleteIfExists request. -func (client EndpointsClient) DeleteIfExistsPreparer(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +// DeletePreparer prepares the Delete request. +func (client EndpointsClient) DeletePreparer(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -172,17 +188,17 @@ func (client EndpointsClient) DeleteIfExistsPreparer(endpointName string, profil return preparer.Prepare(&http.Request{Cancel: cancel}) } -// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the +// DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client EndpointsClient) DeleteIfExistsSender(req *http.Request) (*http.Response, error) { +func (client EndpointsClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoPollForAsynchronous(client.PollingDelay)) } -// DeleteIfExistsResponder handles the response to the DeleteIfExists request. The method always +// DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client EndpointsClient) DeleteIfExistsResponder(resp *http.Response) (result autorest.Response, err error) { +func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -192,13 +208,23 @@ func (client EndpointsClient) DeleteIfExistsResponder(resp *http.Response) (resu return } -// Get sends the get request. +// Get gets an existing CDN endpoint with the specified endpoint name under +// the specified subscription, resource group and profile. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client EndpointsClient) Get(endpointName string, profileName string, resourceGroupName string) (result Endpoint, err error) { - req, err := client.GetPreparer(endpointName, profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client EndpointsClient) Get(resourceGroupName string, profileName string, endpointName string) (result Endpoint, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, profileName, endpointName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Get", nil, "Failure preparing request") } @@ -218,7 +244,7 @@ func (client EndpointsClient) Get(endpointName string, profileName string, resou } // GetPreparer prepares the Get request. -func (client EndpointsClient) GetPreparer(endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { +func (client EndpointsClient) GetPreparer(resourceGroupName string, profileName string, endpointName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -257,13 +283,21 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint return } -// ListByProfile sends the list by profile request. +// ListByProfile lists existing CDN endpoints. // -// profileName is name of the CDN profile within the resource group. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client EndpointsClient) ListByProfile(profileName string, resourceGroupName string) (result EndpointListResult, err error) { - req, err := client.ListByProfilePreparer(profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. +func (client EndpointsClient) ListByProfile(resourceGroupName string, profileName string) (result EndpointListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "ListByProfile") + } + + req, err := client.ListByProfilePreparer(resourceGroupName, profileName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "ListByProfile", nil, "Failure preparing request") } @@ -283,7 +317,7 @@ func (client EndpointsClient) ListByProfile(profileName string, resourceGroupNam } // ListByProfilePreparer prepares the ListByProfile request. -func (client EndpointsClient) ListByProfilePreparer(profileName string, resourceGroupName string) (*http.Request, error) { +func (client EndpointsClient) ListByProfilePreparer(resourceGroupName string, profileName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -321,24 +355,52 @@ func (client EndpointsClient) ListByProfileResponder(resp *http.Response) (resul return } -// LoadContent sends the load content request. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListByProfileNextResults retrieves the next set of results, if any. +func (client EndpointsClient) ListByProfileNextResults(lastResults EndpointListResult) (result EndpointListResult, err error) { + req, err := lastResults.EndpointListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "ListByProfile", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "ListByProfile", resp, "Failure sending next results request") + } + + result, err = client.ListByProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.EndpointsClient", "ListByProfile", resp, "Failure responding to next results request") + } + + return +} + +// LoadContent forcibly pre-loads CDN endpoint content. Available for Verizon +// Profiles. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. -// contentFilePaths is the path to the content to be loaded. Path should -// describe a file. profileName is name of the CDN profile within the -// resource group. resourceGroupName is name of the resource group within the -// Azure subscription. -func (client EndpointsClient) LoadContent(endpointName string, contentFilePaths LoadParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. contentFilePaths is the path to the +// content to be loaded. Path should describe a file. +func (client EndpointsClient) LoadContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: contentFilePaths, Constraints: []validation.Constraint{{Target: "contentFilePaths.ContentPaths", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "LoadContent") } - req, err := client.LoadContentPreparer(endpointName, contentFilePaths, profileName, resourceGroupName, cancel) + req, err := client.LoadContentPreparer(resourceGroupName, profileName, endpointName, contentFilePaths, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "LoadContent", nil, "Failure preparing request") } @@ -358,7 +420,7 @@ func (client EndpointsClient) LoadContent(endpointName string, contentFilePaths } // LoadContentPreparer prepares the LoadContent request. -func (client EndpointsClient) LoadContentPreparer(endpointName string, contentFilePaths LoadParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) LoadContentPreparer(resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -400,24 +462,29 @@ func (client EndpointsClient) LoadContentResponder(resp *http.Response) (result return } -// PurgeContent sends the purge content request. This method may poll for +// PurgeContent forcibly purges CDN endpoint content. This method may poll for // completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. -// contentFilePaths is the path to the content to be purged. Path can -// describe a file or directory. profileName is name of the CDN profile -// within the resource group. resourceGroupName is name of the resource group -// within the Azure subscription. -func (client EndpointsClient) PurgeContent(endpointName string, contentFilePaths PurgeParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. contentFilePaths is the path to the +// content to be purged. Path can describe a file or directory using the +// wildcard. e.g. '/my/directory/*' or '/my/file.exe/' +func (client EndpointsClient) PurgeContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: contentFilePaths, Constraints: []validation.Constraint{{Target: "contentFilePaths.ContentPaths", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "PurgeContent") } - req, err := client.PurgeContentPreparer(endpointName, contentFilePaths, profileName, resourceGroupName, cancel) + req, err := client.PurgeContentPreparer(resourceGroupName, profileName, endpointName, contentFilePaths, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "PurgeContent", nil, "Failure preparing request") } @@ -437,7 +504,7 @@ func (client EndpointsClient) PurgeContent(endpointName string, contentFilePaths } // PurgeContentPreparer prepares the PurgeContent request. -func (client EndpointsClient) PurgeContentPreparer(endpointName string, contentFilePaths PurgeParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) PurgeContentPreparer(resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -479,15 +546,25 @@ func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result return } -// Start sends the start request. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will -// be used to cancel polling and any outstanding HTTP requests. +// Start starts an existing stopped CDN endpoint. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client EndpointsClient) Start(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.StartPreparer(endpointName, profileName, resourceGroupName, cancel) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client EndpointsClient) Start(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Start") + } + + req, err := client.StartPreparer(resourceGroupName, profileName, endpointName, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Start", nil, "Failure preparing request") } @@ -507,7 +584,7 @@ func (client EndpointsClient) Start(endpointName string, profileName string, res } // StartPreparer prepares the Start request. -func (client EndpointsClient) StartPreparer(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) StartPreparer(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -547,15 +624,25 @@ func (client EndpointsClient) StartResponder(resp *http.Response) (result autore return } -// Stop sends the stop request. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will -// be used to cancel polling and any outstanding HTTP requests. +// Stop stops an existing running CDN endpoint. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client EndpointsClient) Stop(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.StopPreparer(endpointName, profileName, resourceGroupName, cancel) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client EndpointsClient) Stop(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Stop") + } + + req, err := client.StopPreparer(resourceGroupName, profileName, endpointName, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Stop", nil, "Failure preparing request") } @@ -575,7 +662,7 @@ func (client EndpointsClient) Stop(endpointName string, profileName string, reso } // StopPreparer prepares the Stop request. -func (client EndpointsClient) StopPreparer(endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) StopPreparer(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -615,16 +702,29 @@ func (client EndpointsClient) StopResponder(resp *http.Response) (result autores return } -// Update sends the update request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Update updates an existing CDN endpoint with the specified parameters. Only +// tags and OriginHostHeader can be updated after creating an endpoint. To +// update origins, use the Update Origin operation. To update custom domains, +// use the Update Custom Domain operation. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// endpointName is name of the endpoint within the CDN profile. -// endpointProperties is endpoint properties profileName is name of the CDN -// profile within the resource group. resourceGroupName is name of the -// resource group within the Azure subscription. -func (client EndpointsClient) Update(endpointName string, endpointProperties EndpointUpdateParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.UpdatePreparer(endpointName, endpointProperties, profileName, resourceGroupName, cancel) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. endpointUpdateProperties is endpoint +// update properties +func (client EndpointsClient) Update(resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "Update") + } + + req, err := client.UpdatePreparer(resourceGroupName, profileName, endpointName, endpointUpdateProperties, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "Update", nil, "Failure preparing request") } @@ -644,7 +744,7 @@ func (client EndpointsClient) Update(endpointName string, endpointProperties End } // UpdatePreparer prepares the Update request. -func (client EndpointsClient) UpdatePreparer(endpointName string, endpointProperties EndpointUpdateParameters, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client EndpointsClient) UpdatePreparer(resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -661,7 +761,7 @@ func (client EndpointsClient) UpdatePreparer(endpointName string, endpointProper autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}", pathParameters), - autorest.WithJSON(endpointProperties), + autorest.WithJSON(endpointUpdateProperties), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -686,20 +786,26 @@ func (client EndpointsClient) UpdateResponder(resp *http.Response) (result autor return } -// ValidateCustomDomain sends the validate custom domain request. +// ValidateCustomDomain validates a custom domain mapping to ensure it maps to +// the correct CNAME in DNS. // -// endpointName is name of the endpoint within the CDN profile. -// customDomainProperties is custom domain to validate. profileName is name -// of the CDN profile within the resource group. resourceGroupName is name of -// the resource group within the Azure subscription. -func (client EndpointsClient) ValidateCustomDomain(endpointName string, customDomainProperties ValidateCustomDomainInput, profileName string, resourceGroupName string) (result ValidateCustomDomainOutput, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. customDomainProperties is custom domain +// to validate. +func (client EndpointsClient) ValidateCustomDomain(resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput) (result ValidateCustomDomainOutput, err error) { if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, {TargetValue: customDomainProperties, Constraints: []validation.Constraint{{Target: "customDomainProperties.HostName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.EndpointsClient", "ValidateCustomDomain") } - req, err := client.ValidateCustomDomainPreparer(endpointName, customDomainProperties, profileName, resourceGroupName) + req, err := client.ValidateCustomDomainPreparer(resourceGroupName, profileName, endpointName, customDomainProperties) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "ValidateCustomDomain", nil, "Failure preparing request") } @@ -719,7 +825,7 @@ func (client EndpointsClient) ValidateCustomDomain(endpointName string, customDo } // ValidateCustomDomainPreparer prepares the ValidateCustomDomain request. -func (client EndpointsClient) ValidateCustomDomainPreparer(endpointName string, customDomainProperties ValidateCustomDomainInput, profileName string, resourceGroupName string) (*http.Request, error) { +func (client EndpointsClient) ValidateCustomDomainPreparer(resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go index 7e592c475..f5401025f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go @@ -20,6 +20,8 @@ package cdn import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/to" + "net/http" ) // CustomDomainResourceState enumerates the values for custom domain resource @@ -59,6 +61,16 @@ const ( EndpointResourceStateStopping EndpointResourceState = "Stopping" ) +// GeoFilterActions enumerates the values for geo filter actions. +type GeoFilterActions string + +const ( + // Allow specifies the allow state for geo filter actions. + Allow GeoFilterActions = "Allow" + // Block specifies the block state for geo filter actions. + Block GeoFilterActions = "Block" +) + // OriginResourceState enumerates the values for origin resource state. type OriginResourceState string @@ -92,21 +104,6 @@ const ( ProfileResourceStateDisabled ProfileResourceState = "Disabled" ) -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // ProvisioningStateCreating specifies the provisioning state creating - // state for provisioning state. - ProvisioningStateCreating ProvisioningState = "Creating" - // ProvisioningStateFailed specifies the provisioning state failed state - // for provisioning state. - ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateSucceeded specifies the provisioning state succeeded - // state for provisioning state. - ProvisioningStateSucceeded ProvisioningState = "Succeeded" -) - // QueryStringCachingBehavior enumerates the values for query string caching // behavior. type QueryStringCachingBehavior string @@ -144,6 +141,8 @@ const ( PremiumVerizon SkuName = "Premium_Verizon" // StandardAkamai specifies the standard akamai state for sku name. StandardAkamai SkuName = "Standard_Akamai" + // StandardChinaCdn specifies the standard china cdn state for sku name. + StandardChinaCdn SkuName = "Standard_ChinaCdn" // StandardVerizon specifies the standard verizon state for sku name. StandardVerizon SkuName = "Standard_Verizon" ) @@ -157,54 +156,74 @@ type CheckNameAvailabilityInput struct { // CheckNameAvailabilityOutput is output of check name availability API. type CheckNameAvailabilityOutput struct { autorest.Response `json:"-"` - NameAvailable *bool `json:"NameAvailable,omitempty"` - Reason *string `json:"Reason,omitempty"` - Message *string `json:"Message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } -// CustomDomain is cDN CustomDomain represents a mapping between a user -// specified domain name and a CDN endpoint. This is to use custom domain -// names to represent the URLs for branding purposes. +// CustomDomain is cDN CustomDomain represents a mapping between a +// user-specified domain name and a CDN endpoint. This is to use custom +// domain names to represent the URLs for branding purposes. type CustomDomain struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Properties *CustomDomainProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *CustomDomainProperties `json:"properties,omitempty"` } -// CustomDomainListResult is +// CustomDomainListResult is result of the request to list custom domains. It +// contains a list of custom domain objects and a URL link to get the next +// set of results. type CustomDomainListResult struct { autorest.Response `json:"-"` Value *[]CustomDomain `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// CustomDomainParameters is customDomain properties required for custom +// CustomDomainListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client CustomDomainListResult) CustomDomainListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// CustomDomainParameters is the customDomain JSON object required for custom // domain creation or update. type CustomDomainParameters struct { - Properties *CustomDomainPropertiesParameters `json:"properties,omitempty"` + *CustomDomainPropertiesParameters `json:"properties,omitempty"` } -// CustomDomainProperties is +// CustomDomainProperties is the JSON object that contains the properties of +// the custom domain to create. type CustomDomainProperties struct { HostName *string `json:"hostName,omitempty"` ResourceState CustomDomainResourceState `json:"resourceState,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + ValidationData *string `json:"validationData,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// CustomDomainPropertiesParameters is +// CustomDomainPropertiesParameters is the JSON object that contains the +// properties of the custom domain to create. type CustomDomainPropertiesParameters struct { HostName *string `json:"hostName,omitempty"` } -// DeepCreatedOrigin is deep created origins within a CDN endpoint. +// DeepCreatedOrigin is origins to be added when creating a CDN endpoint. type DeepCreatedOrigin struct { - Name *string `json:"name,omitempty"` - Properties *DeepCreatedOriginProperties `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + *DeepCreatedOriginProperties `json:"properties,omitempty"` } -// DeepCreatedOriginProperties is properties of deep created origin on a CDN -// endpoint. +// DeepCreatedOriginProperties is properties of origins Properties of the +// origin created on the CDN endpoint. type DeepCreatedOriginProperties struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` @@ -216,32 +235,39 @@ type DeepCreatedOriginProperties struct { // endpoint is exposed using the URL format .azureedge.net by // default, but custom domains can also be created. type Endpoint struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *EndpointProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *EndpointProperties `json:"properties,omitempty"` } -// EndpointCreateParameters is endpoint properties required for new endpoint -// creation. -type EndpointCreateParameters struct { - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *EndpointPropertiesCreateParameters `json:"properties,omitempty"` -} - -// EndpointListResult is +// EndpointListResult is result of the request to list endpoints. It contains +// a list of endpoint objects and a URL link to get the the next set of +// results. type EndpointListResult struct { autorest.Response `json:"-"` Value *[]Endpoint `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// EndpointProperties is +// EndpointListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client EndpointListResult) EndpointListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// EndpointProperties is the JSON object that contains the properties of the +// endpoint to create. type EndpointProperties struct { - HostName *string `json:"hostName,omitempty"` OriginHostHeader *string `json:"originHostHeader,omitempty"` OriginPath *string `json:"originPath,omitempty"` ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"` @@ -249,24 +275,17 @@ type EndpointProperties struct { IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` + OptimizationType *string `json:"optimizationType,omitempty"` + GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` + HostName *string `json:"hostName,omitempty"` Origins *[]DeepCreatedOrigin `json:"origins,omitempty"` ResourceState EndpointResourceState `json:"resourceState,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// EndpointPropertiesCreateParameters is -type EndpointPropertiesCreateParameters struct { - OriginHostHeader *string `json:"originHostHeader,omitempty"` - OriginPath *string `json:"originPath,omitempty"` - ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"` - IsCompressionEnabled *bool `json:"isCompressionEnabled,omitempty"` - IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` - IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` - QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` - Origins *[]DeepCreatedOrigin `json:"origins,omitempty"` -} - -// EndpointPropertiesUpdateParameters is +// EndpointPropertiesUpdateParameters is result of the request to list +// endpoints. It contains a list of endpoints and a URL link to get the next +// set of results. type EndpointPropertiesUpdateParameters struct { OriginHostHeader *string `json:"originHostHeader,omitempty"` OriginPath *string `json:"originPath,omitempty"` @@ -275,20 +294,29 @@ type EndpointPropertiesUpdateParameters struct { IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` + OptimizationType *string `json:"optimizationType,omitempty"` + GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` } // EndpointUpdateParameters is endpoint properties required for new endpoint // creation. type EndpointUpdateParameters struct { - Tags *map[string]*string `json:"tags,omitempty"` - Properties *EndpointPropertiesUpdateParameters `json:"properties,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *EndpointPropertiesUpdateParameters `json:"properties,omitempty"` } -// ErrorResponse is +// ErrorResponse is error reponse indicates CDN service is not able to process +// the incoming request. The reason is provided in the error message. type ErrorResponse struct { - autorest.Response `json:"-"` - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// GeoFilter is geo filter of a CDN endpoint. +type GeoFilter struct { + RelativePath *string `json:"relativePath,omitempty"` + Action GeoFilterActions `json:"action,omitempty"` + CountryCodes *[]string `json:"countryCodes,omitempty"` } // LoadParameters is parameters required for endpoint load. @@ -302,17 +330,32 @@ type Operation struct { Display *OperationDisplay `json:"display,omitempty"` } -// OperationDisplay is +// OperationDisplay is the object that represents the operation. type OperationDisplay struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` Operation *string `json:"operation,omitempty"` } -// OperationListResult is +// OperationListResult is result of the request to list CDN operations. It +// contains a list of operations and a URL link to get the next set of +// results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) } // Origin is cDN origin is the source of the content being delivered via CDN. @@ -321,71 +364,98 @@ type OperationListResult struct { // configured origins. type Origin struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Properties *OriginProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *OriginProperties `json:"properties,omitempty"` } -// OriginListResult is +// OriginListResult is result of the request to list origins. It contains a +// list of origin objects and a URL link to get the next set of results. type OriginListResult struct { autorest.Response `json:"-"` Value *[]Origin `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// OriginParameters is origin properties needed for origin creation or update. -type OriginParameters struct { - Properties *OriginPropertiesParameters `json:"properties,omitempty"` +// OriginListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OriginListResult) OriginListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) } -// OriginProperties is +// OriginProperties is the JSON object that contains the properties of the +// origin to create. type OriginProperties struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` HTTPSPort *int32 `json:"httpsPort,omitempty"` ResourceState OriginResourceState `json:"resourceState,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// OriginPropertiesParameters is +// OriginPropertiesParameters is the JSON object that contains the properties +// of the origin to create. type OriginPropertiesParameters struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` HTTPSPort *int32 `json:"httpsPort,omitempty"` } +// OriginUpdateParameters is origin properties needed for origin creation or +// update. +type OriginUpdateParameters struct { + *OriginPropertiesParameters `json:"properties,omitempty"` +} + // Profile is cDN profile represents the top level resource and the entry // point into the CDN API. This allows users to set up a logical grouping of // endpoints in addition to creating shared configuration settings and // selecting pricing tiers and providers. type Profile struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Properties *ProfileProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *ProfileProperties `json:"properties,omitempty"` } -// ProfileCreateParameters is profile properties required for profile creation. -type ProfileCreateParameters struct { - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` -} - -// ProfileListResult is +// ProfileListResult is result of the request to list profiles. It contains a +// list of profile objects and a URL link to get the the next set of results. type ProfileListResult struct { autorest.Response `json:"-"` Value *[]Profile `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// ProfileProperties is +// ProfileListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ProfileListResult) ProfileListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ProfileProperties is the JSON object that contains the properties of the +// profile to create. type ProfileProperties struct { ResourceState ProfileResourceState `json:"resourceState,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } // ProfileUpdateParameters is profile properties required for profile update. @@ -398,11 +468,13 @@ type PurgeParameters struct { ContentPaths *[]string `json:"contentPaths,omitempty"` } -// Resource is +// Resource is the Resource definition. type Resource struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` } // Sku is the SKU (pricing tier) of the CDN profile. @@ -416,15 +488,6 @@ type SsoURI struct { SsoURIValue *string `json:"ssoUriValue,omitempty"` } -// TrackedResource is aRM tracked resource -type TrackedResource struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` -} - // ValidateCustomDomainInput is input of the custom domain to be validated. type ValidateCustomDomainInput struct { HostName *string `json:"hostName,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/nameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/nameavailability.go deleted file mode 100644 index f645f3746..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/nameavailability.go +++ /dev/null @@ -1,111 +0,0 @@ -package cdn - -// 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 0.17.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "net/http" -) - -// NameAvailabilityClient is the use these APIs to manage Azure CDN resources -// through the Azure Resource Manager. You must make sure that requests made -// to these resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. -type NameAvailabilityClient struct { - ManagementClient -} - -// NewNameAvailabilityClient creates an instance of the NameAvailabilityClient -// client. -func NewNameAvailabilityClient(subscriptionID string) NameAvailabilityClient { - return NewNameAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewNameAvailabilityClientWithBaseURI creates an instance of the -// NameAvailabilityClient client. -func NewNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) NameAvailabilityClient { - return NameAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckNameAvailability sends the check name availability request. -// -// checkNameAvailabilityInput is input to check. -func (client NameAvailabilityClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: checkNameAvailabilityInput, - Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "checkNameAvailabilityInput.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "cdn.NameAvailabilityClient", "CheckNameAvailability") - } - - req, err := client.CheckNameAvailabilityPreparer(checkNameAvailabilityInput) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.NameAvailabilityClient", "CheckNameAvailability", nil, "Failure preparing request") - } - - resp, err := client.CheckNameAvailabilitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.NameAvailabilityClient", "CheckNameAvailability", resp, "Failure sending request") - } - - result, err = client.CheckNameAvailabilityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.NameAvailabilityClient", "CheckNameAvailability", resp, "Failure responding to request") - } - - return -} - -// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client NameAvailabilityClient) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Cdn/checkNameAvailability"), - autorest.WithJSON(checkNameAvailabilityInput), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the -// http.Response Body if it receives an error. -func (client NameAvailabilityClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always -// closes the http.Response Body. -func (client NameAvailabilityClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityOutput, 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/arm/cdn/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go deleted file mode 100644 index e5fdef62b..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go +++ /dev/null @@ -1,98 +0,0 @@ -package cdn - -// 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 0.17.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "net/http" -) - -// OperationsClient is the use these APIs to manage Azure CDN resources -// through the Azure Resource Manager. You must make sure that requests made -// to these resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. -type OperationsClient struct { - ManagementClient -} - -// NewOperationsClient creates an instance of the OperationsClient client. -func NewOperationsClient(subscriptionID string) OperationsClient { - return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. -func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { - return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List sends the list request. -func (client OperationsClient) List() (result OperationListResult, err error) { - req, err := client.ListPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", nil, "Failure preparing request") - } - - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure sending request") - } - - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure responding to request") - } - - return -} - -// ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer() (*http.Request, error) { - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Cdn/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, 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/arm/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go index e7c67d8d3..53520b6b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go @@ -27,8 +27,7 @@ import ( // OriginsClient is the use these APIs to manage Azure CDN resources through // the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. +// resources are secure. type OriginsClient struct { ManagementClient } @@ -43,166 +42,23 @@ func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsC return OriginsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create sends the create request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Get gets an existing CDN origin within an endpoint. // -// originName is name of the origin, an arbitrary value but it needs to be -// unique under endpoint originProperties is origin properties endpointName -// is name of the endpoint within the CDN profile. profileName is name of the -// CDN profile within the resource group. resourceGroupName is name of the -// resource group within the Azure subscription. -func (client OriginsClient) Create(originName string, originProperties OriginParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. originName is name of the origin which +// is unique within the endpoint. +func (client OriginsClient) Get(resourceGroupName string, profileName string, endpointName string, originName string) (result Origin, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: originProperties, - Constraints: []validation.Constraint{{Target: "originProperties.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "originProperties.Properties.HostName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "cdn.OriginsClient", "Create") + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.OriginsClient", "Get") } - req, err := client.CreatePreparer(originName, originProperties, endpointName, profileName, resourceGroupName, cancel) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "Create", nil, "Failure preparing request") - } - - resp, err := client.CreateSender(req) - if err != nil { - result.Response = resp - return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "Create", resp, "Failure sending request") - } - - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.OriginsClient", "Create", resp, "Failure responding to request") - } - - return -} - -// CreatePreparer prepares the Create request. -func (client OriginsClient) CreatePreparer(originName string, originProperties OriginParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "endpointName": autorest.Encode("path", endpointName), - "originName": autorest.Encode("path", originName), - "profileName": autorest.Encode("path", profileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", pathParameters), - autorest.WithJSON(originProperties), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{Cancel: cancel}) -} - -// CreateSender sends the Create request. The method will close the -// http.Response Body if it receives an error. -func (client OriginsClient) CreateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, - req, - azure.DoPollForAsynchronous(client.PollingDelay)) -} - -// CreateResponder handles the response to the Create request. The method always -// closes the http.Response Body. -func (client OriginsClient) CreateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteIfExists sends the delete if exists request. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. -// -// originName is name of the origin. Must be unique within endpoint. -// endpointName is name of the endpoint within the CDN profile. profileName -// is name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client OriginsClient) DeleteIfExists(originName string, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.DeleteIfExistsPreparer(originName, endpointName, profileName, resourceGroupName, cancel) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "DeleteIfExists", nil, "Failure preparing request") - } - - resp, err := client.DeleteIfExistsSender(req) - if err != nil { - result.Response = resp - return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "DeleteIfExists", resp, "Failure sending request") - } - - result, err = client.DeleteIfExistsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.OriginsClient", "DeleteIfExists", resp, "Failure responding to request") - } - - return -} - -// DeleteIfExistsPreparer prepares the DeleteIfExists request. -func (client OriginsClient) DeleteIfExistsPreparer(originName string, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "endpointName": autorest.Encode("path", endpointName), - "originName": autorest.Encode("path", originName), - "profileName": autorest.Encode("path", profileName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{Cancel: cancel}) -} - -// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the -// http.Response Body if it receives an error. -func (client OriginsClient) DeleteIfExistsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, - req, - azure.DoPollForAsynchronous(client.PollingDelay)) -} - -// DeleteIfExistsResponder handles the response to the DeleteIfExists request. The method always -// closes the http.Response Body. -func (client OriginsClient) DeleteIfExistsResponder(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 sends the get request. -// -// originName is name of the origin, an arbitrary value but it needs to be -// unique under endpoint endpointName is name of the endpoint within the CDN -// profile. profileName is name of the CDN profile within the resource group. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client OriginsClient) Get(originName string, endpointName string, profileName string, resourceGroupName string) (result Origin, err error) { - req, err := client.GetPreparer(originName, endpointName, profileName, resourceGroupName) + req, err := client.GetPreparer(resourceGroupName, profileName, endpointName, originName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "Get", nil, "Failure preparing request") } @@ -222,7 +78,7 @@ func (client OriginsClient) Get(originName string, endpointName string, profileN } // GetPreparer prepares the Get request. -func (client OriginsClient) GetPreparer(originName string, endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { +func (client OriginsClient) GetPreparer(resourceGroupName string, profileName string, endpointName string, originName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "originName": autorest.Encode("path", originName), @@ -262,13 +118,22 @@ func (client OriginsClient) GetResponder(resp *http.Response) (result Origin, er return } -// ListByEndpoint sends the list by endpoint request. +// ListByEndpoint lists the existing CDN origins within an endpoint. // -// endpointName is name of the endpoint within the CDN profile. profileName is -// name of the CDN profile within the resource group. resourceGroupName is -// name of the resource group within the Azure subscription. -func (client OriginsClient) ListByEndpoint(endpointName string, profileName string, resourceGroupName string) (result OriginListResult, err error) { - req, err := client.ListByEndpointPreparer(endpointName, profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. +func (client OriginsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result OriginListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.OriginsClient", "ListByEndpoint") + } + + req, err := client.ListByEndpointPreparer(resourceGroupName, profileName, endpointName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "ListByEndpoint", nil, "Failure preparing request") } @@ -288,7 +153,7 @@ func (client OriginsClient) ListByEndpoint(endpointName string, profileName stri } // ListByEndpointPreparer prepares the ListByEndpoint request. -func (client OriginsClient) ListByEndpointPreparer(endpointName string, profileName string, resourceGroupName string) (*http.Request, error) { +func (client OriginsClient) ListByEndpointPreparer(resourceGroupName string, profileName string, endpointName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "profileName": autorest.Encode("path", profileName), @@ -327,17 +192,50 @@ func (client OriginsClient) ListByEndpointResponder(resp *http.Response) (result return } -// Update sends the update request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// ListByEndpointNextResults retrieves the next set of results, if any. +func (client OriginsClient) ListByEndpointNextResults(lastResults OriginListResult) (result OriginListResult, err error) { + req, err := lastResults.OriginListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "ListByEndpoint", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByEndpointSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "ListByEndpoint", resp, "Failure sending next results request") + } + + result, err = client.ListByEndpointResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.OriginsClient", "ListByEndpoint", resp, "Failure responding to next results request") + } + + return +} + +// Update updates an existing CDN origin within an endpoint. This method may +// poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// originName is name of the origin. Must be unique within endpoint. -// originProperties is origin properties endpointName is name of the endpoint -// within the CDN profile. profileName is name of the CDN profile within the -// resource group. resourceGroupName is name of the resource group within the -// Azure subscription. -func (client OriginsClient) Update(originName string, originProperties OriginParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.UpdatePreparer(originName, originProperties, endpointName, profileName, resourceGroupName, cancel) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. endpointName is name of the endpoint under the +// profile which is unique globally. originName is name of the origin which +// is unique within the endpoint. originUpdateProperties is origin properties +func (client OriginsClient) Update(resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.OriginsClient", "Update") + } + + req, err := client.UpdatePreparer(resourceGroupName, profileName, endpointName, originName, originUpdateProperties, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "Update", nil, "Failure preparing request") } @@ -357,7 +255,7 @@ func (client OriginsClient) Update(originName string, originProperties OriginPar } // UpdatePreparer prepares the Update request. -func (client OriginsClient) UpdatePreparer(originName string, originProperties OriginParameters, endpointName string, profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client OriginsClient) UpdatePreparer(resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "endpointName": autorest.Encode("path", endpointName), "originName": autorest.Encode("path", originName), @@ -375,7 +273,7 @@ func (client OriginsClient) UpdatePreparer(originName string, originProperties O autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}", pathParameters), - autorest.WithJSON(originProperties), + autorest.WithJSON(originUpdateProperties), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go index f1ef66570..47f12b69e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go @@ -27,8 +27,7 @@ import ( // ProfilesClient is the use these APIs to manage Azure CDN resources through // the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. For more information, see -// https://msdn.microsoft.com/en-us/library/azure/dn790557.aspx. +// resources are secure. type ProfilesClient struct { ManagementClient } @@ -44,23 +43,31 @@ func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) Profile return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create sends the create request. This method may poll for completion. +// Create creates a new CDN profile with a profile name under the specified +// subscription and resource group. This method may poll for completion. // Polling can be canceled by passing the cancel channel argument. The // channel will be used to cancel polling and any outstanding HTTP requests. // -// profileName is name of the CDN profile within the resource group. -// profileProperties is profile properties needed for creation. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client ProfilesClient) Create(profileName string, profileProperties ProfileCreateParameters, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. profile is profile properties needed to create +// a new profile. +func (client ProfilesClient) Create(resourceGroupName string, profileName string, profile Profile, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: profileProperties, - Constraints: []validation.Constraint{{Target: "profileProperties.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "profileProperties.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: profile, + Constraints: []validation.Constraint{{Target: "profile.Sku", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "profile.ProfileProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "profile.ProfileProperties.ResourceState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "profile.ProfileProperties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "Create") } - req, err := client.CreatePreparer(profileName, profileProperties, resourceGroupName, cancel) + req, err := client.CreatePreparer(resourceGroupName, profileName, profile, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Create", nil, "Failure preparing request") } @@ -80,7 +87,7 @@ func (client ProfilesClient) Create(profileName string, profileProperties Profil } // CreatePreparer prepares the Create request. -func (client ProfilesClient) CreatePreparer(profileName string, profileProperties ProfileCreateParameters, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client ProfilesClient) CreatePreparer(resourceGroupName string, profileName string, profile Profile, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -96,7 +103,7 @@ func (client ProfilesClient) CreatePreparer(profileName string, profilePropertie autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", pathParameters), - autorest.WithJSON(profileProperties), + autorest.WithJSON(profile), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -121,36 +128,46 @@ func (client ProfilesClient) CreateResponder(resp *http.Response) (result autore return } -// DeleteIfExists sends the delete if exists request. This method may poll for +// Delete deletes an existing CDN profile with the specified parameters. +// Deleting a profile will result in the deletion of all subresources +// including endpoints, origins and custom domains. This method may poll for // completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // -// profileName is name of the CDN profile within the resource group. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client ProfilesClient) DeleteIfExists(profileName string, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.DeleteIfExistsPreparer(profileName, resourceGroupName, cancel) - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "DeleteIfExists", nil, "Failure preparing request") +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. +func (client ProfilesClient) Delete(resourceGroupName string, profileName string, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "Delete") } - resp, err := client.DeleteIfExistsSender(req) + req, err := client.DeletePreparer(resourceGroupName, profileName, cancel) + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Delete", nil, "Failure preparing request") + } + + resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "DeleteIfExists", resp, "Failure sending request") + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Delete", resp, "Failure sending request") } - result, err = client.DeleteIfExistsResponder(resp) + result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "DeleteIfExists", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Delete", resp, "Failure responding to request") } return } -// DeleteIfExistsPreparer prepares the DeleteIfExists request. -func (client ProfilesClient) DeleteIfExistsPreparer(profileName string, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +// DeletePreparer prepares the Delete request. +func (client ProfilesClient) DeletePreparer(resourceGroupName string, profileName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -169,17 +186,17 @@ func (client ProfilesClient) DeleteIfExistsPreparer(profileName string, resource return preparer.Prepare(&http.Request{Cancel: cancel}) } -// DeleteIfExistsSender sends the DeleteIfExists request. The method will close the +// DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client ProfilesClient) DeleteIfExistsSender(req *http.Request) (*http.Response, error) { +func (client ProfilesClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoPollForAsynchronous(client.PollingDelay)) } -// DeleteIfExistsResponder handles the response to the DeleteIfExists request. The method always +// DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ProfilesClient) DeleteIfExistsResponder(resp *http.Response) (result autorest.Response, err error) { +func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -189,13 +206,26 @@ func (client ProfilesClient) DeleteIfExistsResponder(resp *http.Response) (resul return } -// GenerateSsoURI sends the generate sso uri request. +// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN +// supplemental portal. Supplemnetal portal is used to configure advanced +// feature capabilities that are not yet available in the Azure portal, such +// as core reports in a standard profile; rules engine, advanced HTTP +// reports, and real-time stats and alerts in a premium profile. The SSO URI +// changes approximately every 10 minutes. // -// profileName is name of the CDN profile within the resource group. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client ProfilesClient) GenerateSsoURI(profileName string, resourceGroupName string) (result SsoURI, err error) { - req, err := client.GenerateSsoURIPreparer(profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. +func (client ProfilesClient) GenerateSsoURI(resourceGroupName string, profileName string) (result SsoURI, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "GenerateSsoURI") + } + + req, err := client.GenerateSsoURIPreparer(resourceGroupName, profileName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "GenerateSsoURI", nil, "Failure preparing request") } @@ -215,7 +245,7 @@ func (client ProfilesClient) GenerateSsoURI(profileName string, resourceGroupNam } // GenerateSsoURIPreparer prepares the GenerateSsoURI request. -func (client ProfilesClient) GenerateSsoURIPreparer(profileName string, resourceGroupName string) (*http.Request, error) { +func (client ProfilesClient) GenerateSsoURIPreparer(resourceGroupName string, profileName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -253,13 +283,22 @@ func (client ProfilesClient) GenerateSsoURIResponder(resp *http.Response) (resul return } -// Get sends the get request. +// Get gets a CDN profile with the specified profile name under the specified +// subscription and resource group. // -// profileName is name of the CDN profile within the resource group. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client ProfilesClient) Get(profileName string, resourceGroupName string) (result Profile, err error) { - req, err := client.GetPreparer(profileName, resourceGroupName) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. +func (client ProfilesClient) Get(resourceGroupName string, profileName string) (result Profile, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, profileName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Get", nil, "Failure preparing request") } @@ -279,7 +318,7 @@ func (client ProfilesClient) Get(profileName string, resourceGroupName string) ( } // GetPreparer prepares the Get request. -func (client ProfilesClient) GetPreparer(profileName string, resourceGroupName string) (*http.Request, error) { +func (client ProfilesClient) GetPreparer(resourceGroupName string, profileName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -317,11 +356,101 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, return } -// ListByResourceGroup sends the list by resource group request. +// List lists all the CDN profiles within an Azure subscription. +func (client ProfilesClient) List() (result ProfileListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "List", nil, "Failure preparing request") + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "List", resp, "Failure sending request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProfilesClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": client.APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProfilesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListResponder(resp *http.Response) (result ProfileListResult, 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 ProfilesClient) ListNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) { + req, err := lastResults.ProfileListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "List", 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, "cdn.ProfilesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroup lists all the CDN profiles within a resource group. // -// resourceGroupName is name of the resource group within the Azure +// resourceGroupName is name of the Resource group within the Azure // subscription. func (client ProfilesClient) ListByResourceGroup(resourceGroupName string) (result ProfileListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "ListByResourceGroup") + } + req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListByResourceGroup", nil, "Failure preparing request") @@ -379,74 +508,50 @@ func (client ProfilesClient) ListByResourceGroupResponder(resp *http.Response) ( return } -// ListBySubscriptionID sends the list by subscription id request. -func (client ProfilesClient) ListBySubscriptionID() (result ProfileListResult, err error) { - req, err := client.ListBySubscriptionIDPreparer() +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client ProfilesClient) ListByResourceGroupNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) { + req, err := lastResults.ProfileListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListBySubscriptionID", nil, "Failure preparing request") + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return } - resp, err := client.ListBySubscriptionIDSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListBySubscriptionID", resp, "Failure sending request") + return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListByResourceGroup", resp, "Failure sending next results request") } - result, err = client.ListBySubscriptionIDResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListBySubscriptionID", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListByResourceGroup", resp, "Failure responding to next results request") } return } -// ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request. -func (client ProfilesClient) ListBySubscriptionIDPreparer() (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - queryParameters := map[string]interface{}{ - "api-version": client.APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the -// http.Response Body if it receives an error. -func (client ProfilesClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always -// closes the http.Response Body. -func (client ProfilesClient) ListBySubscriptionIDResponder(resp *http.Response) (result ProfileListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update sends the update request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Update updates an existing CDN profile with the specified profile name +// under the specified subscription and resource group. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// profileName is name of the CDN profile within the resource group. -// profileProperties is profile properties needed for update. -// resourceGroupName is name of the resource group within the Azure -// subscription. -func (client ProfilesClient) Update(profileName string, profileProperties ProfileUpdateParameters, resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.UpdatePreparer(profileName, profileProperties, resourceGroupName, cancel) +// resourceGroupName is name of the Resource group within the Azure +// subscription. profileName is name of the CDN profile which is unique +// within the resource group. profileUpdateParameters is profile properties +// needed to update an existing profile. +func (client ProfilesClient) Update(resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "Update") + } + + req, err := client.UpdatePreparer(resourceGroupName, profileName, profileUpdateParameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "Update", nil, "Failure preparing request") } @@ -466,7 +571,7 @@ func (client ProfilesClient) Update(profileName string, profileProperties Profil } // UpdatePreparer prepares the Update request. -func (client ProfilesClient) UpdatePreparer(profileName string, profileProperties ProfileUpdateParameters, resourceGroupName string, cancel <-chan struct{}) (*http.Request, error) { +func (client ProfilesClient) UpdatePreparer(resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "profileName": autorest.Encode("path", profileName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -482,7 +587,7 @@ func (client ProfilesClient) UpdatePreparer(profileName string, profilePropertie autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}", pathParameters), - autorest.WithJSON(profileProperties), + autorest.WithJSON(profileUpdateParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go index 9d0149f5a..258937cd0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" @@ -34,7 +34,7 @@ const ( // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return fmt.Sprintf(userAgentFormat, Version(), "cdn", "2016-04-02") + return fmt.Sprintf(userAgentFormat, Version(), "cdn", "2016-10-02") } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go index f1789c9b9..34a4d2df8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go @@ -42,16 +42,16 @@ func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the operation to create or update the availability set. +// CreateOrUpdate create or update an availability set. // -// resourceGroupName is the name of the resource group. name is parameters -// supplied to the Create Availability Set operation. parameters is -// parameters supplied to the Create Availability Set operation. +// resourceGroupName is the name of the resource group. name is the name of +// the availability set. parameters is parameters supplied to the Create +// Availability Set operation. func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters AvailabilitySet) (result AvailabilitySet, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Statuses", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.AvailabilitySetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AvailabilitySetProperties.Statuses", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate") } @@ -115,7 +115,7 @@ func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response return } -// Delete the operation to delete the availability set. +// Delete delete an availability set. // // resourceGroupName is the name of the resource group. availabilitySetName is // the name of the availability set. @@ -177,7 +177,7 @@ func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (resul return } -// Get the operation to get the availability set. +// Get retrieves information about an availability set. // // resourceGroupName is the name of the resource group. availabilitySetName is // the name of the availability set. @@ -240,7 +240,7 @@ func (client AvailabilitySetsClient) GetResponder(resp *http.Response) (result A return } -// List the operation to list the availability sets. +// List lists all availability sets in a resource group. // // resourceGroupName is the name of the resource group. func (client AvailabilitySetsClient) List(resourceGroupName string) (result AvailabilitySetListResult, err error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go index 80570cb86..13dbe637c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go @@ -365,15 +365,15 @@ type APIErrorBase struct { Message *string `json:"message,omitempty"` } -// AvailabilitySet is create or update Availability Set parameters. +// AvailabilitySet is create or update availability set parameters. type AvailabilitySet struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *AvailabilitySetProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *AvailabilitySetProperties `json:"properties,omitempty"` } // AvailabilitySetListResult is the List Availability Set operation response. @@ -477,7 +477,7 @@ type KeyVaultSecretReference struct { SourceVault *SubResource `json:"sourceVault,omitempty"` } -// LinuxConfiguration is describes Windows Configuration of the OS Profile. +// LinuxConfiguration is describes Windows configuration of the OS Profile. type LinuxConfiguration struct { DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` SSH *SSHConfiguration `json:"ssh,omitempty"` @@ -522,8 +522,8 @@ type LongRunningOperationProperties struct { // NetworkInterfaceReference is describes a network interface reference. type NetworkInterfaceReference struct { - ID *string `json:"id,omitempty"` - Properties *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` } // NetworkInterfaceReferenceProperties is describes a network interface @@ -581,7 +581,7 @@ type PurchasePlan struct { Product *string `json:"product,omitempty"` } -// Resource is the Resource model definition. +// Resource is the resource model definition. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -661,15 +661,15 @@ type VirtualHardDisk struct { // VirtualMachine is describes a Virtual Machine. type VirtualMachine struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Plan *Plan `json:"plan,omitempty"` - Properties *VirtualMachineProperties `json:"properties,omitempty"` - Resources *[]VirtualMachineExtension `json:"resources,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineProperties `json:"properties,omitempty"` + Resources *[]VirtualMachineExtension `json:"resources,omitempty"` } // VirtualMachineAgentInstanceView is the instance view of the VM Agent @@ -689,9 +689,9 @@ type VirtualMachineCaptureParameters struct { // VirtualMachineCaptureResult is resource Id. type VirtualMachineCaptureResult struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *VirtualMachineCaptureResultProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *VirtualMachineCaptureResultProperties `json:"properties,omitempty"` } // VirtualMachineCaptureResultProperties is compute-specific operation @@ -702,13 +702,13 @@ type VirtualMachineCaptureResultProperties struct { // VirtualMachineExtension is describes a Virtual Machine Extension. type VirtualMachineExtension struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualMachineExtensionProperties `json:"properties,omitempty"` } // VirtualMachineExtensionHandlerInstanceView is the instance view of a @@ -721,13 +721,13 @@ type VirtualMachineExtensionHandlerInstanceView struct { // VirtualMachineExtensionImage is describes a Virtual Machine Extension Image. type VirtualMachineExtensionImage struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualMachineExtensionImageProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualMachineExtensionImageProperties `json:"properties,omitempty"` } // VirtualMachineExtensionImageProperties is describes the properties of a @@ -766,12 +766,12 @@ type VirtualMachineExtensionProperties struct { // VirtualMachineImage is describes a Virtual Machine Image. type VirtualMachineImage struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualMachineImageProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualMachineImageProperties `json:"properties,omitempty"` } // VirtualMachineImageProperties is describes the properties of a Virtual @@ -837,22 +837,22 @@ type VirtualMachineProperties struct { // VirtualMachineScaleSet is describes a Virtual Machine Scale Set. type VirtualMachineScaleSet struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Properties *VirtualMachineScaleSetProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *VirtualMachineScaleSetProperties `json:"properties,omitempty"` } // VirtualMachineScaleSetExtension is describes a Virtual Machine Scale Set // Extension. type VirtualMachineScaleSetExtension struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` } // VirtualMachineScaleSetExtensionProfile is describes a virtual machine scale @@ -891,9 +891,9 @@ type VirtualMachineScaleSetInstanceViewStatusesSummary struct { // VirtualMachineScaleSetIPConfiguration is describes a virtual machine scale // set network profile's IP configuration. type VirtualMachineScaleSetIPConfiguration struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` } // VirtualMachineScaleSetIPConfigurationProperties is describes a virtual @@ -968,9 +968,9 @@ func (client VirtualMachineScaleSetListWithLinkResult) VirtualMachineScaleSetLis // VirtualMachineScaleSetNetworkConfiguration is describes a virtual machine // scale set network profile's network configurations. type VirtualMachineScaleSetNetworkConfiguration struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` } // VirtualMachineScaleSetNetworkConfigurationProperties is describes a virtual @@ -1044,17 +1044,17 @@ type VirtualMachineScaleSetStorageProfile struct { // VirtualMachineScaleSetVM is describes a virtual machine scale set virtual // machine. type VirtualMachineScaleSetVM struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - InstanceID *string `json:"instanceId,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Properties *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` - Plan *Plan `json:"plan,omitempty"` - Resources *[]VirtualMachineExtension `json:"resources,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"` + Plan *Plan `json:"plan,omitempty"` + Resources *[]VirtualMachineExtension `json:"resources,omitempty"` } // VirtualMachineScaleSetVMExtensionsSummary is extensions summary for virtual @@ -1064,14 +1064,14 @@ type VirtualMachineScaleSetVMExtensionsSummary struct { StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` } -// VirtualMachineScaleSetVMInstanceIDs is specifies the list of virtual -// machine scale set instance IDs. +// VirtualMachineScaleSetVMInstanceIDs is specifies a list of virtual machine +// instance IDs from the VM scale set. type VirtualMachineScaleSetVMInstanceIDs struct { InstanceIds *[]string `json:"instanceIds,omitempty"` } -// VirtualMachineScaleSetVMInstanceRequiredIDs is specifies the list of -// virtual machine scale set instance IDs. +// VirtualMachineScaleSetVMInstanceRequiredIDs is specifies a list of virtual +// machine instance IDs from the VM scale set. type VirtualMachineScaleSetVMInstanceRequiredIDs struct { InstanceIds *[]string `json:"instanceIds,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usageoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usageoperations.go index 474c7ca9f..5fb5bd6f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usageoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usageoperations.go @@ -42,9 +42,11 @@ func NewUsageOperationsClientWithBaseURI(baseURI string, subscriptionID string) return UsageOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists compute usages for a subscription. +// List gets, for the specified location, the current compute resource usage +// information as well as the limits for compute resources under the +// subscription. // -// location is the location upon which resource usage is queried. +// location is the location for which resource usage is queried. func (client UsageOperationsClient) List(location string) (result ListUsagesResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: location, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go index c66fb8c31..3c4783ed6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go index dbbce547a..d94a2b968 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go @@ -55,8 +55,8 @@ func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID func (client VirtualMachineExtensionsClient) CreateOrUpdate(resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: extensionParameters, - Constraints: []validation.Constraint{{Target: "extensionParameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "extensionParameters.Properties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "extensionParameters.VirtualMachineExtensionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "extensionParameters.VirtualMachineExtensionProperties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate") } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go index 50d961460..db1877789 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go @@ -43,6 +43,9 @@ func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID str // Get gets a virtual machine image. // +// location is the name of a supported Azure region. publisherName is a valid +// image publisher. offer is a valid image publisher offer. skus is a valid +// image SKU. version is a valid image SKU version. func (client VirtualMachineImagesClient) Get(location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) { req, err := client.GetPreparer(location, publisherName, offer, skus, version) if err != nil { @@ -105,9 +108,12 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu return } -// List gets a list of virtual machine images. +// List gets a list of all virtual machine image versions for the specified +// location, publisher, offer, and SKU. // -// filter is the filter to apply on the operation. +// location is the name of a supported Azure region. publisherName is a valid +// image publisher. offer is a valid image publisher offer. skus is a valid +// image SKU. filter is the filter to apply on the operation. func (client VirtualMachineImagesClient) List(location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListPreparer(location, publisherName, offer, skus, filter, top, orderby) if err != nil { @@ -178,8 +184,11 @@ func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (res return } -// ListOffers gets a list of virtual machine image offers. +// ListOffers gets a list of virtual machine image offers for the specified +// location and publisher. // +// location is the name of a supported Azure region. publisherName is a valid +// image publisher. func (client VirtualMachineImagesClient) ListOffers(location string, publisherName string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListOffersPreparer(location, publisherName) if err != nil { @@ -239,8 +248,10 @@ func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response return } -// ListPublishers gets a list of virtual machine image publishers. +// ListPublishers gets a list of virtual machine image publishers for the +// specified Azure location. // +// location is the name of a supported Azure region. func (client VirtualMachineImagesClient) ListPublishers(location string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListPublishersPreparer(location) if err != nil { @@ -299,8 +310,11 @@ func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Resp return } -// ListSkus gets a list of virtual machine image skus. +// ListSkus gets a list of virtual machine image SKUs for the specified +// location, publisher, and offer. // +// location is the name of a supported Azure region. publisherName is a valid +// image publisher. offer is a valid image publisher offer. func (client VirtualMachineImagesClient) ListSkus(location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListSkusPreparer(location, publisherName, offer) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go index 8b044e774..626319737 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go @@ -132,26 +132,26 @@ func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (resul func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, vmName string, parameters VirtualMachine, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, }}, - {Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, }}, }}, - {Target: "parameters.Properties.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties.StorageProfile.OsDisk.Vhd", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.Vhd", Name: validation.Null, Rule: true, Chain: nil}, }}, }}, - {Target: "parameters.Properties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "parameters.Properties.InstanceView", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "parameters.Properties.VMID", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.InstanceView", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineProperties.VMID", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}, {Target: "parameters.Resources", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachinesClient", "CreateOrUpdate") @@ -218,9 +218,9 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Deallocate shuts down the Virtual Machine and releases the compute -// resources. You are not billed for the compute resources that this Virtual -// Machine uses. This method may poll for completion. Polling can be canceled +// Deallocate shuts down the virtual machine and releases the compute +// resources. You are not billed for the compute resources that this virtual +// machine uses. This method may poll for completion. Polling can be canceled // by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // @@ -353,7 +353,7 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result return } -// Generalize sets the state of the VM as Generalized. +// Generalize sets the state of the virtual machine to generalized. // // resourceGroupName is the name of the resource group. vmName is the name of // the virtual machine. @@ -415,7 +415,8 @@ func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (re return } -// Get the operation to get a virtual machine. +// Get retrieves information about the model view or the instance view of a +// virtual machine. // // resourceGroupName is the name of the resource group. vmName is the name of // the virtual machine. expand is the expand expression to apply on the @@ -482,7 +483,9 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result Vi return } -// List the operation to list virtual machines under a resource group. +// List lists all of the virtual machines in the specified resource group. Use +// the nextLink property in the response to get the next page of virtual +// machines. // // resourceGroupName is the name of the resource group. func (client VirtualMachinesClient) List(resourceGroupName string) (result VirtualMachineListResult, err error) { @@ -567,9 +570,9 @@ func (client VirtualMachinesClient) ListNextResults(lastResults VirtualMachineLi return } -// ListAll gets the list of Virtual Machines in the subscription. Use nextLink -// property in the response to get the next page of Virtual Machines. Do this -// till nextLink is not null to fetch all the Virtual Machines. +// ListAll lists all of the virtual machines in the specified subscription. +// Use the nextLink property in the response to get the next page of virtual +// machines. func (client VirtualMachinesClient) ListAll() (result VirtualMachineListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -651,8 +654,8 @@ func (client VirtualMachinesClient) ListAllNextResults(lastResults VirtualMachin return } -// ListAvailableSizes lists all available virtual machine sizes it can be -// resized to for a virtual machine. +// ListAvailableSizes lists all available virtual machine sizes to which the +// specified virtual machine can be resized. // // resourceGroupName is the name of the resource group. vmName is the name of // the virtual machine. @@ -715,10 +718,12 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo return } -// PowerOff the operation to power off (stop) a virtual machine. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// PowerOff the operation to power off (stop) a virtual machine. The virtual +// machine can be restarted with the same provisioned resources. You are +// still charged for this virtual machine. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. vmName is the name of // the virtual machine. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go index f2b92a26a..648e9fa4a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go @@ -42,26 +42,24 @@ func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate allows you to create or update a virtual machine scale set -// by providing parameters or a path to pre-configured parameter file. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// CreateOrUpdate create or update a VM scale set. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group. name is parameters -// supplied to the Create Virtual Machine Scale Set operation. parameters is -// parameters supplied to the Create Virtual Machine Scale Set operation. +// resourceGroupName is the name of the resource group. name is the name of +// the VM scale set to create or update. parameters is the scale set object. func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.VirtualMachineProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.VirtualMachineProfile.StorageProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.VirtualMachineProfile.StorageProfile.OsDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.VirtualMachineProfile.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.VirtualMachineProfile.StorageProfile.OsDisk.Name", Name: validation.Null, Rule: true, Chain: nil}}}, }}, }}, - {Target: "parameters.Properties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate") } @@ -127,16 +125,16 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.R return } -// Deallocate allows you to deallocate virtual machines in a virtual machine -// scale set. Shuts down the virtual machines and releases the compute -// resources. You are not billed for the compute resources that this virtual -// machine scale set uses. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Deallocate deallocates specific virtual machines in a VM scale set. Shuts +// down the virtual machines and releases the compute resources. You are not +// billed for the compute resources that this virtual machine scale set +// deallocates. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Deallocate(resourceGroupName string, vmScaleSetName string, vmInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeallocatePreparer(resourceGroupName, vmScaleSetName, vmInstanceIDs, cancel) if err != nil { @@ -202,13 +200,12 @@ func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Respo return } -// Delete allows you to delete a virtual machine scale set. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes a VM scale set. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will +// be used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. +// name of the VM scale set. func (client VirtualMachineScaleSetsClient) Delete(resourceGroupName string, vmScaleSetName string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, vmScaleSetName, cancel) if err != nil { @@ -269,14 +266,14 @@ func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response) return } -// DeleteInstances allows you to delete virtual machines in a virtual machine -// scale set. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// DeleteInstances deletes virtual machines in a VM scale set. This method may +// poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) DeleteInstances(resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: vmInstanceIDs, @@ -348,7 +345,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http. // Get display information about a virtual machine scale set. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. +// name of the VM scale set. func (client VirtualMachineScaleSetsClient) Get(resourceGroupName string, vmScaleSetName string) (result VirtualMachineScaleSet, err error) { req, err := client.GetPreparer(resourceGroupName, vmScaleSetName) if err != nil { @@ -408,10 +405,10 @@ func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (r return } -// GetInstanceView displays status of a virtual machine scale set instance. +// GetInstanceView gets the status of a VM scale set instance. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. +// name of the VM scale set. func (client VirtualMachineScaleSetsClient) GetInstanceView(resourceGroupName string, vmScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) { req, err := client.GetInstanceViewPreparer(resourceGroupName, vmScaleSetName) if err != nil { @@ -471,7 +468,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewResponder(resp *http. return } -// List lists all virtual machine scale sets under a resource group. +// List gets a list of all VM scale sets under a resource group. // // resourceGroupName is the name of the resource group. func (client VirtualMachineScaleSetsClient) List(resourceGroupName string) (result VirtualMachineScaleSetListResult, err error) { @@ -556,10 +553,10 @@ func (client VirtualMachineScaleSetsClient) ListNextResults(lastResults VirtualM return } -// ListAll lists all Virtual Machine Scale Sets in the subscription. Use -// nextLink property in the response to get the next page of Virtual Machine -// Scale Sets. Do this till nextLink is not null to fetch all the Virtual -// Machine Scale Sets. +// ListAll gets a list of all VM Scale Sets in the subscription, regardless of +// the associated resource group. Use nextLink property in the response to +// get the next page of VM Scale Sets. Do this till nextLink is not null to +// fetch all the VM Scale Sets. func (client VirtualMachineScaleSetsClient) ListAll() (result VirtualMachineScaleSetListWithLinkResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -641,12 +638,11 @@ func (client VirtualMachineScaleSetsClient) ListAllNextResults(lastResults Virtu return } -// ListSkus displays available skus for your virtual machine scale set -// including the minimum and maximum vm instances allowed for a particular -// sku. +// ListSkus gets a list of SKUs available for your VM scale set, including the +// minimum and maximum VM instances allowed for each SKU. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. +// name of the VM scale set. func (client VirtualMachineScaleSetsClient) ListSkus(resourceGroupName string, vmScaleSetName string) (result VirtualMachineScaleSetListSkusResult, err error) { req, err := client.ListSkusPreparer(resourceGroupName, vmScaleSetName) if err != nil { @@ -730,16 +726,16 @@ func (client VirtualMachineScaleSetsClient) ListSkusNextResults(lastResults Virt return } -// PowerOff allows you to power off (stop) virtual machines in a virtual -// machine scale set. Note that resources are still attached and you are -// getting charged for the resources. Use deallocate to release resources. +// PowerOff power off (stop) one or more virtual machines in a VM scale set. +// Note that resources are still attached and you are getting charged for the +// resources. Instead, use deallocate to release resources and avoid charges. // This method may poll for completion. Polling can be canceled by passing // the cancel channel argument. The channel will be used to cancel polling // and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) PowerOff(resourceGroupName string, vmScaleSetName string, vmInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.PowerOffPreparer(resourceGroupName, vmScaleSetName, vmInstanceIDs, cancel) if err != nil { @@ -805,14 +801,13 @@ func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Respons return } -// Reimage allows you to re-image(update the version of the installed -// operating system) virtual machines in a virtual machine scale set. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// Reimage reimages (upgrade the operating system) one or more virtual +// machines in a VM scale set. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will +// be used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. +// name of the VM scale set. func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, vmScaleSetName string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.ReimagePreparer(resourceGroupName, vmScaleSetName, cancel) if err != nil { @@ -873,14 +868,14 @@ func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response return } -// Restart allows you to restart virtual machines in a virtual machine scale -// set. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Restart restarts one or more virtual machines in a VM scale set. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Restart(resourceGroupName string, vmScaleSetName string, vmInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.RestartPreparer(resourceGroupName, vmScaleSetName, vmInstanceIDs, cancel) if err != nil { @@ -946,14 +941,14 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response return } -// Start allows you to start virtual machines in a virtual machine scale set. -// This method may poll for completion. Polling can be canceled by passing -// the cancel channel argument. The channel will be used to cancel polling -// and any outstanding HTTP requests. +// Start starts one or more virtual machines in a VM scale set. This method +// may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Start(resourceGroupName string, vmScaleSetName string, vmInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.StartPreparer(resourceGroupName, vmScaleSetName, vmInstanceIDs, cancel) if err != nil { @@ -1019,14 +1014,14 @@ func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) return } -// UpdateInstances allows you to manually upgrade virtual machines in a -// virtual machine scale set. This method may poll for completion. Polling +// UpdateInstances upgrades one or more virtual machines to the latest SKU set +// in the VM scale set model. This method may poll for completion. Polling // can be canceled by passing the cancel channel argument. The channel will // be used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. vmInstanceIDs is the list of -// virtual machine scale set instance IDs. +// name of the VM scale set. vmInstanceIDs is a list of virtual machine +// instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) UpdateInstances(resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: vmInstanceIDs, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go index 37f2be317..f0b309510 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go @@ -41,16 +41,16 @@ func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionI return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Deallocate allows you to deallocate a virtual machine scale set virtual -// machine. Shuts down the virtual machine and releases the compute -// resources. You are not billed for the compute resources that this virtual -// machine uses. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts +// down the virtual machine and releases the compute resources it uses. You +// are not billed for the compute resources of this virtual machine once it +// is deallocated. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Deallocate(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeallocatePreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { @@ -112,14 +112,14 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Res return } -// Delete allows you to delete a virtual machine scale set. This method may -// poll for completion. Polling can be canceled by passing the cancel channel +// Delete deletes a virtual machine from a VM scale set. This method may poll +// for completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Delete(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { @@ -181,11 +181,11 @@ func (client VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Respons return } -// Get displays information about a virtual machine scale set virtual machine. +// Get gets a virtual machine from a VM scale set. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Get(resourceGroupName string, vmScaleSetName string, instanceID string) (result VirtualMachineScaleSetVM, err error) { req, err := client.GetPreparer(resourceGroupName, vmScaleSetName, instanceID) if err != nil { @@ -246,12 +246,11 @@ func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) return } -// GetInstanceView displays the status of a virtual machine scale set virtual -// machine. +// GetInstanceView gets the status of a virtual machine from a VM scale set. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) GetInstanceView(resourceGroupName string, vmScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) { req, err := client.GetInstanceViewPreparer(resourceGroupName, vmScaleSetName, instanceID) if err != nil { @@ -312,13 +311,12 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *htt return } -// List lists all virtual machines in a VM scale sets. +// List gets a list of all virtual machines in a VM scale sets. // // resourceGroupName is the name of the resource group. -// virtualMachineScaleSetName is the name of the virtual machine scale set. -// filter is the filter to apply on the operation. selectParameter is the -// list parameters. expand is the expand expression to apply on the -// operation. +// virtualMachineScaleSetName is the name of the VM scale set. filter is the +// filter to apply to the operation. selectParameter is the list parameters. +// expand is the expand expression to apply to the operation. func (client VirtualMachineScaleSetVMsClient) List(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResult, err error) { req, err := client.ListPreparer(resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand) if err != nil { @@ -411,14 +409,16 @@ func (client VirtualMachineScaleSetVMsClient) ListNextResults(lastResults Virtua return } -// PowerOff allows you to power off (stop) a virtual machine in a VM scale -// set. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// PowerOff power off (stop) a virtual machine in a VM scale set. Note that +// resources are still attached and you are getting charged for the +// resources. Instead, use deallocate to release resources and avoid charges. +// This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling +// and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) PowerOff(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.PowerOffPreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { @@ -480,15 +480,14 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Respo return } -// Reimage allows you to re-image(update the version of the installed -// operating system) a virtual machine scale set instance. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Reimage reimages (upgrade the operating system) a specific virtual machine +// in a VM scale set. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Reimage(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.ReimagePreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { @@ -550,14 +549,14 @@ func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Respon return } -// Restart allows you to restart a virtual machine in a VM scale set. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// Restart restarts a virtual machine in a VM scale set. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Restart(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.RestartPreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { @@ -619,14 +618,14 @@ func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Respon return } -// Start allows you to start a virtual machine in a VM scale set. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Start starts a virtual machine in a VM scale set. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. vmScaleSetName is the -// name of the virtual machine scale set. instanceID is the instance id of -// the virtual machine. +// name of the VM scale set. instanceID is the instance ID of the virtual +// machine. func (client VirtualMachineScaleSetVMsClient) Start(resourceGroupName string, vmScaleSetName string, instanceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.StartPreparer(resourceGroupName, vmScaleSetName, instanceID, cancel) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go index e5bdd8e2d..5eb6b5401 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go @@ -1,7 +1,7 @@ // Package eventhub implements the Azure ARM Eventhub service API version // 2015-08-01. // -// Azure EventHub client +// Azure Event Hubs client package eventhub // Copyright (c) Microsoft and contributors. All rights reserved. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go index 490f0ef27..e355a354f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go @@ -25,7 +25,7 @@ import ( "net/http" ) -// ConsumerGroupsClient is the azure EventHub client +// ConsumerGroupsClient is the azure Event Hubs client type ConsumerGroupsClient struct { ManagementClient } @@ -42,13 +42,13 @@ func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) C return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates/Updates a consumer group as a nested resource within -// a namespace. +// CreateOrUpdate creates or updates an Event Hubs consumer group as a nested +// resource within a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. consumerGroupName is -// the Consumer Group name. parameters is parameters supplied to create a -// Consumer Group Resource. +// namespace name. eventHubName is the Event Hub name. consumerGroupName is +// the consumer group name. parameters is parameters supplied to create a +// consumer group resource. func (client ConsumerGroupsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroupCreateOrUpdateParameters) (result ConsumerGroupResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,12 +118,12 @@ func (client ConsumerGroupsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes an ConsumerGroup from the specified EventHub and resource +// Delete deletes a consumer group from the specified Event Hub and resource // group. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. consumerGroupName is -// the Consumer Group name. +// namespace name. eventHubName is the Event Hub name. consumerGroupName is +// the Cconsumer group name. func (client ConsumerGroupsClient) Delete(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, eventHubName, consumerGroupName) if err != nil { @@ -184,11 +184,11 @@ func (client ConsumerGroupsClient) DeleteResponder(resp *http.Response) (result return } -// Get returns an Consumer Group description for the specified Consumer Group. +// Get gets a description for the specified consumer group. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. consumerGroupName is -// the Consumer Group name. +// namespace name. eventHubName is the Event Hub name. consumerGroupName is +// the consumer group name. func (client ConsumerGroupsClient) Get(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result ConsumerGroupResource, err error) { req, err := client.GetPreparer(resourceGroupName, namespaceName, eventHubName, consumerGroupName) if err != nil { @@ -250,11 +250,11 @@ func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result Con return } -// ListAll enumerates the consumer groups in a namespace. An empty feed is +// ListAll gets all the consumer groups in a namespace. An empty feed is // returned if no consumer group exists in the namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. +// namespace name. eventHubName is the Event Hub name. func (client ConsumerGroupsClient) ListAll(resourceGroupName string, namespaceName string, eventHubName string) (result ConsumerGroupListResult, err error) { req, err := client.ListAllPreparer(resourceGroupName, namespaceName, eventHubName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go index c596d8035..11cd8c61d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go @@ -25,7 +25,7 @@ import ( "net/http" ) -// EventHubsClient is the azure EventHub client +// EventHubsClient is the azure Event Hubs client type EventHubsClient struct { ManagementClient } @@ -41,12 +41,12 @@ func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventH return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates/Updates a new Event Hub as a nested resource within -// a namespace. +// CreateOrUpdate creates or updates a new Event Hub as a nested resource +// within a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. parameters is -// parameters supplied to create a EventHub Resource. +// namespace name. eventHubName is the Event Hub name. parameters is +// parameters supplied to create an Event Hub resource. func (client EventHubsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, parameters CreateOrUpdateParameters) (result ResourceType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -115,18 +115,18 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates an authorization rule for the -// specified Event Hub. +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule +// for the specified Event Hub. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. eventHubName is the Event Hub name. authorizationRuleName -// is aauthorization Rule Name. parameters is the shared access authorization -// rule. +// is the authorization rule name. parameters is the shared access +// authorization rule. func (client EventHubsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "CreateOrUpdateAuthorizationRule") } @@ -192,10 +192,10 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRuleResponder(resp *htt return } -// Delete deletes an Event hub from the specified namespace and resource group. +// Delete deletes an Event Hub from the specified namespace and resource group. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. +// namespace name. eventHubName is the name of the Event Hub to delete. func (client EventHubsClient) Delete(resourceGroupName string, namespaceName string, eventHubName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, eventHubName) if err != nil { @@ -255,11 +255,11 @@ func (client EventHubsClient) DeleteResponder(resp *http.Response) (result autor return } -// DeleteAuthorizationRule deletes a EventHub authorization rule +// DeleteAuthorizationRule deletes an Event Hubs authorization rule. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the Eventhub name. authorizationRuleName -// is authorization Rule Name. +// namespace name. eventHubName is the Event Hub name. authorizationRuleName +// is the authorization rule name. func (client EventHubsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) if err != nil { @@ -320,10 +320,10 @@ func (client EventHubsClient) DeleteAuthorizationRuleResponder(resp *http.Respon return } -// Get returns an Event Hub description for the specified Event Hub. +// Get gets an Event Hubs description for the specified Event Hub. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the EventHub name. +// namespace name. eventHubName is the Event Hub name. func (client EventHubsClient) Get(resourceGroupName string, namespaceName string, eventHubName string) (result ResourceType, err error) { req, err := client.GetPreparer(resourceGroupName, namespaceName, eventHubName) if err != nil { @@ -384,11 +384,12 @@ func (client EventHubsClient) GetResponder(resp *http.Response) (result Resource return } -// GetAuthorizationRule authorization rule for a EventHub by name. +// GetAuthorizationRule gets an authorization rule for an Event Hub by rule +// name. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name eventHubName is the Event Hub name. authorizationRuleName -// is authorization rule name. +// namespace name. eventHubName is the Event Hub name. authorizationRuleName +// is the authorization rule name. func (client EventHubsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) if err != nil { @@ -450,7 +451,7 @@ func (client EventHubsClient) GetAuthorizationRuleResponder(resp *http.Response) return } -// ListAll enumerates the Event Hubs in a namespace. +// ListAll gets all the Event Hubs in a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. @@ -537,10 +538,10 @@ func (client EventHubsClient) ListAllNextResults(lastResults ListResult) (result return } -// ListAuthorizationRules authorization rules for a EventHub. +// ListAuthorizationRules gets the authorization rules for an Event Hub. // // resourceGroupName is the name of the resource group. namespaceName is the -// NameSpace name eventHubName is the EventHub name. +// namespace name eventHubName is the Event Hub name. func (client EventHubsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, eventHubName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName, eventHubName) if err != nil { @@ -625,12 +626,12 @@ func (client EventHubsClient) ListAuthorizationRulesNextResults(lastResults Shar return } -// ListKeys returns the ACS and SAS connection strings for the Event Hub. +// ListKeys gets the ACS and SAS connection strings for the Event Hub. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the event hub name. authorizationRuleName -// is the connection string of the namespace for the specified -// authorizationRule. +// namespace name. eventHubName is the Event Hub name. authorizationRuleName +// is the connection string of the namespace for the specified authorization +// rule. func (client EventHubsClient) ListKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, eventHubName, authorizationRuleName) if err != nil { @@ -696,10 +697,10 @@ func (client EventHubsClient) ListKeysResponder(resp *http.Response) (result Res // Hub. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. eventHubName is the event hub name. authorizationRuleName -// is the connection string of the EventHub for the specified -// authorizationRule. parameters is parameters supplied to regenerate Auth -// Rule. +// namespace name. eventHubName is the Event Hub name. authorizationRuleName +// is the connection string of the Event Hub for the specified authorization +// rule. parameters is parameters supplied to regenerate the authorization +// rule. func (client EventHubsClient) RegenerateKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go index cf0efbc01..ec1c5b117 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go @@ -140,16 +140,16 @@ const ( SkuTierStandard SkuTier = "Standard" ) -// ConsumerGroupCreateOrUpdateParameters is parameters supplied to the -// CreateOrUpdate Consumer Group operation. +// ConsumerGroupCreateOrUpdateParameters is parameters supplied to the Create +// Or Update Consumer Group operation. type ConsumerGroupCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConsumerGroupProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + *ConsumerGroupProperties `json:"properties,omitempty"` } -// ConsumerGroupListResult is the response of the List Consumer Group +// ConsumerGroupListResult is the response to the List Consumer Group // operation. type ConsumerGroupListResult struct { autorest.Response `json:"-"` @@ -177,19 +177,19 @@ type ConsumerGroupProperties struct { UserMetadata *string `json:"userMetadata,omitempty"` } -// ConsumerGroupResource is description of Consumer Group Resource. +// ConsumerGroupResource is description of the consumer group resource. type ConsumerGroupResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *ConsumerGroupProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ConsumerGroupProperties `json:"properties,omitempty"` } -// CreateOrUpdateParameters is parameters supplied to the CreateOrUpdate -// EventHub operation. +// CreateOrUpdateParameters is parameters supplied to the Create Or Update +// Event Hub operation. type CreateOrUpdateParameters struct { Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` @@ -197,7 +197,7 @@ type CreateOrUpdateParameters struct { Properties *Properties `json:"properties,omitempty"` } -// ListResult is the response of the List EventHub operation. +// ListResult is the response of the List Event Hubs operation. type ListResult struct { autorest.Response `json:"-"` Value *[]ResourceType `json:"value,omitempty"` @@ -216,13 +216,13 @@ func (client ListResult) ListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceCreateOrUpdateParameters is parameters supplied to the -// CreateOrUpdate Namespace operation. +// NamespaceCreateOrUpdateParameters is parameters supplied to the Create Or +// Update Namespace operation. type NamespaceCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *NamespaceProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *NamespaceProperties `json:"properties,omitempty"` } // NamespaceListResult is the response of the List Namespace operation. @@ -244,7 +244,7 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceProperties is properties of the Namespace. +// NamespaceProperties is properties of the namespace. type NamespaceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` Status NamespaceState `json:"status,omitempty"` @@ -255,16 +255,16 @@ type NamespaceProperties struct { Enabled *bool `json:"enabled,omitempty"` } -// NamespaceResource is description of a Namespace resource. +// NamespaceResource is description of a namespace resource. type NamespaceResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Properties *NamespaceProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *NamespaceProperties `json:"properties,omitempty"` } // Properties is @@ -277,7 +277,8 @@ type Properties struct { UpdatedAt *date.Time `json:"updatedAt,omitempty"` } -// RegenerateKeysParameters is parameters supplied to the Regenerate Auth Rule. +// RegenerateKeysParameters is parameters supplied to the Regenerate +// Authorization Rule operation. type RegenerateKeysParameters struct { Policykey Policykey `json:"Policykey,omitempty"` } @@ -301,7 +302,7 @@ type ResourceListKeys struct { KeyName *string `json:"keyName,omitempty"` } -// ResourceType is description of EventHub Resource. +// ResourceType is description of the Event Hub resource. type ResourceType struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -309,18 +310,18 @@ type ResourceType struct { Type *string `json:"type,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` - Properties *Properties `json:"properties,omitempty"` + *Properties `json:"properties,omitempty"` } // SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters -// supplied to the CreateOrUpdate AuthorizationRules. +// supplied to the Create Or Update Authorization Rules operation. type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` } -// SharedAccessAuthorizationRuleListResult is the response of the List +// SharedAccessAuthorizationRuleListResult is the response from the List // Namespace operation. type SharedAccessAuthorizationRuleListResult struct { autorest.Response `json:"-"` @@ -346,19 +347,19 @@ type SharedAccessAuthorizationRuleProperties struct { Rights *[]AccessRights `json:"rights,omitempty"` } -// SharedAccessAuthorizationRuleResource is description of a Namespace -// AuthorizationRules. +// SharedAccessAuthorizationRuleResource is description of a namespace +// authorization rule. type SharedAccessAuthorizationRuleResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` } -// Sku is sku of the Namespace. +// Sku is sKU of the namespace. type Sku struct { Name SkuName `json:"name,omitempty"` Tier SkuTier `json:"tier,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go index a39b0f2a3..be52e0d89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go @@ -25,7 +25,7 @@ import ( "net/http" ) -// NamespacesClient is the azure EventHub client +// NamespacesClient is the azure Event Hubs client type NamespacesClient struct { ManagementClient } @@ -41,15 +41,15 @@ func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) Names return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates Updates namespace. Once created, this namespace's -// resource manifest is immutable. This operation is idempotent. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates or updates a namespace. Once created, this +// namespace's resource manifest is immutable. This operation is idempotent. +// This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling +// and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. parameters is parameters supplied to create a Namespace -// Resource. +// namespace name. parameters is parameters for creating a namespace +// resource. func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,17 +118,18 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateAuthorizationRule creates an authorization rule for a -// namespace +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule +// for a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is namespace Aauthorization Rule -// Name. parameters is the shared access authorization rule. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. authorizationRuleName is +// namespace authorization rule name. parameters is the shared access +// authorization rule. func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "CreateOrUpdateAuthorizationRule") } @@ -199,8 +200,8 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the name of the namespace to delete. func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, cancel) if err != nil { @@ -261,10 +262,11 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto return } -// DeleteAuthorizationRule deletes a namespace authorization rule +// DeleteAuthorizationRule deletes an authorization rule for a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is authorization Rule Name. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. authorizationRuleName is +// authorization rule name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -324,10 +326,10 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo return } -// Get returns the description for the specified namespace. +// Get gets the description of the specified namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the name of the specified namespace. func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result NamespaceResource, err error) { req, err := client.GetPreparer(resourceGroupName, namespaceName) if err != nil { @@ -387,10 +389,12 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa return } -// GetAuthorizationRule authorization rule for a namespace by name. +// GetAuthorizationRule gets an authorization rule for a namespace by rule +// name. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name authorizationRuleName is authorization rule name. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. authorizationRuleName is +// authorization rule name. func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -451,10 +455,10 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response return } -// ListAuthorizationRules authorization rules for a namespace. +// ListAuthorizationRules gets a list of authorization rules for a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName) if err != nil { @@ -538,7 +542,7 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Sha return } -// ListByResourceGroup lists the available namespaces within a resourceGroup. +// ListByResourceGroup lists the available namespaces within a resource group. // // resourceGroupName is the name of the resource group. func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) { @@ -623,8 +627,8 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp return } -// ListBySubscription lists all the available namespaces within the -// subscription irrespective of the resourceGroups. +// ListBySubscription lists all the available namespaces within a +// subscription, irrespective of the resource groups. func (client NamespacesClient) ListBySubscription() (result NamespaceListResult, err error) { req, err := client.ListBySubscriptionPreparer() if err != nil { @@ -706,10 +710,12 @@ func (client NamespacesClient) ListBySubscriptionNextResults(lastResults Namespa return } -// ListKeys primary and Secondary ConnectionStrings to the namespace +// ListKeys gets the primary and secondary connection strings for the +// namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the authorizationRule name. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. authorizationRuleName is the +// authorization rule name. func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -770,12 +776,13 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Re return } -// RegenerateKeys regenerats the Primary or Secondary ConnectionStrings to the -// namespace +// RegenerateKeys regenerates the primary or secondary connection strings for +// the specified namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the authorizationRule name. -// parameters is parameters supplied to regenerate Auth Rule. +// resourceGroupName is the name of the resource group in which the namespace +// lives. namespaceName is the namespace name. authorizationRuleName is the +// authorization rule name. parameters is parameters required to regenerate +// the connection string. func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go index b7764d4bc..ef02c1476 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go index 75ef3179f..f50f23850 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go index 8b70b1279..872fbbf7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go @@ -46,9 +46,8 @@ func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID stri return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// BackendHealth the BackendHealth operation gets the backend health of -// application gateway in the specified resource group through Network -// resource provider. This method may poll for completion. Polling can be +// BackendHealth gets the backend health of the specified application gateway +// in a resource group. This method may poll for completion. Polling can be // canceled by passing the cancel channel argument. The channel will be used // to cancel polling and any outstanding HTTP requests. // @@ -118,21 +117,21 @@ func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Respon return } -// CreateOrUpdate the Put ApplicationGateway operation creates/updates a -// ApplicationGateway This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates the specified application gateway. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the ApplicationGateway. parameters is parameters supplied -// to the create/delete ApplicationGateway operation +// is the name of the application gateway. parameters is parameters supplied +// to the create or update application gateway operation. func (client ApplicationGatewaysClient) CreateOrUpdate(resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WebApplicationFirewallConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.OperationalState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.OperationalState", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate") } @@ -198,10 +197,10 @@ func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Respo return } -// Delete the delete ApplicationGateway operation deletes the specified -// application gateway. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified application gateway. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. applicationGatewayName // is the name of the application gateway. @@ -265,8 +264,7 @@ func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (re return } -// Get the Get ApplicationGateway operation retrieves information about the -// specified application gateway. +// Get gets the specified application gateway. // // resourceGroupName is the name of the resource group. applicationGatewayName // is the name of the application gateway. @@ -329,8 +327,7 @@ func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (resul return } -// List the List ApplicationGateway operation retrieves all the application -// gateways in a resource group. +// List lists all application gateways in a resource group. // // resourceGroupName is the name of the resource group. func (client ApplicationGatewaysClient) List(resourceGroupName string) (result ApplicationGatewayListResult, err error) { @@ -415,8 +412,7 @@ func (client ApplicationGatewaysClient) ListNextResults(lastResults ApplicationG return } -// ListAll the List ApplicationGateway operation retrieves all the application -// gateways in a subscription. +// ListAll gets all the application gateways in a subscription. func (client ApplicationGatewaysClient) ListAll() (result ApplicationGatewayListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -498,11 +494,10 @@ func (client ApplicationGatewaysClient) ListAllNextResults(lastResults Applicati return } -// Start the Start ApplicationGateway operation starts application gateway in -// the specified resource group through Network resource provider. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// Start starts the specified application gateway. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. applicationGatewayName // is the name of the application gateway. @@ -566,11 +561,10 @@ func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (res return } -// Stop the STOP ApplicationGateway operation stops application gateway in the -// specified resource group through Network resource provider. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Stop stops the specified application gateway in a resource group. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. applicationGatewayName // is the name of the application gateway. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go index b2ab58173..74e3d7e49 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go @@ -65,7 +65,7 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { // CheckDNSNameAvailability checks whether a domain name in the cloudapp.net // zone is available for use. // -// location is the location of the domain name domainNameLabel is the domain +// location is the location of the domain name. domainNameLabel is the domain // name to be verified. It must conform to the following regular expression: // ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. func (client ManagementClient) CheckDNSNameAvailability(location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go index 86b8faa78..eb0a2a075 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go @@ -45,16 +45,15 @@ func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subsc return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put Authorization operation creates/updates an -// authorization in the specified ExpressRouteCircuits This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates an authorization in the specified express +// route circuit. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. authorizationName is the name of the // authorization. authorizationParameters is parameters supplied to the -// create/update ExpressRouteCircuitAuthorization operation +// create or update express route circuit authorization operation. func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, circuitName, authorizationName, authorizationParameters, cancel) if err != nil { @@ -118,11 +117,10 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(re return } -// Delete the delete authorization operation deletes the specified -// authorization from the specified ExpressRouteCircuit. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified authorization from the specified express route +// circuit. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. authorizationName is the name of the @@ -188,8 +186,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http return } -// Get the GET authorization operation retrieves the specified authorization -// from the specified ExpressRouteCircuit. +// Get gets the specified authorization from the specified express route +// circuit. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. authorizationName is the name of the @@ -254,8 +252,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Re return } -// List the List authorization operation retrieves all the authorizations in -// an ExpressRouteCircuit. +// List gets all authorizations in an express route circuit. // // resourceGroupName is the name of the resource group. circuitName is the // name of the circuit. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go index ddbff0acf..a459574b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go @@ -45,15 +45,15 @@ func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptio return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put Peering operation creates/updates an peering in the -// specified ExpressRouteCircuits This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a peering in the specified express route +// circuits. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. peeringName is the name of the peering. -// peeringParameters is parameters supplied to the create/update -// ExpressRouteCircuit Peering operation +// peeringParameters is parameters supplied to the create or update express +// route circuit peering operation. func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, circuitName, peeringName, peeringParameters, cancel) if err != nil { @@ -117,10 +117,10 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *ht return } -// Delete the delete peering operation deletes the specified peering from the -// ExpressRouteCircuit. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified peering from the specified express route +// circuit. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. peeringName is the name of the peering. @@ -185,8 +185,8 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo return } -// Get the GET peering operation retrieves the specified authorization from -// the ExpressRouteCircuit. +// Get gets the specified authorization from the specified express route +// circuit. // // resourceGroupName is the name of the resource group. circuitName is the // name of the express route circuit. peeringName is the name of the peering. @@ -250,11 +250,10 @@ func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response return } -// List the List peering operation retrieves all the peerings in an -// ExpressRouteCircuit. +// List gets all peerings in a specified express route circuit. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. +// name of the express route circuit. func (client ExpressRouteCircuitPeeringsClient) List(resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResult, err error) { req, err := client.ListPreparer(resourceGroupName, circuitName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go index 9e46f8f94..6572e92b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go @@ -45,14 +45,14 @@ func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID str return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put ExpressRouteCircuit operation creates/updates a -// ExpressRouteCircuit This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates an express route circuit. This method may +// poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. parameters is parameters supplied to the -// create/delete ExpressRouteCircuit operation +// name of the circuit. parameters is parameters supplied to the create or +// update express route circuit operation. func (client ExpressRouteCircuitsClient) CreateOrUpdate(resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, circuitName, parameters, cancel) if err != nil { @@ -115,13 +115,13 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Resp return } -// Delete the delete ExpressRouteCircuit operation deletes the specified -// ExpressRouteCircuit. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified express route circuit. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the express route Circuit. +// name of the express route circuit. func (client ExpressRouteCircuitsClient) Delete(resourceGroupName string, circuitName string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, circuitName, cancel) if err != nil { @@ -182,11 +182,10 @@ func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (r return } -// Get the Get ExpressRouteCircuit operation retrieves information about the -// specified ExpressRouteCircuit. +// Get gets information about the specified express route circuit. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. +// name of express route circuit. func (client ExpressRouteCircuitsClient) Get(resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) { req, err := client.GetPreparer(resourceGroupName, circuitName) if err != nil { @@ -246,11 +245,11 @@ func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (resu return } -// GetPeeringStats the List stats ExpressRouteCircuit operation retrieves all -// the stats from a ExpressRouteCircuits in a resource group. +// GetPeeringStats gets all stats from an express route circuit in a resource +// group. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. peeringName is the name of the peering. +// name of the express route circuit. peeringName is the name of the peering. func (client ExpressRouteCircuitsClient) GetPeeringStats(resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) { req, err := client.GetPeeringStatsPreparer(resourceGroupName, circuitName, peeringName) if err != nil { @@ -311,11 +310,11 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Res return } -// GetStats the List stats ExpressRouteCircuit operation retrieves all the -// stats from a ExpressRouteCircuits in a resource group. +// GetStats gets all the stats from an express route circuit in a resource +// group. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. +// name of the express route circuit. func (client ExpressRouteCircuitsClient) GetStats(resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) { req, err := client.GetStatsPreparer(resourceGroupName, circuitName) if err != nil { @@ -375,8 +374,7 @@ func (client ExpressRouteCircuitsClient) GetStatsResponder(resp *http.Response) return } -// List the List ExpressRouteCircuit operation retrieves all the -// ExpressRouteCircuits in a resource group. +// List gets all the express route circuits in a resource group. // // resourceGroupName is the name of the resource group. func (client ExpressRouteCircuitsClient) List(resourceGroupName string) (result ExpressRouteCircuitListResult, err error) { @@ -461,8 +459,7 @@ func (client ExpressRouteCircuitsClient) ListNextResults(lastResults ExpressRout return } -// ListAll the List ExpressRouteCircuit operation retrieves all the -// ExpressRouteCircuits in a subscription. +// ListAll gets all the express route circuits in a subscription. func (client ExpressRouteCircuitsClient) ListAll() (result ExpressRouteCircuitListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -544,16 +541,15 @@ func (client ExpressRouteCircuitsClient) ListAllNextResults(lastResults ExpressR return } -// ListArpTable the ListArpTable from ExpressRouteCircuit operation retrieves -// the currently advertised arp table associated with the -// ExpressRouteCircuits in a resource group. This method may poll for +// ListArpTable gets the currently advertised ARP table associated with the +// express route circuit in a resource group. This method may poll for // completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. peeringName is the name of the peering. devicePath is -// the path of the device. +// name of the express route circuit. peeringName is the name of the peering. +// devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListArpTable(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.ListArpTablePreparer(resourceGroupName, circuitName, peeringName, devicePath, cancel) if err != nil { @@ -616,16 +612,15 @@ func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Respon return } -// ListRoutesTable the ListRoutesTable from ExpressRouteCircuit operation -// retrieves the currently advertised routes table associated with the -// ExpressRouteCircuits in a resource group. This method may poll for +// ListRoutesTable gets the currently advertised routes table associated with +// the express route circuit in a resource group. This method may poll for // completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. peeringName is the name of the peering. devicePath is -// the path of the device. +// name of the express route circuit. peeringName is the name of the peering. +// devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListRoutesTable(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.ListRoutesTablePreparer(resourceGroupName, circuitName, peeringName, devicePath, cancel) if err != nil { @@ -688,16 +683,15 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Res return } -// ListRoutesTableSummary the ListRoutesTable from ExpressRouteCircuit -// operation retrieves the currently advertised routes table associated with -// the ExpressRouteCircuits in a resource group. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListRoutesTableSummary gets the currently advertised routes table summary +// associated with the express route circuit in a resource group. This method +// may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // // resourceGroupName is the name of the resource group. circuitName is the -// name of the circuit. peeringName is the name of the peering. devicePath is -// the path of the device. +// name of the express route circuit. peeringName is the name of the peering. +// devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.ListRoutesTableSummaryPreparer(resourceGroupName, circuitName, peeringName, devicePath, cancel) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go index b65d60cf8..9d0450ecf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go @@ -45,8 +45,7 @@ func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscripti return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List the List ExpressRouteServiceProvider operation retrieves all the -// available ExpressRouteServiceProviders. +// List gets all the available express route service providers. func (client ExpressRouteServiceProvidersClient) List() (result ExpressRouteServiceProviderListResult, err error) { req, err := client.ListPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go index 4a5309a8c..9fbf7cddd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go @@ -45,22 +45,22 @@ func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) Inter return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put NetworkInterface operation creates/updates a -// networkInterface This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a network interface. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. networkInterfaceName // is the name of the network interface. parameters is parameters supplied to -// the create/update NetworkInterface operation +// the create or update network interface operation. func (client InterfacesClient) CreateOrUpdate(resourceGroupName string, networkInterfaceName string, parameters Interface, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.NetworkSecurityGroup", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.NetworkSecurityGroup.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.NetworkSecurityGroup.Properties.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "parameters.Properties.NetworkSecurityGroup.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.NetworkSecurityGroup", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.InterfacePropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}, }}, }}}}}); err != nil { @@ -128,10 +128,10 @@ func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// Delete the delete netwokInterface operation deletes the specified -// netwokInterface. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified network interface. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. networkInterfaceName // is the name of the network interface. @@ -195,11 +195,10 @@ func (client InterfacesClient) DeleteResponder(resp *http.Response) (result auto return } -// Get the Get network interface operation retrieves information about the -// specified network interface. +// Get gets information about the specified network interface. // // resourceGroupName is the name of the resource group. networkInterfaceName -// is the name of the network interface. expand is expand references +// is the name of the network interface. expand is expands referenced // resources. func (client InterfacesClient) Get(resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) { req, err := client.GetPreparer(resourceGroupName, networkInterfaceName, expand) @@ -263,11 +262,10 @@ func (client InterfacesClient) GetResponder(resp *http.Response) (result Interfa return } -// GetEffectiveRouteTable the get effective routetable operation retrieves all -// the route tables applied on a networkInterface. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// GetEffectiveRouteTable gets all route tables applied to a network +// interface. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. networkInterfaceName // is the name of the network interface. @@ -331,14 +329,13 @@ func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Respon return } -// GetVirtualMachineScaleSetNetworkInterface the Get network interface -// operation retrieves information about the specified network interface in a -// virtual machine scale set. +// GetVirtualMachineScaleSetNetworkInterface get the specified network +// interface in a virtual machine scale set. // // resourceGroupName is the name of the resource group. // virtualMachineScaleSetName is the name of the virtual machine scale set. // virtualmachineIndex is the virtual machine index. networkInterfaceName is -// the name of the network interface. expand is expand references resources. +// the name of the network interface. expand is expands referenced resources. func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) { req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) if err != nil { @@ -403,8 +400,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponde return } -// List the List networkInterfaces operation retrieves all the -// networkInterfaces in a resource group. +// List gets all network interfaces in a resource group. // // resourceGroupName is the name of the resource group. func (client InterfacesClient) List(resourceGroupName string) (result InterfaceListResult, err error) { @@ -489,8 +485,7 @@ func (client InterfacesClient) ListNextResults(lastResults InterfaceListResult) return } -// ListAll the List networkInterfaces operation retrieves all the -// networkInterfaces in a subscription. +// ListAll gets all network interfaces in a subscription. func (client InterfacesClient) ListAll() (result InterfaceListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -572,11 +567,10 @@ func (client InterfacesClient) ListAllNextResults(lastResults InterfaceListResul return } -// ListEffectiveNetworkSecurityGroups the list effective network security -// group operation retrieves all the network security groups applied on a -// networkInterface. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// ListEffectiveNetworkSecurityGroups gets all network security groups applied +// to a network interface. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. networkInterfaceName // is the name of the network interface. @@ -640,9 +634,8 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp return } -// ListVirtualMachineScaleSetNetworkInterfaces the list network interface -// operation retrieves information about all network interfaces in a virtual -// machine scale set. +// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in +// a virtual machine scale set. // // resourceGroupName is the name of the resource group. // virtualMachineScaleSetName is the name of the virtual machine scale set. @@ -729,9 +722,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesNextRe return } -// ListVirtualMachineScaleSetVMNetworkInterfaces the list network interface -// operation retrieves information about all network interfaces in a virtual -// machine from a virtual machine scale set. +// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all +// network interfaces in a virtual machine in a virtual machine scale set. // // resourceGroupName is the name of the resource group. // virtualMachineScaleSetName is the name of the virtual machine scale set. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go index 3426ea03a..30012ff35 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go @@ -45,14 +45,14 @@ func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) Lo return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put LoadBalancer operation creates/updates a -// LoadBalancer This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a load balancer. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. loadBalancerName is -// the name of the loadBalancer. parameters is parameters supplied to the -// create/delete LoadBalancer operation +// the name of the load balancer. parameters is parameters supplied to the +// create or update load balancer operation. func (client LoadBalancersClient) CreateOrUpdate(resourceGroupName string, loadBalancerName string, parameters LoadBalancer, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, loadBalancerName, parameters, cancel) if err != nil { @@ -115,13 +115,13 @@ func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete the delete LoadBalancer operation deletes the specified load -// balancer. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified load balancer. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. loadBalancerName is -// the name of the loadBalancer. +// the name of the load balancer. func (client LoadBalancersClient) Delete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, loadBalancerName, cancel) if err != nil { @@ -182,11 +182,10 @@ func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result a return } -// Get the Get LoadBalancer operation retrieves information about the -// specified LoadBalancer. +// Get gets the specified load balancer. // // resourceGroupName is the name of the resource group. loadBalancerName is -// the name of the loadBalancer. expand is expand references resources. +// the name of the load balancer. expand is expands referenced resources. func (client LoadBalancersClient) Get(resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) { req, err := client.GetPreparer(resourceGroupName, loadBalancerName, expand) if err != nil { @@ -249,8 +248,7 @@ func (client LoadBalancersClient) GetResponder(resp *http.Response) (result Load return } -// List the List loadBalancer operation retrieves all the load balancers in a -// resource group. +// List gets all the load balancers in a resource group. // // resourceGroupName is the name of the resource group. func (client LoadBalancersClient) List(resourceGroupName string) (result LoadBalancerListResult, err error) { @@ -335,8 +333,7 @@ func (client LoadBalancersClient) ListNextResults(lastResults LoadBalancerListRe return } -// ListAll the List loadBalancer operation retrieves all the load balancers in -// a subscription. +// ListAll gets all the load balancers in a subscription. func (client LoadBalancersClient) ListAll() (result LoadBalancerListResult, err error) { req, err := client.ListAllPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go index 847054dc4..fd48306f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go @@ -21,6 +21,7 @@ package network import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -45,17 +46,25 @@ func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID str return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put LocalNetworkGateway operation creates/updates a -// local network gateway in the specified resource group through Network -// resource provider. This method may poll for completion. Polling can be +// CreateOrUpdate creates or updates a local network gateway in the specified +// resource group. This method may poll for completion. Polling can be // canceled by passing the cancel channel argument. The channel will be used // to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // localNetworkGatewayName is the name of the local network gateway. -// parameters is parameters supplied to the Begin Create or update Local -// Network Gateway operation through Network resource provider. +// parameters is parameters supplied to the create or update local network +// gateway operation. func (client LocalNetworkGatewaysClient) CreateOrUpdate(resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.LocalNetworkGatewayPropertiesFormat.LocalNetworkAddressSpace", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.LocalNetworkGatewayPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate") + } + req, err := client.CreateOrUpdatePreparer(resourceGroupName, localNetworkGatewayName, parameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -117,8 +126,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Resp return } -// Delete the Delete LocalNetworkGateway operation deletes the specified local -// network Gateway through Network resource provider. This method may poll +// Delete deletes the specified local network gateway. This method may poll // for completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. @@ -185,8 +193,7 @@ func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (r return } -// Get the Get LocalNetworkGateway operation retrieves information about the -// specified local network gateway through Network resource provider. +// Get gets the specified local network gateway in a resource group. // // resourceGroupName is the name of the resource group. // localNetworkGatewayName is the name of the local network gateway. @@ -249,8 +256,7 @@ func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (resu return } -// List the List LocalNetworkGateways operation retrieves all the local -// network gateways stored. +// List gets all the local network gateways in a resource group. // // resourceGroupName is the name of the resource group. func (client LocalNetworkGatewaysClient) List(resourceGroupName string) (result LocalNetworkGatewayListResult, err error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go index 810fe457e..bb514f796 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go @@ -548,76 +548,78 @@ const ( ) // AddressSpace is addressSpace contains an array of IP address ranges that -// can be used by subnets +// can be used by subnets of the virtual network. type AddressSpace struct { AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` } -// ApplicationGateway is applicationGateways resource +// ApplicationGateway is application gateway resource type ApplicationGateway struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayAuthenticationCertificate is authentication certificates -// of application gateway +// of an application gateway. type ApplicationGatewayAuthenticationCertificate struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ApplicationGatewayAuthenticationCertificatePropertiesFormat is properties -// of Authentication certificates of application gateway +// ApplicationGatewayAuthenticationCertificatePropertiesFormat is +// authentication certificates properties of an application gateway. type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayBackendAddress is backend Address of application gateway +// ApplicationGatewayBackendAddress is backend address of an application +// gateway. type ApplicationGatewayBackendAddress struct { Fqdn *string `json:"fqdn,omitempty"` IPAddress *string `json:"ipAddress,omitempty"` } -// ApplicationGatewayBackendAddressPool is backend Address Pool of application -// gateway +// ApplicationGatewayBackendAddressPool is backend Address Pool of an +// application gateway. type ApplicationGatewayBackendAddressPool struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayBackendAddressPoolPropertiesFormat is properties of -// Backend Address Pool of application gateway +// Backend Address Pool of an application gateway. type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayBackendHealth is list of backendhealth pools. +// ApplicationGatewayBackendHealth is list of +// ApplicationGatewayBackendHealthPool resources. type ApplicationGatewayBackendHealth struct { autorest.Response `json:"-"` BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` } // ApplicationGatewayBackendHealthHTTPSettings is application gateway -// backendhealth http settings. +// BackendHealthHttp settings. type ApplicationGatewayBackendHealthHTTPSettings struct { BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` } -// ApplicationGatewayBackendHealthPool is application gateway backendhealth +// ApplicationGatewayBackendHealthPool is application gateway BackendHealth // pool. type ApplicationGatewayBackendHealthPool struct { BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` @@ -633,16 +635,16 @@ type ApplicationGatewayBackendHealthServer struct { } // ApplicationGatewayBackendHTTPSettings is backend address pool settings of -// application gateway +// an application gateway. type ApplicationGatewayBackendHTTPSettings struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayBackendHTTPSettingsPropertiesFormat is properties of -// Backend address pool settings of application gateway +// Backend address pool settings of an application gateway. type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { Port *int32 `json:"port,omitempty"` Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` @@ -654,16 +656,16 @@ type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { } // ApplicationGatewayFrontendIPConfiguration is frontend IP configuration of -// application gateway +// an application gateway. type ApplicationGatewayFrontendIPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayFrontendIPConfigurationPropertiesFormat is properties of -// Frontend IP configuration of application gateway +// Frontend IP configuration of an application gateway. type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { PrivateIPAddress *string `json:"privateIPAddress,omitempty"` PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` @@ -672,31 +674,31 @@ type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayFrontendPort is frontend Port of application gateway +// ApplicationGatewayFrontendPort is frontend port of an application gateway. type ApplicationGatewayFrontendPort struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayFrontendPortPropertiesFormat is properties of Frontend -// Port of application gateway +// port of an application gateway. type ApplicationGatewayFrontendPortPropertiesFormat struct { Port *int32 `json:"port,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayHTTPListener is http listener of application gateway +// ApplicationGatewayHTTPListener is http listener of an application gateway. type ApplicationGatewayHTTPListener struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ApplicationGatewayHTTPListenerPropertiesFormat is properties of Http -// listener of application gateway +// ApplicationGatewayHTTPListenerPropertiesFormat is properties of HTTP +// listener of an application gateway. type ApplicationGatewayHTTPListenerPropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` FrontendPort *SubResource `json:"frontendPort,omitempty"` @@ -707,23 +709,24 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayIPConfiguration is iP configuration of application gateway +// ApplicationGatewayIPConfiguration is iP configuration of an application +// gateway. Currently 1 public and 1 private IP configuration is allowed. type ApplicationGatewayIPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayIPConfigurationPropertiesFormat is properties of IP -// configuration of application gateway +// configuration of an application gateway. type ApplicationGatewayIPConfigurationPropertiesFormat struct { Subnet *SubResource `json:"subnet,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayListResult is response for ListApplicationGateways Api -// service call +// ApplicationGatewayListResult is response for ListApplicationGateways API +// service call. type ApplicationGatewayListResult struct { autorest.Response `json:"-"` Value *[]ApplicationGateway `json:"value,omitempty"` @@ -742,17 +745,17 @@ func (client ApplicationGatewayListResult) ApplicationGatewayListResultPreparer( autorest.WithBaseURL(to.String(client.NextLink))) } -// ApplicationGatewayPathRule is path rule of URL path map of application -// gateway +// ApplicationGatewayPathRule is path rule of URL path map of an application +// gateway. type ApplicationGatewayPathRule struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ApplicationGatewayPathRulePropertiesFormat is properties of probe of -// application gateway +// ApplicationGatewayPathRulePropertiesFormat is properties of probe of an +// application gateway. type ApplicationGatewayPathRulePropertiesFormat struct { Paths *[]string `json:"paths,omitempty"` BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` @@ -760,16 +763,16 @@ type ApplicationGatewayPathRulePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayProbe is probe of application gateway +// ApplicationGatewayProbe is probe of the application gateway. type ApplicationGatewayProbe struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ApplicationGatewayProbePropertiesFormat is properties of probe of -// application gateway +// ApplicationGatewayProbePropertiesFormat is properties of probe of an +// application gateway. type ApplicationGatewayProbePropertiesFormat struct { Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` Host *string `json:"host,omitempty"` @@ -780,7 +783,7 @@ type ApplicationGatewayProbePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayPropertiesFormat is properties of Application Gateway +// ApplicationGatewayPropertiesFormat is properties of the application gateway. type ApplicationGatewayPropertiesFormat struct { Sku *ApplicationGatewaySku `json:"sku,omitempty"` SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` @@ -801,17 +804,17 @@ type ApplicationGatewayPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayRequestRoutingRule is request routing rule of application -// gateway +// ApplicationGatewayRequestRoutingRule is request routing rule of an +// application gateway. type ApplicationGatewayRequestRoutingRule struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayRequestRoutingRulePropertiesFormat is properties of -// Request routing rule of application gateway +// request routing rule of the application gateway. type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` @@ -821,23 +824,24 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewaySku is sKU of application gateway +// ApplicationGatewaySku is sKU of an application gateway type ApplicationGatewaySku struct { Name ApplicationGatewaySkuName `json:"name,omitempty"` Tier ApplicationGatewayTier `json:"tier,omitempty"` Capacity *int32 `json:"capacity,omitempty"` } -// ApplicationGatewaySslCertificate is sSL certificates of application gateway +// ApplicationGatewaySslCertificate is sSL certificates of an application +// gateway. type ApplicationGatewaySslCertificate struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewaySslCertificatePropertiesFormat is properties of SSL -// certificates of application gateway +// certificates of an application gateway. type ApplicationGatewaySslCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` Password *string `json:"password,omitempty"` @@ -845,21 +849,22 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewaySslPolicy is application gateway SSL policy +// ApplicationGatewaySslPolicy is application gateway SSL policy. type ApplicationGatewaySslPolicy struct { DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` } -// ApplicationGatewayURLPathMap is urlPathMap of application gateway +// ApplicationGatewayURLPathMap is urlPathMaps give a url path to the backend +// mapping information for PathBasedRouting. type ApplicationGatewayURLPathMap struct { - ID *string `json:"id,omitempty"` - Properties *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ApplicationGatewayURLPathMapPropertiesFormat is properties of UrlPathMap of -// application gateway +// the application gateway. type ApplicationGatewayURLPathMapPropertiesFormat struct { DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` @@ -868,14 +873,14 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { } // ApplicationGatewayWebApplicationFirewallConfiguration is application -// gateway web application firewall configuration +// gateway web application firewall configuration. type ApplicationGatewayWebApplicationFirewallConfiguration struct { Enabled *bool `json:"enabled,omitempty"` FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` } -// AuthorizationListResult is response for ListAuthorizations Api service -// callRetrieves all authorizations that belongs to an ExpressRouteCircuit +// AuthorizationListResult is response for ListAuthorizations API service call +// retrieves all authorizations that belongs to an ExpressRouteCircuit. type AuthorizationListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` @@ -914,15 +919,16 @@ type AzureAsyncOperationResult struct { Error *Error `json:"error,omitempty"` } -// BackendAddressPool is pool of backend IP addresses +// BackendAddressPool is pool of backend IP addresses. type BackendAddressPool struct { - ID *string `json:"id,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// BackendAddressPoolPropertiesFormat is properties of BackendAddressPool +// BackendAddressPoolPropertiesFormat is properties of the backend address +// pool. type BackendAddressPoolPropertiesFormat struct { BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` @@ -940,59 +946,52 @@ type BgpSettings struct { // ConnectionResetSharedKey is type ConnectionResetSharedKey struct { autorest.Response `json:"-"` - KeyLength *int64 `json:"keyLength,omitempty"` + KeyLength *int32 `json:"keyLength,omitempty"` } -// ConnectionSharedKey is response for GetConnectionSharedKey Api service call +// ConnectionSharedKey is response for GetConnectionSharedKey API service call type ConnectionSharedKey struct { autorest.Response `json:"-"` Value *string `json:"value,omitempty"` } -// ConnectionSharedKeyResult is response for CheckConnectionSharedKey Api -// service call -type ConnectionSharedKeyResult struct { - autorest.Response `json:"-"` - Value *string `json:"value,omitempty"` -} - -// DhcpOptions is dHCPOptions contains an array of DNS servers available to -// VMs deployed in the virtual networkStandard DHCP option for a subnet +// DhcpOptions is dhcpOptions contains an array of DNS servers available to +// VMs deployed in the virtual network. Standard DHCP option for a subnet // overrides VNET DHCP options. type DhcpOptions struct { DNSServers *[]string `json:"dnsServers,omitempty"` } -// DNSNameAvailabilityResult is response for CheckDnsNameAvailability Api -// service call +// DNSNameAvailabilityResult is response for the CheckDnsNameAvailability API +// service call. type DNSNameAvailabilityResult struct { autorest.Response `json:"-"` Available *bool `json:"available,omitempty"` } -// EffectiveNetworkSecurityGroup is effective NetworkSecurityGroup +// EffectiveNetworkSecurityGroup is effective network security group. type EffectiveNetworkSecurityGroup struct { NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` } -// EffectiveNetworkSecurityGroupAssociation is effective NetworkSecurityGroup -// association +// EffectiveNetworkSecurityGroupAssociation is the effective network security +// group association. type EffectiveNetworkSecurityGroupAssociation struct { Subnet *SubResource `json:"subnet,omitempty"` NetworkInterface *SubResource `json:"networkInterface,omitempty"` } // EffectiveNetworkSecurityGroupListResult is response for list effective -// network security groups api service call +// network security groups API service call. type EffectiveNetworkSecurityGroupListResult struct { autorest.Response `json:"-"` Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// EffectiveNetworkSecurityRule is effective NetworkSecurityRules +// EffectiveNetworkSecurityRule is effective network security rules. type EffectiveNetworkSecurityRule struct { Name *string `json:"name,omitempty"` Protocol SecurityRuleProtocol `json:"protocol,omitempty"` @@ -1017,8 +1016,8 @@ type EffectiveRoute struct { NextHopType RouteNextHopType `json:"nextHopType,omitempty"` } -// EffectiveRouteListResult is response for list effective route api service -// call +// EffectiveRouteListResult is response for list effective route API service +// call. type EffectiveRouteListResult struct { autorest.Response `json:"-"` Value *[]EffectiveRoute `json:"value,omitempty"` @@ -1043,19 +1042,19 @@ type ErrorDetails struct { // ExpressRouteCircuit is expressRouteCircuit resource type ExpressRouteCircuit struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - Properties *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` + *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ExpressRouteCircuitArpTable is the arp table associated with the -// ExpressRouteCircuit +// ExpressRouteCircuitArpTable is the ARP table associated with the +// ExpressRouteCircuit. type ExpressRouteCircuitArpTable struct { Age *int32 `json:"age,omitempty"` Interface *string `json:"interface,omitempty"` @@ -1063,18 +1062,18 @@ type ExpressRouteCircuitArpTable struct { MacAddress *string `json:"macAddress,omitempty"` } -// ExpressRouteCircuitAuthorization is authorization in a ExpressRouteCircuit -// resource +// ExpressRouteCircuitAuthorization is authorization in an ExpressRouteCircuit +// resource. type ExpressRouteCircuitAuthorization struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *AuthorizationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ExpressRouteCircuitListResult is response for ListExpressRouteCircuit Api -// service call +// ExpressRouteCircuitListResult is response for ListExpressRouteCircuit API +// service call. type ExpressRouteCircuitListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuit `json:"value,omitempty"` @@ -1093,16 +1092,16 @@ func (client ExpressRouteCircuitListResult) ExpressRouteCircuitListResultPrepare autorest.WithBaseURL(to.String(client.NextLink))) } -// ExpressRouteCircuitPeering is peering in a ExpressRouteCircuit resource +// ExpressRouteCircuitPeering is peering in an ExpressRouteCircuit resource. type ExpressRouteCircuitPeering struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ExpressRouteCircuitPeeringConfig is specifies the peering config +// ExpressRouteCircuitPeeringConfig is specifies the peering configuration. type ExpressRouteCircuitPeeringConfig struct { AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` @@ -1110,8 +1109,8 @@ type ExpressRouteCircuitPeeringConfig struct { RoutingRegistryName *string `json:"routingRegistryName,omitempty"` } -// ExpressRouteCircuitPeeringListResult is response for ListPeering Api -// service callRetrieves all Peerings that belongs to an ExpressRouteCircuit +// ExpressRouteCircuitPeeringListResult is response for ListPeering API +// service call retrieves all peerings that belong to an ExpressRouteCircuit. type ExpressRouteCircuitPeeringListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` @@ -1149,7 +1148,7 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` } -// ExpressRouteCircuitPropertiesFormat is properties of ExpressRouteCircuit +// ExpressRouteCircuitPropertiesFormat is properties of ExpressRouteCircuit. type ExpressRouteCircuitPropertiesFormat struct { AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` @@ -1174,7 +1173,7 @@ type ExpressRouteCircuitRoutesTable struct { } // ExpressRouteCircuitRoutesTableSummary is the routes table associated with -// the ExpressRouteCircuit +// the ExpressRouteCircuit. type ExpressRouteCircuitRoutesTableSummary struct { Neighbor *string `json:"neighbor,omitempty"` V *int32 `json:"v,omitempty"` @@ -1184,7 +1183,7 @@ type ExpressRouteCircuitRoutesTableSummary struct { } // ExpressRouteCircuitsArpTableListResult is response for ListArpTable -// associated with the Express Route Circuits Api +// associated with the Express Route Circuits API. type ExpressRouteCircuitsArpTableListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` @@ -1192,14 +1191,14 @@ type ExpressRouteCircuitsArpTableListResult struct { } // ExpressRouteCircuitServiceProviderProperties is contains -// ServiceProviderProperties in an ExpressRouteCircuit +// ServiceProviderProperties in an ExpressRouteCircuit. type ExpressRouteCircuitServiceProviderProperties struct { ServiceProviderName *string `json:"serviceProviderName,omitempty"` PeeringLocation *string `json:"peeringLocation,omitempty"` BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` } -// ExpressRouteCircuitSku is contains sku in an ExpressRouteCircuit +// ExpressRouteCircuitSku is contains SKU in an ExpressRouteCircuit. type ExpressRouteCircuitSku struct { Name *string `json:"name,omitempty"` Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` @@ -1207,7 +1206,7 @@ type ExpressRouteCircuitSku struct { } // ExpressRouteCircuitsRoutesTableListResult is response for ListRoutesTable -// associated with the Express Route Circuits Api +// associated with the Express Route Circuits API. type ExpressRouteCircuitsRoutesTableListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` @@ -1215,14 +1214,14 @@ type ExpressRouteCircuitsRoutesTableListResult struct { } // ExpressRouteCircuitsRoutesTableSummaryListResult is response for -// ListRoutesTable associated with the Express Route Circuits Api +// ListRoutesTable associated with the Express Route Circuits API. type ExpressRouteCircuitsRoutesTableSummaryListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitStats is contains Stats associated with the peering +// ExpressRouteCircuitStats is contains stats associated with the peering. type ExpressRouteCircuitStats struct { autorest.Response `json:"-"` PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` @@ -1231,25 +1230,25 @@ type ExpressRouteCircuitStats struct { SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` } -// ExpressRouteServiceProvider is expressRouteResourceProvider object +// ExpressRouteServiceProvider is a ExpressRouteResourceProvider object. type ExpressRouteServiceProvider struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` } -// ExpressRouteServiceProviderBandwidthsOffered is contains Bandwidths offered -// in ExpressRouteServiceProviders +// ExpressRouteServiceProviderBandwidthsOffered is contains bandwidths offered +// in ExpressRouteServiceProvider resources. type ExpressRouteServiceProviderBandwidthsOffered struct { OfferName *string `json:"offerName,omitempty"` ValueInMbps *int32 `json:"valueInMbps,omitempty"` } -// ExpressRouteServiceProviderListResult is response for -// ListExpressRouteServiceProvider Api service call +// ExpressRouteServiceProviderListResult is response for the +// ListExpressRouteServiceProvider API service call. type ExpressRouteServiceProviderListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` @@ -1269,23 +1268,23 @@ func (client ExpressRouteServiceProviderListResult) ExpressRouteServiceProviderL } // ExpressRouteServiceProviderPropertiesFormat is properties of -// ExpressRouteServiceProvider +// ExpressRouteServiceProvider. type ExpressRouteServiceProviderPropertiesFormat struct { PeeringLocations *[]string `json:"peeringLocations,omitempty"` BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// FrontendIPConfiguration is frontend IP address of the load balancer +// FrontendIPConfiguration is frontend IP address of the load balancer. type FrontendIPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // FrontendIPConfigurationPropertiesFormat is properties of Frontend IP -// Configuration of the load balancer +// Configuration of the load balancer. type FrontendIPConfigurationPropertiesFormat struct { InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` @@ -1298,15 +1297,15 @@ type FrontendIPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// InboundNatPool is inbound NAT pool of the load balancer +// InboundNatPool is inbound NAT pool of the load balancer. type InboundNatPool struct { - ID *string `json:"id,omitempty"` - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// InboundNatPoolPropertiesFormat is properties of Inbound NAT pool +// InboundNatPoolPropertiesFormat is properties of Inbound NAT pool. type InboundNatPoolPropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` Protocol TransportProtocol `json:"protocol,omitempty"` @@ -1316,15 +1315,15 @@ type InboundNatPoolPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// InboundNatRule is inbound NAT rule of the loadbalancer +// InboundNatRule is inbound NAT rule of the load balancer. type InboundNatRule struct { - ID *string `json:"id,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *InboundNatRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// InboundNatRulePropertiesFormat is properties of Inbound NAT rule +// InboundNatRulePropertiesFormat is properties of the inbound NAT rule. type InboundNatRulePropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` @@ -1336,19 +1335,19 @@ type InboundNatRulePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// Interface is a NetworkInterface in a resource group +// Interface is a network interface in a resource group. type Interface struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *InterfacePropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *InterfacePropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// InterfaceDNSSettings is dns settings of a network interface +// InterfaceDNSSettings is dNS settings of a network interface. type InterfaceDNSSettings struct { DNSServers *[]string `json:"dnsServers,omitempty"` AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` @@ -1357,15 +1356,15 @@ type InterfaceDNSSettings struct { InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` } -// InterfaceIPConfiguration is iPConfiguration in a NetworkInterface +// InterfaceIPConfiguration is iPConfiguration in a network interface. type InterfaceIPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// InterfaceIPConfigurationPropertiesFormat is properties of IPConfiguration +// InterfaceIPConfigurationPropertiesFormat is properties of IP configuration. type InterfaceIPConfigurationPropertiesFormat struct { ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` @@ -1379,7 +1378,8 @@ type InterfaceIPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// InterfaceListResult is response for ListNetworkInterface Api service call +// InterfaceListResult is response for the ListNetworkInterface API service +// call. type InterfaceListResult struct { autorest.Response `json:"-"` Value *[]Interface `json:"value,omitempty"` @@ -1412,7 +1412,7 @@ type InterfacePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// IPAddressAvailabilityResult is response for CheckIPAddressAvailability Api +// IPAddressAvailabilityResult is response for CheckIPAddressAvailability API // service call type IPAddressAvailabilityResult struct { autorest.Response `json:"-"` @@ -1422,13 +1422,13 @@ type IPAddressAvailabilityResult struct { // IPConfiguration is iPConfiguration type IPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *IPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// IPConfigurationPropertiesFormat is properties of IPConfiguration +// IPConfigurationPropertiesFormat is properties of IP configuration. type IPConfigurationPropertiesFormat struct { PrivateIPAddress *string `json:"privateIPAddress,omitempty"` PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` @@ -1439,17 +1439,17 @@ type IPConfigurationPropertiesFormat struct { // LoadBalancer is loadBalancer resource type LoadBalancer struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *LoadBalancerPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// LoadBalancerListResult is response for ListLoadBalancers Api service call +// LoadBalancerListResult is response for ListLoadBalancers API service call. type LoadBalancerListResult struct { autorest.Response `json:"-"` Value *[]LoadBalancer `json:"value,omitempty"` @@ -1468,7 +1468,7 @@ func (client LoadBalancerListResult) LoadBalancerListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// LoadBalancerPropertiesFormat is properties of Load Balancer +// LoadBalancerPropertiesFormat is properties of the load balancer. type LoadBalancerPropertiesFormat struct { FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` @@ -1481,15 +1481,15 @@ type LoadBalancerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancingRule is rules of the load balancer +// LoadBalancingRule is a loag balancing rule for a load balancer. type LoadBalancingRule struct { - ID *string `json:"id,omitempty"` - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// LoadBalancingRulePropertiesFormat is properties of the load balancer +// LoadBalancingRulePropertiesFormat is properties of the load balancer. type LoadBalancingRulePropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` @@ -1505,18 +1505,18 @@ type LoadBalancingRulePropertiesFormat struct { // LocalNetworkGateway is a common class for general resource information type LocalNetworkGateway struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// LocalNetworkGatewayListResult is response for ListLocalNetworkGateways Api -// service call +// LocalNetworkGatewayListResult is response for ListLocalNetworkGateways API +// service call. type LocalNetworkGatewayListResult struct { autorest.Response `json:"-"` Value *[]LocalNetworkGateway `json:"value,omitempty"` @@ -1544,15 +1544,15 @@ type LocalNetworkGatewayPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// OutboundNatRule is outbound NAT pool of the load balancer +// OutboundNatRule is outbound NAT pool of the load balancer. type OutboundNatRule struct { - ID *string `json:"id,omitempty"` - Properties *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *OutboundNatRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// OutboundNatRulePropertiesFormat is outbound NAT pool of the load balancer +// OutboundNatRulePropertiesFormat is outbound NAT pool of the load balancer. type OutboundNatRulePropertiesFormat struct { AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` @@ -1560,12 +1560,12 @@ type OutboundNatRulePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// Probe is load balancer Probe +// Probe is a load balancer probe. type Probe struct { - ID *string `json:"id,omitempty"` - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ProbePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // ProbePropertiesFormat is @@ -1579,28 +1579,28 @@ type ProbePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// PublicIPAddress is publicIPAddress resource +// PublicIPAddress is public IP address resource. type PublicIPAddress struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// PublicIPAddressDNSSettings is contains FQDN of the DNS record associated -// with the public IP address +// PublicIPAddressDNSSettings is contains the FQDN of the DNS record +// associated with the public IP address. type PublicIPAddressDNSSettings struct { DomainNameLabel *string `json:"domainNameLabel,omitempty"` Fqdn *string `json:"fqdn,omitempty"` ReverseFqdn *string `json:"reverseFqdn,omitempty"` } -// PublicIPAddressListResult is response for ListPublicIpAddresses Api service -// call +// PublicIPAddressListResult is response for ListPublicIpAddresses API service +// call. type PublicIPAddressListResult struct { autorest.Response `json:"-"` Value *[]PublicIPAddress `json:"value,omitempty"` @@ -1619,7 +1619,7 @@ func (client PublicIPAddressListResult) PublicIPAddressListResultPreparer() (*ht autorest.WithBaseURL(to.String(client.NextLink))) } -// PublicIPAddressPropertiesFormat is publicIpAddress properties +// PublicIPAddressPropertiesFormat is public IP address properties. type PublicIPAddressPropertiesFormat struct { PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` @@ -1640,15 +1640,15 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ResourceNavigationLink is resourceNavigationLink resource +// ResourceNavigationLink is resourceNavigationLink resource. type ResourceNavigationLink struct { - ID *string `json:"id,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *ResourceNavigationLinkFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ResourceNavigationLinkFormat is properties of ResourceNavigationLink +// ResourceNavigationLinkFormat is properties of ResourceNavigationLink. type ResourceNavigationLinkFormat struct { LinkedResourceType *string `json:"linkedResourceType,omitempty"` Link *string `json:"link,omitempty"` @@ -1657,14 +1657,14 @@ type ResourceNavigationLinkFormat struct { // Route is route resource type Route struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *RoutePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// RouteListResult is response for ListRoute Api service call +// RouteListResult is response for the ListRoute API service call type RouteListResult struct { autorest.Response `json:"-"` Value *[]Route `json:"value,omitempty"` @@ -1691,19 +1691,19 @@ type RoutePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// RouteTable is routeTable resource +// RouteTable is route table resource. type RouteTable struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *RouteTablePropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// RouteTableListResult is response for ListRouteTable Api service call +// RouteTableListResult is response for the ListRouteTable API service call. type RouteTableListResult struct { autorest.Response `json:"-"` Value *[]RouteTable `json:"value,omitempty"` @@ -1729,20 +1729,20 @@ type RouteTablePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityGroup is networkSecurityGroup resource +// SecurityGroup is networkSecurityGroup resource. type SecurityGroup struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *SecurityGroupPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *SecurityGroupPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// SecurityGroupListResult is response for ListNetworkSecurityGroups Api -// service call +// SecurityGroupListResult is response for ListNetworkSecurityGroups API +// service call. type SecurityGroupListResult struct { autorest.Response `json:"-"` Value *[]SecurityGroup `json:"value,omitempty"` @@ -1761,7 +1761,7 @@ func (client SecurityGroupListResult) SecurityGroupListResultPreparer() (*http.R autorest.WithBaseURL(to.String(client.NextLink))) } -// SecurityGroupPropertiesFormat is network Security Group resource +// SecurityGroupPropertiesFormat is network Security Group resource. type SecurityGroupPropertiesFormat struct { SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` @@ -1771,17 +1771,17 @@ type SecurityGroupPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityRule is network security rule +// SecurityRule is network security rule. type SecurityRule struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *SecurityRulePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// SecurityRuleListResult is response for ListSecurityRule Api service -// callRetrieves all security rules that belongs to a network security group +// SecurityRuleListResult is response for ListSecurityRule API service call. +// Retrieves all security rules that belongs to a network security group. type SecurityRuleListResult struct { autorest.Response `json:"-"` Value *[]SecurityRule `json:"value,omitempty"` @@ -1820,16 +1820,16 @@ type String struct { Value *string `json:"value,omitempty"` } -// Subnet is subnet in a VirtualNework resource +// Subnet is subnet in a virtual network resource. type Subnet struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *SubnetPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// SubnetListResult is response for ListSubnets Api service callRetrieves all +// SubnetListResult is response for ListSubnets API service callRetrieves all // subnet that belongs to a virtual network type SubnetListResult struct { autorest.Response `json:"-"` @@ -1864,7 +1864,16 @@ type SubResource struct { ID *string `json:"id,omitempty"` } -// Usage is describes Network Resource Usage. +// TunnelConnectionHealth is virtualNetworkGatewayConnection properties +type TunnelConnectionHealth struct { + Tunnel *string `json:"tunnel,omitempty"` + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` +} + +// Usage is describes network resource usage. type Usage struct { Unit *string `json:"unit,omitempty"` CurrentValue *int64 `json:"currentValue,omitempty"` @@ -1872,13 +1881,13 @@ type Usage struct { Name *UsageName `json:"name,omitempty"` } -// UsageName is the Usage Names. +// UsageName is the usage names. type UsageName struct { Value *string `json:"value,omitempty"` LocalizedValue *string `json:"localizedValue,omitempty"` } -// UsagesListResult is the List Usages operation response. +// UsagesListResult is the list usages operation response. type UsagesListResult struct { autorest.Response `json:"-"` Value *[]Usage `json:"value,omitempty"` @@ -1897,45 +1906,45 @@ func (client UsagesListResult) UsagesListResultPreparer() (*http.Request, error) autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualNetwork is virtual Network resource +// VirtualNetwork is virtual Network resource. type VirtualNetwork struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } // VirtualNetworkGateway is a common class for general resource information type VirtualNetworkGateway struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } // VirtualNetworkGatewayConnection is a common class for general resource // information type VirtualNetworkGatewayConnection struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` } -// VirtualNetworkGatewayConnectionListResult is response for -// ListVirtualNetworkGatewayConnections Api service call +// VirtualNetworkGatewayConnectionListResult is response for the +// ListVirtualNetworkGatewayConnections API service call type VirtualNetworkGatewayConnectionListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` @@ -1965,6 +1974,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { RoutingWeight *int32 `json:"routingWeight,omitempty"` SharedKey *string `json:"sharedKey,omitempty"` ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` Peer *SubResource `json:"peer,omitempty"` @@ -1973,13 +1983,13 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayIPConfiguration is ipConfiguration for Virtual network -// gateway +// VirtualNetworkGatewayIPConfiguration is iP configuration for virtual +// network gateway type VirtualNetworkGatewayIPConfiguration struct { - ID *string `json:"id,omitempty"` - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // VirtualNetworkGatewayIPConfigurationPropertiesFormat is properties of @@ -1991,8 +2001,8 @@ type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayListResult is response for ListVirtualNetworkGateways -// Api service call +// VirtualNetworkGatewayListResult is response for the +// ListVirtualNetworkGateways API service call. type VirtualNetworkGatewayListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkGateway `json:"value,omitempty"` @@ -2033,8 +2043,8 @@ type VirtualNetworkGatewaySku struct { Capacity *int32 `json:"capacity,omitempty"` } -// VirtualNetworkListResult is response for ListVirtualNetworks Api service -// call +// VirtualNetworkListResult is response for the ListVirtualNetworks API +// service call. type VirtualNetworkListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetwork `json:"value,omitempty"` @@ -2053,17 +2063,17 @@ func (client VirtualNetworkListResult) VirtualNetworkListResultPreparer() (*http autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualNetworkPeering is peerings in a VirtualNework resource +// VirtualNetworkPeering is peerings in a virtual network resource. type VirtualNetworkPeering struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } -// VirtualNetworkPeeringListResult is response for ListSubnets Api service -// callRetrieves all subnet that belongs to a virtual network +// VirtualNetworkPeeringListResult is response for ListSubnets API service +// call. Retrieves all subnets that belong to a virtual network. type VirtualNetworkPeeringListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkPeering `json:"value,omitempty"` @@ -2098,12 +2108,12 @@ type VirtualNetworkPropertiesFormat struct { AddressSpace *AddressSpace `json:"addressSpace,omitempty"` DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` Subnets *[]Subnet `json:"subnets,omitempty"` - VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"VirtualNetworkPeerings,omitempty"` + VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` ResourceGUID *string `json:"resourceGuid,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// VpnClientConfiguration is vpnClientConfiguration for P2S client +// VpnClientConfiguration is vpnClientConfiguration for P2S client. type VpnClientConfiguration struct { VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` @@ -2116,16 +2126,16 @@ type VpnClientParameters struct { } // VpnClientRevokedCertificate is vPN client revoked certificate of virtual -// network gateway +// network gateway. type VpnClientRevokedCertificate struct { - ID *string `json:"id,omitempty"` - Properties *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // VpnClientRevokedCertificatePropertiesFormat is properties of the revoked -// VPN client certificate of virtual network gateway +// VPN client certificate of virtual network gateway. type VpnClientRevokedCertificatePropertiesFormat struct { Thumbprint *string `json:"thumbprint,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` @@ -2134,10 +2144,10 @@ type VpnClientRevokedCertificatePropertiesFormat struct { // VpnClientRootCertificate is vPN client root certificate of virtual network // gateway type VpnClientRootCertificate struct { - ID *string `json:"id,omitempty"` - Properties *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` } // VpnClientRootCertificatePropertiesFormat is properties of SSL certificates diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go index 40bf7cc56..d8ef099a7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go @@ -46,39 +46,39 @@ func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put PublicIPAddress operation creates/updates a -// stable/dynamic PublicIP address This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a static or dynamic public IP address. +// This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling +// and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. publicIPAddressName is -// the name of the publicIpAddress. parameters is parameters supplied to the -// create/update PublicIPAddress operation +// the name of the public IP address. parameters is parameters supplied to +// the create or update public IP address operation. func (client PublicIPAddressesClient) CreateOrUpdate(resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.NetworkSecurityGroup", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.NetworkSecurityGroup.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.NetworkSecurityGroup.Properties.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.NetworkSecurityGroup.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.NetworkSecurityGroup", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}, }}, - {Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.RouteTable", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.RouteTable.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.RouteTable.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, + {Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.RouteTable", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.RouteTable.RouteTablePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.RouteTable.RouteTablePropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, }}, - {Target: "parameters.Properties.IPConfiguration.Properties.Subnet.Properties.IPConfigurations", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.Subnet.SubnetPropertiesFormat.IPConfigurations", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}, }}, - {Target: "parameters.Properties.IPConfiguration.Properties.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, }}, }}, - {Target: "parameters.Properties.IPConfiguration", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.PublicIPAddressesClient", "CreateOrUpdate") } @@ -144,10 +144,10 @@ func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Respons return } -// Delete the delete publicIpAddress operation deletes the specified -// publicIpAddress. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified public IP address. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. publicIPAddressName is // the name of the subnet. @@ -211,11 +211,10 @@ func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (resu return } -// Get the Get publicIpAddress operation retrieves information about the -// specified pubicIpAddress +// Get gets the specified public IP address in a specified resource group. // // resourceGroupName is the name of the resource group. publicIPAddressName is -// the name of the subnet. expand is expand references resources. +// the name of the subnet. expand is expands referenced resources. func (client PublicIPAddressesClient) Get(resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { req, err := client.GetPreparer(resourceGroupName, publicIPAddressName, expand) if err != nil { @@ -278,8 +277,7 @@ func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result return } -// List the List publicIpAddress operation retrieves all the publicIpAddresses -// in a resource group. +// List gets all public IP addresses in a resource group. // // resourceGroupName is the name of the resource group. func (client PublicIPAddressesClient) List(resourceGroupName string) (result PublicIPAddressListResult, err error) { @@ -364,8 +362,7 @@ func (client PublicIPAddressesClient) ListNextResults(lastResults PublicIPAddres return } -// ListAll the List publicIpAddress operation retrieves all the -// publicIpAddresses in a subscription. +// ListAll gets all the public IP addresses in a subscription. func (client PublicIPAddressesClient) ListAll() (result PublicIPAddressListResult, err error) { req, err := client.ListAllPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go index fd0c68178..9aa1cf505 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go @@ -43,15 +43,15 @@ func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesCli return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put route operation creates/updates a route in the -// specified route table This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a route in the specified route table. +// This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling +// and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. routeTableName is the // name of the route table. routeName is the name of the route. -// routeParameters is parameters supplied to the create/update route -// operation +// routeParameters is parameters supplied to the create or update route +// operation. func (client RoutesClient) CreateOrUpdate(resourceGroupName string, routeTableName string, routeName string, routeParameters Route, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, routeTableName, routeName, routeParameters, cancel) if err != nil { @@ -115,10 +115,10 @@ func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete the delete route operation deletes the specified route from a route -// table. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified route from a route table. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. routeTableName is the // name of the route table. routeName is the name of the route. @@ -183,8 +183,7 @@ func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest return } -// Get the Get route operation retrieves information about the specified route -// from the route table. +// Get gets the specified route from a route table. // // resourceGroupName is the name of the resource group. routeTableName is the // name of the route table. routeName is the name of the route. @@ -248,8 +247,7 @@ func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err return } -// List the List network security rule operation retrieves all the routes in a -// route table. +// List gets all routes in a route table. // // resourceGroupName is the name of the resource group. routeTableName is the // name of the route table. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go index 81e5a0e99..b53e94eba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go @@ -45,19 +45,19 @@ func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) Rout return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put RouteTable operation creates/updates a route table -// in the specified resource group. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or updates a route table in a specified resource +// group. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. parameters is parameters supplied to the -// create/update Route Table operation +// name of the route table. parameters is parameters supplied to the create +// or update route table operation. func (client RouteTablesClient) CreateOrUpdate(resourceGroupName string, routeTableName string, parameters RouteTable, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.RouteTablePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RouteTablePropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.RouteTablesClient", "CreateOrUpdate") } @@ -122,10 +122,10 @@ func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (re return } -// Delete the Delete RouteTable operation deletes the specified Route Table -// This method may poll for completion. Polling can be canceled by passing -// the cancel channel argument. The channel will be used to cancel polling -// and any outstanding HTTP requests. +// Delete deletes the specified route table. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. routeTableName is the // name of the route table. @@ -189,11 +189,10 @@ func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result aut return } -// Get the Get RouteTables operation retrieves information about the specified -// route table. +// Get gets the specified route table. // // resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. expand is expand references resources. +// name of the route table. expand is expands referenced resources. func (client RouteTablesClient) Get(resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) { req, err := client.GetPreparer(resourceGroupName, routeTableName, expand) if err != nil { @@ -256,7 +255,7 @@ func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteT return } -// List the list RouteTables returns all route tables in a resource group +// List gets all route tables in a resource group. // // resourceGroupName is the name of the resource group. func (client RouteTablesClient) List(resourceGroupName string) (result RouteTableListResult, err error) { @@ -341,7 +340,7 @@ func (client RouteTablesClient) ListNextResults(lastResults RouteTableListResult return } -// ListAll the list RouteTables returns all route tables in a subscription +// ListAll gets all route tables in a subscription. func (client RouteTablesClient) ListAll() (result RouteTableListResult, err error) { req, err := client.ListAllPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go index 187ca8b98..37898c4d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go @@ -46,22 +46,21 @@ func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) S return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put NetworkSecurityGroup operation creates/updates a -// network security group in the specified resource group. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a network security group in the specified +// resource group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. -// parameters is parameters supplied to the create/update Network Security -// Group operation +// parameters is parameters supplied to the create or update network security +// group operation. func (client SecurityGroupsClient) CreateOrUpdate(resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "parameters.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.SecurityGroupPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SecurityGroupPropertiesFormat.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.SecurityGroupPropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.SecurityGroupsClient", "CreateOrUpdate") } @@ -127,10 +126,10 @@ func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete the Delete NetworkSecurityGroup operation deletes the specified -// network security group This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified network security group. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. @@ -194,12 +193,11 @@ func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result return } -// Get the Get NetworkSecurityGroups operation retrieves information about the -// specified network security group. +// Get gets the specified network security group. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. expand -// is expand references resources. +// is expands referenced resources. func (client SecurityGroupsClient) Get(resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) { req, err := client.GetPreparer(resourceGroupName, networkSecurityGroupName, expand) if err != nil { @@ -262,8 +260,7 @@ func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result Sec return } -// List the list NetworkSecurityGroups returns all network security groups in -// a resource group +// List gets all network security groups in a resource group. // // resourceGroupName is the name of the resource group. func (client SecurityGroupsClient) List(resourceGroupName string) (result SecurityGroupListResult, err error) { @@ -348,8 +345,7 @@ func (client SecurityGroupsClient) ListNextResults(lastResults SecurityGroupList return } -// ListAll the list NetworkSecurityGroups returns all network security groups -// in a subscription +// ListAll gets all network security groups in a subscription. func (client SecurityGroupsClient) ListAll() (result SecurityGroupListResult, err error) { req, err := client.ListAllPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go index c5ed15e55..9603c3c1f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go @@ -46,23 +46,22 @@ func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) Se return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put network security rule operation creates/updates a -// security rule in the specified network security group This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a security rule in the specified network +// security group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. // securityRuleName is the name of the security rule. securityRuleParameters -// is parameters supplied to the create/update network security rule -// operation +// is parameters supplied to the create or update network security rule +// operation. func (client SecurityRulesClient) CreateOrUpdate(resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: securityRuleParameters, - Constraints: []validation.Constraint{{Target: "securityRuleParameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "securityRuleParameters.Properties.SourceAddressPrefix", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "securityRuleParameters.Properties.DestinationAddressPrefix", Name: validation.Null, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "securityRuleParameters.SecurityRulePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "securityRuleParameters.SecurityRulePropertiesFormat.SourceAddressPrefix", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "securityRuleParameters.SecurityRulePropertiesFormat.DestinationAddressPrefix", Name: validation.Null, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.SecurityRulesClient", "CreateOrUpdate") } @@ -129,10 +128,10 @@ func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete the delete network security rule operation deletes the specified -// network security rule. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified network security rule. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. @@ -198,8 +197,7 @@ func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result a return } -// Get the Get NetworkSecurityRule operation retrieves information about the -// specified network security rule. +// Get get the specified network security rule. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. @@ -264,8 +262,7 @@ func (client SecurityRulesClient) GetResponder(resp *http.Response) (result Secu return } -// List the List network security rule operation retrieves all the security -// rules in a network security group. +// List gets all security rules in a network security group. // // resourceGroupName is the name of the resource group. // networkSecurityGroupName is the name of the network security group. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go index 3e27f4849..6230dbf03 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go @@ -44,30 +44,30 @@ func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsC return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put Subnet operation creates/updates a subnet in the -// specified virtual network This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a subnet in the specified virtual +// network. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. subnetName is the name of the subnet. -// subnetParameters is parameters supplied to the create/update Subnet -// operation +// subnetParameters is parameters supplied to the create or update subnet +// operation. func (client SubnetsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: subnetParameters, - Constraints: []validation.Constraint{{Target: "subnetParameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "subnetParameters.Properties.NetworkSecurityGroup", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "subnetParameters.Properties.NetworkSecurityGroup.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "subnetParameters.Properties.NetworkSecurityGroup.Properties.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, - {Target: "subnetParameters.Properties.NetworkSecurityGroup.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat.NetworkSecurityGroup", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.NetworkInterfaces", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "subnetParameters.SubnetPropertiesFormat.NetworkSecurityGroup.SecurityGroupPropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}, }}, - {Target: "subnetParameters.Properties.RouteTable", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "subnetParameters.Properties.RouteTable.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "subnetParameters.Properties.RouteTable.Properties.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, + {Target: "subnetParameters.SubnetPropertiesFormat.RouteTable", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat.RouteTable.RouteTablePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "subnetParameters.SubnetPropertiesFormat.RouteTable.RouteTablePropertiesFormat.Subnets", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, }}, - {Target: "subnetParameters.Properties.IPConfigurations", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "subnetParameters.SubnetPropertiesFormat.IPConfigurations", Name: validation.ReadOnly, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "network.SubnetsClient", "CreateOrUpdate") } @@ -134,10 +134,9 @@ func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete the delete subnet operation deletes the specified subnet. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// Delete deletes the specified subnet. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. subnetName is the name of the subnet. @@ -202,12 +201,11 @@ func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autores return } -// Get the Get subnet operation retrieves information about the specified -// subnet. +// Get gets the specified subnet by virtual network and resource group. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. subnetName is the name of the subnet. -// expand is expand references resources. +// expand is expands referenced resources. func (client SubnetsClient) Get(resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkName, subnetName, expand) if err != nil { @@ -271,8 +269,7 @@ func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, er return } -// List the List subnets operation retrieves all the subnets in a virtual -// network. +// List gets all subnets in a virtual network. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go index 8c246feca..016de70e1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go @@ -46,7 +46,7 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli // List lists compute usages for a subscription. // -// location is the location upon which resource usage is queried. +// location is the location where resource usage is queried. func (client UsagesClient) List(location string) (result UsagesListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: location, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go index aebb35cf3..b0628fe0b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go index a7feb8fe2..d58a9d326 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go @@ -21,6 +21,7 @@ package network import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -45,19 +46,46 @@ func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscr return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put VirtualNetworkGatewayConnection operation -// creates/updates a virtual network gateway connection in the specified -// resource group through Network resource provider. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a virtual network gateway connection in +// the specified resource group. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will +// be used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayConnectionName is the name of the virtual network -// gateway connection. parameters is parameters supplied to the Begin Create -// or update Virtual Network Gateway connection operation through Network -// resource provider. +// gateway connection. parameters is parameters supplied to the create or +// update virtual network gateway connection operation. func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.IPConfigurations", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.IPConfigurations", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.LocalNetworkAddressSpace", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.ConnectionStatus", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.TunnelConnectionStatus", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.EgressBytesTransferred", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.IngressBytesTransferred", Name: validation.ReadOnly, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate") + } + req, err := client.CreateOrUpdatePreparer(resourceGroupName, virtualNetworkGatewayConnectionName, parameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -119,11 +147,10 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(res return } -// Delete the Delete VirtualNetworkGatewayConnection operation deletes the -// specified virtual network Gateway connection through Network resource -// provider. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified virtual network Gateway connection. This +// method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and +// any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayConnectionName is the name of the virtual network @@ -188,9 +215,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http. return } -// Get the Get VirtualNetworkGatewayConnection operation retrieves information -// about the specified virtual network gateway connection through Network -// resource provider. +// Get gets the specified virtual network gateway connection by resource group. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayConnectionName is the name of the virtual network @@ -259,10 +284,10 @@ func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Res // connection shared key through Network resource provider. // // resourceGroupName is the name of the resource group. -// connectionSharedKeyName is the virtual network gateway connection shared -// key name. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(resourceGroupName string, connectionSharedKeyName string) (result ConnectionSharedKeyResult, err error) { - req, err := client.GetSharedKeyPreparer(resourceGroupName, connectionSharedKeyName) +// virtualNetworkGatewayConnectionName is the virtual network gateway +// connection shared key name. +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) { + req, err := client.GetSharedKeyPreparer(resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request") } @@ -282,11 +307,11 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(resourceGroupN } // GetSharedKeyPreparer prepares the GetSharedKey request. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(resourceGroupName string, connectionSharedKeyName string) (*http.Request, error) { +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(resourceGroupName string, virtualNetworkGatewayConnectionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "connectionSharedKeyName": autorest.Encode("path", connectionSharedKeyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } queryParameters := map[string]interface{}{ @@ -296,7 +321,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{connectionSharedKeyName}/sharedkey", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -309,7 +334,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *htt // GetSharedKeyResponder handles the response to the GetSharedKey request. The method always // closes the http.Response Body. -func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKeyResult, err error) { +func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp *http.Response) (result ConnectionSharedKey, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -416,9 +441,18 @@ func (client VirtualNetworkGatewayConnectionsClient) ListNextResults(lastResults // resourceGroupName is the name of the resource group. // virtualNetworkGatewayConnectionName is the virtual network gateway // connection reset shared key Name. parameters is parameters supplied to the -// Begin Reset Virtual Network Gateway connection shared key operation -// through Network resource provider. +// begin reset virtual network gateway connection shared key operation +// through network resource provider. func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: 128, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey") + } + req, err := client.ResetSharedKeyPreparer(resourceGroupName, virtualNetworkGatewayConnectionName, parameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure preparing request") @@ -493,6 +527,12 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(res // Virtual Network Gateway connection Shared key operation throughNetwork // resource provider. func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey") + } + req, err := client.SetSharedKeyPreparer(resourceGroupName, virtualNetworkGatewayConnectionName, parameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure preparing request") diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go index 12e12bc42..2a6ce4772 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go @@ -21,6 +21,7 @@ package network import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -45,17 +46,25 @@ func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID s return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put VirtualNetworkGateway operation creates/updates a -// virtual network gateway in the specified resource group through Network -// resource provider. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a virtual network gateway in the +// specified resource group. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayName is the name of the virtual network gateway. -// parameters is parameters supplied to the Begin Create or update Virtual -// Network Gateway operation through Network resource provider. +// parameters is parameters supplied to create or update virtual network +// gateway operation. func (client VirtualNetworkGatewaysClient) CreateOrUpdate(resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, cancel <-chan struct{}) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.IPConfigurations", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayPropertiesFormat.ProvisioningState", Name: validation.ReadOnly, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate") + } + req, err := client.CreateOrUpdatePreparer(resourceGroupName, virtualNetworkGatewayName, parameters, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -117,9 +126,8 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Re return } -// Delete the Delete VirtualNetworkGateway operation deletes the specified -// virtual network Gateway through Network resource provider. This method may -// poll for completion. Polling can be canceled by passing the cancel channel +// Delete deletes the specified virtual network gateway. This method may poll +// for completion. Polling can be canceled by passing the cancel channel // argument. The channel will be used to cancel polling and any outstanding // HTTP requests. // @@ -185,14 +193,13 @@ func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response) return } -// Generatevpnclientpackage the Generatevpnclientpackage operation generates -// Vpn client package for P2S client of the virtual network gateway in the -// specified resource group through Network resource provider. +// Generatevpnclientpackage generates VPN client package for P2S client of the +// virtual network gateway in the specified resource group. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayName is the name of the virtual network gateway. -// parameters is parameters supplied to the Begin Generating Virtual Network -// Gateway Vpn client package operation through Network resource provider. +// parameters is parameters supplied to the generate virtual network gateway +// VPN client package operation. func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result String, err error) { req, err := client.GeneratevpnclientpackagePreparer(resourceGroupName, virtualNetworkGatewayName, parameters) if err != nil { @@ -254,8 +261,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res return } -// Get the Get VirtualNetworkGateway operation retrieves information about the -// specified virtual network gateway through Network resource provider. +// Get gets the specified virtual network gateway by resource group. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayName is the name of the virtual network gateway. @@ -318,8 +324,7 @@ func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (re return } -// List the List VirtualNetworkGateways operation retrieves all the virtual -// network gateways stored. +// List gets all virtual network gateways by resource group. // // resourceGroupName is the name of the resource group. func (client VirtualNetworkGatewaysClient) List(resourceGroupName string) (result VirtualNetworkGatewayListResult, err error) { @@ -404,18 +409,17 @@ func (client VirtualNetworkGatewaysClient) ListNextResults(lastResults VirtualNe return } -// Reset the Reset VirtualNetworkGateway operation resets the primary of the -// virtual network gateway in the specified resource group through Network -// resource provider. This method may poll for completion. Polling can be +// Reset resets the primary of the virtual network gateway in the specified +// resource group. This method may poll for completion. Polling can be // canceled by passing the cancel channel argument. The channel will be used // to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. // virtualNetworkGatewayName is the name of the virtual network gateway. -// parameters is parameters supplied to the Begin Reset Virtual Network -// Gateway operation through Network resource provider. -func (client VirtualNetworkGatewaysClient) Reset(resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, cancel <-chan struct{}) (result autorest.Response, err error) { - req, err := client.ResetPreparer(resourceGroupName, virtualNetworkGatewayName, parameters, cancel) +// gatewayVip is virtual network gateway vip address supplied to the begin +// reset of the active-active feature enabled gateway. +func (client VirtualNetworkGatewaysClient) Reset(resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string, cancel <-chan struct{}) (result autorest.Response, err error) { + req, err := client.ResetPreparer(resourceGroupName, virtualNetworkGatewayName, gatewayVip, cancel) if err != nil { return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request") } @@ -435,7 +439,7 @@ func (client VirtualNetworkGatewaysClient) Reset(resourceGroupName string, virtu } // ResetPreparer prepares the Reset request. -func (client VirtualNetworkGatewaysClient) ResetPreparer(resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, cancel <-chan struct{}) (*http.Request, error) { +func (client VirtualNetworkGatewaysClient) ResetPreparer(resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -445,13 +449,14 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(resourceGroupName strin queryParameters := map[string]interface{}{ "api-version": client.APIVersion, } + if len(gatewayVip) > 0 { + queryParameters["gatewayVip"] = autorest.Encode("query", gatewayVip) + } preparer := autorest.CreatePreparer( - autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset", pathParameters), - autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go index ba9dc74a8..bfed897a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go @@ -45,16 +45,15 @@ func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID s return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the Put virtual network peering operation creates/updates a -// peering in the specified virtual network This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a peering in the specified virtual +// network. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. virtualNetworkPeeringName is the name of // the peering. virtualNetworkPeeringParameters is parameters supplied to the -// create/update virtual network peering operation +// create or update virtual network peering operation. func (client VirtualNetworkPeeringsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, cancel) if err != nil { @@ -118,10 +117,10 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Re return } -// Delete the delete virtual network peering operation deletes the specified -// peering. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified virtual network peering. This method may poll +// for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. virtualNetworkPeeringName is the name of @@ -187,8 +186,7 @@ func (client VirtualNetworkPeeringsClient) DeleteResponder(resp *http.Response) return } -// Get the Get virtual network peering operation retrieves information about -// the specified virtual network peering. +// Get gets the specified virtual network peering. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. virtualNetworkPeeringName is the name of @@ -253,8 +251,7 @@ func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (re return } -// List the List virtual network peerings operation retrieves all the peerings -// in a virtual network. +// List gets all virtual network peerings in a virtual network. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go index 89758841b..9046437af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go @@ -45,7 +45,7 @@ func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckIPAddressAvailability checks whether a private Ip address is available +// CheckIPAddressAvailability checks whether a private IP address is available // for use. // // resourceGroupName is the name of the resource group. virtualNetworkName is @@ -113,15 +113,14 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *ht return } -// CreateOrUpdate the Put VirtualNetwork operation creates/updates a virtual -// network in the specified resource group. This method may poll for -// completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a virtual network in the specified +// resource group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. parameters is parameters supplied to the -// create/update Virtual Network operation +// create or update virtual network operation func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, virtualNetworkName, parameters, cancel) if err != nil { @@ -184,10 +183,10 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete the Delete VirtualNetwork operation deletes the specified virtual -// network This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified virtual network. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group. virtualNetworkName is // the name of the virtual network. @@ -251,11 +250,10 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result return } -// Get the Get VirtualNetwork operation retrieves information about the -// specified virtual network. +// Get gets the specified virtual network by resource group. // // resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. expand is expand references resources. +// the name of the virtual network. expand is expands referenced resources. func (client VirtualNetworksClient) Get(resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkName, expand) if err != nil { @@ -318,8 +316,7 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi return } -// List the list VirtualNetwork returns all Virtual Networks in a resource -// group +// List gets all virtual networks in a resource group. // // resourceGroupName is the name of the resource group. func (client VirtualNetworksClient) List(resourceGroupName string) (result VirtualNetworkListResult, err error) { @@ -404,8 +401,7 @@ func (client VirtualNetworksClient) ListNextResults(lastResults VirtualNetworkLi return } -// ListAll the list VirtualNetwork returns all Virtual Networks in a -// subscription +// ListAll gets all virtual networks in a subscription. func (client VirtualNetworksClient) ListAll() (result VirtualNetworkListResult, err error) { req, err := client.ListAllPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go index 05cafbf1c..23a8189a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go @@ -1,6 +1,7 @@ // Package resources implements the Azure ARM Resources service API version // 2016-09-01. // +// Provides operations for working with resources and resource groups. package resources // Copyright (c) Microsoft and contributors. All rights reserved. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go index 2b8408512..76fbd496e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go @@ -25,8 +25,8 @@ import ( "net/http" ) -// DeploymentOperationsClient is the client for the DeploymentOperations -// methods of the Resources service. +// DeploymentOperationsClient is the provides operations for working with +// resources and resource groups. type DeploymentOperationsClient struct { ManagementClient } @@ -43,11 +43,11 @@ func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID str return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get get a list of deployments operations. +// Get gets a deployments operation. // // resourceGroupName is the name of the resource group. The name is case // insensitive. deploymentName is the name of the deployment. operationID is -// operation Id. +// the ID of the operation to get. func (client DeploymentOperationsClient) Get(resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -120,11 +120,11 @@ func (client DeploymentOperationsClient) GetResponder(resp *http.Response) (resu return } -// List gets a list of deployments operations. +// List gets all deployments operations for a deployment. // // resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. top is query -// parameters. +// insensitive. deploymentName is the name of the deployment with the +// operation to get. top is the number of results to return. func (client DeploymentOperationsClient) List(resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go index 316456c02..e2c6bb2cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go @@ -25,8 +25,8 @@ import ( "net/http" ) -// DeploymentsClient is the client for the Deployments methods of the -// Resources service. +// DeploymentsClient is the provides operations for working with resources and +// resource groups. type DeploymentsClient struct { ManagementClient } @@ -42,10 +42,14 @@ func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) Depl return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Cancel cancel a currently running template deployment. +// Cancel you can cancel a deployment only if the provisioningState is +// Accepted or Running. After the deployment is canceled, the +// provisioningState is set to Canceled. Canceling a template deployment +// stops the currently running template deployment and leaves the resource +// group partially deployed. // // resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. +// insensitive. deploymentName is the name of the deployment to cancel. func (client DeploymentsClient) Cancel(resourceGroupName string, deploymentName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -116,10 +120,11 @@ func (client DeploymentsClient) CancelResponder(resp *http.Response) (result aut return } -// CheckExistence checks whether deployment exists. +// CheckExistence checks whether the deployment exists. // -// resourceGroupName is the name of the resource group to check. The name is -// case insensitive. deploymentName is the name of the deployment. +// resourceGroupName is the name of the resource group with the deployment to +// check. The name is case insensitive. deploymentName is the name of the +// deployment to check. func (client DeploymentsClient) CheckExistence(resourceGroupName string, deploymentName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -190,14 +195,15 @@ func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (re return } -// CreateOrUpdate create a named template deployment using a template. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// CreateOrUpdate you can provide the template and parameters directly in the +// request or link to JSON files. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. parameters is -// additional parameters supplied to the operation. +// resourceGroupName is the name of the resource group to deploy the resources +// to. The name is case insensitive. The resource group must already exist. +// deploymentName is the name of the deployment. parameters is additional +// parameters supplied to the operation. func (client DeploymentsClient) CreateOrUpdate(resourceGroupName string, deploymentName string, parameters Deployment, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -279,12 +285,23 @@ func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (re return } -// Delete delete deployment. This method may poll for completion. Polling can +// Delete a template deployment that is currently running cannot be deleted. +// Deleting a template deployment removes the associated deployment +// operations. Deleting a template deployment does not affect the state of +// the resource group. This is an asynchronous operation that returns a +// status of 202 until the template deployment is successfully deleted. The +// Location response header contains the URI that is used to obtain the +// status of the process. While the process is running, a call to the URI in +// the Location header returns a status of 202. When the process finishes, +// the URI in the Location header returns a status of 204 on success. If the +// asynchronous request failed, the URI in the Location header returns an +// error-level status code. This method may poll for completion. Polling can // be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment to be deleted. +// resourceGroupName is the name of the resource group with the deployment to +// delete. The name is case insensitive. deploymentName is the name of the +// deployment to delete. func (client DeploymentsClient) Delete(resourceGroupName string, deploymentName string, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -357,10 +374,11 @@ func (client DeploymentsClient) DeleteResponder(resp *http.Response) (result aut return } -// ExportTemplate exports a deployment template. +// ExportTemplate exports the template used for specified deployment. // // resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. +// insensitive. deploymentName is the name of the deployment from which to +// get the template. func (client DeploymentsClient) ExportTemplate(resourceGroupName string, deploymentName string) (result DeploymentExportResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -432,10 +450,10 @@ func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (re return } -// Get get a deployment. +// Get gets a deployment. // -// resourceGroupName is the name of the resource group to get. The name is -// case insensitive. deploymentName is the name of the deployment. +// resourceGroupName is the name of the resource group. The name is case +// insensitive. deploymentName is the name of the deployment to get. func (client DeploymentsClient) Get(resourceGroupName string, deploymentName string) (result DeploymentExtended, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -507,11 +525,13 @@ func (client DeploymentsClient) GetResponder(resp *http.Response) (result Deploy return } -// List get a list of deployments. +// List get all the deployments for a resource group. // -// resourceGroupName is the name of the resource group to filter by. The name -// is case insensitive. filter is the filter to apply on the operation. top -// is query parameters. If null is passed returns all deployments. +// resourceGroupName is the name of the resource group with the deployments to +// get. The name is case insensitive. filter is the filter to apply on the +// operation. For example, you can use $filter=provisioningState eq +// '{state}'. top is the number of results to get. If null is passed, returns +// all deployments. func (client DeploymentsClient) List(resourceGroupName string, filter string, top *int32) (result DeploymentListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -608,11 +628,12 @@ func (client DeploymentsClient) ListNextResults(lastResults DeploymentListResult return } -// Validate validate a deployment template. +// Validate validates whether the specified template is syntactically correct +// and will be accepted by Azure Resource Manager.. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. parameters is -// deployment to validate. +// resourceGroupName is the name of the resource group the template will be +// deployed to. The name is case insensitive. deploymentName is the name of +// the deployment. parameters is parameters to validate. func (client DeploymentsClient) Validate(resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go index c8eaff637..7fe47a09a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go @@ -25,7 +25,8 @@ import ( "net/http" ) -// GroupsClient is the client for the Groups methods of the Resources service. +// GroupsClient is the provides operations for working with resources and +// resource groups. type GroupsClient struct { ManagementClient } @@ -40,7 +41,7 @@ func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsCli return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckExistence checks whether resource group exists. +// CheckExistence checks whether a resource group exists. // // resourceGroupName is the name of the resource group to check. The name is // case insensitive. @@ -109,11 +110,11 @@ func (client GroupsClient) CheckExistenceResponder(resp *http.Response) (result return } -// CreateOrUpdate create a resource group. +// CreateOrUpdate creates a resource group. // -// resourceGroupName is the name of the resource group to be created or -// updated. parameters is parameters supplied to the create or update -// resource group service operation. +// resourceGroupName is the name of the resource group to create or update. +// parameters is parameters supplied to the create or update a resource +// group. func (client GroupsClient) CreateOrUpdate(resourceGroupName string, parameters ResourceGroup) (result ResourceGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -187,12 +188,14 @@ func (client GroupsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete delete resource group. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will -// be used to cancel polling and any outstanding HTTP requests. +// Delete when you delete a resource group, all of its resources are also +// deleted. Deleting a resource group deletes all of its template deployments +// and currently stored operations. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group to be deleted. The name -// is case insensitive. +// resourceGroupName is the name of the resource group to delete. The name is +// case insensitive. func (client GroupsClient) Delete(resourceGroupName string, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -262,9 +265,8 @@ func (client GroupsClient) DeleteResponder(resp *http.Response) (result autorest // ExportTemplate captures the specified resource group as a template. // -// resourceGroupName is the name of the resource group to be created or -// updated. parameters is parameters supplied to the export template resource -// group operation. +// resourceGroupName is the name of the resource group to export as a +// template. parameters is parameters for exporting the template. func (client GroupsClient) ExportTemplate(resourceGroupName string, parameters ExportTemplateRequest) (result ResourceGroupExportResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -333,7 +335,7 @@ func (client GroupsClient) ExportTemplateResponder(resp *http.Response) (result return } -// Get get a resource group. +// Get gets a resource group. // // resourceGroupName is the name of the resource group to get. The name is // case insensitive. @@ -403,10 +405,10 @@ func (client GroupsClient) GetResponder(resp *http.Response) (result ResourceGro return } -// List gets a collection of resource groups. +// List gets all the resource groups for a subscription. // -// filter is the filter to apply on the operation. top is query parameters. If -// null is passed returns all resource groups. +// filter is the filter to apply on the operation. top is the number of +// results to return. If null is passed, returns all resource groups. func (client GroupsClient) List(filter string, top *int32) (result ResourceGroupListResult, err error) { req, err := client.ListPreparer(filter, top) if err != nil { @@ -494,12 +496,12 @@ func (client GroupsClient) ListNextResults(lastResults ResourceGroupListResult) return } -// ListResources get all of the resources under a subscription. +// ListResources get all the resources for a resource group. // -// resourceGroupName is query parameters. If null is passed returns all -// resource groups. filter is the filter to apply on the operation. expand is -// the $expand query parameter top is query parameters. If null is passed -// returns all resource groups. +// resourceGroupName is the resource group with the resources to get. filter +// is the filter to apply on the operation. expand is the $expand query +// parameter top is the number of results to return. If null is passed, +// returns all resources. func (client GroupsClient) ListResources(resourceGroupName string, filter string, expand string, top *int32) (result ResourceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -601,12 +603,11 @@ func (client GroupsClient) ListResourcesNextResults(lastResults ResourceListResu // Patch resource groups can be updated through a simple PATCH operation to a // group address. The format of the request is the same as that for creating -// a resource groups, though if a field is unspecified current value will be -// carried over. +// a resource group. If a field is unspecified, the current value is retained. // -// resourceGroupName is the name of the resource group to be created or -// updated. The name is case insensitive. parameters is parameters supplied -// to the update state resource group service operation. +// resourceGroupName is the name of the resource group to update. The name is +// case insensitive. parameters is parameters supplied to update a resource +// group. func (client GroupsClient) Patch(resourceGroupName string, parameters ResourceGroup) (result ResourceGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go index 5376d70ee..60abc05cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go @@ -165,7 +165,7 @@ type DeploymentProperties struct { Parameters *map[string]interface{} `json:"parameters,omitempty"` ParametersLink *ParametersLink `json:"parametersLink,omitempty"` Mode DeploymentMode `json:"mode,omitempty"` - DebugSetting *DebugSetting `json:"debugSetting,omitempty"` + *DebugSetting `json:"debugSetting,omitempty"` } // DeploymentPropertiesExtended is deployment properties with additional @@ -182,7 +182,7 @@ type DeploymentPropertiesExtended struct { Parameters *map[string]interface{} `json:"parameters,omitempty"` ParametersLink *ParametersLink `json:"parametersLink,omitempty"` Mode DeploymentMode `json:"mode,omitempty"` - DebugSetting *DebugSetting `json:"debugSetting,omitempty"` + *DebugSetting `json:"debugSetting,omitempty"` } // DeploymentValidateResult is information from validate template deployment @@ -386,7 +386,7 @@ type ResourceProviderOperationDisplayProperties struct { Description *string `json:"description,omitempty"` } -// Sku is sku for the resource. +// Sku is sKU for the resource. type Sku struct { Name *string `json:"name,omitempty"` Tier *string `json:"tier,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go index 5a9470f53..e796941bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go @@ -24,8 +24,8 @@ import ( "net/http" ) -// ProvidersClient is the client for the Providers methods of the Resources -// service. +// ProvidersClient is the provides operations for working with resources and +// resource groups. type ProvidersClient struct { ManagementClient } @@ -41,11 +41,11 @@ func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) Provid return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets a resource provider. +// Get gets the specified resource provider. // -// resourceProviderNamespace is namespace of the resource provider. expand is -// the $expand query parameter. e.g. To include property aliases in response, -// use $expand=resourceTypes/aliases. +// resourceProviderNamespace is the namespace of the resource provider. expand +// is the $expand query parameter. For example, to include property aliases +// in response, use $expand=resourceTypes/aliases. func (client ProvidersClient) Get(resourceProviderNamespace string, expand string) (result Provider, err error) { req, err := client.GetPreparer(resourceProviderNamespace, expand) if err != nil { @@ -107,11 +107,13 @@ func (client ProvidersClient) GetResponder(resp *http.Response) (result Provider return } -// List gets a list of resource providers. +// List gets all resource providers for a subscription. // -// top is query parameters. If null is passed returns all deployments. expand -// is the $expand query parameter. e.g. To include property aliases in -// response, use $expand=resourceTypes/aliases. +// top is the number of results to return. If null is passed returns all +// deployments. expand is the properties to include in the results. For +// example, use &$expand=metadata in the query string to retrieve resource +// provider metadata. To include property aliases in response, use +// $expand=resourceTypes/aliases. func (client ProvidersClient) List(top *int32, expand string) (result ProviderListResult, err error) { req, err := client.ListPreparer(top, expand) if err != nil { @@ -199,9 +201,10 @@ func (client ProvidersClient) ListNextResults(lastResults ProviderListResult) (r return } -// Register registers provider to be used with a subscription. +// Register registers a subscription with a resource provider. // -// resourceProviderNamespace is namespace of the resource provider. +// resourceProviderNamespace is the namespace of the resource provider to +// register. func (client ProvidersClient) Register(resourceProviderNamespace string) (result Provider, err error) { req, err := client.RegisterPreparer(resourceProviderNamespace) if err != nil { @@ -260,9 +263,10 @@ func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Pro return } -// Unregister unregisters provider from a subscription. +// Unregister unregisters a subscription from a resource provider. // -// resourceProviderNamespace is namespace of the resource provider. +// resourceProviderNamespace is the namespace of the resource provider to +// unregister. func (client ProvidersClient) Unregister(resourceProviderNamespace string) (result Provider, err error) { req, err := client.UnregisterPreparer(resourceProviderNamespace) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resources.go index b50184799..55acbf28c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resources.go @@ -25,7 +25,8 @@ import ( "net/http" ) -// Client is the client for the Resources methods of the Resources service. +// Client is the provides operations for working with resources and resource +// groups. type Client struct { ManagementClient } @@ -40,12 +41,13 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { return Client{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckExistence checks whether resource exists. +// CheckExistence checks whether a resource exists. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. resourceProviderNamespace is resource identity. -// parentResourcePath is resource identity. resourceType is resource -// identity. resourceName is resource identity. +// resourceGroupName is the name of the resource group containing the resource +// to check. The name is case insensitive. resourceProviderNamespace is the +// resource provider of the resource to check. parentResourcePath is the +// parent resource identity. resourceType is the resource type. resourceName +// is the name of the resource to check whether it exists. func (client Client) CheckExistence(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -115,11 +117,11 @@ func (client Client) CheckExistenceResponder(resp *http.Response) (result autore return } -// CheckExistenceByID checks whether resource exists. +// CheckExistenceByID checks by ID whether a resource exists. // -// resourceID is the fully qualified Id of the resource, including the -// resource name and resource type. For example, -// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite +// resourceID is the fully qualified ID of the resource, including the +// resource name and resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client Client) CheckExistenceByID(resourceID string) (result autorest.Response, err error) { req, err := client.CheckExistenceByIDPreparer(resourceID) if err != nil { @@ -176,15 +178,16 @@ func (client Client) CheckExistenceByIDResponder(resp *http.Response) (result au return } -// CreateOrUpdate create a resource. This method may poll for completion. +// CreateOrUpdate creates a resource. This method may poll for completion. // Polling can be canceled by passing the cancel channel argument. The // channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. resourceProviderNamespace is resource identity. -// parentResourcePath is resource identity. resourceType is resource -// identity. resourceName is resource identity. parameters is create or -// update resource parameters. +// resourceGroupName is the name of the resource group for the resource. The +// name is case insensitive. resourceProviderNamespace is the namespace of +// the resource provider. parentResourcePath is the parent resource identity. +// resourceType is the resource type of the resource to create. resourceName +// is the name of the resource to create. parameters is parameters for +// creating or updating the resource. func (client Client) CreateOrUpdate(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -265,13 +268,14 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result autore return } -// CreateOrUpdateByID create a resource. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdateByID create a resource by ID. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceID is the fully qualified Id of the resource, including the -// resource name and resource type. For example, -// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite +// resourceID is the fully qualified ID of the resource, including the +// resource name and resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} // parameters is create or update resource parameters. func (client Client) CreateOrUpdateByID(resourceID string, parameters GenericResource, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -348,10 +352,11 @@ func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result au // be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. resourceProviderNamespace is resource identity. -// parentResourcePath is resource identity. resourceType is resource -// identity. resourceName is resource identity. +// resourceGroupName is the name of the resource group that contains the +// resource to delete. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. +// parentResourcePath is the parent resource identity. resourceType is the +// resource type. resourceName is the name of the resource to delete. func (client Client) Delete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -423,13 +428,13 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo return } -// DeleteByID deletes a resource. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will -// be used to cancel polling and any outstanding HTTP requests. +// DeleteByID deletes a resource by ID. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceID is the fully qualified Id of the resource, including the -// resource name and resource type. For example, -// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite +// resourceID is the fully qualified ID of the resource, including the +// resource name and resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client Client) DeleteByID(resourceID string, cancel <-chan struct{}) (result autorest.Response, err error) { req, err := client.DeleteByIDPreparer(resourceID, cancel) if err != nil { @@ -488,12 +493,13 @@ func (client Client) DeleteByIDResponder(resp *http.Response) (result autorest.R return } -// Get returns a resource belonging to a resource group. +// Get gets a resource. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. resourceProviderNamespace is resource identity. -// parentResourcePath is resource identity. resourceType is resource -// identity. resourceName is resource identity. +// resourceGroupName is the name of the resource group containing the resource +// to get. The name is case insensitive. resourceProviderNamespace is the +// namespace of the resource provider. parentResourcePath is the parent +// resource identity. resourceType is the resource type of the resource. +// resourceName is the name of the resource to get. func (client Client) Get(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result GenericResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -564,11 +570,11 @@ func (client Client) GetResponder(resp *http.Response) (result GenericResource, return } -// GetByID gets a resource. +// GetByID gets a resource by ID. // -// resourceID is the fully qualified Id of the resource, including the -// resource name and resource type. For example, -// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite +// resourceID is the fully qualified ID of the resource, including the +// resource name and resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client Client) GetByID(resourceID string) (result GenericResource, err error) { req, err := client.GetByIDPreparer(resourceID) if err != nil { @@ -626,11 +632,11 @@ func (client Client) GetByIDResponder(resp *http.Response) (result GenericResour return } -// List get all of the resources under a subscription. +// List get all the resources in a subscription. // // filter is the filter to apply on the operation. expand is the $expand query -// parameter. top is query parameters. If null is passed returns all resource -// groups. +// parameter. top is the number of results to return. If null is passed, +// returns all resource groups. func (client Client) List(filter string, expand string, top *int32) (result ResourceListResult, err error) { req, err := client.ListPreparer(filter, expand, top) if err != nil { @@ -721,14 +727,17 @@ func (client Client) ListNextResults(lastResults ResourceListResult) (result Res return } -// MoveResources move resources from one resource group to another. The -// resources being moved should all be in the same resource group. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// MoveResources the resources to move must be in the same source resource +// group. The target resource group may be in a different subscription. When +// moving resources, both the source group and the target group are locked +// for the duration of the operation. Write and delete operations are blocked +// on the groups until the move completes. This method may poll for +// completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// sourceResourceGroupName is source resource group name. parameters is move -// resources' parameters. +// sourceResourceGroupName is the name of the resource group containing the +// rsources to move. parameters is parameters for moving resources. func (client Client) MoveResources(sourceResourceGroupName string, parameters MoveInfo, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: sourceResourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go index ffe8d1322..428c572f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go @@ -24,7 +24,8 @@ import ( "net/http" ) -// TagsClient is the client for the Tags methods of the Resources service. +// TagsClient is the provides operations for working with resources and +// resource groups. type TagsClient struct { ManagementClient } @@ -39,9 +40,11 @@ func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create a subscription resource tag. +// CreateOrUpdate the tag name can have a maximum of 512 characters and is +// case insensitive. Tag names created by Azure have prefixes of microsoft, +// azure, or windows. You cannot create tags with one of these prefixes. // -// tagName is the name of the tag. +// tagName is the name of the tag to create. func (client TagsClient) CreateOrUpdate(tagName string) (result TagDetails, err error) { req, err := client.CreateOrUpdatePreparer(tagName) if err != nil { @@ -100,9 +103,10 @@ func (client TagsClient) CreateOrUpdateResponder(resp *http.Response) (result Ta return } -// CreateOrUpdateValue create a subscription resource tag value. +// CreateOrUpdateValue creates a tag value. The name of the tag must already +// exist. // -// tagName is the name of the tag. tagValue is the value of the tag. +// tagName is the name of the tag. tagValue is the value of the tag to create. func (client TagsClient) CreateOrUpdateValue(tagName string, tagValue string) (result TagValue, err error) { req, err := client.CreateOrUpdateValuePreparer(tagName, tagValue) if err != nil { @@ -162,7 +166,8 @@ func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (resu return } -// Delete delete a subscription resource tag. +// Delete you must remove all values from a resource tag before you can delete +// it. // // tagName is the name of the tag. func (client TagsClient) Delete(tagName string) (result autorest.Response, err error) { @@ -222,9 +227,9 @@ func (client TagsClient) DeleteResponder(resp *http.Response) (result autorest.R return } -// DeleteValue delete a subscription resource tag value. +// DeleteValue deletes a tag value. // -// tagName is the name of the tag. tagValue is the value of the tag. +// tagName is the name of the tag. tagValue is the value of the tag to delete. func (client TagsClient) DeleteValue(tagName string, tagValue string) (result autorest.Response, err error) { req, err := client.DeleteValuePreparer(tagName, tagValue) if err != nil { @@ -283,7 +288,8 @@ func (client TagsClient) DeleteValueResponder(resp *http.Response) (result autor return } -// List get a list of subscription resource tags. +// List gets the names and values of all resource tags that are defined in a +// subscription. func (client TagsClient) List() (result TagsListResult, err error) { req, err := client.ListPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go index 17d9de077..3b186148e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go index a2c4e12ca..806efd115 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go @@ -254,7 +254,7 @@ func (client JobsClient) GetResponder(resp *http.Response) (result JobDefinition // List lists all jobs under the specified job collection. // // resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. top is the number of jobs to request, in the of range +// collection name. top is the number of jobs to request, in the of range of // [1..100]. skip is the (0-based) index of the job history list from which // to begin requesting entries. filter is the filter to apply on the job // state. @@ -363,8 +363,8 @@ func (client JobsClient) ListNextResults(lastResults JobListResult) (result JobL // // resourceGroupName is the resource group name. jobCollectionName is the job // collection name. jobName is the job name. top is the number of job history -// to request, in the of range [1..100]. skip is the (0-based) index of the -// job history list from which to begin requesting entries. filter is the +// to request, in the of range of [1..100]. skip is the (0-based) index of +// the job history list from which to begin requesting entries. filter is the // filter to apply on the job state. func (client JobsClient) ListJobHistory(resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result JobHistoryListResult, err error) { if err := validation.Validate([]validation.Validation{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go index 9e1be0b5a..d44344782 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go index c7a95d7ef..80c09140c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go @@ -175,13 +175,13 @@ type MessageCountDetails struct { TransferMessageCount *int64 `json:"transferMessageCount,omitempty"` } -// NamespaceCreateOrUpdateParameters is parameters supplied to the -// CreateOrUpdate Namespace operation. +// NamespaceCreateOrUpdateParameters is parameters supplied to the Create Or +// Update Namespace operation. type NamespaceCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *NamespaceProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *NamespaceProperties `json:"properties,omitempty"` } // NamespaceListResult is the response of the List Namespace operation. @@ -203,7 +203,7 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceProperties is properties of the Namespace. +// NamespaceProperties is properties of the namespace. type NamespaceProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` Status NamespaceState `json:"status,omitempty"` @@ -214,27 +214,27 @@ type NamespaceProperties struct { Enabled *bool `json:"enabled,omitempty"` } -// NamespaceResource is description of a Namespace resource. +// NamespaceResource is description of a namespace resource. type NamespaceResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Properties *NamespaceProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *NamespaceProperties `json:"properties,omitempty"` } -// QueueCreateOrUpdateParameters is parameters supplied to the CreateOrUpdate -// Queue operation. +// QueueCreateOrUpdateParameters is parameters supplied to the Create Or +// Update Queue operation. type QueueCreateOrUpdateParameters struct { - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Properties *QueueProperties `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Location *string `json:"location,omitempty"` + *QueueProperties `json:"properties,omitempty"` } -// QueueListResult is the response of the List Queues operation. +// QueueListResult is the response to the List Queues operation. type QueueListResult struct { autorest.Response `json:"-"` Value *[]QueueResource `json:"value,omitempty"` @@ -287,10 +287,11 @@ type QueueResource struct { Type *string `json:"type,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` - Properties *QueueProperties `json:"properties,omitempty"` + *QueueProperties `json:"properties,omitempty"` } -// RegenerateKeysParameters is parameters supplied to the Regenerate Auth Rule. +// RegenerateKeysParameters is parameters supplied to the Regenerate +// Authorization Rule operation. type RegenerateKeysParameters struct { Policykey Policykey `json:"Policykey,omitempty"` } @@ -315,14 +316,14 @@ type ResourceListKeys struct { } // SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters -// supplied to the CreateOrUpdate AuthorizationRules. +// supplied to the Create Or Update Authorization Rules operation. type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` } -// SharedAccessAuthorizationRuleListResult is the response of the List +// SharedAccessAuthorizationRuleListResult is the response to the List // Namespace operation. type SharedAccessAuthorizationRuleListResult struct { autorest.Response `json:"-"` @@ -348,34 +349,34 @@ type SharedAccessAuthorizationRuleProperties struct { Rights *[]AccessRights `json:"rights,omitempty"` } -// SharedAccessAuthorizationRuleResource is description of a Namespace -// AuthorizationRules. +// SharedAccessAuthorizationRuleResource is description of a namespace +// authorization rule. type SharedAccessAuthorizationRuleResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` } -// Sku is sku of the Namespace. +// Sku is sKU of the namespace. type Sku struct { Name SkuName `json:"name,omitempty"` Tier SkuTier `json:"tier,omitempty"` Capacity *int32 `json:"capacity,omitempty"` } -// SubscriptionCreateOrUpdateParameters is parameters supplied to the -// CreateOrUpdate Subscription operation. +// SubscriptionCreateOrUpdateParameters is parameters supplied to the Create +// Or Update Subscription operation. type SubscriptionCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Properties *SubscriptionProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Type *string `json:"type,omitempty"` + *SubscriptionProperties `json:"properties,omitempty"` } -// SubscriptionListResult is the response of the List Subscriptions operation. +// SubscriptionListResult is the response to the List Subscriptions operation. type SubscriptionListResult struct { autorest.Response `json:"-"` Value *[]SubscriptionResource `json:"value,omitempty"` @@ -414,26 +415,26 @@ type SubscriptionProperties struct { UpdatedAt *date.Time `json:"updatedAt,omitempty"` } -// SubscriptionResource is description of Subscription Resource. +// SubscriptionResource is description of subscription resource. type SubscriptionResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *SubscriptionProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *SubscriptionProperties `json:"properties,omitempty"` } -// TopicCreateOrUpdateParameters is parameters supplied to the CreateOrUpdate -// Topic operation. +// TopicCreateOrUpdateParameters is parameters supplied to the Create Or +// Update Topic operation. type TopicCreateOrUpdateParameters struct { - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Properties *TopicProperties `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Location *string `json:"location,omitempty"` + *TopicProperties `json:"properties,omitempty"` } -// TopicListResult is the response of the List Topics operation. +// TopicListResult is the response to the List Topics operation. type TopicListResult struct { autorest.Response `json:"-"` Value *[]TopicResource `json:"value,omitempty"` @@ -477,7 +478,7 @@ type TopicProperties struct { UpdatedAt *date.Time `json:"updatedAt,omitempty"` } -// TopicResource is description of topic Resource. +// TopicResource is description of topic resource. type TopicResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -485,5 +486,5 @@ type TopicResource struct { Type *string `json:"type,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` - Properties *TopicProperties `json:"properties,omitempty"` + *TopicProperties `json:"properties,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go index 53b297a86..d19e9cc70 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go @@ -41,15 +41,15 @@ func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) Names return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates/Updates a service namespace. Once created, this +// CreateOrUpdate creates or updates a service namespace. Once created, this // namespace's resource manifest is immutable. This operation is idempotent. // This method may poll for completion. Polling can be canceled by passing // the cancel channel argument. The channel will be used to cancel polling // and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. parameters is parameters supplied to create a Namespace -// Resource. +// namespace name. parameters is parameters supplied to create a namespace +// resource. func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,17 +118,17 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateAuthorizationRule creates an authorization rule for a -// namespace +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule +// for a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is namespace Aauthorization Rule -// Name. parameters is the shared access authorization rule. +// namespace name. authorizationRuleName is namespace authorization rule +// name. parameters is the shared access authorization rule. func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "CreateOrUpdateAuthorizationRule") } @@ -261,10 +261,10 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto return } -// DeleteAuthorizationRule deletes a namespace authorization rule +// DeleteAuthorizationRule deletes a namespace authorization rule. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is authorization Rule Name. +// namespace name. authorizationRuleName is authorization rule name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -324,7 +324,7 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo return } -// Get returns the description for the specified namespace. +// Get gets a description for the specified namespace. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. @@ -387,10 +387,11 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa return } -// GetAuthorizationRule authorization rule for a namespace by name. +// GetAuthorizationRule gets an authorization rule for a namespace by rule +// name. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name authorizationRuleName is authorization rule name. +// namespace name. authorizationRuleName is authorization rule name. func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -451,10 +452,10 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response return } -// ListAuthorizationRules authorization rules for a namespace. +// ListAuthorizationRules gets the authorization rules for a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name +// namespace name. func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName) if err != nil { @@ -538,7 +539,7 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Sha return } -// ListByResourceGroup lists the available namespaces within a resourceGroup. +// ListByResourceGroup gets the available namespaces within a resource group. // // resourceGroupName is the name of the resource group. func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) { @@ -623,8 +624,8 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp return } -// ListBySubscription lists all the available namespaces within the -// subscription irrespective of the resourceGroups. +// ListBySubscription gets all the available namespaces within the +// subscription, irrespective of the resource groups. func (client NamespacesClient) ListBySubscription() (result NamespaceListResult, err error) { req, err := client.ListBySubscriptionPreparer() if err != nil { @@ -706,10 +707,11 @@ func (client NamespacesClient) ListBySubscriptionNextResults(lastResults Namespa return } -// ListKeys primary and Secondary ConnectionStrings to the namespace +// ListKeys gets the primary and secondary connection strings for the +// namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the authorizationRule name. +// namespace name. authorizationRuleName is the authorization rule name. func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -770,12 +772,12 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Re return } -// RegenerateKeys regenerats the Primary or Secondary ConnectionStrings to the -// namespace +// RegenerateKeys regenerates the primary or secondary connection strings for +// the namespace. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the authorizationRule name. -// parameters is parameters supplied to regenerate Auth Rule. +// namespace name. authorizationRuleName is the authorization rule name. +// parameters is parameters supplied to regenerate the authorization rule. func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go index a0891931e..c9c12644b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go @@ -40,12 +40,12 @@ func NewQueuesClientWithBaseURI(baseURI string, subscriptionID string) QueuesCli return QueuesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates/Updates a service Queue. This operation is +// CreateOrUpdate creates or updates a Service Bus queue. This operation is // idempotent. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. parameters is parameters -// supplied to create a Queue Resource. +// supplied to create or update a queue resource. func (client QueuesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, queueName string, parameters QueueCreateOrUpdateParameters) (result QueueResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -114,17 +114,17 @@ func (client QueuesClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// CreateOrUpdateAuthorizationRule creates an authorization rule for a queue +// CreateOrUpdateAuthorizationRule creates an authorization rule for a queue. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. authorizationRuleName is -// aauthorization Rule Name. parameters is the shared access authorization +// authorization rule name. parameters is the shared access authorization // rule. func (client QueuesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule") } @@ -190,10 +190,10 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.R return } -// Delete deletes a queue from the specified namespace in resource group. +// Delete deletes a queue from the specified namespace in a resource group. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. queueName is the queue name. +// namespace name. queueName is the name of the queue to be deleted. func (client QueuesClient) Delete(resourceGroupName string, namespaceName string, queueName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, queueName) if err != nil { @@ -253,11 +253,11 @@ func (client QueuesClient) DeleteResponder(resp *http.Response) (result autorest return } -// DeleteAuthorizationRule deletes a queue authorization rule +// DeleteAuthorizationRule deletes a queue authorization rule. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. authorizationRuleName is -// authorization Rule Name. +// authorization rule name. func (client QueuesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, queueName, authorizationRuleName) if err != nil { @@ -318,7 +318,7 @@ func (client QueuesClient) DeleteAuthorizationRuleResponder(resp *http.Response) return } -// Get returns the description for the specified queue. +// Get returns a description for the specified queue. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. @@ -382,10 +382,10 @@ func (client QueuesClient) GetResponder(resp *http.Response) (result QueueResour return } -// GetAuthorizationRule queue authorizationRule for a queue by name. +// GetAuthorizationRule gets an authorization rule for a queue by rule name. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name queueName is the queue name. authorizationRuleName is +// namespace name. queueName is the queue name. authorizationRuleName is // authorization rule name. func (client QueuesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, queueName, authorizationRuleName) @@ -448,7 +448,7 @@ func (client QueuesClient) GetAuthorizationRuleResponder(resp *http.Response) (r return } -// ListAll lists the queues within the namespace. +// ListAll gets the queues within a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. @@ -535,7 +535,7 @@ func (client QueuesClient) ListAllNextResults(lastResults QueueListResult) (resu return } -// ListAuthorizationRules returns all Queue authorizationRules. +// ListAuthorizationRules gets all authorization rules for a queue. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name queueName is the queue name. @@ -623,11 +623,11 @@ func (client QueuesClient) ListAuthorizationRulesNextResults(lastResults SharedA return } -// ListKeys primary and Secondary ConnectionStrings to the queue. +// ListKeys primary and secondary connection strings to the queue. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. authorizationRuleName is the -// authorizationRule name. +// authorization rule name. func (client QueuesClient) ListKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, queueName, authorizationRuleName) if err != nil { @@ -689,13 +689,13 @@ func (client QueuesClient) ListKeysResponder(resp *http.Response) (result Resour return } -// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to -// the Queue +// RegenerateKeys regenerates the primary or secondary connection strings to +// the queue. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. queueName is the queue name. authorizationRuleName is the -// authorizationRule name parameters is parameters supplied to regenerate -// Auth Rule. +// authorization rule name. parameters is parameters supplied to regenerate +// the authorization rule. func (client QueuesClient) RegenerateKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go index 596fd970f..b7a77ced8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go @@ -42,12 +42,12 @@ func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) Su return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a topic subscription +// CreateOrUpdate creates a topic subscription. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. topicName is the topicName name. subscriptionName is the -// subscriptionName name. parameters is parameters supplied to create a -// subscription Resource. +// namespace name. topicName is the topic name. subscriptionName is the +// subscription name. parameters is parameters supplied to create a +// subscription resource. func (client SubscriptionsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SubscriptionCreateOrUpdateParameters) (result SubscriptionResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -248,7 +248,7 @@ func (client SubscriptionsClient) GetResponder(resp *http.Response) (result Subs return } -// ListAll lsit all the subscriptions under a specified topic +// ListAll lsit all the subscriptions under a specified topic. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go index ee2af19a7..e5f125578 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go @@ -40,11 +40,11 @@ func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsCli return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a topic in the specified namespace +// CreateOrUpdate creates a topic in the specified namespace. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. parameters is parameters -// supplied to create a Topic Resource. +// supplied to create a topic resource. func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, parameters TopicCreateOrUpdateParameters) (result TopicResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -113,18 +113,18 @@ func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// CreateOrUpdateAuthorizationRule creates an authorizatioRule for the +// CreateOrUpdateAuthorizationRule creates an authorizatio rule for the // specified topic. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. authorizationRuleName is -// aauthorization Rule Name. parameters is the shared access authorization +// authorization rule name. parameters is the shared access authorization // rule. func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "CreateOrUpdateAuthorizationRule") } @@ -193,7 +193,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.R // Delete deletes a topic from the specified namespace and resource group. // // resourceGroupName is the name of the resource group. namespaceName is the -// topics name. topicName is the topics name. +// namespace name. topicName is the name of the topic to delete. func (client TopicsClient) Delete(resourceGroupName string, namespaceName string, topicName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, topicName) if err != nil { @@ -253,11 +253,11 @@ func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest return } -// DeleteAuthorizationRule deletes a topic authorizationRule +// DeleteAuthorizationRule deletes a topic authorization rule. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. authorizationRuleName is -// authorizationRule Name. +// authorization rule name. func (client TopicsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, topicName, authorizationRuleName) if err != nil { @@ -318,7 +318,7 @@ func (client TopicsClient) DeleteAuthorizationRuleResponder(resp *http.Response) return } -// Get returns the description for the specified topic +// Get returns a description for the specified topic. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. @@ -382,10 +382,10 @@ func (client TopicsClient) GetResponder(resp *http.Response) (result TopicResour return } -// GetAuthorizationRule returns the specified authorizationRule. +// GetAuthorizationRule returns the specified authorization rule. // // resourceGroupName is the name of the resource group. namespaceName is the -// namespace name topicName is the topic name. authorizationRuleName is +// namespace name. topicName is the topic name. authorizationRuleName is // authorization rule name. func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, topicName, authorizationRuleName) @@ -448,7 +448,7 @@ func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (r return } -// ListAll lists all the topics in a namespace. +// ListAll gets all the topics in a namespace. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. @@ -535,10 +535,10 @@ func (client TopicsClient) ListAllNextResults(lastResults TopicListResult) (resu return } -// ListAuthorizationRules authorization rules for a topic. +// ListAuthorizationRules gets authorization rules for a topic. // // resourceGroupName is the name of the resource group. namespaceName is the -// topic name topicName is the topic name. +// namespace name. topicName is the topic name. func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, topicName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName, topicName) if err != nil { @@ -623,11 +623,11 @@ func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SharedA return } -// ListKeys primary and Secondary ConnectionStrings to the topic +// ListKeys gets the primary and secondary connection strings for the topic. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. authorizationRuleName is the -// authorizationRule name. +// authorization rule name. func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, topicName, authorizationRuleName) if err != nil { @@ -689,13 +689,13 @@ func (client TopicsClient) ListKeysResponder(resp *http.Response) (result Resour return } -// RegenerateKeys regenerates Primary or Secondary ConnectionStrings to the -// topic +// RegenerateKeys regenerates primary or secondary connection strings for the +// topic. // // resourceGroupName is the name of the resource group. namespaceName is the // namespace name. topicName is the topic name. authorizationRuleName is the -// authorizationRule name. parameters is parameters supplied to regenerate -// Auth Rule. +// authorization rule name. parameters is parameters supplied to regenerate +// the authorization rule. func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, topicName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go index ed028ff82..e0561d8c8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go index d9c54e795..c895c3a94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go @@ -41,7 +41,8 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks that account name is valid and is not in use. +// CheckNameAvailability checks that the storage account name is valid and is +// not already in use. // // accountName is the name of the storage account within the specified // resource group. Storage account names must be between 3 and 24 characters @@ -113,13 +114,13 @@ func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) } // Create asynchronously creates a new storage account with the specified -// parameters. If an account is already created and subsequent create request -// is issued with different properties, the account properties will be -// updated. If an account is already created and subsequent create or update -// request is issued with exact same set of properties, the request will -// succeed. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// parameters. If an account is already created and a subsequent create +// request is issued with different properties, the account properties will +// be updated. If an account is already created and a subsequent create or +// update request is issued with the exact same set of properties, the +// request will succeed. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used +// to cancel polling and any outstanding HTTP requests. // // resourceGroupName is the name of the resource group within the user's // subscription. accountName is the name of the storage account within the @@ -135,15 +136,15 @@ func (client AccountsClient) Create(resourceGroupName string, accountName string Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Tier", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomDomain", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.Encryption", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Encryption.Services", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Encryption.Services.Blob", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.Encryption.Services.Blob.LastEnabledTime", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, + {Target: "parameters.AccountPropertiesCreateParameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.AccountPropertiesCreateParameters.Encryption", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.Encryption.Services", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.Encryption.Services.Blob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.Encryption.Services.Blob.LastEnabledTime", Name: validation.ReadOnly, Rule: true, Chain: nil}}}, }}, - {Target: "parameters.Properties.Encryption.KeySource", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AccountPropertiesCreateParameters.Encryption.KeySource", Name: validation.Null, Rule: true, Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "storage.AccountsClient", "Create") @@ -204,7 +205,7 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result autore err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp return @@ -282,8 +283,8 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore } // GetProperties returns the properties for the specified storage account -// including but not limited to name, account type, location, and account -// status. The ListKeys operation should be used to retrieve storage keys. +// including but not limited to name, SKU name, location, and account status. +// The ListKeys operation should be used to retrieve storage keys. // // resourceGroupName is the name of the resource group within the user's // subscription. accountName is the name of the storage account within the @@ -480,8 +481,10 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) ( // ListKeys lists the access keys for the specified storage account. // -// resourceGroupName is the name of the resource group. accountName is the -// name of the storage account. +// resourceGroupName is the name of the resource group within the user's +// subscription. accountName is the name of the storage account within the +// specified resource group. Storage account names must be between 3 and 24 +// characters in length and use numbers and lower-case letters only. func (client AccountsClient) ListKeys(resourceGroupName string, accountName string) (result AccountListKeysResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, @@ -548,14 +551,15 @@ func (client AccountsClient) ListKeysResponder(resp *http.Response) (result Acco return } -// RegenerateKey regenerates the access keys for the specified storage account. +// RegenerateKey regenerates one of the access keys for the specified storage +// account. // // resourceGroupName is the name of the resource group within the user's // subscription. accountName is the name of the storage account within the // specified resource group. Storage account names must be between 3 and 24 // characters in length and use numbers and lower-case letters only. -// regenerateKey is specifies name of the key which should be regenerated. -// key1 or key2 for the default keys +// regenerateKey is specifies name of the key which should be regenerated -- +// key1 or key2. func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (result AccountListKeysResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, @@ -626,15 +630,15 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result return } -// Update the update operation can be used to update the account type, -// encryption, or tags for a storage account. It can also be used to map the +// Update the update operation can be used to update the SKU, encryption, +// access tier, or tags for a storage account. It can also be used to map the // account to a custom domain. Only one custom domain is supported per -// storage account and. replacement/change of custom domain is not supported. +// storage account; the replacement/change of custom domain is not supported. // In order to replace an old custom domain, the old value must be -// cleared/unregistered before a new value may be set. Update of multiple +// cleared/unregistered before a new value can be set. The update of multiple // properties is supported. This call does not change the storage keys for -// the account. If you want to change storage account keys, use the -// regenerate keys operation. The location and name of the storage account +// the account. If you want to change the storage account keys, use the +// regenerate keys operation. The location and name of the storage account // cannot be changed after creation. // // resourceGroupName is the name of the resource group within the user's diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go index a4a4d2be4..bff65ec6e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go @@ -131,15 +131,15 @@ const ( // Account is the storage account. type Account struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Kind Kind `json:"kind,omitempty"` - Properties *AccountProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Kind Kind `json:"kind,omitempty"` + *AccountProperties `json:"properties,omitempty"` } // AccountCheckNameAvailabilityParameters is @@ -148,13 +148,14 @@ type AccountCheckNameAvailabilityParameters struct { Type *string `json:"type,omitempty"` } -// AccountCreateParameters is the parameters to provide for the account. +// AccountCreateParameters is the parameters used when creating a storage +// account. type AccountCreateParameters struct { - Sku *Sku `json:"sku,omitempty"` - Kind Kind `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *AccountPropertiesCreateParameters `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Kind Kind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *AccountPropertiesCreateParameters `json:"properties,omitempty"` } // AccountKey is an access key for the storage account. @@ -164,13 +165,13 @@ type AccountKey struct { Permissions KeyPermission `json:"permissions,omitempty"` } -// AccountListKeysResult is the ListKeys operation response. +// AccountListKeysResult is the response from the ListKeys operation. type AccountListKeysResult struct { autorest.Response `json:"-"` Keys *[]AccountKey `json:"keys,omitempty"` } -// AccountListResult is the list storage accounts operation response. +// AccountListResult is the response from the List Storage Accounts operation. type AccountListResult struct { autorest.Response `json:"-"` Value *[]Account `json:"value,omitempty"` @@ -211,11 +212,12 @@ type AccountRegenerateKeyParameters struct { KeyName *string `json:"keyName,omitempty"` } -// AccountUpdateParameters is the parameters to provide for the account. +// AccountUpdateParameters is the parameters that can be provided when +// updating the storage account properties. type AccountUpdateParameters struct { - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *AccountPropertiesUpdateParameters `json:"properties,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *AccountPropertiesUpdateParameters `json:"properties,omitempty"` } // CheckNameAvailabilityResult is the CheckNameAvailability operation response. @@ -233,25 +235,26 @@ type CustomDomain struct { UseSubDomain *bool `json:"useSubDomain,omitempty"` } -// Encryption is the encryption settings on the account. +// Encryption is the encryption settings on the storage account. type Encryption struct { Services *EncryptionServices `json:"services,omitempty"` KeySource *string `json:"keySource,omitempty"` } -// EncryptionService is an encrypted service. +// EncryptionService is a service that allows server-side encryption to be +// used. type EncryptionService struct { Enabled *bool `json:"enabled,omitempty"` LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` } -// EncryptionServices is the encrypted services. +// EncryptionServices is a list of services that support encryption. type EncryptionServices struct { Blob *EncryptionService `json:"blob,omitempty"` } // Endpoints is the URIs that are used to perform a retrieval of a public -// blob, queue or table object. +// blob, queue, or table object. type Endpoints struct { Blob *string `json:"blob,omitempty"` Queue *string `json:"queue,omitempty"` @@ -282,13 +285,14 @@ type Usage struct { Name *UsageName `json:"name,omitempty"` } -// UsageListResult is the List Usages operation response. +// UsageListResult is the response from the List Usages operation. type UsageListResult struct { autorest.Response `json:"-"` Value *[]Usage `json:"value,omitempty"` } -// UsageName is the Usage Names. +// UsageName is the usage names that can be used; currently limited to +// StorageAccount. type UsageName struct { Value *string `json:"value,omitempty"` LocalizedValue *string `json:"localizedValue,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go index 8abc6c070..e0a181c11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go index e6042cbc6..4dc2a59de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go @@ -38,11 +38,11 @@ type DNSConfig struct { // Endpoint is class representing a Traffic Manager endpoint. type Endpoint struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Properties *EndpointProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *EndpointProperties `json:"properties,omitempty"` } // EndpointProperties is class representing a Traffic Manager endpoint @@ -80,13 +80,13 @@ type NameAvailability struct { // Profile is class representing a Traffic Manager profile. type Profile struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Properties *ProfileProperties `json:"properties,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ProfileProperties `json:"properties,omitempty"` } // ProfileListResult is the list Traffic Manager profiles operation response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go index c214c4ed9..afcfcff33 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go @@ -23,9 +23,9 @@ import ( ) const ( - major = "6" + major = "7" minor = "0" - patch = "0" + patch = "1" // Always begin a "tag" with a dash (as per http://semver.org) tag = "-beta" semVerFormat = "%s.%s.%s%s" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go index 317620363..3dbaca52a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net/http" "net/url" "strconv" @@ -301,6 +302,65 @@ const ( ContainerAccessTypeContainer ContainerAccessType = "container" ) +// ContainerAccessOptions are used when setting ACLs of containers (after creation) +type ContainerAccessOptions struct { + ContainerAccess ContainerAccessType + Timeout int + LeaseID string +} + +// AccessPolicyDetails are used for SETTING policies +type AccessPolicyDetails struct { + ID string + StartTime time.Time + ExpiryTime time.Time + CanRead bool + CanWrite bool + CanDelete bool +} + +// ContainerPermissions is used when setting permissions and Access Policies for containers. +type ContainerPermissions struct { + AccessOptions ContainerAccessOptions + AccessPolicy AccessPolicyDetails +} + +// AccessPolicyDetailsXML has specifics about an access policy +// annotated with XML details. +type AccessPolicyDetailsXML struct { + StartTime time.Time `xml:"Start"` + ExpiryTime time.Time `xml:"Expiry"` + Permission string `xml:"Permission"` +} + +// SignedIdentifier is a wrapper for a specific policy +type SignedIdentifier struct { + ID string `xml:"Id"` + AccessPolicy AccessPolicyDetailsXML `xml:"AccessPolicy"` +} + +// SignedIdentifiers part of the response from GetPermissions call. +type SignedIdentifiers struct { + SignedIdentifiers []SignedIdentifier `xml:"SignedIdentifier"` +} + +// AccessPolicy is the response type from the GetPermissions call. +type AccessPolicy struct { + SignedIdentifiersList SignedIdentifiers `xml:"SignedIdentifiers"` +} + +// ContainerAccessResponse is returned for the GetContainerPermissions function. +// This contains both the permission and access policy for the container. +type ContainerAccessResponse struct { + ContainerAccess ContainerAccessType + AccessPolicy SignedIdentifiers +} + +// ContainerAccessHeader references header used when setting/getting container ACL +const ( + ContainerAccessHeader string = "x-ms-blob-public-access" +) + // Maximum sizes (per REST API) for various concepts const ( MaxBlobBlockSize = 4 * 1024 * 1024 @@ -416,7 +476,7 @@ func (b BlobStorageClient) createContainer(name string, access ContainerAccessTy headers := b.client.getStandardHeaders() if access != "" { - headers["x-ms-blob-public-access"] = string(access) + headers[ContainerAccessHeader] = string(access) } return b.client.exec(verb, uri, headers, nil) } @@ -438,6 +498,101 @@ func (b BlobStorageClient) ContainerExists(name string) (bool, error) { return false, err } +// SetContainerPermissions sets up container permissions as per https://msdn.microsoft.com/en-us/library/azure/dd179391.aspx +func (b BlobStorageClient) SetContainerPermissions(container string, containerPermissions ContainerPermissions) (err error) { + params := url.Values{ + "restype": {"container"}, + "comp": {"acl"}, + } + + if containerPermissions.AccessOptions.Timeout > 0 { + params.Add("timeout", strconv.Itoa(containerPermissions.AccessOptions.Timeout)) + } + + uri := b.client.getEndpoint(blobServiceName, pathForContainer(container), params) + headers := b.client.getStandardHeaders() + if containerPermissions.AccessOptions.ContainerAccess != "" { + headers[ContainerAccessHeader] = string(containerPermissions.AccessOptions.ContainerAccess) + } + + if containerPermissions.AccessOptions.LeaseID != "" { + headers[leaseID] = containerPermissions.AccessOptions.LeaseID + } + + // generate the XML for the SharedAccessSignature if required. + accessPolicyXML, err := generateAccessPolicy(containerPermissions.AccessPolicy) + if err != nil { + return err + } + + var resp *storageResponse + if accessPolicyXML != "" { + headers["Content-Length"] = strconv.Itoa(len(accessPolicyXML)) + resp, err = b.client.exec("PUT", uri, headers, strings.NewReader(accessPolicyXML)) + } else { + resp, err = b.client.exec("PUT", uri, headers, nil) + } + + if err != nil { + return err + } + + if resp != nil { + defer func() { + err = resp.body.Close() + }() + + if resp.statusCode != http.StatusOK { + return errors.New("Unable to set permissions") + } + } + return nil +} + +// GetContainerPermissions gets the container permissions as per https://msdn.microsoft.com/en-us/library/azure/dd179469.aspx +// If timeout is 0 then it will not be passed to Azure +// leaseID will only be passed to Azure if populated +// Returns permissionResponse which is combined permissions and AccessPolicy +func (b BlobStorageClient) GetContainerPermissions(container string, timeout int, leaseID string) (permissionResponse *ContainerAccessResponse, err error) { + params := url.Values{"restype": {"container"}, + "comp": {"acl"}} + + if timeout > 0 { + params.Add("timeout", strconv.Itoa(timeout)) + } + + uri := b.client.getEndpoint(blobServiceName, pathForContainer(container), params) + headers := b.client.getStandardHeaders() + + if leaseID != "" { + headers[leaseID] = leaseID + } + + resp, err := b.client.exec("GET", uri, headers, nil) + if err != nil { + return nil, err + } + + // containerAccess. Blob, Container, empty + containerAccess := resp.headers.Get(http.CanonicalHeaderKey(ContainerAccessHeader)) + + defer func() { + err = resp.body.Close() + }() + + var out AccessPolicy + err = xmlUnmarshal(resp.body, &out.SignedIdentifiersList) + if err != nil { + return nil, err + } + + permissionResponse = &ContainerAccessResponse{} + permissionResponse.AccessPolicy = out.SignedIdentifiersList + permissionResponse.ContainerAccess = ContainerAccessType(containerAccess) + + return permissionResponse, nil +} + // DeleteContainer deletes the container with given name on the storage // account. If the container does not exist returns error. // @@ -595,13 +750,55 @@ func (b BlobStorageClient) leaseCommonPut(container string, name string, headers return resp.headers, nil } +// SnapshotBlob creates a snapshot for a blob as per https://msdn.microsoft.com/en-us/library/azure/ee691971.aspx +func (b BlobStorageClient) SnapshotBlob(container string, name string, timeout int, extraHeaders map[string]string) (snapshotTimestamp *time.Time, err error) { + headers := b.client.getStandardHeaders() + params := url.Values{"comp": {"snapshot"}} + + if timeout > 0 { + params.Add("timeout", strconv.Itoa(timeout)) + } + + for k, v := range extraHeaders { + headers[k] = v + } + + uri := b.client.getEndpoint(blobServiceName, pathForBlob(container, name), params) + resp, err := b.client.exec("PUT", uri, headers, nil) + if err != nil { + return nil, err + } + + if err := checkRespCode(resp.statusCode, []int{http.StatusCreated}); err != nil { + return nil, err + } + + snapshotResponse := resp.headers.Get(http.CanonicalHeaderKey("x-ms-snapshot")) + if snapshotResponse != "" { + snapshotTimestamp, err := time.Parse(time.RFC3339, snapshotResponse) + if err != nil { + return nil, err + } + + return &snapshotTimestamp, nil + } + + return nil, errors.New("Snapshot not created") +} + // AcquireLease creates a lease for a blob as per https://msdn.microsoft.com/en-us/library/azure/ee691972.aspx // returns leaseID acquired func (b BlobStorageClient) AcquireLease(container string, name string, leaseTimeInSeconds int, proposedLeaseID string) (returnedLeaseID string, err error) { headers := b.client.getStandardHeaders() headers[leaseAction] = acquireLease - headers[leaseProposedID] = proposedLeaseID - headers[leaseDuration] = strconv.Itoa(leaseTimeInSeconds) + + if leaseTimeInSeconds > 0 { + headers[leaseDuration] = strconv.Itoa(leaseTimeInSeconds) + } + + if proposedLeaseID != "" { + headers[leaseProposedID] = proposedLeaseID + } respHeaders, err := b.leaseCommonPut(container, name, headers, http.StatusCreated) if err != nil { @@ -614,8 +811,6 @@ func (b BlobStorageClient) AcquireLease(container string, name string, leaseTime return returnedLeaseID, nil } - // what should we return in case of HTTP 201 but no lease ID? - // or it just cant happen? (brave words) return "", errors.New("LeaseID not returned") } @@ -1106,15 +1301,20 @@ func (b BlobStorageClient) AppendBlock(container, name string, chunk []byte, ext // // See https://msdn.microsoft.com/en-us/library/azure/dd894037.aspx func (b BlobStorageClient) CopyBlob(container, name, sourceBlob string) error { - copyID, err := b.startBlobCopy(container, name, sourceBlob) + copyID, err := b.StartBlobCopy(container, name, sourceBlob) if err != nil { return err } - return b.waitForBlobCopy(container, name, copyID) + return b.WaitForBlobCopy(container, name, copyID) } -func (b BlobStorageClient) startBlobCopy(container, name, sourceBlob string) (string, error) { +// StartBlobCopy starts a blob copy operation. +// sourceBlob parameter must be a canonical URL to the blob (can be +// obtained using GetBlobURL method.) +// +// See https://msdn.microsoft.com/en-us/library/azure/dd894037.aspx +func (b BlobStorageClient) StartBlobCopy(container, name, sourceBlob string) (string, error) { uri := b.client.getEndpoint(blobServiceName, pathForBlob(container, name), url.Values{}) headers := b.client.getStandardHeaders() @@ -1137,7 +1337,39 @@ func (b BlobStorageClient) startBlobCopy(container, name, sourceBlob string) (st return copyID, nil } -func (b BlobStorageClient) waitForBlobCopy(container, name, copyID string) error { +// AbortBlobCopy aborts a BlobCopy which has already been triggered by the StartBlobCopy function. +// copyID is generated from StartBlobCopy function. +// currentLeaseID is required IF the destination blob has an active lease on it. +// As defined in https://msdn.microsoft.com/en-us/library/azure/jj159098.aspx +func (b BlobStorageClient) AbortBlobCopy(container, name, copyID, currentLeaseID string, timeout int) error { + params := url.Values{"comp": {"copy"}, "copyid": {copyID}} + if timeout > 0 { + params.Add("timeout", strconv.Itoa(timeout)) + } + + uri := b.client.getEndpoint(blobServiceName, pathForBlob(container, name), params) + headers := b.client.getStandardHeaders() + headers["x-ms-copy-action"] = "abort" + + if currentLeaseID != "" { + headers[leaseID] = currentLeaseID + } + + resp, err := b.client.exec("PUT", uri, headers, nil) + if err != nil { + return err + } + defer resp.body.Close() + + if err := checkRespCode(resp.statusCode, []int{http.StatusNoContent}); err != nil { + return err + } + + return nil +} + +// WaitForBlobCopy loops until a BlobCopy operation is completed (or fails with error) +func (b BlobStorageClient) WaitForBlobCopy(container, name, copyID string) error { for { props, err := b.GetBlobProperties(container, name) if err != nil { @@ -1181,10 +1413,12 @@ func (b BlobStorageClient) DeleteBlob(container, name string, extraHeaders map[s // See https://msdn.microsoft.com/en-us/library/azure/dd179413.aspx func (b BlobStorageClient) DeleteBlobIfExists(container, name string, extraHeaders map[string]string) (bool, error) { resp, err := b.deleteBlob(container, name, extraHeaders) - if resp != nil && (resp.statusCode == http.StatusAccepted || resp.statusCode == http.StatusNotFound) { - return resp.statusCode == http.StatusAccepted, nil + if resp != nil { + defer resp.body.Close() + if resp.statusCode == http.StatusAccepted || resp.statusCode == http.StatusNotFound { + return resp.statusCode == http.StatusAccepted, nil + } } - defer resp.body.Close() return false, err } @@ -1210,17 +1444,18 @@ func pathForBlob(container, name string) string { return fmt.Sprintf("/%s/%s", container, name) } -// GetBlobSASURI creates an URL to the specified blob which contains the Shared -// Access Signature with specified permissions and expiration time. +// GetBlobSASURIWithSignedIPAndProtocol creates an URL to the specified blob which contains the Shared +// Access Signature with specified permissions and expiration time. Also includes signedIPRange and allowed procotols. +// If old API version is used but no signedIP is passed (ie empty string) then this should still work. +// We only populate the signedIP when it non-empty. // // See https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx -func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Time, permissions string) (string, error) { +func (b BlobStorageClient) GetBlobSASURIWithSignedIPAndProtocol(container, name string, expiry time.Time, permissions string, signedIPRange string, HTTPSOnly bool) (string, error) { var ( signedPermissions = permissions blobURL = b.GetBlobURL(container, name) ) canonicalizedResource, err := b.client.buildCanonicalizedResource(blobURL) - if err != nil { return "", err } @@ -1232,7 +1467,6 @@ func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Tim // We need to replace + with %2b first to avoid being treated as a space (which is correct for query strings, but not the path component). canonicalizedResource = strings.Replace(canonicalizedResource, "+", "%2b", -1) - canonicalizedResource, err = url.QueryUnescape(canonicalizedResource) if err != nil { return "", err @@ -1241,7 +1475,11 @@ func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Tim signedExpiry := expiry.UTC().Format(time.RFC3339) signedResource := "b" - stringToSign, err := blobSASStringToSign(b.client.apiVersion, canonicalizedResource, signedExpiry, signedPermissions) + protocols := "https,http" + if HTTPSOnly { + protocols = "https" + } + stringToSign, err := blobSASStringToSign(b.client.apiVersion, canonicalizedResource, signedExpiry, signedPermissions, signedIPRange, protocols) if err != nil { return "", err } @@ -1255,6 +1493,13 @@ func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Tim "sig": {sig}, } + if b.client.apiVersion >= "2015-04-05" { + sasParams.Add("spr", protocols) + if signedIPRange != "" { + sasParams.Add("sip", signedIPRange) + } + } + sasURL, err := url.Parse(blobURL) if err != nil { return "", err @@ -1263,16 +1508,89 @@ func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Tim return sasURL.String(), nil } -func blobSASStringToSign(signedVersion, canonicalizedResource, signedExpiry, signedPermissions string) (string, error) { +// GetBlobSASURI creates an URL to the specified blob which contains the Shared +// Access Signature with specified permissions and expiration time. +// +// See https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx +func (b BlobStorageClient) GetBlobSASURI(container, name string, expiry time.Time, permissions string) (string, error) { + url, err := b.GetBlobSASURIWithSignedIPAndProtocol(container, name, expiry, permissions, "", false) + return url, err +} + +func blobSASStringToSign(signedVersion, canonicalizedResource, signedExpiry, signedPermissions string, signedIP string, protocols string) (string, error) { var signedStart, signedIdentifier, rscc, rscd, rsce, rscl, rsct string if signedVersion >= "2015-02-21" { canonicalizedResource = "/blob" + canonicalizedResource } + // https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx#Anchor_12 + if signedVersion >= "2015-04-05" { + return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s", signedPermissions, signedStart, signedExpiry, canonicalizedResource, signedIdentifier, signedIP, protocols, signedVersion, rscc, rscd, rsce, rscl, rsct), nil + } + // reference: http://msdn.microsoft.com/en-us/library/azure/dn140255.aspx if signedVersion >= "2013-08-15" { return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s", signedPermissions, signedStart, signedExpiry, canonicalizedResource, signedIdentifier, signedVersion, rscc, rscd, rsce, rscl, rsct), nil } + return "", errors.New("storage: not implemented SAS for versions earlier than 2013-08-15") } + +func generatePermissions(accessPolicy AccessPolicyDetails) (permissions string) { + // generate the permissions string (rwd). + // still want the end user API to have bool flags. + permissions = "" + + if accessPolicy.CanRead { + permissions += "r" + } + + if accessPolicy.CanWrite { + permissions += "w" + } + + if accessPolicy.CanDelete { + permissions += "d" + } + + return permissions +} + +// convertAccessPolicyToXMLStructs converts between AccessPolicyDetails which is a struct better for API usage to the +// AccessPolicy struct which will get converted to XML. +func convertAccessPolicyToXMLStructs(accessPolicy AccessPolicyDetails) SignedIdentifiers { + return SignedIdentifiers{ + SignedIdentifiers: []SignedIdentifier{ + { + ID: accessPolicy.ID, + AccessPolicy: AccessPolicyDetailsXML{ + StartTime: accessPolicy.StartTime.UTC().Round(time.Second), + ExpiryTime: accessPolicy.ExpiryTime.UTC().Round(time.Second), + Permission: generatePermissions(accessPolicy), + }, + }, + }, + } +} + +// generateAccessPolicy generates the XML access policy used as the payload for SetContainerPermissions. +func generateAccessPolicy(accessPolicy AccessPolicyDetails) (accessPolicyXML string, err error) { + + if accessPolicy.ID != "" { + signedIdentifiers := convertAccessPolicyToXMLStructs(accessPolicy) + body, _, err := xmlMarshal(signedIdentifiers) + if err != nil { + return "", err + } + + xmlByteArray, err := ioutil.ReadAll(body) + if err != nil { + return "", err + } + accessPolicyXML = string(xmlByteArray) + return accessPolicyXML, nil + } + + return "", nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go index 2816e03ec..77528511a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go @@ -128,6 +128,7 @@ func NewBasicClient(accountName, accountKey string) (Client, error) { return NewEmulatorClient() } return NewClient(accountName, accountKey, DefaultBaseURL, DefaultAPIVersion, defaultUseHTTPS) + } //NewEmulatorClient contructs a Client intended to only work with Azure @@ -305,7 +306,7 @@ func (c Client) buildCanonicalizedResourceTable(uri string) (string, error) { cr := "/" + c.getCanonicalizedAccountName() if len(u.Path) > 0 { - cr += u.Path + cr += u.EscapedPath() } return cr, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go index 2397587c8..f679395bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go @@ -2,9 +2,12 @@ package storage import ( "encoding/xml" + "errors" "fmt" + "io" "net/http" "net/url" + "strconv" "strings" ) @@ -19,6 +22,17 @@ type Share struct { Properties ShareProperties `xml:"Properties"` } +// A Directory is an entry in DirsAndFilesListResponse. +type Directory struct { + Name string `xml:"Name"` +} + +// A File is an entry in DirsAndFilesListResponse. +type File struct { + Name string `xml:"Name"` + Properties FileProperties `xml:"Properties"` +} + // ShareProperties contains various properties of a share returned from // various endpoints like ListShares. type ShareProperties struct { @@ -27,6 +41,40 @@ type ShareProperties struct { Quota string `xml:"Quota"` } +// DirectoryProperties contains various properties of a directory returned +// from various endpoints like GetDirectoryProperties. +type DirectoryProperties struct { + LastModified string `xml:"Last-Modified"` + Etag string `xml:"Etag"` +} + +// FileProperties contains various properties of a file returned from +// various endpoints like ListDirsAndFiles. +type FileProperties struct { + CacheControl string `header:"x-ms-cache-control"` + ContentLength uint64 `xml:"Content-Length"` + ContentType string `header:"x-ms-content-type"` + CopyCompletionTime string + CopyID string + CopySource string + CopyProgress string + CopyStatusDesc string + CopyStatus string + Disposition string `header:"x-ms-content-disposition"` + Encoding string `header:"x-ms-content-encoding"` + Etag string + Language string `header:"x-ms-content-language"` + LastModified string + MD5 string `header:"x-ms-content-md5"` +} + +// FileStream contains file data returned from a call to GetFile. +type FileStream struct { + Body io.ReadCloser + Properties *FileProperties + Metadata map[string]string +} + // ShareListResponse contains the response fields from // ListShares call. // @@ -53,12 +101,80 @@ type ListSharesParameters struct { Timeout uint } +// DirsAndFilesListResponse contains the response fields from +// a List Files and Directories call. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166980.aspx +type DirsAndFilesListResponse struct { + XMLName xml.Name `xml:"EnumerationResults"` + Xmlns string `xml:"xmlns,attr"` + Marker string `xml:"Marker"` + MaxResults int64 `xml:"MaxResults"` + Directories []Directory `xml:"Entries>Directory"` + Files []File `xml:"Entries>File"` + NextMarker string `xml:"NextMarker"` +} + +// FileRanges contains a list of file range information for a file. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166984.aspx +type FileRanges struct { + ContentLength uint64 + LastModified string + ETag string + FileRanges []FileRange `xml:"Range"` +} + +// FileRange contains range information for a file. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166984.aspx +type FileRange struct { + Start uint64 `xml:"Start"` + End uint64 `xml:"End"` +} + +// ListDirsAndFilesParameters defines the set of customizable parameters to +// make a List Files and Directories call. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166980.aspx +type ListDirsAndFilesParameters struct { + Marker string + MaxResults uint + Timeout uint +} + // ShareHeaders contains various properties of a file and is an entry // in SetShareProperties type ShareHeaders struct { Quota string `header:"x-ms-share-quota"` } +type compType string + +const ( + compNone compType = "" + compList compType = "list" + compMetadata compType = "metadata" + compProperties compType = "properties" + compRangeList compType = "rangelist" +) + +func (ct compType) String() string { + return string(ct) +} + +type resourceType string + +const ( + resourceDirectory resourceType = "directory" + resourceFile resourceType = "" + resourceShare resourceType = "share" +) + +func (rt resourceType) String() string { + return string(rt) +} + func (p ListSharesParameters) getParameters() url.Values { out := url.Values{} @@ -81,9 +197,97 @@ func (p ListSharesParameters) getParameters() url.Values { return out } -// pathForFileShare returns the URL path segment for a File Share resource -func pathForFileShare(name string) string { - return fmt.Sprintf("/%s", name) +func (p ListDirsAndFilesParameters) getParameters() url.Values { + out := url.Values{} + + if p.Marker != "" { + out.Set("marker", p.Marker) + } + if p.MaxResults != 0 { + out.Set("maxresults", fmt.Sprintf("%v", p.MaxResults)) + } + if p.Timeout != 0 { + out.Set("timeout", fmt.Sprintf("%v", p.Timeout)) + } + + return out +} + +func (fr FileRange) String() string { + return fmt.Sprintf("bytes=%d-%d", fr.Start, fr.End) +} + +// ToPathSegment returns the URL path segment for the specified values +func ToPathSegment(parts ...string) string { + join := strings.Join(parts, "/") + if join[0] != '/' { + join = fmt.Sprintf("/%s", join) + } + return join +} + +// returns url.Values for the specified types +func getURLInitValues(comp compType, res resourceType) url.Values { + values := url.Values{} + if comp != compNone { + values.Set("comp", comp.String()) + } + if res != resourceFile { + values.Set("restype", res.String()) + } + return values +} + +// ListDirsAndFiles returns a list of files or directories under the specified share or +// directory. It also contains a pagination token and other response details. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166980.aspx +func (f FileServiceClient) ListDirsAndFiles(path string, params ListDirsAndFilesParameters) (DirsAndFilesListResponse, error) { + q := mergeParams(params.getParameters(), getURLInitValues(compList, resourceDirectory)) + + var out DirsAndFilesListResponse + resp, err := f.listContent(path, q, nil) + if err != nil { + return out, err + } + + defer resp.body.Close() + err = xmlUnmarshal(resp.body, &out) + return out, err +} + +// ListFileRanges returns the list of valid ranges for a file. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166984.aspx +func (f FileServiceClient) ListFileRanges(path string, listRange *FileRange) (FileRanges, error) { + params := url.Values{"comp": {"rangelist"}} + + // add optional range to list + var headers map[string]string + if listRange != nil { + headers = make(map[string]string) + headers["Range"] = listRange.String() + } + + var out FileRanges + resp, err := f.listContent(path, params, headers) + if err != nil { + return out, err + } + + defer resp.body.Close() + var cl uint64 + cl, err = strconv.ParseUint(resp.headers.Get("x-ms-content-length"), 10, 64) + if err != nil { + return out, err + } + + out.ContentLength = cl + out.ETag = resp.headers.Get("ETag") + out.LastModified = resp.headers.Get("Last-Modified") + + err = xmlUnmarshal(resp.body, &out) + return out, err } // ListShares returns the list of shares in a storage account along with @@ -92,40 +296,176 @@ func pathForFileShare(name string) string { // See https://msdn.microsoft.com/en-us/library/azure/dd179352.aspx func (f FileServiceClient) ListShares(params ListSharesParameters) (ShareListResponse, error) { q := mergeParams(params.getParameters(), url.Values{"comp": {"list"}}) - uri := f.client.getEndpoint(fileServiceName, "", q) - headers := f.client.getStandardHeaders() var out ShareListResponse - resp, err := f.client.exec("GET", uri, headers, nil) + resp, err := f.listContent("", q, nil) if err != nil { return out, err } - defer resp.body.Close() + defer resp.body.Close() err = xmlUnmarshal(resp.body, &out) return out, err } -// CreateShare operation creates a new share under the specified account. If the -// share with the same name already exists, the operation fails. +// retrieves directory or share content +func (f FileServiceClient) listContent(path string, params url.Values, extraHeaders map[string]string) (*storageResponse, error) { + if err := f.checkForStorageEmulator(); err != nil { + return nil, err + } + + uri := f.client.getEndpoint(fileServiceName, path, params) + headers := mergeHeaders(f.client.getStandardHeaders(), extraHeaders) + + resp, err := f.client.exec(http.MethodGet, uri, headers, nil) + if err != nil { + return nil, err + } + + if err = checkRespCode(resp.statusCode, []int{http.StatusOK}); err != nil { + resp.body.Close() + return nil, err + } + + return resp, nil +} + +// CreateDirectory operation creates a new directory with optional metadata in the +// specified share. If a directory with the same name already exists, the operation fails. // -// See https://msdn.microsoft.com/en-us/library/azure/dn167008.aspx -func (f FileServiceClient) CreateShare(name string) error { - resp, err := f.createShare(name) +// See https://msdn.microsoft.com/en-us/library/azure/dn166993.aspx +func (f FileServiceClient) CreateDirectory(path string, metadata map[string]string) error { + return f.createResource(path, resourceDirectory, mergeMDIntoExtraHeaders(metadata, nil)) +} + +// CreateFile operation creates a new file with optional metadata or replaces an existing one. +// Note that this only initializes the file, call PutRange to add content. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn194271.aspx +func (f FileServiceClient) CreateFile(path string, maxSize uint64, metadata map[string]string) error { + extraHeaders := map[string]string{ + "x-ms-content-length": strconv.FormatUint(maxSize, 10), + "x-ms-type": "file", + } + return f.createResource(path, resourceFile, mergeMDIntoExtraHeaders(metadata, extraHeaders)) +} + +// ClearRange releases the specified range of space in storage. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn194276.aspx +func (f FileServiceClient) ClearRange(path string, fileRange FileRange) error { + return f.modifyRange(path, nil, fileRange) +} + +// PutRange writes a range of bytes to a file. Note that the length of bytes must +// match (rangeEnd - rangeStart) + 1 with a maximum size of 4MB. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn194276.aspx +func (f FileServiceClient) PutRange(path string, bytes io.Reader, fileRange FileRange) error { + return f.modifyRange(path, bytes, fileRange) +} + +// modifies a range of bytes in the specified file +func (f FileServiceClient) modifyRange(path string, bytes io.Reader, fileRange FileRange) error { + if err := f.checkForStorageEmulator(); err != nil { + return err + } + if fileRange.End < fileRange.Start { + return errors.New("the value for rangeEnd must be greater than or equal to rangeStart") + } + if bytes != nil && fileRange.End-fileRange.Start > 4194304 { + return errors.New("range cannot exceed 4MB in size") + } + + uri := f.client.getEndpoint(fileServiceName, path, url.Values{"comp": {"range"}}) + + // default to clear + write := "clear" + cl := uint64(0) + + // if bytes is not nil then this is an update operation + if bytes != nil { + write = "update" + cl = (fileRange.End - fileRange.Start) + 1 + } + + extraHeaders := map[string]string{ + "Content-Length": strconv.FormatUint(cl, 10), + "Range": fileRange.String(), + "x-ms-write": write, + } + + headers := mergeHeaders(f.client.getStandardHeaders(), extraHeaders) + resp, err := f.client.exec(http.MethodPut, uri, headers, bytes) if err != nil { return err } + defer resp.body.Close() return checkRespCode(resp.statusCode, []int{http.StatusCreated}) } +// GetFile operation reads or downloads a file from the system, including its +// metadata and properties. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-file +func (f FileServiceClient) GetFile(path string, fileRange *FileRange) (*FileStream, error) { + var extraHeaders map[string]string + if fileRange != nil { + extraHeaders = map[string]string{ + "Range": fileRange.String(), + } + } + + resp, err := f.getResourceNoClose(path, compNone, resourceFile, http.MethodGet, extraHeaders) + if err != nil { + return nil, err + } + + if err = checkRespCode(resp.statusCode, []int{http.StatusOK, http.StatusPartialContent}); err != nil { + resp.body.Close() + return nil, err + } + + props, err := getFileProps(resp.headers) + md := getFileMDFromHeaders(resp.headers) + return &FileStream{Body: resp.body, Properties: props, Metadata: md}, nil +} + +// CreateShare operation creates a new share with optional metadata under the specified account. +// If the share with the same name already exists, the operation fails. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn167008.aspx +func (f FileServiceClient) CreateShare(name string, metadata map[string]string) error { + return f.createResource(ToPathSegment(name), resourceShare, mergeMDIntoExtraHeaders(metadata, nil)) +} + +// DirectoryExists returns true if the specified directory exists on the specified share. +func (f FileServiceClient) DirectoryExists(path string) (bool, error) { + return f.resourceExists(path, resourceDirectory) +} + +// FileExists returns true if the specified file exists. +func (f FileServiceClient) FileExists(path string) (bool, error) { + return f.resourceExists(path, resourceFile) +} + // ShareExists returns true if a share with given name exists // on the storage account, otherwise returns false. func (f FileServiceClient) ShareExists(name string) (bool, error) { - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), url.Values{"restype": {"share"}}) + return f.resourceExists(ToPathSegment(name), resourceShare) +} + +// returns true if the specified directory or share exists +func (f FileServiceClient) resourceExists(path string, res resourceType) (bool, error) { + if err := f.checkForStorageEmulator(); err != nil { + return false, err + } + + uri := f.client.getEndpoint(fileServiceName, path, getURLInitValues(compNone, res)) headers := f.client.getStandardHeaders() - resp, err := f.client.exec("HEAD", uri, headers, nil) + resp, err := f.client.exec(http.MethodHead, uri, headers, nil) if resp != nil { defer resp.body.Close() if resp.statusCode == http.StatusOK || resp.statusCode == http.StatusNotFound { @@ -135,21 +475,27 @@ func (f FileServiceClient) ShareExists(name string) (bool, error) { return false, err } -// GetShareURL gets the canonical URL to the share with the specified name in the -// specified container. This method does not create a publicly accessible URL if -// the file is private and this method does not check if the file -// exists. -func (f FileServiceClient) GetShareURL(name string) string { - return f.client.getEndpoint(fileServiceName, pathForFileShare(name), url.Values{}) +// GetDirectoryURL gets the canonical URL to the directory with the specified name +// in the specified share. This method does not create a publicly accessible URL if +// the file is private and this method does not check if the directory exists. +func (f FileServiceClient) GetDirectoryURL(path string) string { + return f.client.getEndpoint(fileServiceName, path, url.Values{}) } -// CreateShareIfNotExists creates a new share under the specified account if -// it does not exist. Returns true if container is newly created or false if -// container already exists. +// GetShareURL gets the canonical URL to the share with the specified name in the +// specified container. This method does not create a publicly accessible URL if +// the file is private and this method does not check if the share exists. +func (f FileServiceClient) GetShareURL(name string) string { + return f.client.getEndpoint(fileServiceName, ToPathSegment(name), url.Values{}) +} + +// CreateDirectoryIfNotExists creates a new directory on the specified share +// if it does not exist. Returns true if directory is newly created or false +// if the directory already exists. // -// See https://msdn.microsoft.com/en-us/library/azure/dn167008.aspx -func (f FileServiceClient) CreateShareIfNotExists(name string) (bool, error) { - resp, err := f.createShare(name) +// See https://msdn.microsoft.com/en-us/library/azure/dn166993.aspx +func (f FileServiceClient) CreateDirectoryIfNotExists(path string) (bool, error) { + resp, err := f.createResourceNoClose(path, resourceDirectory, nil) if resp != nil { defer resp.body.Close() if resp.statusCode == http.StatusCreated || resp.statusCode == http.StatusConflict { @@ -159,37 +505,149 @@ func (f FileServiceClient) CreateShareIfNotExists(name string) (bool, error) { return false, err } -// CreateShare creates a Azure File Share and returns its response -func (f FileServiceClient) createShare(name string) (*storageResponse, error) { +// CreateShareIfNotExists creates a new share under the specified account if +// it does not exist. Returns true if container is newly created or false if +// container already exists. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn167008.aspx +func (f FileServiceClient) CreateShareIfNotExists(name string) (bool, error) { + resp, err := f.createResourceNoClose(ToPathSegment(name), resourceShare, nil) + if resp != nil { + defer resp.body.Close() + if resp.statusCode == http.StatusCreated || resp.statusCode == http.StatusConflict { + return resp.statusCode == http.StatusCreated, nil + } + } + return false, err +} + +// creates a resource depending on the specified resource type +func (f FileServiceClient) createResource(path string, res resourceType, extraHeaders map[string]string) error { + resp, err := f.createResourceNoClose(path, res, extraHeaders) + if err != nil { + return err + } + defer resp.body.Close() + return checkRespCode(resp.statusCode, []int{http.StatusCreated}) +} + +// creates a resource depending on the specified resource type, doesn't close the response body +func (f FileServiceClient) createResourceNoClose(path string, res resourceType, extraHeaders map[string]string) (*storageResponse, error) { if err := f.checkForStorageEmulator(); err != nil { return nil, err } - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), url.Values{"restype": {"share"}}) - headers := f.client.getStandardHeaders() - return f.client.exec("PUT", uri, headers, nil) + + values := getURLInitValues(compNone, res) + uri := f.client.getEndpoint(fileServiceName, path, values) + headers := mergeHeaders(f.client.getStandardHeaders(), extraHeaders) + + return f.client.exec(http.MethodPut, uri, headers, nil) +} + +// GetDirectoryProperties provides various information about the specified directory. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn194272.aspx +func (f FileServiceClient) GetDirectoryProperties(path string) (*DirectoryProperties, error) { + headers, err := f.getResourceHeaders(path, compNone, resourceDirectory, http.MethodHead) + if err != nil { + return nil, err + } + + return &DirectoryProperties{ + LastModified: headers.Get("Last-Modified"), + Etag: headers.Get("Etag"), + }, nil +} + +// GetFileProperties provides various information about the specified file. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166971.aspx +func (f FileServiceClient) GetFileProperties(path string) (*FileProperties, error) { + headers, err := f.getResourceHeaders(path, compNone, resourceFile, http.MethodHead) + if err != nil { + return nil, err + } + return getFileProps(headers) +} + +// returns file properties from the specified HTTP header +func getFileProps(header http.Header) (*FileProperties, error) { + size, err := strconv.ParseUint(header.Get("Content-Length"), 10, 64) + if err != nil { + return nil, err + } + + return &FileProperties{ + CacheControl: header.Get("Cache-Control"), + ContentLength: size, + ContentType: header.Get("Content-Type"), + CopyCompletionTime: header.Get("x-ms-copy-completion-time"), + CopyID: header.Get("x-ms-copy-id"), + CopyProgress: header.Get("x-ms-copy-progress"), + CopySource: header.Get("x-ms-copy-source"), + CopyStatus: header.Get("x-ms-copy-status"), + CopyStatusDesc: header.Get("x-ms-copy-status-description"), + Disposition: header.Get("Content-Disposition"), + Encoding: header.Get("Content-Encoding"), + Etag: header.Get("ETag"), + Language: header.Get("Content-Language"), + LastModified: header.Get("Last-Modified"), + MD5: header.Get("Content-MD5"), + }, nil } // GetShareProperties provides various information about the specified // file. See https://msdn.microsoft.com/en-us/library/azure/dn689099.aspx func (f FileServiceClient) GetShareProperties(name string) (*ShareProperties, error) { - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), url.Values{"restype": {"share"}}) + headers, err := f.getResourceHeaders(ToPathSegment(name), compNone, resourceShare, http.MethodHead) + if err != nil { + return nil, err + } + return &ShareProperties{ + LastModified: headers.Get("Last-Modified"), + Etag: headers.Get("Etag"), + Quota: headers.Get("x-ms-share-quota"), + }, nil +} - headers := f.client.getStandardHeaders() - resp, err := f.client.exec("HEAD", uri, headers, nil) +// returns HTTP header data for the specified directory or share +func (f FileServiceClient) getResourceHeaders(path string, comp compType, res resourceType, verb string) (http.Header, error) { + resp, err := f.getResourceNoClose(path, comp, res, verb, nil) if err != nil { return nil, err } defer resp.body.Close() - if err := checkRespCode(resp.statusCode, []int{http.StatusOK}); err != nil { + if err = checkRespCode(resp.statusCode, []int{http.StatusOK}); err != nil { return nil, err } - return &ShareProperties{ - LastModified: resp.headers.Get("Last-Modified"), - Etag: resp.headers.Get("Etag"), - Quota: resp.headers.Get("x-ms-share-quota"), - }, nil + return resp.headers, nil +} + +// gets the specified resource, doesn't close the response body +func (f FileServiceClient) getResourceNoClose(path string, comp compType, res resourceType, verb string, extraHeaders map[string]string) (*storageResponse, error) { + if err := f.checkForStorageEmulator(); err != nil { + return nil, err + } + + params := getURLInitValues(comp, res) + uri := f.client.getEndpoint(fileServiceName, path, params) + headers := mergeHeaders(f.client.getStandardHeaders(), extraHeaders) + + return f.client.exec(verb, uri, headers, nil) +} + +// SetFileProperties operation sets system properties on the specified file. +// +// Some keys may be converted to Camel-Case before sending. All keys +// are returned in lower case by SetFileProperties. HTTP header names +// are case-insensitive so case munging should not matter to other +// applications either. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166975.aspx +func (f FileServiceClient) SetFileProperties(path string, props FileProperties) error { + return f.setResourceHeaders(path, compProperties, resourceFile, headersFromStruct(props)) } // SetShareProperties replaces the ShareHeaders for the specified file. @@ -201,26 +659,21 @@ func (f FileServiceClient) GetShareProperties(name string) (*ShareProperties, er // // See https://msdn.microsoft.com/en-us/library/azure/mt427368.aspx func (f FileServiceClient) SetShareProperties(name string, shareHeaders ShareHeaders) error { - params := url.Values{} - params.Set("restype", "share") - params.Set("comp", "properties") + return f.setResourceHeaders(ToPathSegment(name), compProperties, resourceShare, headersFromStruct(shareHeaders)) +} - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), params) - headers := f.client.getStandardHeaders() +// DeleteDirectory operation removes the specified empty directory. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn166969.aspx +func (f FileServiceClient) DeleteDirectory(path string) error { + return f.deleteResource(path, resourceDirectory) +} - extraHeaders := headersFromStruct(shareHeaders) - - for k, v := range extraHeaders { - headers[k] = v - } - - resp, err := f.client.exec("PUT", uri, headers, nil) - if err != nil { - return err - } - defer resp.body.Close() - - return checkRespCode(resp.statusCode, []int{http.StatusOK}) +// DeleteFile operation immediately removes the file from the storage account. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn689085.aspx +func (f FileServiceClient) DeleteFile(path string) error { + return f.deleteResource(path, resourceFile) } // DeleteShare operation marks the specified share for deletion. The share @@ -229,12 +682,7 @@ func (f FileServiceClient) SetShareProperties(name string, shareHeaders ShareHea // // See https://msdn.microsoft.com/en-us/library/azure/dn689090.aspx func (f FileServiceClient) DeleteShare(name string) error { - resp, err := f.deleteShare(name) - if err != nil { - return err - } - defer resp.body.Close() - return checkRespCode(resp.statusCode, []int{http.StatusAccepted}) + return f.deleteResource(ToPathSegment(name), resourceShare) } // DeleteShareIfExists operation marks the specified share for deletion if it @@ -244,7 +692,7 @@ func (f FileServiceClient) DeleteShare(name string) error { // // See https://msdn.microsoft.com/en-us/library/azure/dn689090.aspx func (f FileServiceClient) DeleteShareIfExists(name string) (bool, error) { - resp, err := f.deleteShare(name) + resp, err := f.deleteResourceNoClose(ToPathSegment(name), resourceShare) if resp != nil { defer resp.body.Close() if resp.statusCode == http.StatusAccepted || resp.statusCode == http.StatusNotFound { @@ -254,14 +702,49 @@ func (f FileServiceClient) DeleteShareIfExists(name string) (bool, error) { return false, err } -// deleteShare makes the call to Delete Share operation endpoint and returns -// the response -func (f FileServiceClient) deleteShare(name string) (*storageResponse, error) { +// deletes the resource and returns the response +func (f FileServiceClient) deleteResource(path string, res resourceType) error { + resp, err := f.deleteResourceNoClose(path, res) + if err != nil { + return err + } + defer resp.body.Close() + return checkRespCode(resp.statusCode, []int{http.StatusAccepted}) +} + +// deletes the resource and returns the response, doesn't close the response body +func (f FileServiceClient) deleteResourceNoClose(path string, res resourceType) (*storageResponse, error) { if err := f.checkForStorageEmulator(); err != nil { return nil, err } - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), url.Values{"restype": {"share"}}) - return f.client.exec("DELETE", uri, f.client.getStandardHeaders(), nil) + + values := getURLInitValues(compNone, res) + uri := f.client.getEndpoint(fileServiceName, path, values) + return f.client.exec(http.MethodDelete, uri, f.client.getStandardHeaders(), nil) +} + +// SetDirectoryMetadata replaces the metadata for the specified directory. +// +// Some keys may be converted to Camel-Case before sending. All keys +// are returned in lower case by GetDirectoryMetadata. HTTP header names +// are case-insensitive so case munging should not matter to other +// applications either. +// +// See https://msdn.microsoft.com/en-us/library/azure/mt427370.aspx +func (f FileServiceClient) SetDirectoryMetadata(path string, metadata map[string]string) error { + return f.setResourceHeaders(path, compMetadata, resourceDirectory, mergeMDIntoExtraHeaders(metadata, nil)) +} + +// SetFileMetadata replaces the metadata for the specified file. +// +// Some keys may be converted to Camel-Case before sending. All keys +// are returned in lower case by GetFileMetadata. HTTP header names +// are case-insensitive so case munging should not matter to other +// applications either. +// +// See https://msdn.microsoft.com/en-us/library/azure/dn689097.aspx +func (f FileServiceClient) SetFileMetadata(path string, metadata map[string]string) error { + return f.setResourceHeaders(path, compMetadata, resourceFile, mergeMDIntoExtraHeaders(metadata, nil)) } // SetShareMetadata replaces the metadata for the specified Share. @@ -272,22 +755,43 @@ func (f FileServiceClient) deleteShare(name string) (*storageResponse, error) { // applications either. // // See https://msdn.microsoft.com/en-us/library/azure/dd179414.aspx -func (f FileServiceClient) SetShareMetadata(name string, metadata map[string]string, extraHeaders map[string]string) error { - params := url.Values{} - params.Set("restype", "share") - params.Set("comp", "metadata") +func (f FileServiceClient) SetShareMetadata(name string, metadata map[string]string) error { + return f.setResourceHeaders(ToPathSegment(name), compMetadata, resourceShare, mergeMDIntoExtraHeaders(metadata, nil)) +} - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), params) - headers := f.client.getStandardHeaders() - for k, v := range metadata { - headers[userDefinedMetadataHeaderPrefix+k] = v +// merges metadata into extraHeaders and returns extraHeaders +func mergeMDIntoExtraHeaders(metadata, extraHeaders map[string]string) map[string]string { + if metadata == nil && extraHeaders == nil { + return nil } + if extraHeaders == nil { + extraHeaders = make(map[string]string) + } + for k, v := range metadata { + extraHeaders[userDefinedMetadataHeaderPrefix+k] = v + } + return extraHeaders +} +// merges extraHeaders into headers and returns headers +func mergeHeaders(headers, extraHeaders map[string]string) map[string]string { for k, v := range extraHeaders { headers[k] = v } + return headers +} - resp, err := f.client.exec("PUT", uri, headers, nil) +// sets extra header data for the specified resource +func (f FileServiceClient) setResourceHeaders(path string, comp compType, res resourceType, extraHeaders map[string]string) error { + if err := f.checkForStorageEmulator(); err != nil { + return err + } + + params := getURLInitValues(comp, res) + uri := f.client.getEndpoint(fileServiceName, path, params) + headers := mergeHeaders(f.client.getStandardHeaders(), extraHeaders) + + resp, err := f.client.exec(http.MethodPut, uri, headers, nil) if err != nil { return err } @@ -296,6 +800,26 @@ func (f FileServiceClient) SetShareMetadata(name string, metadata map[string]str return checkRespCode(resp.statusCode, []int{http.StatusOK}) } +// GetDirectoryMetadata returns all user-defined metadata for the specified directory. +// +// All metadata keys will be returned in lower case. (HTTP header +// names are case-insensitive.) +// +// See https://msdn.microsoft.com/en-us/library/azure/mt427371.aspx +func (f FileServiceClient) GetDirectoryMetadata(path string) (map[string]string, error) { + return f.getMetadata(path, resourceDirectory) +} + +// GetFileMetadata returns all user-defined metadata for the specified file. +// +// All metadata keys will be returned in lower case. (HTTP header +// names are case-insensitive.) +// +// See https://msdn.microsoft.com/en-us/library/azure/dn689098.aspx +func (f FileServiceClient) GetFileMetadata(path string) (map[string]string, error) { + return f.getMetadata(path, resourceFile) +} + // GetShareMetadata returns all user-defined metadata for the specified share. // // All metadata keys will be returned in lower case. (HTTP header @@ -303,25 +827,27 @@ func (f FileServiceClient) SetShareMetadata(name string, metadata map[string]str // // See https://msdn.microsoft.com/en-us/library/azure/dd179414.aspx func (f FileServiceClient) GetShareMetadata(name string) (map[string]string, error) { - params := url.Values{} - params.Set("restype", "share") - params.Set("comp", "metadata") + return f.getMetadata(ToPathSegment(name), resourceShare) +} - uri := f.client.getEndpoint(fileServiceName, pathForFileShare(name), params) - headers := f.client.getStandardHeaders() +// gets metadata for the specified resource +func (f FileServiceClient) getMetadata(path string, res resourceType) (map[string]string, error) { + if err := f.checkForStorageEmulator(); err != nil { + return nil, err + } - resp, err := f.client.exec("GET", uri, headers, nil) + headers, err := f.getResourceHeaders(path, compMetadata, res, http.MethodGet) if err != nil { return nil, err } - defer resp.body.Close() - if err := checkRespCode(resp.statusCode, []int{http.StatusOK}); err != nil { - return nil, err - } + return getFileMDFromHeaders(headers), nil +} +// returns a map of custom metadata values from the specified HTTP header +func getFileMDFromHeaders(header http.Header) map[string]string { metadata := make(map[string]string) - for k, v := range resp.headers { + for k, v := range header { // Can't trust CanonicalHeaderKey() to munge case // reliably. "_" is allowed in identifiers: // https://msdn.microsoft.com/en-us/library/azure/dd179414.aspx @@ -339,7 +865,7 @@ func (f FileServiceClient) GetShareMetadata(name string) (map[string]string, err k = k[len(userDefinedMetadataHeaderPrefix):] metadata[k] = v[len(v)-1] } - return metadata, nil + return metadata } //checkForStorageEmulator determines if the client is setup for use with diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go index 3ecf4aca0..0cd357844 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go @@ -82,6 +82,24 @@ func (p PeekMessagesParameters) getParameters() url.Values { return out } +// UpdateMessageParameters is the set of options can be specified for Update Messsage +// operation. A zero struct does not use any preferences for the request. +type UpdateMessageParameters struct { + PopReceipt string + VisibilityTimeout int +} + +func (p UpdateMessageParameters) getParameters() url.Values { + out := url.Values{} + if p.PopReceipt != "" { + out.Set("popreceipt", p.PopReceipt) + } + if p.VisibilityTimeout != 0 { + out.Set("visibilitytimeout", strconv.Itoa(p.VisibilityTimeout)) + } + return out +} + // GetMessagesResponse represents a response returned from Get Messages // operation. type GetMessagesResponse struct { @@ -304,3 +322,23 @@ func (c QueueServiceClient) DeleteMessage(queue, messageID, popReceipt string) e defer resp.body.Close() return checkRespCode(resp.statusCode, []int{http.StatusNoContent}) } + +// UpdateMessage operation deletes the specified message. +// +// See https://msdn.microsoft.com/en-us/library/azure/hh452234.aspx +func (c QueueServiceClient) UpdateMessage(queue string, messageID string, message string, params UpdateMessageParameters) error { + uri := c.client.getEndpoint(queueServiceName, pathForMessage(queue, messageID), params.getParameters()) + req := putMessageRequest{MessageText: message} + body, nn, err := xmlMarshal(req) + if err != nil { + return err + } + headers := c.client.getStandardHeaders() + headers["Content-Length"] = fmt.Sprintf("%d", nn) + resp, err := c.client.exec("PUT", uri, headers, body) + if err != nil { + return err + } + defer resp.body.Close() + return checkRespCode(resp.statusCode, []int{http.StatusNoContent}) +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_entities.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_entities.go index 1b5919cd1..a26d9c6f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_entities.go @@ -10,6 +10,8 @@ import ( "reflect" ) +// Annotating as secure for gas scanning +/* #nosec */ const ( partitionKeyNode = "PartitionKey" rowKeyNode = "RowKey" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go index d71c6ce55..57ca1b6d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go @@ -77,7 +77,7 @@ func headersFromStruct(v interface{}) map[string]string { for i := 0; i < value.NumField(); i++ { key := value.Type().Field(i).Tag.Get("header") val := value.Field(i).String() - if val != "" { + if key != "" && val != "" { headers[key] = val } } diff --git a/vendor/vendor.json b/vendor/vendor.json index 6ab695d77..66a4e98db 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -3,218 +3,218 @@ "ignore": "appengine test", "package": [ { - "checksumSHA1": "7EtT3l4dwaxhwHlAd7IZ1DcglU0=", + "checksumSHA1": "fZpMwExfyDmWnqpghxa/75Gmj+w=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/cdn", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "oIt4tXgFYnZJBsCac1BQLnTWALM=", + "checksumSHA1": "duGYYmAIPryWG256C+VrJgNy1uU=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/compute", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "SPkgudG/pEcehXo9ytOLhOl67Pk=", + "checksumSHA1": "NJGBM6QQwUQEhaCBZlN9sCoaBZE=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/eventhub", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "97/DmD4+utvbQqbVSDvf/eUFY+U=", + "checksumSHA1": "ULyaZ5HqIzSiehaIWGhcoNSBBsw=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/keyvault", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "QKi6LiSyD5GnRK8ExpMgZl4XiMI=", + "checksumSHA1": "VECRv0I+g9uIgIZpeKb38hF/sT0=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/network", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "FtfyN0iRVvIh5VhhOOnMcrIPn8c=", + "checksumSHA1": "uC6vwlBtGNsb+aJJG3m9tdEfHQM=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/resources/resources", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "3Y2bhfhNi9XZRM6d8+mAioAa/DU=", + "checksumSHA1": "gDwsxE1+KRfIswYeYjBcNQiLdIM=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/scheduler", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "tNH1MlJGiBc5aalhn2c+K3B3lsw=", + "checksumSHA1": "42r4OTPQkCr3IHb3YaV/PKK9YWE=", "path": "github.com/Azure/azure-sdk-for-go/arm/servicebus", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "HEF1uByK7oq8NPBVQzs+q+Ntz8k=", + "checksumSHA1": "tJdi+m5G/aMsHYihxqPsfszSe5Y=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/arm/storage", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "HpEjcIrXo84sq0LO0bGfMl3VRRs=", + "checksumSHA1": "S5ZZyUgvr7DFHwMyGsLXOUu4hw0=", "path": "github.com/Azure/azure-sdk-for-go/arm/trafficmanager", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "2TUrvoJUkp8W98S9f30Ss1J/Bnk=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "TcQ6KXoBkvUhCYeggJ/bwcz+QaQ=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/affinitygroup", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "HfjyhRfmKBsVgWLTOfWVcxe8Z88=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/hostedservice", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "4otMhU6xZ41HfmiGZFYtV93GdcI=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/location", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "hxivwm3D13cqFGOlOS3q8HD7DN0=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/networksecuritygroup", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "XzrPv8SWFBYdh5oie+NGysqnLIM=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/osimage", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "hzwziaU5QlMlFcFPdbEmW18oV3Y=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/sql", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "YoAhDE0X6hSFuPpXbpfqcTC0Zvw=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/storageservice", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "6xEiZL4a9rr5YbnY0RdzuzhEF1Q=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/virtualmachine", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "xcBM3zQtfcE3VHNBACJJGEesCBI=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "0bfdkDZ2JFV7bol6GQFfC0g+lP4=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/virtualmachineimage", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "IhjDqm84VDVSIoHyiGvUzuljG3s=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/virtualnetwork", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "+ykSkHo40/f6VK6/zXDqzF8Lh14=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/management/vmutils", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { - "checksumSHA1": "M30X+Wqn7AnUr1numUOkQRI7ET0=", + "checksumSHA1": "Nbn9LDCCDU8HdiTeiEocwLDGIRo=", "comment": "v2.1.1-beta-8-gca4d906", "path": "github.com/Azure/azure-sdk-for-go/storage", - "revision": "bd73d950fa4440dae889bd9917bff7cef539f86e", - "revisionTime": "2016-10-28T18:31:11Z", - "version": "v5.0.0-beta", - "versionExact": "v5.0.0-beta" + "revision": "0984e0641ae43b89283223034574d6465be93bf4", + "revisionTime": "2016-11-30T22:29:01Z", + "version": "v7.0.1-beta", + "versionExact": "v7.0.1-beta" }, { "checksumSHA1": "eVSHe6GIHj9/ziFrQLZ1SC7Nn6k=",