[WIP] provider/azurerm: Bump sdk version to 7.0.1 (#10458)
* provider/azurerm: Bump sdk version to 7.0.1 * Fixing the build (#10489) * Fixing the broken tests (#10499) * Updating the method signatures to match (#10533)
This commit is contained in:
parent
dccdaceee0
commit
54459900c5
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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{
|
||||
cdnEndpoint := cdn.Endpoint{
|
||||
Location: &location,
|
||||
Properties: &properties,
|
||||
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)
|
||||
|
||||
|
@ -302,10 +302,10 @@ func resourceArmCdnEndpointUpdate(d *schema.ResourceData, meta interface{}) erro
|
|||
|
||||
updateProps := cdn.EndpointUpdateParameters{
|
||||
Tags: expandTags(newTags),
|
||||
Properties: &properties,
|
||||
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
|
||||
|
@ -389,7 +389,7 @@ func expandAzureRmCdnEndpointOrigins(d *schema.ResourceData) ([]cdn.DeepCreatedO
|
|||
|
||||
origin := cdn.DeepCreatedOrigin{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ func resourceArmLoadBalancerCreate(d *schema.ResourceData, meta interface{}) err
|
|||
Name: azure.String(name),
|
||||
Location: azure.String(location),
|
||||
Tags: expandedTags,
|
||||
Properties: &properties,
|
||||
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)
|
||||
|
@ -216,7 +216,7 @@ func expandAzureRmLoadBalancerFrontendIpConfigurations(d *schema.ResourceData) *
|
|||
name := data["name"].(string)
|
||||
frontEndConfig := network.FrontendIPConfiguration{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
@ -257,7 +257,7 @@ func expandAzureRmLoadBalancerNatPool(d *schema.ResourceData, lb *network.LoadBa
|
|||
|
||||
natPool := network.InboundNatPool{
|
||||
Name: azure.String(d.Get("name").(string)),
|
||||
Properties: &properties,
|
||||
InboundNatPoolPropertiesFormat: &properties,
|
||||
}
|
||||
|
||||
return &natPool, nil
|
||||
|
|
|
@ -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 {
|
||||
|
@ -259,7 +259,7 @@ func expandAzureRmLoadBalancerNatRule(d *schema.ResourceData, lb *network.LoadBa
|
|||
|
||||
natRule := network.InboundNatRule{
|
||||
Name: azure.String(d.Get("name").(string)),
|
||||
Properties: &properties,
|
||||
InboundNatRulePropertiesFormat: &properties,
|
||||
}
|
||||
|
||||
return &natRule, nil
|
||||
|
|
|
@ -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 {
|
||||
|
@ -254,7 +254,7 @@ func expandAzureRmLoadBalancerProbe(d *schema.ResourceData, lb *network.LoadBala
|
|||
|
||||
probe := network.Probe{
|
||||
Name: azure.String(d.Get("name").(string)),
|
||||
Properties: &properties,
|
||||
ProbePropertiesFormat: &properties,
|
||||
}
|
||||
|
||||
return &probe, nil
|
||||
|
|
|
@ -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 {
|
||||
|
@ -325,7 +325,7 @@ func expandAzureRmLoadBalancerRule(d *schema.ResourceData, lb *network.LoadBalan
|
|||
|
||||
lbRule := network.LoadBalancingRule{
|
||||
Name: azure.String(d.Get("name").(string)),
|
||||
Properties: &properties,
|
||||
LoadBalancingRulePropertiesFormat: &properties,
|
||||
}
|
||||
|
||||
return &lbRule, nil
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ func resourceArmNetworkInterfaceCreate(d *schema.ResourceData, meta interface{})
|
|||
iface := network.Interface{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: &properties,
|
||||
InterfacePropertiesFormat: &properties,
|
||||
Tags: expandTags(tags),
|
||||
}
|
||||
|
||||
|
@ -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 != "" {
|
||||
|
@ -418,7 +418,7 @@ func expandAzureRmNetworkInterfaceIpConfigurations(d *schema.ResourceData) ([]ne
|
|||
name := data["name"].(string)
|
||||
ipConfig := network.InterfaceIPConfiguration{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
InterfaceIPConfigurationPropertiesFormat: &properties,
|
||||
}
|
||||
|
||||
ipConfigs = append(ipConfigs, ipConfig)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
@ -290,7 +290,7 @@ func expandAzureRmSecurityRules(d *schema.ResourceData) ([]network.SecurityRule,
|
|||
name := data["name"].(string)
|
||||
rule := network.SecurityRule{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ func resourceArmNetworkSecurityRuleCreate(d *schema.ResourceData, meta interface
|
|||
|
||||
sgr := network.SecurityRule{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ func resourceArmPublicIpCreate(d *schema.ResourceData, meta interface{}) error {
|
|||
publicIp := network.PublicIPAddress{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: &properties,
|
||||
PublicIPAddressPropertiesFormat: &properties,
|
||||
Tags: expandTags(tags),
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ func resourceArmRouteCreate(d *schema.ResourceData, meta interface{}) error {
|
|||
|
||||
route := network.Route{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ func expandAzureRmRouteTableRoutes(d *schema.ResourceData) ([]network.Route, err
|
|||
name := data["name"].(string)
|
||||
route := network.Route{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,15 +106,15 @@ func resourceArmServiceBusSubscriptionCreate(d *schema.ResourceData, meta interf
|
|||
|
||||
parameters := servicebus.SubscriptionCreateOrUpdateParameters{
|
||||
Location: &location,
|
||||
Properties: &servicebus.SubscriptionProperties{},
|
||||
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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,19 +111,19 @@ func resourceArmServiceBusTopicCreate(d *schema.ResourceData, meta interface{})
|
|||
parameters := servicebus.TopicCreateOrUpdateParameters{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: &servicebus.TopicProperties{},
|
||||
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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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))})
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -101,7 +100,7 @@ func resourceArmSubnetCreate(d *schema.ResourceData, meta interface{}) error {
|
|||
|
||||
subnet := network.Subnet{
|
||||
Name: &name,
|
||||
Properties: &properties,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ func resourceArmTrafficManagerEndpointCreate(d *schema.ResourceData, meta interf
|
|||
params := trafficmanager.Endpoint{
|
||||
Name: &name,
|
||||
Type: &fullEndpointType,
|
||||
Properties: getArmTrafficManagerEndpointProperties(d),
|
||||
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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ func resourceArmTrafficManagerProfileCreate(d *schema.ResourceData, meta interfa
|
|||
profile := trafficmanager.Profile{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: getArmTrafficManagerProfileProperties(d),
|
||||
ProfileProperties: getArmTrafficManagerProfileProperties(d),
|
||||
Tags: expandTags(tags),
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -523,7 +523,7 @@ func resourceArmVirtualMachineCreate(d *schema.ResourceData, meta interface{}) e
|
|||
vm := compute.VirtualMachine{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: &properties,
|
||||
VirtualMachineProperties: &properties,
|
||||
Tags: expandedTags,
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -395,7 +394,7 @@ func resourceArmVirtualMachineScaleSetCreate(d *schema.ResourceData, meta interf
|
|||
Location: &location,
|
||||
Tags: expandTags(tags),
|
||||
Sku: sku,
|
||||
Properties: &scaleSetProps,
|
||||
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,
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -94,7 +93,7 @@ func resourceArmVirtualNetworkCreate(d *schema.ResourceData, meta interface{}) e
|
|||
vnet := network.VirtualNetwork{
|
||||
Name: &name,
|
||||
Location: &location,
|
||||
Properties: getVirtualNetworkProperties(d),
|
||||
VirtualNetworkPropertiesFormat: getVirtualNetworkProperties(d),
|
||||
Tags: expandTags(tags),
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ func resourceArmVirtualNetworkPeeringCreate(d *schema.ResourceData, meta interfa
|
|||
|
||||
peer := network.VirtualNetworkPeering{
|
||||
Name: &name,
|
||||
Properties: getVirtualNetworkPeeringProperties(d),
|
||||
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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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"`
|
||||
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"`
|
||||
*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"`
|
||||
|
@ -222,26 +241,33 @@ type Endpoint struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *EndpointProperties `json:"properties,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,22 +294,31 @@ 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"`
|
||||
*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"`
|
||||
}
|
||||
|
||||
// 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.
|
||||
type LoadParameters struct {
|
||||
ContentPaths *[]string `json:"contentPaths,omitempty"`
|
||||
|
@ -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.
|
||||
|
@ -324,36 +367,55 @@ type Origin struct {
|
|||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
Properties *OriginProperties `json:"properties,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
|
||||
|
@ -366,26 +428,34 @@ type Profile struct {
|
|||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
Properties *ProfileProperties `json:"properties,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"`
|
||||
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"`
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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})
|
||||
}
|
||||
|
|
|
@ -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})
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -365,7 +365,7 @@ 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"`
|
||||
|
@ -373,7 +373,7 @@ type AvailabilitySet struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *AvailabilitySetProperties `json:"properties,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"`
|
||||
|
@ -523,7 +523,7 @@ type LongRunningOperationProperties struct {
|
|||
// NetworkInterfaceReference is describes a network interface reference.
|
||||
type NetworkInterfaceReference struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Properties *NetworkInterfaceReferenceProperties `json:"properties,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"`
|
||||
|
@ -668,7 +668,7 @@ type VirtualMachine struct {
|
|||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Plan *Plan `json:"plan,omitempty"`
|
||||
Properties *VirtualMachineProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineProperties `json:"properties,omitempty"`
|
||||
Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ type VirtualMachineCaptureParameters struct {
|
|||
type VirtualMachineCaptureResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
Properties *VirtualMachineCaptureResultProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineCaptureResultProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineCaptureResultProperties is compute-specific operation
|
||||
|
@ -708,7 +708,7 @@ type VirtualMachineExtension struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *VirtualMachineExtensionProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineExtensionProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineExtensionHandlerInstanceView is the instance view of a
|
||||
|
@ -727,7 +727,7 @@ type VirtualMachineExtensionImage struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineExtensionImageProperties is describes the properties of a
|
||||
|
@ -771,7 +771,7 @@ type VirtualMachineImage struct {
|
|||
Name *string `json:"name,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *VirtualMachineImageProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineImageProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineImageProperties is describes the properties of a Virtual
|
||||
|
@ -844,7 +844,7 @@ type VirtualMachineScaleSet struct {
|
|||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
Properties *VirtualMachineScaleSetProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineScaleSetProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetExtension is describes a Virtual Machine Scale Set
|
||||
|
@ -852,7 +852,7 @@ type VirtualMachineScaleSet struct {
|
|||
type VirtualMachineScaleSetExtension struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Properties *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetExtensionProfile is describes a virtual machine scale
|
||||
|
@ -893,7 +893,7 @@ type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
|
|||
type VirtualMachineScaleSetIPConfiguration struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Properties *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetIPConfigurationProperties is describes a virtual
|
||||
|
@ -970,7 +970,7 @@ func (client VirtualMachineScaleSetListWithLinkResult) VirtualMachineScaleSetLis
|
|||
type VirtualMachineScaleSetNetworkConfiguration struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Properties *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetNetworkConfigurationProperties is describes a virtual
|
||||
|
@ -1052,7 +1052,7 @@ type VirtualMachineScaleSetVM struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
InstanceID *string `json:"instanceId,omitempty"`
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
Properties *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
|
||||
*VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
|
||||
Plan *Plan `json:"plan,omitempty"`
|
||||
Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
|
||||
}
|
||||
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
4
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go
generated
vendored
4
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go
generated
vendored
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
139
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go
generated
vendored
139
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go
generated
vendored
|
@ -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,
|
||||
|
|
97
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go
generated
vendored
97
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go
generated
vendored
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 Event Hub name. consumerGroupName is
|
||||
// the Consumer Group name. parameters is parameters supplied to create a
|
||||
// Consumer Group Resource.
|
||||
// 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 Event Hub name. consumerGroupName is
|
||||
// the Consumer Group name.
|
||||
// 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 Event Hub name. consumerGroupName is
|
||||
// the Consumer Group name.
|
||||
// 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,7 +250,7 @@ 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
|
||||
|
|
|
@ -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 Event Hub name. parameters is
|
||||
// parameters supplied to create a EventHub Resource.
|
||||
// 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,7 +320,7 @@ 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 Event Hub name.
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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"`
|
||||
*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,7 +177,7 @@ 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"`
|
||||
|
@ -185,7 +185,7 @@ type ConsumerGroupResource struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *ConsumerGroupProperties `json:"properties,omitempty"`
|
||||
*ConsumerGroupProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CreateOrUpdateParameters is parameters supplied to the Create Or Update
|
||||
|
@ -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"`
|
||||
*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,7 +255,7 @@ 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"`
|
||||
|
@ -264,7 +264,7 @@ type NamespaceResource struct {
|
|||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
Properties *NamespaceProperties `json:"properties,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"`
|
||||
*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,8 +347,8 @@ 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"`
|
||||
|
@ -355,10 +356,10 @@ type SharedAccessAuthorizationRuleResource struct {
|
|||
Type *string `json:"type,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
Properties *SharedAccessAuthorizationRuleProperties `json:"properties,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"`
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
29
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go
generated
vendored
29
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go
generated
vendored
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
3
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go
generated
vendored
3
vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go
generated
vendored
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
94
vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go
generated
vendored
94
vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go
generated
vendored
|
@ -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),
|
||||
"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")
|
||||
|
|
63
vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go
generated
vendored
63
vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go
generated
vendored
|
@ -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})
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue