diff --git a/GNUmakefile b/GNUmakefile index e7e48cdcfa3e..844e318f34d9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,9 +3,9 @@ WEBSITE_REPO=github.com/hashicorp/terraform-website PKG_NAME=azurerm #make sure we catch schema errors during testing -TF_SCHEMA_PANIC_ON_ERROR=1 -GO111MODULE=on -GOFLAGS=-mod=vendor +export TF_SCHEMA_PANIC_ON_ERROR=1 +export GO111MODULE=on +export GOFLAGS=-mod=vendor default: build diff --git a/azurerm/config.go b/azurerm/config.go index 2f81317a8b1b..c59804392ea9 100644 --- a/azurerm/config.go +++ b/azurerm/config.go @@ -10,7 +10,7 @@ import ( "time" resourcesprofile "github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" appinsights "github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights" automationSvc "github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation" "github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2018-12-01/batch" diff --git a/azurerm/data_source_api_management.go b/azurerm/data_source_api_management.go index 8b6581201b5d..1751055bdded 100644 --- a/azurerm/data_source_api_management.go +++ b/azurerm/data_source_api_management.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/data_source_api_management_api.go b/azurerm/data_source_api_management_api.go index 39f4948daf32..5555d5b76580 100644 --- a/azurerm/data_source_api_management_api.go +++ b/azurerm/data_source_api_management_api.go @@ -3,7 +3,7 @@ package azurerm import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" diff --git a/azurerm/data_source_api_management_product.go b/azurerm/data_source_api_management_product.go index a9492fc1d3db..9113600afca6 100644 --- a/azurerm/data_source_api_management_product.go +++ b/azurerm/data_source_api_management_product.go @@ -3,7 +3,7 @@ package azurerm import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/helpers/azure/api_management.go b/azurerm/helpers/azure/api_management.go index 3d1bf66b5490..506ff049cd3f 100644 --- a/azurerm/helpers/azure/api_management.go +++ b/azurerm/helpers/azure/api_management.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/internal/services/apimgmt/client.go b/azurerm/internal/services/apimgmt/client.go index 5bd333996042..22cc650deff4 100644 --- a/azurerm/internal/services/apimgmt/client.go +++ b/azurerm/internal/services/apimgmt/client.go @@ -1,6 +1,6 @@ package apimgmt -import "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" +import "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" type Client struct { ApiClient apimanagement.APIClient diff --git a/azurerm/resource_arm_api_management.go b/azurerm/resource_arm_api_management.go index 16a8d09df96e..360aec2ddce4 100644 --- a/azurerm/resource_arm_api_management.go +++ b/azurerm/resource_arm_api_management.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" @@ -24,6 +24,8 @@ var apimFrontendProtocolTls10 = "Microsoft.WindowsAzure.ApiManagement.Gateway.Se var apimFrontendProtocolTls11 = "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11" var apimTripleDesCiphers = "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168" +const apiManagementResourceName = "azurerm_api_management" + func resourceArmApiManagementService() *schema.Resource { return &schema.Resource{ Create: resourceArmApiManagementServiceCreateUpdate, @@ -343,6 +345,33 @@ func resourceArmApiManagementService() *schema.Resource { }, }, + "virtual_network_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + // ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + string(apimanagement.VirtualNetworkTypeExternal), + string(apimanagement.VirtualNetworkTypeInternal), + string(apimanagement.VirtualNetworkTypeNone), + }, false), + }, + + "subnet_id": { + Type: schema.TypeString, + Required: true, + // ForceNew: true, + ValidateFunc: azure.ValidateResourceID, + }, + }, + }, + }, + "tags": tagsSchema(), "gateway_url": { @@ -407,15 +436,32 @@ func resourceArmApiManagementServiceCreateUpdate(d *schema.ResourceData, meta in customProperties := expandApiManagementCustomProperties(d) certificates := expandAzureRmApiManagementCertificates(d) hostnameConfigurations := expandAzureRmApiManagementHostnameConfigurations(d) + vnetConfig, vnetType := expandAzureRmApiManagementVirtualNetworkConfiguration(d) + + subnetsToLock, vnetsToLock, err := expandApiManagementVirtualNetworkSubnetNames(d) + if err != nil { + return fmt.Errorf("Error extracting names of Subnet and Virtual Network: %+v", err) + } + + azureRMLockByName(name, apiManagementResourceName) + defer azureRMUnlockByName(name, apiManagementResourceName) + + azureRMLockMultipleByName(subnetsToLock, subnetResourceName) + defer azureRMUnlockMultipleByName(subnetsToLock, subnetResourceName) + + azureRMLockMultipleByName(vnetsToLock, virtualNetworkResourceName) + defer azureRMUnlockMultipleByName(vnetsToLock, virtualNetworkResourceName) properties := apimanagement.ServiceResource{ Location: utils.String(location), ServiceProperties: &apimanagement.ServiceProperties{ - PublisherName: utils.String(publisherName), - PublisherEmail: utils.String(publisherEmail), - CustomProperties: customProperties, - Certificates: certificates, - HostnameConfigurations: hostnameConfigurations, + PublisherName: utils.String(publisherName), + PublisherEmail: utils.String(publisherEmail), + CustomProperties: customProperties, + Certificates: certificates, + HostnameConfigurations: hostnameConfigurations, + VirtualNetworkConfiguration: vnetConfig, + VirtualNetworkType: apimanagement.VirtualNetworkType(*vnetType), }, Tags: expandTags(tags), Sku: sku, @@ -456,14 +502,14 @@ func resourceArmApiManagementServiceCreateUpdate(d *schema.ResourceData, meta in signInSettingsRaw := d.Get("sign_in").([]interface{}) signInSettings := expandApiManagementSignInSettings(signInSettingsRaw) signInClient := meta.(*ArmClient).apimgmt.SignInClient - if _, err := signInClient.CreateOrUpdate(ctx, resourceGroup, name, signInSettings); err != nil { + if _, err := signInClient.CreateOrUpdate(ctx, resourceGroup, name, signInSettings, ""); err != nil { return fmt.Errorf("Error setting Sign In settings for API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) } signUpSettingsRaw := d.Get("sign_up").([]interface{}) signUpSettings := expandApiManagementSignUpSettings(signUpSettingsRaw) signUpClient := meta.(*ArmClient).apimgmt.SignUpClient - if _, err := signUpClient.CreateOrUpdate(ctx, resourceGroup, name, signUpSettings); err != nil { + if _, err := signUpClient.CreateOrUpdate(ctx, resourceGroup, name, signUpSettings, ""); err != nil { return fmt.Errorf("Error setting Sign Up settings for API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) } @@ -484,7 +530,7 @@ func resourceArmApiManagementServiceCreateUpdate(d *schema.ResourceData, meta in // then add the new one, if it exists if policy != nil { - if _, err := policyClient.CreateOrUpdate(ctx, resourceGroup, name, *policy); err != nil { + if _, err := policyClient.CreateOrUpdate(ctx, resourceGroup, name, *policy, ""); err != nil { return fmt.Errorf("Error setting Policies for API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) } } @@ -529,7 +575,7 @@ func resourceArmApiManagementServiceRead(d *schema.ResourceData, meta interface{ } policyClient := meta.(*ArmClient).apimgmt.PolicyClient - policy, err := policyClient.Get(ctx, resourceGroup, name) + policy, err := policyClient.Get(ctx, resourceGroup, name, apimanagement.PolicyExportFormatXML) if err != nil { if !utils.ResponseWasNotFound(policy.Response) { return fmt.Errorf("Error retrieving Policy for API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) @@ -568,6 +614,11 @@ func resourceArmApiManagementServiceRead(d *schema.ResourceData, meta interface{ return fmt.Errorf("Error setting `hostname_configuration`: %+v", err) } + vnetConfig := flattenApiManagementVirtualNetworkConfiguration(props.VirtualNetworkType, props.VirtualNetworkConfiguration, d) + if err := d.Set("virtual_network_configuration", vnetConfig); err != nil { + return fmt.Errorf("Error setting `virtual_network_configuration`: %+v", err) + } + if err := d.Set("additional_location", flattenApiManagementAdditionalLocations(props.AdditionalLocations)); err != nil { return fmt.Errorf("Error setting `additional_location`: %+v", err) } @@ -605,12 +656,29 @@ func resourceArmApiManagementServiceDelete(d *schema.ResourceData, meta interfac resourceGroup := id.ResourceGroup name := id.Path["service"] + subnetsToLock, vnetsToLock, err := expandApiManagementVirtualNetworkSubnetNames(d) + if err != nil { + return fmt.Errorf("Error extracting names of Subnet and Virtual Network: %+v", err) + } + + azureRMLockByName(name, apiManagementResourceName) + defer azureRMUnlockByName(name, apiManagementResourceName) + + azureRMLockMultipleByName(subnetsToLock, subnetResourceName) + defer azureRMUnlockMultipleByName(subnetsToLock, subnetResourceName) + + azureRMLockMultipleByName(vnetsToLock, virtualNetworkResourceName) + defer azureRMUnlockMultipleByName(vnetsToLock, virtualNetworkResourceName) + log.Printf("[DEBUG] Deleting API Management Service %q (Resource Grouo %q)", name, resourceGroup) - resp, err := client.Delete(ctx, resourceGroup, name) + future, err := client.Delete(ctx, resourceGroup, name) if err != nil { - if !utils.ResponseWasNotFound(resp) { - return fmt.Errorf("Error deleting API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) - } + return fmt.Errorf("Error deleting API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + err = future.WaitForCompletionRef(ctx, client.Client) + if err != nil { + return fmt.Errorf("Error waiting for deletion of API Management Service %q (Resource Group %q): %+v", name, resourceGroup, err) } return nil @@ -679,6 +747,70 @@ func expandApiManagementCommonHostnameConfiguration(input map[string]interface{} return output } +func expandAzureRmApiManagementVirtualNetworkConfiguration(d *schema.ResourceData) (*apimanagement.VirtualNetworkConfiguration, *string) { + vnetRawConfigs := d.Get("virtual_network_configuration").([]interface{}) + + if len(vnetRawConfigs) < 1 { + return nil, nil + } + + vnetRawConfig := vnetRawConfigs[0].(map[string]interface{}) + vnetType := vnetRawConfig["type"].(string) + vnetSubnetID := vnetRawConfig["subnet_id"].(string) + vnetConfig := apimanagement.VirtualNetworkConfiguration{ + SubnetResourceID: &vnetSubnetID, + } + + return &vnetConfig, &vnetType +} + +func flattenApiManagementVirtualNetworkConfiguration(vnetType apimanagement.VirtualNetworkType, vnetConfig *apimanagement.VirtualNetworkConfiguration, d *schema.ResourceData) []interface{} { + if vnetConfig == nil { + return []interface{}{} + } + + vnet := make(map[string]interface{}) + vnet["type"] = string(vnetType) + if vnetConfig != nil { + vnet["subnet_id"] = vnetConfig.SubnetResourceID + } + + return []interface{}{ + vnet, + } +} + +func expandApiManagementVirtualNetworkSubnetNames(d *schema.ResourceData) (*[]string, *[]string, error) { + vnetRawConfigs := d.Get("virtual_network_configuration").([]interface{}) + + if len(vnetRawConfigs) < 1 { + return nil, nil, nil + } + + vnetRawConfig := vnetRawConfigs[0].(map[string]interface{}) + subnetID := vnetRawConfig["subnet_id"].(string) + subnetNames := make([]string, 0) + vnetNames := make([]string, 0) + + subnetResourceID, err := parseAzureResourceID(subnetID) + if err != nil { + return nil, nil, err + } + + subnetName := subnetResourceID.Path["subnets"] + vnetName := subnetResourceID.Path["virtualNetworks"] + + if !sliceContainsValue(subnetNames, subnetName) { + subnetNames = append(subnetNames, subnetName) + } + + if !sliceContainsValue(vnetNames, vnetName) { + vnetNames = append(vnetNames, vnetName) + } + + return &subnetNames, &vnetNames, nil +} + func flattenApiManagementHostnameConfigurations(input *[]apimanagement.HostnameConfiguration, d *schema.ResourceData) []interface{} { results := make([]interface{}, 0) if input == nil { @@ -1136,8 +1268,8 @@ func expandApiManagementPolicies(input []interface{}) (*apimanagement.PolicyCont if xmlContent != "" { return &apimanagement.PolicyContract{ PolicyContractProperties: &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XML, - PolicyContent: utils.String(xmlContent), + Format: apimanagement.XML, + Value: utils.String(xmlContent), }, }, nil } @@ -1145,8 +1277,8 @@ func expandApiManagementPolicies(input []interface{}) (*apimanagement.PolicyCont if xmlLink != "" { return &apimanagement.PolicyContract{ PolicyContractProperties: &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XMLLink, - PolicyContent: utils.String(xmlLink), + Format: apimanagement.XMLLink, + Value: utils.String(xmlLink), }, }, nil } @@ -1157,8 +1289,8 @@ func expandApiManagementPolicies(input []interface{}) (*apimanagement.PolicyCont func flattenApiManagementPolicies(d *schema.ResourceData, input apimanagement.PolicyContract) []interface{} { xmlContent := "" if props := input.PolicyContractProperties; props != nil { - if props.PolicyContent != nil { - xmlContent = *props.PolicyContent + if props.Value != nil { + xmlContent = *props.Value } } diff --git a/azurerm/resource_arm_api_management_api.go b/azurerm/resource_arm_api_management_api.go index 774345f6e2b7..9c1a808f9afc 100644 --- a/azurerm/resource_arm_api_management_api.go +++ b/azurerm/resource_arm_api_management_api.go @@ -5,7 +5,7 @@ import ( "log" "strings" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" @@ -214,9 +214,9 @@ func resourceArmApiManagementApiCreateUpdate(d *schema.ResourceData, meta interf log.Printf("[DEBUG] Importing API Management API %q of type %q", name, contentFormat) apiParams := apimanagement.APICreateOrUpdateParameter{ APICreateOrUpdateProperties: &apimanagement.APICreateOrUpdateProperties{ - ContentFormat: apimanagement.ContentFormat(contentFormat), - ContentValue: utils.String(contentValue), - Path: utils.String(path), + Format: apimanagement.ContentFormat(contentFormat), + Value: utils.String(contentValue), + Path: utils.String(path), }, } wsdlSelectorVs := importV["wsdl_selector"].([]interface{}) diff --git a/azurerm/resource_arm_api_management_api_operation.go b/azurerm/resource_arm_api_management_api_operation.go index c9368be11ea1..d6cb7a3775c0 100644 --- a/azurerm/resource_arm_api_management_api_operation.go +++ b/azurerm/resource_arm_api_management_api_operation.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" diff --git a/azurerm/resource_arm_api_management_api_operation_policy.go b/azurerm/resource_arm_api_management_api_operation_policy.go index 223032b4a553..c10fe50cc303 100644 --- a/azurerm/resource_arm_api_management_api_operation_policy.go +++ b/azurerm/resource_arm_api_management_api_operation_policy.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/suppress" @@ -58,7 +58,7 @@ func resourceArmApiManagementAPIOperationPolicyCreateUpdate(d *schema.ResourceDa operationID := d.Get("operation_id").(string) if requireResourcesToBeImported && d.IsNewResource() { - existing, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID) + existing, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID, apimanagement.PolicyExportFormatXML) if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("Error checking for presence of existing API Operation Policy (API Management Service %q / API %q / Operation %q / Resource Group %q): %s", serviceName, apiName, operationID, resourceGroup, err) @@ -77,15 +77,15 @@ func resourceArmApiManagementAPIOperationPolicyCreateUpdate(d *schema.ResourceDa if xmlContent != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XML, - PolicyContent: utils.String(xmlContent), + Format: apimanagement.XML, + Value: utils.String(xmlContent), } } if xmlLink != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XMLLink, - PolicyContent: utils.String(xmlLink), + Format: apimanagement.XMLLink, + Value: utils.String(xmlLink), } } @@ -97,7 +97,7 @@ func resourceArmApiManagementAPIOperationPolicyCreateUpdate(d *schema.ResourceDa return fmt.Errorf("Error creating or updating API Operation Policy (Resource Group %q / API Management Service %q / API %q / Operation %q): %+v", resourceGroup, serviceName, apiName, operationID, err) } - resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID) + resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID, apimanagement.PolicyExportFormatXML) if err != nil { return fmt.Errorf("Error retrieving API Operation Policy (Resource Group %q / API Management Service %q / API %q / Operation %q): %+v", resourceGroup, serviceName, apiName, operationID, err) } @@ -122,7 +122,7 @@ func resourceArmApiManagementAPIOperationPolicyRead(d *schema.ResourceData, meta apiName := id.Path["apis"] operationID := id.Path["operations"] - resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID) + resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, operationID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { log.Printf("[DEBUG] API Operation Policy (Resource Group %q / API Management Service %q / API %q / Operation %q) was not found - removing from state!", resourceGroup, serviceName, apiName, operationID) @@ -141,7 +141,7 @@ func resourceArmApiManagementAPIOperationPolicyRead(d *schema.ResourceData, meta if properties := resp.PolicyContractProperties; properties != nil { // when you submit an `xml_link` to the API, the API downloads this link and stores it as `xml_content` // as such there is no way to set `xml_link` and we'll let Terraform handle it - d.Set("xml_content", properties.PolicyContent) + d.Set("xml_content", properties.Value) } return nil diff --git a/azurerm/resource_arm_api_management_api_operation_policy_test.go b/azurerm/resource_arm_api_management_api_operation_policy_test.go index 980fb2acde31..6e202ee1b4ce 100644 --- a/azurerm/resource_arm_api_management_api_operation_policy_test.go +++ b/azurerm/resource_arm_api_management_api_operation_policy_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -112,7 +113,7 @@ func testCheckAzureRMApiManagementAPIOperationPolicyExists(resourceName string) conn := testAccProvider.Meta().(*ArmClient).apimgmt.ApiOperationPoliciesClient ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, operationID) + resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, operationID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return fmt.Errorf("Bad: API Policy (API Management Service %q / API %q / Operation %q / Resource Group %q) does not exist", serviceName, apiName, operationID, resourceGroup) @@ -139,7 +140,7 @@ func testCheckAzureRMApiManagementAPIOperationPolicyDestroy(s *terraform.State) operationID := rs.Primary.Attributes["operation_id"] ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, operationID) + resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, operationID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return nil diff --git a/azurerm/resource_arm_api_management_api_policy.go b/azurerm/resource_arm_api_management_api_policy.go index 96ddf73cca74..1b19f0826602 100644 --- a/azurerm/resource_arm_api_management_api_policy.go +++ b/azurerm/resource_arm_api_management_api_policy.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/suppress" @@ -55,7 +55,7 @@ func resourceArmApiManagementAPIPolicyCreateUpdate(d *schema.ResourceData, meta apiName := d.Get("api_name").(string) if requireResourcesToBeImported && d.IsNewResource() { - existing, err := client.Get(ctx, resourceGroup, serviceName, apiName) + existing, err := client.Get(ctx, resourceGroup, serviceName, apiName, apimanagement.PolicyExportFormatXML) if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("Error checking for presence of existing API Policy (API Management Service %q / API %q / Resource Group %q): %s", serviceName, apiName, resourceGroup, err) @@ -74,15 +74,15 @@ func resourceArmApiManagementAPIPolicyCreateUpdate(d *schema.ResourceData, meta if xmlContent != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XML, - PolicyContent: utils.String(xmlContent), + Format: apimanagement.XML, + Value: utils.String(xmlContent), } } if xmlLink != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XMLLink, - PolicyContent: utils.String(xmlLink), + Format: apimanagement.XMLLink, + Value: utils.String(xmlLink), } } @@ -94,7 +94,7 @@ func resourceArmApiManagementAPIPolicyCreateUpdate(d *schema.ResourceData, meta return fmt.Errorf("Error creating or updating API Policy (Resource Group %q / API Management Service %q / API %q): %+v", resourceGroup, serviceName, apiName, err) } - resp, err := client.Get(ctx, resourceGroup, serviceName, apiName) + resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, apimanagement.PolicyExportFormatXML) if err != nil { return fmt.Errorf("Error retrieving API Policy (Resource Group %q / API Management Service %q / API %q): %+v", resourceGroup, serviceName, apiName, err) } @@ -118,7 +118,7 @@ func resourceArmApiManagementAPIPolicyRead(d *schema.ResourceData, meta interfac serviceName := id.Path["service"] apiName := id.Path["apis"] - resp, err := client.Get(ctx, resourceGroup, serviceName, apiName) + resp, err := client.Get(ctx, resourceGroup, serviceName, apiName, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { log.Printf("[DEBUG] API Policy (Resource Group %q / API Management Service %q / API %q) was not found - removing from state!", resourceGroup, serviceName, apiName) @@ -136,7 +136,7 @@ func resourceArmApiManagementAPIPolicyRead(d *schema.ResourceData, meta interfac if properties := resp.PolicyContractProperties; properties != nil { // when you submit an `xml_link` to the API, the API downloads this link and stores it as `xml_content` // as such there is no way to set `xml_link` and we'll let Terraform handle it - d.Set("xml_content", properties.PolicyContent) + d.Set("xml_content", properties.Value) } return nil diff --git a/azurerm/resource_arm_api_management_api_policy_test.go b/azurerm/resource_arm_api_management_api_policy_test.go index 227146f3a111..86805b3b55dd 100644 --- a/azurerm/resource_arm_api_management_api_policy_test.go +++ b/azurerm/resource_arm_api_management_api_policy_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -111,7 +112,7 @@ func testCheckAzureRMApiManagementAPIPolicyExists(resourceName string) resource. conn := testAccProvider.Meta().(*ArmClient).apimgmt.ApiPoliciesClient ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName) + resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return fmt.Errorf("Bad: API Policy (API Management Service %q / API %q/ Resource Group %q) does not exist", serviceName, apiName, resourceGroup) @@ -136,7 +137,7 @@ func testCheckAzureRMApiManagementAPIPolicyDestroy(s *terraform.State) error { serviceName := rs.Primary.Attributes["api_management_name"] resourceGroup := rs.Primary.Attributes["resource_group_name"] ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName) + resp, err := conn.Get(ctx, resourceGroup, serviceName, apiName, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return nil diff --git a/azurerm/resource_arm_api_management_api_schema.go b/azurerm/resource_arm_api_management_api_schema.go index 40441cecfae6..f974f82492d9 100644 --- a/azurerm/resource_arm_api_management_api_schema.go +++ b/azurerm/resource_arm_api_management_api_schema.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -70,8 +70,8 @@ func resourceArmApiManagementApiSchemaCreateUpdate(d *schema.ResourceData, meta contentType := d.Get("content_type").(string) value := d.Get("value").(string) - parameters := apimanagement.SchemaContract{ - SchemaContractProperties: &apimanagement.SchemaContractProperties{ + parameters := apimanagement.SchemaCreateOrUpdateContract{ + SchemaCreateOrUpdateProperties: &apimanagement.SchemaCreateOrUpdateProperties{ ContentType: &contentType, SchemaDocumentProperties: &apimanagement.SchemaDocumentProperties{ Value: &value, @@ -147,7 +147,8 @@ func resourceArmApiManagementApiSchemaDelete(d *schema.ResourceData, meta interf apiName := id.Path["apis"] schemaID := id.Path["schemas"] - if resp, err := client.Delete(ctx, resourceGroup, serviceName, apiName, schemaID, ""); err != nil { + force := false + if resp, err := client.Delete(ctx, resourceGroup, serviceName, apiName, schemaID, "", &force); err != nil { if !utils.ResponseWasNotFound(resp) { return fmt.Errorf("Error deleting API Schema %q (API Management Service %q / API %q / Resource Group %q): %s", schemaID, serviceName, apiName, resourceGroup, err) } diff --git a/azurerm/resource_arm_api_management_api_version_set.go b/azurerm/resource_arm_api_management_api_version_set.go index b7c0cdc6160c..c0b08c52661d 100644 --- a/azurerm/resource_arm_api_management_api_version_set.go +++ b/azurerm/resource_arm_api_management_api_version_set.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/validation" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -175,7 +175,7 @@ func resourceArmApiManagementApiVersionSetRead(d *schema.ResourceData, meta inte return fmt.Errorf("Error making Read request for Api Version Set %q (Resource Group %q / Api Management Service %q): %+v", name, resourceGroup, serviceName, err) } - d.Set("name", resp.Name) + d.Set("name", name) d.Set("resource_group_name", resourceGroup) d.Set("api_management_name", serviceName) diff --git a/azurerm/resource_arm_api_management_authorization_server.go b/azurerm/resource_arm_api_management_authorization_server.go index 2fe7ada316e2..c463e3fcf77f 100644 --- a/azurerm/resource_arm_api_management_authorization_server.go +++ b/azurerm/resource_arm_api_management_authorization_server.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_api_management_certificate.go b/azurerm/resource_arm_api_management_certificate.go index 7d05b16cb87e..5bc6ee334559 100644 --- a/azurerm/resource_arm_api_management_certificate.go +++ b/azurerm/resource_arm_api_management_certificate.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_api_management_group.go b/azurerm/resource_arm_api_management_group.go index dc44f313142f..6c5ddab77592 100644 --- a/azurerm/resource_arm_api_management_group.go +++ b/azurerm/resource_arm_api_management_group.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/azurerm/resource_arm_api_management_logger.go b/azurerm/resource_arm_api_management_logger.go index 7a2077c72e00..af6c8cee6de4 100644 --- a/azurerm/resource_arm_api_management_logger.go +++ b/azurerm/resource_arm_api_management_logger.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -228,7 +228,8 @@ func resourceArmApiManagementLoggerDelete(d *schema.ResourceData, meta interface serviceName := id.Path["service"] name := id.Path["loggers"] - if resp, err := client.Delete(ctx, resourceGroup, serviceName, name, ""); err != nil { + force := false + if resp, err := client.Delete(ctx, resourceGroup, serviceName, name, "", &force); err != nil { if !utils.ResponseWasNotFound(resp) { return fmt.Errorf("Error deleting Logger %q (Resource Group %q / API Management Service %q): %+v", name, resourceGroup, serviceName, err) } diff --git a/azurerm/resource_arm_api_management_openid_connect_provider.go b/azurerm/resource_arm_api_management_openid_connect_provider.go index 41b9f8ddc99c..c982cf3395c5 100644 --- a/azurerm/resource_arm_api_management_openid_connect_provider.go +++ b/azurerm/resource_arm_api_management_openid_connect_provider.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_api_management_product.go b/azurerm/resource_arm_api_management_product.go index 8616b7d034cf..1df1b75bf074 100644 --- a/azurerm/resource_arm_api_management_product.go +++ b/azurerm/resource_arm_api_management_product.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_api_management_product_policy.go b/azurerm/resource_arm_api_management_product_policy.go index c30cb62d3a5f..82a7029e7cb4 100644 --- a/azurerm/resource_arm_api_management_product_policy.go +++ b/azurerm/resource_arm_api_management_product_policy.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/suppress" @@ -55,7 +55,7 @@ func resourceArmApiManagementProductPolicyCreateUpdate(d *schema.ResourceData, m productID := d.Get("product_id").(string) if requireResourcesToBeImported && d.IsNewResource() { - existing, err := client.Get(ctx, resourceGroup, serviceName, productID) + existing, err := client.Get(ctx, resourceGroup, serviceName, productID, apimanagement.PolicyExportFormatXML) if err != nil { if !utils.ResponseWasNotFound(existing.Response) { return fmt.Errorf("Error checking for presence of existing Product Policy (API Management Service %q / Product %q / Resource Group %q): %s", serviceName, productID, resourceGroup, err) @@ -74,15 +74,15 @@ func resourceArmApiManagementProductPolicyCreateUpdate(d *schema.ResourceData, m if xmlContent != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XML, - PolicyContent: utils.String(xmlContent), + Format: apimanagement.XML, + Value: utils.String(xmlContent), } } if xmlLink != "" { parameters.PolicyContractProperties = &apimanagement.PolicyContractProperties{ - ContentFormat: apimanagement.XMLLink, - PolicyContent: utils.String(xmlLink), + Format: apimanagement.XMLLink, + Value: utils.String(xmlLink), } } @@ -94,7 +94,7 @@ func resourceArmApiManagementProductPolicyCreateUpdate(d *schema.ResourceData, m return fmt.Errorf("Error creating or updating Product Policy (Resource Group %q / API Management Service %q / Product %q): %+v", resourceGroup, serviceName, productID, err) } - resp, err := client.Get(ctx, resourceGroup, serviceName, productID) + resp, err := client.Get(ctx, resourceGroup, serviceName, productID, apimanagement.PolicyExportFormatXML) if err != nil { return fmt.Errorf("Error retrieving Product Policy (Resource Group %q / API Management Service %q / Product %q): %+v", resourceGroup, serviceName, productID, err) } @@ -118,7 +118,7 @@ func resourceArmApiManagementProductPolicyRead(d *schema.ResourceData, meta inte serviceName := id.Path["service"] productID := id.Path["products"] - resp, err := client.Get(ctx, resourceGroup, serviceName, productID) + resp, err := client.Get(ctx, resourceGroup, serviceName, productID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { log.Printf("[DEBUG] Product Policy (Resource Group %q / API Management Service %q / Product %q) was not found - removing from state!", resourceGroup, serviceName, productID) @@ -136,7 +136,7 @@ func resourceArmApiManagementProductPolicyRead(d *schema.ResourceData, meta inte if properties := resp.PolicyContractProperties; properties != nil { // when you submit an `xml_link` to the API, the API downloads this link and stores it as `xml_content` // as such there is no way to set `xml_link` and we'll let Terraform handle it - d.Set("xml_content", properties.PolicyContent) + d.Set("xml_content", properties.Value) } return nil diff --git a/azurerm/resource_arm_api_management_product_policy_test.go b/azurerm/resource_arm_api_management_product_policy_test.go index ca1f3ea541e7..c4c715c06498 100644 --- a/azurerm/resource_arm_api_management_product_policy_test.go +++ b/azurerm/resource_arm_api_management_product_policy_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" @@ -111,7 +112,7 @@ func testCheckAzureRMApiManagementProductPolicyExists(resourceName string) resou conn := testAccProvider.Meta().(*ArmClient).apimgmt.ProductPoliciesClient ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, productID) + resp, err := conn.Get(ctx, resourceGroup, serviceName, productID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return fmt.Errorf("Bad: Product Policy (API Management Service %q / Product %q/ Resource Group %q) does not exist", serviceName, productID, resourceGroup) @@ -136,7 +137,7 @@ func testCheckAzureRMApiManagementProductPolicyDestroy(s *terraform.State) error serviceName := rs.Primary.Attributes["api_management_name"] resourceGroup := rs.Primary.Attributes["resource_group_name"] ctx := testAccProvider.Meta().(*ArmClient).StopContext - resp, err := conn.Get(ctx, resourceGroup, serviceName, productID) + resp, err := conn.Get(ctx, resourceGroup, serviceName, productID, apimanagement.PolicyExportFormatXML) if err != nil { if utils.ResponseWasNotFound(resp.Response) { return nil diff --git a/azurerm/resource_arm_api_management_property.go b/azurerm/resource_arm_api_management_property.go index 6a5de9c5adc7..1467103242e3 100644 --- a/azurerm/resource_arm_api_management_property.go +++ b/azurerm/resource_arm_api_management_property.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" diff --git a/azurerm/resource_arm_api_management_subscription.go b/azurerm/resource_arm_api_management_subscription.go index 70f080a45a8e..511de3deb37c 100644 --- a/azurerm/resource_arm_api_management_subscription.go +++ b/azurerm/resource_arm_api_management_subscription.go @@ -3,8 +3,9 @@ package azurerm import ( "fmt" "log" + "strings" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/satori/uuid" @@ -35,7 +36,23 @@ func resourceArmApiManagementSubscription() *schema.Resource { "user_id": azure.SchemaApiManagementChildID(), - "product_id": azure.SchemaApiManagementChildID(), + // TODO: replace with `azure.SchemaApiManagementChildID()` in 2.0 + "scope": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: azure.ValidateResourceID, + ConflictsWith: []string{"product_id"}, + }, + + // TODO: remove in 2.0 + "product_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: azure.ValidateResourceID, + ConflictsWith: []string{"scope"}, + Deprecated: "This field has been renamed `scope` to match the API.", + }, "resource_group_name": azure.SchemaResourceGroupName(), @@ -103,16 +120,20 @@ func resourceArmApiManagementSubscriptionCreateUpdate(d *schema.ResourceData, me } displayName := d.Get("display_name").(string) - productId := d.Get("product_id").(string) state := d.Get("state").(string) userId := d.Get("user_id").(string) + scope := d.Get("scope").(string) + if scope == "" { + scope = d.Get("product_id").(string) + } + params := apimanagement.SubscriptionCreateParameters{ SubscriptionCreateParameterProperties: &apimanagement.SubscriptionCreateParameterProperties{ DisplayName: utils.String(displayName), - ProductID: utils.String(productId), State: apimanagement.SubscriptionState(state), - UserID: utils.String(userId), + OwnerID: utils.String(userId), + Scope: utils.String(scope), }, } @@ -171,9 +192,18 @@ func resourceArmApiManagementSubscriptionRead(d *schema.ResourceData, meta inter d.Set("display_name", props.DisplayName) d.Set("primary_key", props.PrimaryKey) d.Set("secondary_key", props.SecondaryKey) + d.Set("scope", props.Scope) d.Set("state", string(props.State)) - d.Set("product_id", props.ProductID) - d.Set("user_id", props.UserID) + d.Set("user_id", props.OwnerID) + + // since this field now supports different kind of scopes; but this field is explicitly called Product + if scope := props.Scope; scope != nil { + if strings.HasPrefix(*scope, "/products/") { + d.Set("product_id", props.Scope) + } else { + d.Set("product_id", "") + } + } } return nil diff --git a/azurerm/resource_arm_api_management_subscription_test.go b/azurerm/resource_arm_api_management_subscription_test.go index a5ffcefb933f..23ec5b8bd3f5 100644 --- a/azurerm/resource_arm_api_management_subscription_test.go +++ b/azurerm/resource_arm_api_management_subscription_test.go @@ -70,6 +70,34 @@ func TestAccAzureRMAPIManagementSubscription_requiresImport(t *testing.T) { }) } +func TestAccAzureRMAPIManagementSubscription_deprecated(t *testing.T) { + resourceName := "azurerm_api_management_subscription.test" + ri := tf.AccRandTimeInt() + location := testLocation() + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMAPIManagementSubscriptionDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAzureRMAPIManagementSubscription_deprecated(ri, location), + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMAPIManagementSubscriptionExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "subscription_id"), + resource.TestCheckResourceAttrSet(resourceName, "primary_key"), + resource.TestCheckResourceAttrSet(resourceName, "secondary_key"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func TestAccAzureRMAPIManagementSubscription_update(t *testing.T) { resourceName := "azurerm_api_management_subscription.test" ri := tf.AccRandTimeInt() @@ -201,7 +229,7 @@ resource "azurerm_api_management_subscription" "test" { resource_group_name = "${azurerm_api_management.test.resource_group_name}" api_management_name = "${azurerm_api_management.test.name}" user_id = "${azurerm_api_management_user.test.id}" - product_id = "${azurerm_api_management_product.test.id}" + scope = "${azurerm_api_management_product.test.id}" display_name = "Butter Parser API Enterprise Edition" } `, template) @@ -216,13 +244,13 @@ resource "azurerm_api_management_subscription" "import" { resource_group_name = "${azurerm_api_management_subscription.test.resource_group_name}" api_management_name = "${azurerm_api_management_subscription.test.api_management_name}" user_id = "${azurerm_api_management_subscription.test.user_id}" - product_id = "${azurerm_api_management_subscription.test.product_id}" + scope = "${azurerm_api_management_subscription.test.scope}" display_name = "${azurerm_api_management_subscription.test.display_name}" } `, template) } -func testAccAzureRMAPIManagementSubscription_update(rInt int, location, state string) string { +func testAccAzureRMAPIManagementSubscription_deprecated(rInt int, location string) string { template := testAccAzureRMAPIManagementSubscription_template(rInt, location) return fmt.Sprintf(` %s @@ -233,6 +261,21 @@ resource "azurerm_api_management_subscription" "test" { user_id = "${azurerm_api_management_user.test.id}" product_id = "${azurerm_api_management_product.test.id}" display_name = "Butter Parser API Enterprise Edition" +} +`, template) +} + +func testAccAzureRMAPIManagementSubscription_update(rInt int, location, state string) string { + template := testAccAzureRMAPIManagementSubscription_template(rInt, location) + return fmt.Sprintf(` +%s + +resource "azurerm_api_management_subscription" "test" { + resource_group_name = "${azurerm_api_management.test.resource_group_name}" + api_management_name = "${azurerm_api_management.test.name}" + user_id = "${azurerm_api_management_user.test.id}" + scope = "${azurerm_api_management_product.test.id}" + display_name = "Butter Parser API Enterprise Edition" state = "%s" } `, template, state) @@ -247,7 +290,7 @@ resource "azurerm_api_management_subscription" "test" { resource_group_name = "${azurerm_api_management.test.resource_group_name}" api_management_name = "${azurerm_api_management.test.name}" user_id = "${azurerm_api_management_user.test.id}" - product_id = "${azurerm_api_management_product.test.id}" + scope = "${azurerm_api_management_product.test.id}" display_name = "Butter Parser API Enterprise Edition" state = "active" } diff --git a/azurerm/resource_arm_api_management_test.go b/azurerm/resource_arm_api_management_test.go index 97ff1fce702d..27ac38d80a14 100644 --- a/azurerm/resource_arm_api_management_test.go +++ b/azurerm/resource_arm_api_management_test.go @@ -198,6 +198,32 @@ func TestAccAzureRMApiManagement_policy(t *testing.T) { }) } +func TestAccAzureRMApiManagement_vnet(t *testing.T) { + resourceName := "azurerm_api_management.test" + ri := tf.AccRandTimeInt() + location := testLocation() + config := testAccAzureRMApiManagement_vnet(ri, location) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMApiManagementDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMApiManagementExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + func testCheckAzureRMApiManagementDestroy(s *terraform.State) error { conn := testAccProvider.Meta().(*ArmClient).apimgmt.ServiceClient @@ -308,6 +334,51 @@ XML `, rInt, location, rInt) } +func testAccAzureRMApiManagement_vnet(rInt int, location string) string { + return fmt.Sprintf(` +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_virtual_network" "test" { + name = "acctestvirtnet%d" + address_space = ["10.1.0.0/16"] + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + + tags = { + environment = "Testing" + } +} + +resource "azurerm_subnet" "test" { + name = "acctestsubnet%d" + resource_group_name = "${azurerm_resource_group.test.name}" + virtual_network_name = "${azurerm_virtual_network.test.name}" + address_prefix = "10.1.0.0/24" +} + +resource "azurerm_api_management" "test" { + name = "acctestAM-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + publisher_name = "pub1" + publisher_email = "pub1@email.com" + + sku { + name = "Developer" + capacity = 1 + } + + virtual_network_configuration { + type = "External" + subnet_id = "${azurerm_subnet.test.id}" + } +} +`, rInt, location, rInt, rInt, rInt) +} + func testAccAzureRMApiManagement_policyXmlLink(rInt int, location string) string { return fmt.Sprintf(` resource "azurerm_resource_group" "test" { diff --git a/azurerm/resource_arm_api_management_user.go b/azurerm/resource_arm_api_management_user.go index b0df236d0110..f624360edcf0 100644 --- a/azurerm/resource_arm_api_management_user.go +++ b/azurerm/resource_arm_api_management_user.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" + "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go deleted file mode 100644 index 39adb12ed735..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go +++ /dev/null @@ -1,502 +0,0 @@ -package apimanagement - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// APIDiagnosticLoggerClient is the apiManagement Client -type APIDiagnosticLoggerClient struct { - BaseClient -} - -// NewAPIDiagnosticLoggerClient creates an instance of the APIDiagnosticLoggerClient client. -func NewAPIDiagnosticLoggerClient(subscriptionID string) APIDiagnosticLoggerClient { - return NewAPIDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewAPIDiagnosticLoggerClientWithBaseURI creates an instance of the APIDiagnosticLoggerClient client. -func NewAPIDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) APIDiagnosticLoggerClient { - return APIDiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckEntityExists checks that logger entity specified by identifier is associated with the diagnostics entity. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// apiid - API identifier. Must be unique in the current API Management service instance. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client APIDiagnosticLoggerClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticLoggerClient.CheckEntityExists") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: apiid, - Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "CheckEntityExists", err.Error()) - } - - req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, apiid, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CheckEntityExists", nil, "Failure preparing request") - return - } - - resp, err := client.CheckEntityExistsSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CheckEntityExists", resp, "Failure sending request") - return - } - - result, err = client.CheckEntityExistsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CheckEntityExists", resp, "Failure responding to request") - } - - return -} - -// CheckEntityExistsPreparer prepares the CheckEntityExists request. -func (client APIDiagnosticLoggerClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiId": autorest.Encode("path", apiid), - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsHead(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckEntityExistsSender sends the CheckEntityExists request. The method will close the -// http.Response Body if it receives an error. -func (client APIDiagnosticLoggerClient) CheckEntityExistsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// CheckEntityExistsResponder handles the response to the CheckEntityExists request. The method always -// closes the http.Response Body. -func (client APIDiagnosticLoggerClient) CheckEntityExistsResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate attaches a logger to a diagnostic for an API. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// apiid - API identifier. Must be unique in the current API Management service instance. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client APIDiagnosticLoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result LoggerContract, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticLoggerClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: apiid, - Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, apiid, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client APIDiagnosticLoggerClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiId": autorest.Encode("path", apiid), - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client APIDiagnosticLoggerClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client APIDiagnosticLoggerClient) CreateOrUpdateResponder(resp *http.Response) (result LoggerContract, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the specified Logger from Diagnostic for an API. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// apiid - API identifier. Must be unique in the current API Management service instance. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client APIDiagnosticLoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticLoggerClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: apiid, - Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, apiid, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "Delete", resp, "Failure responding to request") - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client APIDiagnosticLoggerClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiId": autorest.Encode("path", apiid), - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client APIDiagnosticLoggerClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client APIDiagnosticLoggerClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// ListByService lists all loggers associated with the specified Diagnostic of an API. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// apiid - API identifier. Must be unique in the current API Management service instance. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | type | eq | | -// top - number of records to return. -// skip - number of records to skip. -func (client APIDiagnosticLoggerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result LoggerCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticLoggerClient.ListByService") - defer func() { - sc := -1 - if result.lc.Response.Response != nil { - sc = result.lc.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: apiid, - Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: top, - Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "ListByService", err.Error()) - } - - result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, diagnosticID, filter, top, skip) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "ListByService", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServiceSender(req) - if err != nil { - result.lc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "ListByService", resp, "Failure sending request") - return - } - - result.lc, err = client.ListByServiceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "ListByService", resp, "Failure responding to request") - } - - return -} - -// ListByServicePreparer prepares the ListByService request. -func (client APIDiagnosticLoggerClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "apiId": autorest.Encode("path", apiid), - "diagnosticId": autorest.Encode("path", diagnosticID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}/loggers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServiceSender sends the ListByService request. The method will close the -// http.Response Body if it receives an error. -func (client APIDiagnosticLoggerClient) ListByServiceSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServiceResponder handles the response to the ListByService request. The method always -// closes the http.Response Body. -func (client APIDiagnosticLoggerClient) ListByServiceResponder(resp *http.Response) (result LoggerCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServiceNextResults retrieves the next set of results, if any. -func (client APIDiagnosticLoggerClient) listByServiceNextResults(ctx context.Context, lastResults LoggerCollection) (result LoggerCollection, err error) { - req, err := lastResults.loggerCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "listByServiceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServiceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "listByServiceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServiceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticLoggerClient", "listByServiceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIDiagnosticLoggerClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, filter string, top *int32, skip *int32) (result LoggerCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticLoggerClient.ListByService") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, diagnosticID, filter, top, skip) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go deleted file mode 100644 index 45d6f3b4e6a4..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go +++ /dev/null @@ -1,478 +0,0 @@ -package apimanagement - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// DiagnosticLoggerClient is the apiManagement Client -type DiagnosticLoggerClient struct { - BaseClient -} - -// NewDiagnosticLoggerClient creates an instance of the DiagnosticLoggerClient client. -func NewDiagnosticLoggerClient(subscriptionID string) DiagnosticLoggerClient { - return NewDiagnosticLoggerClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewDiagnosticLoggerClientWithBaseURI creates an instance of the DiagnosticLoggerClient client. -func NewDiagnosticLoggerClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticLoggerClient { - return DiagnosticLoggerClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CheckEntityExists checks that logger entity specified by identifier is associated with the diagnostics entity. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client DiagnosticLoggerClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticLoggerClient.CheckEntityExists") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "CheckEntityExists", err.Error()) - } - - req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CheckEntityExists", nil, "Failure preparing request") - return - } - - resp, err := client.CheckEntityExistsSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CheckEntityExists", resp, "Failure sending request") - return - } - - result, err = client.CheckEntityExistsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CheckEntityExists", resp, "Failure responding to request") - } - - return -} - -// CheckEntityExistsPreparer prepares the CheckEntityExists request. -func (client DiagnosticLoggerClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsHead(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CheckEntityExistsSender sends the CheckEntityExists request. The method will close the -// http.Response Body if it receives an error. -func (client DiagnosticLoggerClient) CheckEntityExistsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// CheckEntityExistsResponder handles the response to the CheckEntityExists request. The method always -// closes the http.Response Body. -func (client DiagnosticLoggerClient) CheckEntityExistsResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), - autorest.ByClosing()) - result.Response = resp - return -} - -// CreateOrUpdate attaches a logger to a diagnostic. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client DiagnosticLoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result LoggerContract, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticLoggerClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "CreateOrUpdate", err.Error()) - } - - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DiagnosticLoggerClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client DiagnosticLoggerClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client DiagnosticLoggerClient) CreateOrUpdateResponder(resp *http.Response) (result LoggerContract, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes the specified Logger from Diagnostic. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client DiagnosticLoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticLoggerClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "Delete", err.Error()) - } - - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, diagnosticID, loggerid) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "Delete", resp, "Failure responding to request") - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client DiagnosticLoggerClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, loggerid string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diagnosticId": autorest.Encode("path", diagnosticID), - "loggerid": autorest.Encode("path", loggerid), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client DiagnosticLoggerClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client DiagnosticLoggerClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// ListByService lists all loggers associated with the specified Diagnostic of the API Management service instance. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | type | eq | | -// top - number of records to return. -// skip - number of records to skip. -func (client DiagnosticLoggerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result LoggerCollectionPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticLoggerClient.ListByService") - defer func() { - sc := -1 - if result.lc.Response.Response != nil { - sc = result.lc.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: diagnosticID, - Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: top, - Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, - {TargetValue: skip, - Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "ListByService", err.Error()) - } - - result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, diagnosticID, filter, top, skip) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "ListByService", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServiceSender(req) - if err != nil { - result.lc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "ListByService", resp, "Failure sending request") - return - } - - result.lc, err = client.ListByServiceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "ListByService", resp, "Failure responding to request") - } - - return -} - -// ListByServicePreparer prepares the ListByService request. -func (client DiagnosticLoggerClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "diagnosticId": autorest.Encode("path", diagnosticID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if skip != nil { - queryParameters["$skip"] = autorest.Encode("query", *skip) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServiceSender sends the ListByService request. The method will close the -// http.Response Body if it receives an error. -func (client DiagnosticLoggerClient) ListByServiceSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServiceResponder handles the response to the ListByService request. The method always -// closes the http.Response Body. -func (client DiagnosticLoggerClient) ListByServiceResponder(resp *http.Response) (result LoggerCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServiceNextResults retrieves the next set of results, if any. -func (client DiagnosticLoggerClient) listByServiceNextResults(ctx context.Context, lastResults LoggerCollection) (result LoggerCollection, err error) { - req, err := lastResults.loggerCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "listByServiceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServiceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "listByServiceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServiceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.DiagnosticLoggerClient", "listByServiceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client DiagnosticLoggerClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, filter string, top *int32, skip *int32) (result LoggerCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticLoggerClient.ListByService") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, diagnosticID, filter, top, skip) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go index 29f6710f910b..177f781cbf7f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go @@ -49,13 +49,13 @@ func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient { // revision has ;rev=n as a suffix where n is the revision number. // parameters - create or update parameters. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client APIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters APICreateOrUpdateParameter, ifMatch string) (result APIContract, err error) { +func (client APIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters APICreateOrUpdateParameter, ifMatch string) (result APICreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.CreateOrUpdate") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -78,18 +78,12 @@ func (client APIClient) CreateOrUpdate(ctx context.Context, resourceGroupName st return } - resp, err := client.CreateOrUpdateSender(req) + result, err = client.CreateOrUpdateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "CreateOrUpdate", resp, "Failure responding to request") - } - return } @@ -102,7 +96,7 @@ func (client APIClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -123,9 +117,15 @@ func (client APIClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client APIClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, +func (client APIClient) CreateOrUpdateSender(req *http.Request) (future APICreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -134,7 +134,7 @@ func (client APIClient) CreateOrUpdateResponder(resp *http.Response) (result API err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -203,7 +203,7 @@ func (client APIClient) DeletePreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -298,7 +298,7 @@ func (client APIClient) GetPreparer(ctx context.Context, resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -390,7 +390,7 @@ func (client APIClient) GetEntityTagPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -426,17 +426,18 @@ func (client APIClient) GetEntityTagResponder(resp *http.Response) (result autor // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | serviceUrl | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | path | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. +// tags - include tags in the response. // expandAPIVersionSet - include full ApiVersionSet resource in response -func (client APIClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result APICollectionPage, err error) { +func (client APIClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result APICollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByService") defer func() { @@ -462,7 +463,7 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, expandAPIVersionSet) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, tags, expandAPIVersionSet) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "ListByService", nil, "Failure preparing request") return @@ -484,14 +485,14 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str } // ListByServicePreparer prepares the ListByService request. -func (client APIClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (*http.Request, error) { +func (client APIClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -504,10 +505,11 @@ func (client APIClient) ListByServicePreparer(ctx context.Context, resourceGroup if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(tags) > 0 { + queryParameters["tags"] = autorest.Encode("query", tags) + } if expandAPIVersionSet != nil { queryParameters["expandApiVersionSet"] = autorest.Encode("query", *expandAPIVersionSet) - } else { - queryParameters["expandApiVersionSet"] = autorest.Encode("query", false) } preparer := autorest.CreatePreparer( @@ -560,7 +562,7 @@ func (client APIClient) listByServiceNextResults(ctx context.Context, lastResult } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result APICollectionIterator, err error) { +func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, tags string, expandAPIVersionSet *bool) (result APICollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByService") defer func() { @@ -571,7 +573,7 @@ func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandAPIVersionSet) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, tags, expandAPIVersionSet) return } @@ -579,19 +581,20 @@ func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroup // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | isCurrent | eq | substringof, contains, startswith, endswith | +// filter - | Field | Supported operators | Supported functions | +// |-------------|------------------------|-----------------------------------| +// +// |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |displayName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// |isCurrent | eq | | // top - number of records to return. // skip - number of records to skip. -func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) { +// includeNotTaggedApis - include not tagged APIs. +func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result TagResourceCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByTags") defer func() { @@ -617,7 +620,7 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string } result.fn = client.listByTagsNextResults - req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedApis) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "ListByTags", nil, "Failure preparing request") return @@ -639,14 +642,14 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string } // ListByTagsPreparer prepares the ListByTags request. -func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -659,6 +662,9 @@ func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupNam if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if includeNotTaggedApis != nil { + queryParameters["includeNotTaggedApis"] = autorest.Encode("query", *includeNotTaggedApis) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -710,7 +716,7 @@ func (client APIClient) listByTagsNextResults(ctx context.Context, lastResults T } // ListByTagsComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionIterator, err error) { +func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result TagResourceCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByTags") defer func() { @@ -721,7 +727,7 @@ func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupNam tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedApis) return } @@ -787,7 +793,7 @@ func (client APIClient) UpdatePreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go index ca85f39ce6cb..bf0a281a8aba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go @@ -68,14 +68,49 @@ func (client APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGr {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.LoggerID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Frontend.Response", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Backend", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Backend.Response", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + }}, + }}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "CreateOrUpdate", err.Error()) } @@ -110,7 +145,7 @@ func (client APIDiagnosticClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,11 +211,11 @@ func (client APIDiagnosticClient) Delete(ctx context.Context, resourceGroupName {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "Delete", err.Error()) } @@ -215,7 +250,7 @@ func (client APIDiagnosticClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -273,11 +308,11 @@ func (client APIDiagnosticClient) Get(ctx context.Context, resourceGroupName str {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "Get", err.Error()) } @@ -312,7 +347,7 @@ func (client APIDiagnosticClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -370,11 +405,11 @@ func (client APIDiagnosticClient) GetEntityTag(ctx context.Context, resourceGrou {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "GetEntityTag", err.Error()) } @@ -409,7 +444,7 @@ func (client APIDiagnosticClient) GetEntityTagPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -446,9 +481,9 @@ func (client APIDiagnosticClient) GetEntityTagResponder(resp *http.Response) (re // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result DiagnosticCollectionPage, err error) { @@ -470,7 +505,7 @@ func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGro {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -511,7 +546,7 @@ func (client APIDiagnosticClient) ListByServicePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -618,11 +653,11 @@ func (client APIDiagnosticClient) Update(ctx context.Context, resourceGroupName {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "Update", err.Error()) } @@ -657,7 +692,7 @@ func (client APIDiagnosticClient) UpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go index b00aa7225d10..eacf58de1d17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiexport.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiexport.go @@ -103,7 +103,7 @@ func (client APIExportClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "export": autorest.Encode("query", "true"), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go index 518bf144696e..ab199b9580ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go @@ -48,8 +48,7 @@ func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssu // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. // parameters - create parameters. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. func (client APIIssueClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters IssueContract, ifMatch string) (result IssueContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.CreateOrUpdate") @@ -69,7 +68,7 @@ func (client APIIssueClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -114,7 +113,7 @@ func (client APIIssueClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,8 +158,8 @@ func (client APIIssueClient) CreateOrUpdateResponder(resp *http.Response) (resul // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. func (client APIIssueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Delete") @@ -180,7 +179,7 @@ func (client APIIssueClient) Delete(ctx context.Context, resourceGroupName strin {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -219,7 +218,7 @@ func (client APIIssueClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -258,7 +257,8 @@ func (client APIIssueClient) DeleteResponder(resp *http.Response) (result autore // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. -func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result IssueContract, err error) { +// expandCommentsAttachments - expand the comment attachments. +func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, expandCommentsAttachments *bool) (result IssueContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Get") defer func() { @@ -277,7 +277,7 @@ func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -285,7 +285,7 @@ func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, return result, validation.NewError("apimanagement.APIIssueClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, issueID) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, issueID, expandCommentsAttachments) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "Get", nil, "Failure preparing request") return @@ -307,7 +307,7 @@ func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client APIIssueClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (*http.Request, error) { +func (client APIIssueClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, expandCommentsAttachments *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "issueId": autorest.Encode("path", issueID), @@ -316,10 +316,13 @@ func (client APIIssueClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if expandCommentsAttachments != nil { + queryParameters["expandCommentsAttachments"] = autorest.Encode("query", *expandCommentsAttachments) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -374,7 +377,7 @@ func (client APIIssueClient) GetEntityTag(ctx context.Context, resourceGroupName {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -413,7 +416,7 @@ func (client APIIssueClient) GetEntityTagPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -450,14 +453,14 @@ func (client APIIssueClient) GetEntityTagResponder(resp *http.Response) (result // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | state | eq | | -// | userId | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| state | filter | eq | |
+// expandCommentsAttachments - expand the comment attachments. // top - number of records to return. // skip - number of records to skip. -func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result IssueCollectionPage, err error) { +func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result IssueCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.ListByService") defer func() { @@ -476,7 +479,7 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -487,7 +490,7 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, filter, expandCommentsAttachments, top, skip) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "ListByService", nil, "Failure preparing request") return @@ -509,7 +512,7 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam } // ListByServicePreparer prepares the ListByService request. -func (client APIIssueClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client APIIssueClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -517,13 +520,16 @@ func (client APIIssueClient) ListByServicePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if expandCommentsAttachments != nil { + queryParameters["expandCommentsAttachments"] = autorest.Encode("query", *expandCommentsAttachments) + } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } @@ -581,7 +587,7 @@ func (client APIIssueClient) listByServiceNextResults(ctx context.Context, lastR } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIIssueClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result IssueCollectionIterator, err error) { +func (client APIIssueClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, expandCommentsAttachments *bool, top *int32, skip *int32) (result IssueCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.ListByService") defer func() { @@ -592,7 +598,7 @@ func (client APIIssueClient) ListByServiceComplete(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, expandCommentsAttachments, top, skip) return } @@ -603,8 +609,8 @@ func (client APIIssueClient) ListByServiceComplete(ctx context.Context, resource // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. // parameters - update parameters. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. func (client APIIssueClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters IssueUpdateContract, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Update") @@ -624,7 +630,7 @@ func (client APIIssueClient) Update(ctx context.Context, resourceGroupName strin {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -663,7 +669,7 @@ func (client APIIssueClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -674,11 +680,8 @@ func (client APIIssueClient) UpdatePreparer(ctx context.Context, resourceGroupNa autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", pathParameters), autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go index 29a371da081f..9818f0f7350b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go @@ -49,8 +49,7 @@ func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID strin // issueID - issue identifier. Must be unique in the current API Management service instance. // attachmentID - attachment identifier within an Issue. Must be unique in the current Issue. // parameters - create parameters. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. func (client APIIssueAttachmentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string, parameters IssueAttachmentContract, ifMatch string) (result IssueAttachmentContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.CreateOrUpdate") @@ -70,7 +69,7 @@ func (client APIIssueAttachmentClient) CreateOrUpdate(ctx context.Context, resou {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -120,7 +119,7 @@ func (client APIIssueAttachmentClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,8 +165,8 @@ func (client APIIssueAttachmentClient) CreateOrUpdateResponder(resp *http.Respon // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. // attachmentID - attachment identifier within an Issue. Must be unique in the current Issue. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. func (client APIIssueAttachmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.Delete") @@ -187,7 +186,7 @@ func (client APIIssueAttachmentClient) Delete(ctx context.Context, resourceGroup {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -231,7 +230,7 @@ func (client APIIssueAttachmentClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -290,7 +289,7 @@ func (client APIIssueAttachmentClient) Get(ctx context.Context, resourceGroupNam {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -334,7 +333,7 @@ func (client APIIssueAttachmentClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -393,7 +392,7 @@ func (client APIIssueAttachmentClient) GetEntityTag(ctx context.Context, resourc {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -437,7 +436,7 @@ func (client APIIssueAttachmentClient) GetEntityTagPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -469,16 +468,16 @@ func (client APIIssueAttachmentClient) GetEntityTagResponder(resp *http.Response return } -// ListByService lists all comments for the Issue associated with the specified API. +// ListByService lists all attachments for the Issue associated with the specified API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | userId | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueAttachmentCollectionPage, err error) { @@ -500,7 +499,7 @@ func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resour {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -546,7 +545,7 @@ func (client APIIssueAttachmentClient) ListByServicePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go index 25bfa4cf393f..1256b8808c77 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go @@ -49,8 +49,7 @@ func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string) // issueID - issue identifier. Must be unique in the current API Management service instance. // commentID - comment identifier within an Issue. Must be unique in the current Issue. // parameters - create parameters. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. func (client APIIssueCommentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string, parameters IssueCommentContract, ifMatch string) (result IssueCommentContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.CreateOrUpdate") @@ -70,7 +69,7 @@ func (client APIIssueCommentClient) CreateOrUpdate(ctx context.Context, resource {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -119,7 +118,7 @@ func (client APIIssueCommentClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,8 +164,8 @@ func (client APIIssueCommentClient) CreateOrUpdateResponder(resp *http.Response) // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. // commentID - comment identifier within an Issue. Must be unique in the current Issue. -// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of -// the GET request or it should be * for unconditional update. +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. func (client APIIssueCommentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.Delete") @@ -186,7 +185,7 @@ func (client APIIssueCommentClient) Delete(ctx context.Context, resourceGroupNam {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -230,7 +229,7 @@ func (client APIIssueCommentClient) DeletePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -289,7 +288,7 @@ func (client APIIssueCommentClient) Get(ctx context.Context, resourceGroupName s {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -333,7 +332,7 @@ func (client APIIssueCommentClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -392,7 +391,7 @@ func (client APIIssueCommentClient) GetEntityTag(ctx context.Context, resourceGr {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -436,7 +435,7 @@ func (client APIIssueCommentClient) GetEntityTagPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -474,10 +473,10 @@ func (client APIIssueCommentClient) GetEntityTagResponder(resp *http.Response) ( // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. // issueID - issue identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | userId | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueCommentCollectionPage, err error) { @@ -499,7 +498,7 @@ func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceG {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: issueID, Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -545,7 +544,7 @@ func (client APIIssueCommentClient) ListByServicePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go index 00a0255a5a43..6d2dccb0c5df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go @@ -74,7 +74,7 @@ func (client APIOperationClient) CreateOrUpdate(ctx context.Context, resourceGro {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.OperationContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.OperationContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -121,7 +121,7 @@ func (client APIOperationClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,7 +193,7 @@ func (client APIOperationClient) Delete(ctx context.Context, resourceGroupName s {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "Delete", err.Error()) } @@ -228,7 +228,7 @@ func (client APIOperationClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,7 +292,7 @@ func (client APIOperationClient) Get(ctx context.Context, resourceGroupName stri {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "Get", err.Error()) } @@ -327,7 +327,7 @@ func (client APIOperationClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -391,7 +391,7 @@ func (client APIOperationClient) GetEntityTag(ctx context.Context, resourceGroup {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "GetEntityTag", err.Error()) } @@ -426,7 +426,7 @@ func (client APIOperationClient) GetEntityTagPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -464,15 +464,17 @@ func (client APIOperationClient) GetEntityTagResponder(resp *http.Response) (res // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | name | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | method | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | -// | urlTemplate | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result OperationCollectionPage, err error) { +// tags - include tags in the response. +func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result OperationCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.ListByAPI") defer func() { @@ -502,7 +504,7 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam } result.fn = client.listByAPINextResults - req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, tags) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIOperationClient", "ListByAPI", nil, "Failure preparing request") return @@ -524,7 +526,7 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam } // ListByAPIPreparer prepares the ListByAPI request. -func (client APIOperationClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client APIOperationClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -532,7 +534,7 @@ func (client APIOperationClient) ListByAPIPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -545,6 +547,9 @@ func (client APIOperationClient) ListByAPIPreparer(ctx context.Context, resource if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(tags) > 0 { + queryParameters["tags"] = autorest.Encode("query", tags) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -596,7 +601,7 @@ func (client APIOperationClient) listByAPINextResults(ctx context.Context, lastR } // ListByAPIComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIOperationClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result OperationCollectionIterator, err error) { +func (client APIOperationClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, tags string) (result OperationCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.ListByAPI") defer func() { @@ -607,7 +612,7 @@ func (client APIOperationClient) ListByAPIComplete(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, tags) return } @@ -645,7 +650,7 @@ func (client APIOperationClient) Update(ctx context.Context, resourceGroupName s {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "Update", err.Error()) } @@ -680,7 +685,7 @@ func (client APIOperationClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go index e95f0a6df844..f2f000c71bb0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperationpolicy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperationpolicy.go @@ -74,10 +74,10 @@ func (client APIOperationPolicyClient) CreateOrUpdate(ctx context.Context, resou {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PolicyContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.PolicyContent", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.Value", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationPolicyClient", "CreateOrUpdate", err.Error()) } @@ -113,7 +113,7 @@ func (client APIOperationPolicyClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,7 +185,7 @@ func (client APIOperationPolicyClient) Delete(ctx context.Context, resourceGroup {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationPolicyClient", "Delete", err.Error()) } @@ -221,7 +221,7 @@ func (client APIOperationPolicyClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -262,7 +262,8 @@ func (client APIOperationPolicyClient) DeleteResponder(resp *http.Response) (res // revision has ;rev=n as a suffix where n is the revision number. // operationID - operation identifier within an API. Must be unique in the current API Management service // instance. -func (client APIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client APIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.Get") defer func() { @@ -285,11 +286,11 @@ func (client APIOperationPolicyClient) Get(ctx context.Context, resourceGroupNam {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationPolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, operationID) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIOperationPolicyClient", "Get", nil, "Failure preparing request") return @@ -311,7 +312,7 @@ func (client APIOperationPolicyClient) Get(ctx context.Context, resourceGroupNam } // GetPreparer prepares the Get request. -func (client APIOperationPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (*http.Request, error) { +func (client APIOperationPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "operationId": autorest.Encode("path", operationID), @@ -321,10 +322,15 @@ func (client APIOperationPolicyClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -385,7 +391,7 @@ func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourc {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationPolicyClient", "GetEntityTag", err.Error()) } @@ -421,7 +427,7 @@ func (client APIOperationPolicyClient) GetEntityTagPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -484,7 +490,7 @@ func (client APIOperationPolicyClient) ListByOperation(ctx context.Context, reso {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationPolicyClient", "ListByOperation", err.Error()) } @@ -519,7 +525,7 @@ func (client APIOperationPolicyClient) ListByOperationPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go index faf5b212c3b7..a045237950b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apipolicy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apipolicy.go @@ -71,7 +71,7 @@ func (client APIPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PolicyContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.PolicyContent", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.Value", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIPolicyClient", "CreateOrUpdate", err.Error()) } @@ -106,7 +106,7 @@ func (client APIPolicyClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -207,7 +207,7 @@ func (client APIPolicyClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,8 @@ func (client APIPolicyClient) DeleteResponder(resp *http.Response) (result autor // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.Get") defer func() { @@ -269,7 +270,7 @@ func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, return result, validation.NewError("apimanagement.APIPolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APIPolicyClient", "Get", nil, "Failure preparing request") return @@ -291,7 +292,7 @@ func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, } // GetPreparer prepares the Get request. -func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (*http.Request, error) { +func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "policyId": autorest.Encode("path", "policy"), @@ -300,10 +301,15 @@ func (client APIPolicyClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -393,7 +399,7 @@ func (client APIPolicyClient) GetEntityTagPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -484,7 +490,7 @@ func (client APIPolicyClient) ListByAPIPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go index ce0ec03a39fb..117b851811a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go @@ -46,9 +46,9 @@ func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIPr // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result ProductCollectionPage, err error) { @@ -70,7 +70,7 @@ func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -111,7 +111,7 @@ func (client APIProductClient) ListByApisPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go index f8404eea5427..58c750c474c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go @@ -41,16 +41,17 @@ func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIRe return APIReleaseClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new Release for the API. +// CreateOrUpdate creates a new Release for the API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. // releaseID - release identifier within an API. Must be unique in the current API Management service instance. // parameters - create parameters. -func (client APIReleaseClient) Create(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract) (result APIReleaseContract, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client APIReleaseClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract, ifMatch string) (result APIReleaseContract, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.Create") + ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.CreateOrUpdate") defer func() { sc := -1 if result.Response.Response != nil { @@ -67,37 +68,37 @@ func (client APIReleaseClient) Create(ctx context.Context, resourceGroupName str {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: releaseID, Constraints: []validation.Constraint{{Target: "releaseID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "releaseID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "releaseID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.APIReleaseClient", "Create", err.Error()) + {Target: "releaseID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.APIReleaseClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, serviceName, apiid, releaseID, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, apiid, releaseID, parameters, ifMatch) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "Create", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "CreateOrUpdate", nil, "Failure preparing request") return } - resp, err := client.CreateSender(req) + resp, err := client.CreateOrUpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "Create", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "CreateOrUpdate", resp, "Failure sending request") return } - result, err = client.CreateResponder(resp) + result, err = client.CreateOrUpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "Create", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "CreateOrUpdate", resp, "Failure responding to request") } return } -// CreatePreparer prepares the Create request. -func (client APIReleaseClient) CreatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract) (*http.Request, error) { +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client APIReleaseClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "releaseId": autorest.Encode("path", releaseID), @@ -106,7 +107,7 @@ func (client APIReleaseClient) CreatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -118,19 +119,23 @@ func (client APIReleaseClient) CreatePreparer(ctx context.Context, resourceGroup autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateSender sends the Create request. The method will close the +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client APIReleaseClient) CreateSender(req *http.Request) (*http.Response, error) { +func (client APIReleaseClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } -// CreateResponder handles the response to the Create request. The method always +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client APIReleaseClient) CreateResponder(resp *http.Response) (result APIReleaseContract, err error) { +func (client APIReleaseClient) CreateOrUpdateResponder(resp *http.Response) (result APIReleaseContract, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -168,11 +173,11 @@ func (client APIReleaseClient) Delete(ctx context.Context, resourceGroupName str {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: releaseID, Constraints: []validation.Constraint{{Target: "releaseID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "releaseID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "releaseID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "releaseID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "Delete", err.Error()) } @@ -207,7 +212,7 @@ func (client APIReleaseClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,11 +270,11 @@ func (client APIReleaseClient) Get(ctx context.Context, resourceGroupName string {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: releaseID, Constraints: []validation.Constraint{{Target: "releaseID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "releaseID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "releaseID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "releaseID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "Get", err.Error()) } @@ -304,7 +309,7 @@ func (client APIReleaseClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -362,11 +367,11 @@ func (client APIReleaseClient) GetEntityTag(ctx context.Context, resourceGroupNa {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: releaseID, Constraints: []validation.Constraint{{Target: "releaseID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "releaseID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "releaseID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "releaseID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "GetEntityTag", err.Error()) } @@ -401,7 +406,7 @@ func (client APIReleaseClient) GetEntityTagPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -433,22 +438,21 @@ func (client APIReleaseClient) GetEntityTagResponder(resp *http.Response) (resul return } -// List lists all releases of an API. An API release is created when making an API Revision current. Releases are also -// used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip +// ListByService lists all releases of an API. An API release is created when making an API Revision current. Releases +// are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip // parameters. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// |notes|ge le eq ne gt lt|substringof contains startswith endswith| +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| notes | filter | ge, le, eq, ne, gt, +// lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client APIReleaseClient) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionPage, err error) { +func (client APIReleaseClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.ListByService") defer func() { sc := -1 if result.arc.Response.Response != nil { @@ -465,40 +469,40 @@ func (client APIReleaseClient) List(ctx context.Context, resourceGroupName strin {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("apimanagement.APIReleaseClient", "List", err.Error()) + return result, validation.NewError("apimanagement.APIReleaseClient", "ListByService", err.Error()) } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.fn = client.listByServiceNextResults + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "ListByService", nil, "Failure preparing request") return } - resp, err := client.ListSender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.arc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "ListByService", resp, "Failure sending request") return } - result.arc, err = client.ListResponder(resp) + result.arc, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "ListByService", resp, "Failure responding to request") } return } -// ListPreparer prepares the List request. -func (client APIReleaseClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +// ListByServicePreparer prepares the ListByService request. +func (client APIReleaseClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -506,7 +510,7 @@ func (client APIReleaseClient) ListPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -528,16 +532,16 @@ func (client APIReleaseClient) ListPreparer(ctx context.Context, resourceGroupNa return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSender sends the List request. The method will close the +// ListByServiceSender sends the ListByService request. The method will close the // http.Response Body if it receives an error. -func (client APIReleaseClient) ListSender(req *http.Request) (*http.Response, error) { +func (client APIReleaseClient) ListByServiceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } -// ListResponder handles the response to the List request. The method always +// ListByServiceResponder handles the response to the ListByService request. The method always // closes the http.Response Body. -func (client APIReleaseClient) ListResponder(resp *http.Response) (result APIReleaseCollection, err error) { +func (client APIReleaseClient) ListByServiceResponder(resp *http.Response) (result APIReleaseCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -548,31 +552,31 @@ func (client APIReleaseClient) ListResponder(resp *http.Response) (result APIRel return } -// listNextResults retrieves the next set of results, if any. -func (client APIReleaseClient) listNextResults(ctx context.Context, lastResults APIReleaseCollection) (result APIReleaseCollection, err error) { +// listByServiceNextResults retrieves the next set of results, if any. +func (client APIReleaseClient) listByServiceNextResults(ctx context.Context, lastResults APIReleaseCollection) (result APIReleaseCollection, err error) { req, err := lastResults.aPIReleaseCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listByServiceNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListSender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listByServiceNextResults", resp, "Failure sending next results request") } - result, err = client.ListResponder(resp) + result, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listByServiceNextResults", resp, "Failure responding to next results request") } return } -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIReleaseClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionIterator, err error) { +// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client APIReleaseClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.ListByService") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -581,7 +585,7 @@ func (client APIReleaseClient) ListComplete(ctx context.Context, resourceGroupNa tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) return } @@ -613,11 +617,11 @@ func (client APIReleaseClient) Update(ctx context.Context, resourceGroupName str {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: releaseID, Constraints: []validation.Constraint{{Target: "releaseID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "releaseID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "releaseID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "releaseID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "Update", err.Error()) } @@ -652,7 +656,7 @@ func (client APIReleaseClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go similarity index 59% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go index 3fd8552511f5..a5fc05259780 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go @@ -26,35 +26,34 @@ import ( "net/http" ) -// APIRevisionsClient is the apiManagement Client -type APIRevisionsClient struct { +// APIRevisionClient is the apiManagement Client +type APIRevisionClient struct { BaseClient } -// NewAPIRevisionsClient creates an instance of the APIRevisionsClient client. -func NewAPIRevisionsClient(subscriptionID string) APIRevisionsClient { - return NewAPIRevisionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewAPIRevisionClient creates an instance of the APIRevisionClient client. +func NewAPIRevisionClient(subscriptionID string) APIRevisionClient { + return NewAPIRevisionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAPIRevisionsClientWithBaseURI creates an instance of the APIRevisionsClient client. -func NewAPIRevisionsClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionsClient { - return APIRevisionsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewAPIRevisionClientWithBaseURI creates an instance of the APIRevisionClient client. +func NewAPIRevisionClientWithBaseURI(baseURI string, subscriptionID string) APIRevisionClient { + return APIRevisionClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all revisions of an API. +// ListByService lists all revisions of an API. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// -// |apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| apiRevision | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionPage, err error) { +func (client APIRevisionClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionClient.ListByService") defer func() { sc := -1 if result.arc.Response.Response != nil { @@ -71,40 +70,40 @@ func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName str {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("apimanagement.APIRevisionsClient", "List", err.Error()) + return result, validation.NewError("apimanagement.APIRevisionClient", "ListByService", err.Error()) } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.fn = client.listByServiceNextResults + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "ListByService", nil, "Failure preparing request") return } - resp, err := client.ListSender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.arc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "ListByService", resp, "Failure sending request") return } - result.arc, err = client.ListResponder(resp) + result.arc, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "ListByService", resp, "Failure responding to request") } return } -// ListPreparer prepares the List request. -func (client APIRevisionsClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +// ListByServicePreparer prepares the ListByService request. +func (client APIRevisionClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -112,7 +111,7 @@ func (client APIRevisionsClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -134,16 +133,16 @@ func (client APIRevisionsClient) ListPreparer(ctx context.Context, resourceGroup return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSender sends the List request. The method will close the +// ListByServiceSender sends the ListByService request. The method will close the // http.Response Body if it receives an error. -func (client APIRevisionsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client APIRevisionClient) ListByServiceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } -// ListResponder handles the response to the List request. The method always +// ListByServiceResponder handles the response to the ListByService request. The method always // closes the http.Response Body. -func (client APIRevisionsClient) ListResponder(resp *http.Response) (result APIRevisionCollection, err error) { +func (client APIRevisionClient) ListByServiceResponder(resp *http.Response) (result APIRevisionCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -154,31 +153,31 @@ func (client APIRevisionsClient) ListResponder(resp *http.Response) (result APIR return } -// listNextResults retrieves the next set of results, if any. -func (client APIRevisionsClient) listNextResults(ctx context.Context, lastResults APIRevisionCollection) (result APIRevisionCollection, err error) { +// listByServiceNextResults retrieves the next set of results, if any. +func (client APIRevisionClient) listByServiceNextResults(ctx context.Context, lastResults APIRevisionCollection) (result APIRevisionCollection, err error) { req, err := lastResults.aPIRevisionCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "listByServiceNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListSender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "listByServiceNextResults", resp, "Failure sending next results request") } - result, err = client.ListResponder(resp) + result, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "apimanagement.APIRevisionClient", "listByServiceNextResults", resp, "Failure responding to next results request") } return } -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client APIRevisionsClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionIterator, err error) { +// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client APIRevisionClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionClient.ListByService") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -187,6 +186,6 @@ func (client APIRevisionsClient) ListComplete(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go index dc26569e541f..80c1e637f50e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apischema.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go @@ -50,7 +50,7 @@ func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISch // schemaID - schema identifier within an API. Must be unique in the current API Management service instance. // parameters - the schema contents to apply. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client APISchemaClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, parameters SchemaContract, ifMatch string) (result SchemaContract, err error) { +func (client APISchemaClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, parameters SchemaCreateOrUpdateContract, ifMatch string) (result SchemaContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.CreateOrUpdate") defer func() { @@ -73,10 +73,10 @@ func (client APISchemaClient) CreateOrUpdate(ctx context.Context, resourceGroupN {TargetValue: schemaID, Constraints: []validation.Constraint{{Target: "schemaID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "schemaID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "schemaID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "schemaID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SchemaContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SchemaContractProperties.ContentType", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SchemaCreateOrUpdateProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SchemaCreateOrUpdateProperties.ContentType", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "CreateOrUpdate", err.Error()) } @@ -102,7 +102,7 @@ func (client APISchemaClient) CreateOrUpdate(ctx context.Context, resourceGroupN } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client APISchemaClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, parameters SchemaContract, ifMatch string) (*http.Request, error) { +func (client APISchemaClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, parameters SchemaCreateOrUpdateContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -111,7 +111,7 @@ func (client APISchemaClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,8 @@ func (client APISchemaClient) CreateOrUpdateResponder(resp *http.Response) (resu // schemaID - schema identifier within an API. Must be unique in the current API Management service instance. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client APISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, ifMatch string) (result autorest.Response, err error) { +// force - if true removes all references to the schema before deleting it. +func (client APISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, ifMatch string, force *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.Delete") defer func() { @@ -182,11 +183,11 @@ func (client APISchemaClient) Delete(ctx context.Context, resourceGroupName stri {TargetValue: schemaID, Constraints: []validation.Constraint{{Target: "schemaID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "schemaID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "schemaID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "schemaID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, apiid, schemaID, ifMatch) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, apiid, schemaID, ifMatch, force) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APISchemaClient", "Delete", nil, "Failure preparing request") return @@ -208,7 +209,7 @@ func (client APISchemaClient) Delete(ctx context.Context, resourceGroupName stri } // DeletePreparer prepares the Delete request. -func (client APISchemaClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, ifMatch string) (*http.Request, error) { +func (client APISchemaClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, ifMatch string, force *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -217,10 +218,13 @@ func (client APISchemaClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if force != nil { + queryParameters["force"] = autorest.Encode("query", *force) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), @@ -280,7 +284,7 @@ func (client APISchemaClient) Get(ctx context.Context, resourceGroupName string, {TargetValue: schemaID, Constraints: []validation.Constraint{{Target: "schemaID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "schemaID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "schemaID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "schemaID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "Get", err.Error()) } @@ -315,7 +319,7 @@ func (client APISchemaClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +382,7 @@ func (client APISchemaClient) GetEntityTag(ctx context.Context, resourceGroupNam {TargetValue: schemaID, Constraints: []validation.Constraint{{Target: "schemaID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "schemaID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "schemaID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "schemaID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "GetEntityTag", err.Error()) } @@ -413,7 +417,7 @@ func (client APISchemaClient) GetEntityTagPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -451,7 +455,12 @@ func (client APISchemaClient) GetEntityTagResponder(resp *http.Response) (result // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result SchemaCollectionPage, err error) { +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| contentType | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
+// top - number of records to return. +// skip - number of records to skip. +func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result SchemaCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.ListByAPI") defer func() { @@ -470,12 +479,18 @@ func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName s {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "ListByAPI", err.Error()) } result.fn = client.listByAPINextResults - req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, apiid) + req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.APISchemaClient", "ListByAPI", nil, "Failure preparing request") return @@ -497,7 +512,7 @@ func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName s } // ListByAPIPreparer prepares the ListByAPI request. -func (client APISchemaClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (*http.Request, error) { +func (client APISchemaClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -505,10 +520,19 @@ func (client APISchemaClient) ListByAPIPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if skip != nil { + queryParameters["$skip"] = autorest.Encode("query", *skip) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -560,7 +584,7 @@ func (client APISchemaClient) listByAPINextResults(ctx context.Context, lastResu } // ListByAPIComplete enumerates all values, automatically crossing page boundaries as required. -func (client APISchemaClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result SchemaCollectionIterator, err error) { +func (client APISchemaClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result SchemaCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.ListByAPI") defer func() { @@ -571,6 +595,6 @@ func (client APISchemaClient) ListByAPIComplete(ctx context.Context, resourceGro tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, apiid) + result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go similarity index 66% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go index f740dfd5ae41..861f1284bd27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go @@ -26,19 +26,19 @@ import ( "net/http" ) -// TagDescriptionClient is the apiManagement Client -type TagDescriptionClient struct { +// APITagDescriptionClient is the apiManagement Client +type APITagDescriptionClient struct { BaseClient } -// NewTagDescriptionClient creates an instance of the TagDescriptionClient client. -func NewTagDescriptionClient(subscriptionID string) TagDescriptionClient { - return NewTagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewAPITagDescriptionClient creates an instance of the APITagDescriptionClient client. +func NewAPITagDescriptionClient(subscriptionID string) APITagDescriptionClient { + return NewAPITagDescriptionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagDescriptionClientWithBaseURI creates an instance of the TagDescriptionClient client. -func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) TagDescriptionClient { - return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewAPITagDescriptionClientWithBaseURI creates an instance of the APITagDescriptionClient client. +func NewAPITagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) APITagDescriptionClient { + return APITagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create/Update tag description in scope of the Api. @@ -50,9 +50,9 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T // tagID - tag identifier. Must be unique in the current API Management service instance. // parameters - create parameters. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client TagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, parameters TagDescriptionCreateParameters, ifMatch string) (result TagDescriptionContract, err error) { +func (client APITagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, parameters TagDescriptionCreateParameters, ifMatch string) (result TagDescriptionContract, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.CreateOrUpdate") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.CreateOrUpdate") defer func() { sc := -1 if result.Response.Response != nil { @@ -73,38 +73,38 @@ func (client TagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceG {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.TagDescriptionBaseProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.TagDescriptionBaseProperties.ExternalDocsURL", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.TagDescriptionBaseProperties.ExternalDocsURL", Name: validation.MaxLength, Rule: 2000, Chain: nil}}}, }}}}}); err != nil { - return result, validation.NewError("apimanagement.TagDescriptionClient", "CreateOrUpdate", err.Error()) + return result, validation.NewError("apimanagement.APITagDescriptionClient", "CreateOrUpdate", err.Error()) } req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, apiid, tagID, parameters, ifMatch) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "CreateOrUpdate", nil, "Failure preparing request") return } resp, err := client.CreateOrUpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "CreateOrUpdate", resp, "Failure sending request") return } result, err = client.CreateOrUpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "CreateOrUpdate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "CreateOrUpdate", resp, "Failure responding to request") } return } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client TagDescriptionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, parameters TagDescriptionCreateParameters, ifMatch string) (*http.Request, error) { +func (client APITagDescriptionClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, parameters TagDescriptionCreateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -113,7 +113,7 @@ func (client TagDescriptionClient) CreateOrUpdatePreparer(ctx context.Context, r "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -134,14 +134,14 @@ func (client TagDescriptionClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client TagDescriptionClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { +func (client APITagDescriptionClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client TagDescriptionClient) CreateOrUpdateResponder(resp *http.Response) (result TagDescriptionContract, err error) { +func (client APITagDescriptionClient) CreateOrUpdateResponder(resp *http.Response) (result TagDescriptionContract, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -161,9 +161,9 @@ func (client TagDescriptionClient) CreateOrUpdateResponder(resp *http.Response) // tagID - tag identifier. Must be unique in the current API Management service instance. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client TagDescriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result autorest.Response, err error) { +func (client APITagDescriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.Delete") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.Delete") defer func() { sc := -1 if result.Response != nil { @@ -184,33 +184,33 @@ func (client TagDescriptionClient) Delete(ctx context.Context, resourceGroupName {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.TagDescriptionClient", "Delete", err.Error()) + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.APITagDescriptionClient", "Delete", err.Error()) } req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, apiid, tagID, ifMatch) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Delete", nil, "Failure preparing request") return } resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Delete", resp, "Failure sending request") return } result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Delete", resp, "Failure responding to request") } return } // DeletePreparer prepares the Delete request. -func (client TagDescriptionClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (*http.Request, error) { +func (client APITagDescriptionClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -219,7 +219,7 @@ func (client TagDescriptionClient) DeletePreparer(ctx context.Context, resourceG "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -235,14 +235,14 @@ func (client TagDescriptionClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client TagDescriptionClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client APITagDescriptionClient) DeleteSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client TagDescriptionClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client APITagDescriptionClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -252,16 +252,16 @@ func (client TagDescriptionClient) DeleteResponder(resp *http.Response) (result return } -// Get get tag associated with the API. +// Get get Tag description in scope of API // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. // tagID - tag identifier. Must be unique in the current API Management service instance. -func (client TagDescriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result TagDescriptionContract, err error) { +func (client APITagDescriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result TagDescriptionContract, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.Get") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.Get") defer func() { sc := -1 if result.Response.Response != nil { @@ -282,33 +282,33 @@ func (client TagDescriptionClient) Get(ctx context.Context, resourceGroupName st {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.TagDescriptionClient", "Get", err.Error()) + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.APITagDescriptionClient", "Get", err.Error()) } req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apiid, tagID) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client TagDescriptionClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { +func (client APITagDescriptionClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -317,7 +317,7 @@ func (client TagDescriptionClient) GetPreparer(ctx context.Context, resourceGrou "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,14 +332,14 @@ func (client TagDescriptionClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client TagDescriptionClient) GetSender(req *http.Request) (*http.Response, error) { +func (client APITagDescriptionClient) GetSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client TagDescriptionClient) GetResponder(resp *http.Response) (result TagDescriptionContract, err error) { +func (client APITagDescriptionClient) GetResponder(resp *http.Response) (result TagDescriptionContract, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -350,16 +350,16 @@ func (client TagDescriptionClient) GetResponder(resp *http.Response) (result Tag return } -// GetEntityState gets the entity state version of the tag specified by its identifier. +// GetEntityTag gets the entity state version of the tag specified by its identifier. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. // tagID - tag identifier. Must be unique in the current API Management service instance. -func (client TagDescriptionClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) { +func (client APITagDescriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.GetEntityState") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.GetEntityTag") defer func() { sc := -1 if result.Response != nil { @@ -380,33 +380,33 @@ func (client TagDescriptionClient) GetEntityState(ctx context.Context, resourceG {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.TagDescriptionClient", "GetEntityState", err.Error()) + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.APITagDescriptionClient", "GetEntityTag", err.Error()) } - req, err := client.GetEntityStatePreparer(ctx, resourceGroupName, serviceName, apiid, tagID) + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, apiid, tagID) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "GetEntityState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "GetEntityTag", nil, "Failure preparing request") return } - resp, err := client.GetEntityStateSender(req) + resp, err := client.GetEntityTagSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "GetEntityState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "GetEntityTag", resp, "Failure sending request") return } - result, err = client.GetEntityStateResponder(resp) + result, err = client.GetEntityTagResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "GetEntityState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "GetEntityTag", resp, "Failure responding to request") } return } -// GetEntityStatePreparer prepares the GetEntityState request. -func (client TagDescriptionClient) GetEntityStatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { +// GetEntityTagPreparer prepares the GetEntityTag request. +func (client APITagDescriptionClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -415,7 +415,7 @@ func (client TagDescriptionClient) GetEntityStatePreparer(ctx context.Context, r "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -428,16 +428,16 @@ func (client TagDescriptionClient) GetEntityStatePreparer(ctx context.Context, r return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetEntityStateSender sends the GetEntityState request. The method will close the +// GetEntityTagSender sends the GetEntityTag request. The method will close the // http.Response Body if it receives an error. -func (client TagDescriptionClient) GetEntityStateSender(req *http.Request) (*http.Response, error) { +func (client APITagDescriptionClient) GetEntityTagSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } -// GetEntityStateResponder handles the response to the GetEntityState request. The method always +// GetEntityTagResponder handles the response to the GetEntityTag request. The method always // closes the http.Response Body. -func (client TagDescriptionClient) GetEntityStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client APITagDescriptionClient) GetEntityTagResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -447,22 +447,22 @@ func (client TagDescriptionClient) GetEntityStateResponder(resp *http.Response) return } -// ListByAPI lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API -// level but tag may be assigned to the Operations +// ListByService lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on +// API level but tag may be assigned to the Operations // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionPage, err error) { +func (client APITagDescriptionClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.ListByAPI") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.ListByService") defer func() { sc := -1 if result.tdc.Response.Response != nil { @@ -486,33 +486,33 @@ func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupN {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("apimanagement.TagDescriptionClient", "ListByAPI", err.Error()) + return result, validation.NewError("apimanagement.APITagDescriptionClient", "ListByService", err.Error()) } - result.fn = client.listByAPINextResults - req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.fn = client.listByServiceNextResults + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "ListByAPI", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "ListByService", nil, "Failure preparing request") return } - resp, err := client.ListByAPISender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.tdc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "ListByAPI", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "ListByService", resp, "Failure sending request") return } - result.tdc, err = client.ListByAPIResponder(resp) + result.tdc, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "ListByAPI", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "ListByService", resp, "Failure responding to request") } return } -// ListByAPIPreparer prepares the ListByAPI request. -func (client TagDescriptionClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +// ListByServicePreparer prepares the ListByService request. +func (client APITagDescriptionClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -520,7 +520,7 @@ func (client TagDescriptionClient) ListByAPIPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -542,16 +542,16 @@ func (client TagDescriptionClient) ListByAPIPreparer(ctx context.Context, resour return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListByAPISender sends the ListByAPI request. The method will close the +// ListByServiceSender sends the ListByService request. The method will close the // http.Response Body if it receives an error. -func (client TagDescriptionClient) ListByAPISender(req *http.Request) (*http.Response, error) { +func (client APITagDescriptionClient) ListByServiceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } -// ListByAPIResponder handles the response to the ListByAPI request. The method always +// ListByServiceResponder handles the response to the ListByService request. The method always // closes the http.Response Body. -func (client TagDescriptionClient) ListByAPIResponder(resp *http.Response) (result TagDescriptionCollection, err error) { +func (client APITagDescriptionClient) ListByServiceResponder(resp *http.Response) (result TagDescriptionCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -562,31 +562,31 @@ func (client TagDescriptionClient) ListByAPIResponder(resp *http.Response) (resu return } -// listByAPINextResults retrieves the next set of results, if any. -func (client TagDescriptionClient) listByAPINextResults(ctx context.Context, lastResults TagDescriptionCollection) (result TagDescriptionCollection, err error) { +// listByServiceNextResults retrieves the next set of results, if any. +func (client APITagDescriptionClient) listByServiceNextResults(ctx context.Context, lastResults TagDescriptionCollection) (result TagDescriptionCollection, err error) { req, err := lastResults.tagDescriptionCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "listByAPINextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "listByServiceNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListByAPISender(req) + resp, err := client.ListByServiceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "listByAPINextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "listByServiceNextResults", resp, "Failure sending next results request") } - result, err = client.ListByAPIResponder(resp) + result, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "listByAPINextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "apimanagement.APITagDescriptionClient", "listByServiceNextResults", resp, "Failure responding to next results request") } return } -// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required. -func (client TagDescriptionClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionIterator, err error) { +// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client APITagDescriptionClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.ListByAPI") + ctx = tracing.StartSpan(ctx, fqdn+"/APITagDescriptionClient.ListByService") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -595,6 +595,6 @@ func (client TagDescriptionClient) ListByAPIComplete(ctx context.Context, resour tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go index 3e96eff6c9a4..1e0bd97d6566 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go @@ -67,7 +67,7 @@ func (client APIVersionSetClient) CreateOrUpdate(ctx context.Context, resourceGr {TargetValue: versionSetID, Constraints: []validation.Constraint{{Target: "versionSetID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "versionSetID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "versionSetID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "versionSetID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.APIVersionSetContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.APIVersionSetContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -108,7 +108,7 @@ func (client APIVersionSetClient) CreateOrUpdatePreparer(ctx context.Context, re "versionSetId": autorest.Encode("path", versionSetID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -117,7 +117,7 @@ func (client APIVersionSetClient) CreateOrUpdatePreparer(ctx context.Context, re autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) if len(ifMatch) > 0 { @@ -173,7 +173,7 @@ func (client APIVersionSetClient) Delete(ctx context.Context, resourceGroupName {TargetValue: versionSetID, Constraints: []validation.Constraint{{Target: "versionSetID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "versionSetID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "versionSetID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "versionSetID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "Delete", err.Error()) } @@ -207,7 +207,7 @@ func (client APIVersionSetClient) DeletePreparer(ctx context.Context, resourceGr "versionSetId": autorest.Encode("path", versionSetID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -215,7 +215,7 @@ func (client APIVersionSetClient) DeletePreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", pathParameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -264,7 +264,7 @@ func (client APIVersionSetClient) Get(ctx context.Context, resourceGroupName str {TargetValue: versionSetID, Constraints: []validation.Constraint{{Target: "versionSetID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "versionSetID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "versionSetID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "versionSetID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "Get", err.Error()) } @@ -298,7 +298,7 @@ func (client APIVersionSetClient) GetPreparer(ctx context.Context, resourceGroup "versionSetId": autorest.Encode("path", versionSetID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -306,7 +306,7 @@ func (client APIVersionSetClient) GetPreparer(ctx context.Context, resourceGroup preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -355,7 +355,7 @@ func (client APIVersionSetClient) GetEntityTag(ctx context.Context, resourceGrou {TargetValue: versionSetID, Constraints: []validation.Constraint{{Target: "versionSetID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "versionSetID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "versionSetID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "versionSetID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "GetEntityTag", err.Error()) } @@ -389,7 +389,7 @@ func (client APIVersionSetClient) GetEntityTagPreparer(ctx context.Context, reso "versionSetId": autorest.Encode("path", versionSetID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,7 +397,7 @@ func (client APIVersionSetClient) GetEntityTagPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -425,15 +425,8 @@ func (client APIVersionSetClient) GetEntityTagResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |------------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | N/A | -// | registrationDate | ge, le, eq, ne, gt, lt | N/A | -// | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
// top - number of records to return. // skip - number of records to skip. func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result APIVersionSetCollectionPage, err error) { @@ -491,7 +484,7 @@ func (client APIVersionSetClient) ListByServicePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -508,7 +501,7 @@ func (client APIVersionSetClient) ListByServicePreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -597,7 +590,7 @@ func (client APIVersionSetClient) Update(ctx context.Context, resourceGroupName {TargetValue: versionSetID, Constraints: []validation.Constraint{{Target: "versionSetID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "versionSetID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "versionSetID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "versionSetID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "Update", err.Error()) } @@ -631,7 +624,7 @@ func (client APIVersionSetClient) UpdatePreparer(ctx context.Context, resourceGr "versionSetId": autorest.Encode("path", versionSetID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -640,7 +633,7 @@ func (client APIVersionSetClient) UpdatePreparer(ctx context.Context, resourceGr autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go index ef62a2d25892..32a69da60650 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go @@ -67,7 +67,7 @@ func (client AuthorizationServerClient) CreateOrUpdate(ctx context.Context, reso {TargetValue: authsid, Constraints: []validation.Constraint{{Target: "authsid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "authsid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "authsid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "authsid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.AuthorizationServerContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AuthorizationServerContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -112,7 +112,7 @@ func (client AuthorizationServerClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -177,7 +177,7 @@ func (client AuthorizationServerClient) Delete(ctx context.Context, resourceGrou {TargetValue: authsid, Constraints: []validation.Constraint{{Target: "authsid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "authsid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "authsid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "authsid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "Delete", err.Error()) } @@ -211,7 +211,7 @@ func (client AuthorizationServerClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -268,7 +268,7 @@ func (client AuthorizationServerClient) Get(ctx context.Context, resourceGroupNa {TargetValue: authsid, Constraints: []validation.Constraint{{Target: "authsid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "authsid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "authsid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "authsid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "Get", err.Error()) } @@ -302,7 +302,7 @@ func (client AuthorizationServerClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -359,7 +359,7 @@ func (client AuthorizationServerClient) GetEntityTag(ctx context.Context, resour {TargetValue: authsid, Constraints: []validation.Constraint{{Target: "authsid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "authsid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "authsid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "authsid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "GetEntityTag", err.Error()) } @@ -393,7 +393,7 @@ func (client AuthorizationServerClient) GetEntityTagPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,10 +429,10 @@ func (client AuthorizationServerClient) GetEntityTagResponder(resp *http.Respons // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client AuthorizationServerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result AuthorizationServerCollectionPage, err error) { @@ -490,7 +490,7 @@ func (client AuthorizationServerClient) ListByServicePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -596,7 +596,7 @@ func (client AuthorizationServerClient) Update(ctx context.Context, resourceGrou {TargetValue: authsid, Constraints: []validation.Constraint{{Target: "authsid", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "authsid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "authsid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "authsid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "Update", err.Error()) } @@ -630,7 +630,7 @@ func (client AuthorizationServerClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go similarity index 87% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go index 96f91a993644..a5ab5f8477be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go @@ -45,10 +45,10 @@ func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendC // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. // parameters - create parameters. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendContract, ifMatch string) (result BackendContract, err error) { +func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendContract, ifMatch string) (result BackendContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.CreateOrUpdate") defer func() { @@ -64,10 +64,10 @@ func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.BackendContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BackendContractProperties.URL", Name: validation.Null, Rule: true, @@ -78,7 +78,7 @@ func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupNam return result, validation.NewError("apimanagement.BackendClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, backendid, parameters, ifMatch) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, backendID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -100,15 +100,15 @@ func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BackendClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendContract, ifMatch string) (*http.Request, error) { +func (client BackendClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -117,7 +117,7 @@ func (client BackendClient) CreateOrUpdatePreparer(ctx context.Context, resource autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) if len(ifMatch) > 0 { @@ -151,10 +151,10 @@ func (client BackendClient) CreateOrUpdateResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (result autorest.Response, err error) { +func (client BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Delete") defer func() { @@ -170,14 +170,14 @@ func (client BackendClient) Delete(ctx context.Context, resourceGroupName string Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, backendid, ifMatch) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, backendID, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "Delete", nil, "Failure preparing request") return @@ -199,15 +199,15 @@ func (client BackendClient) Delete(ctx context.Context, resourceGroupName string } // DeletePreparer prepares the Delete request. -func (client BackendClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (*http.Request, error) { +func (client BackendClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -215,7 +215,7 @@ func (client BackendClient) DeletePreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", pathParameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -244,8 +244,8 @@ func (client BackendClient) DeleteResponder(resp *http.Response) (result autores // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. -func (client BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result BackendContract, err error) { +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. +func (client BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result BackendContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Get") defer func() { @@ -261,14 +261,14 @@ func (client BackendClient) Get(ctx context.Context, resourceGroupName string, s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, backendid) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, backendID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "Get", nil, "Failure preparing request") return @@ -290,15 +290,15 @@ func (client BackendClient) Get(ctx context.Context, resourceGroupName string, s } // GetPreparer prepares the Get request. -func (client BackendClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (*http.Request, error) { +func (client BackendClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -306,7 +306,7 @@ func (client BackendClient) GetPreparer(ctx context.Context, resourceGroupName s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -335,8 +335,8 @@ func (client BackendClient) GetResponder(resp *http.Response) (result BackendCon // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. -func (client BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result autorest.Response, err error) { +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. +func (client BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.GetEntityTag") defer func() { @@ -352,14 +352,14 @@ func (client BackendClient) GetEntityTag(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "GetEntityTag", err.Error()) } - req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, backendid) + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, backendID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "GetEntityTag", nil, "Failure preparing request") return @@ -381,15 +381,15 @@ func (client BackendClient) GetEntityTag(ctx context.Context, resourceGroupName } // GetEntityTagPreparer prepares the GetEntityTag request. -func (client BackendClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (*http.Request, error) { +func (client BackendClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,7 +397,7 @@ func (client BackendClient) GetEntityTagPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -425,10 +425,11 @@ func (client BackendClient) GetEntityTagResponder(resp *http.Response) (result a // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| url | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client BackendClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result BackendCollectionPage, err error) { @@ -486,7 +487,7 @@ func (client BackendClient) ListByServicePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -570,9 +571,9 @@ func (client BackendClient) ListByServiceComplete(ctx context.Context, resourceG // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. // parameters - reconnect request parameters. -func (client BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters *BackendReconnectContract) (result autorest.Response, err error) { +func (client BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters *BackendReconnectContract) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Reconnect") defer func() { @@ -588,14 +589,14 @@ func (client BackendClient) Reconnect(ctx context.Context, resourceGroupName str Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "Reconnect", err.Error()) } - req, err := client.ReconnectPreparer(ctx, resourceGroupName, serviceName, backendid, parameters) + req, err := client.ReconnectPreparer(ctx, resourceGroupName, serviceName, backendID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "Reconnect", nil, "Failure preparing request") return @@ -617,15 +618,15 @@ func (client BackendClient) Reconnect(ctx context.Context, resourceGroupName str } // ReconnectPreparer prepares the Reconnect request. -func (client BackendClient) ReconnectPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters *BackendReconnectContract) (*http.Request, error) { +func (client BackendClient) ReconnectPreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters *BackendReconnectContract) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -634,7 +635,7 @@ func (client BackendClient) ReconnectPreparer(ctx context.Context, resourceGroup autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}/reconnect", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", pathParameters), autorest.WithQueryParameters(queryParameters)) if parameters != nil { preparer = autorest.DecoratePreparer(preparer, @@ -666,11 +667,11 @@ func (client BackendClient) ReconnectResponder(resp *http.Response) (result auto // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance. +// backendID - identifier of the Backend entity. Must be unique in the current API Management service instance. // parameters - update parameters. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) { +func (client BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Update") defer func() { @@ -686,14 +687,14 @@ func (client BackendClient) Update(ctx context.Context, resourceGroupName string Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: backendid, - Constraints: []validation.Constraint{{Target: "backendid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "backendid", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "backendid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: backendID, + Constraints: []validation.Constraint{{Target: "backendID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "backendID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "backendID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, backendid, parameters, ifMatch) + req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, backendID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.BackendClient", "Update", nil, "Failure preparing request") return @@ -715,15 +716,15 @@ func (client BackendClient) Update(ctx context.Context, resourceGroupName string } // UpdatePreparer prepares the Update request. -func (client BackendClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendUpdateParameters, ifMatch string) (*http.Request, error) { +func (client BackendClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, backendID string, parameters BackendUpdateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backendid": autorest.Encode("path", backendid), + "backendId": autorest.Encode("path", backendID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -732,7 +733,7 @@ func (client BackendClient) UpdatePreparer(ctx context.Context, resourceGroupNam autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go new file mode 100644 index 000000000000..50dcc88e8685 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go @@ -0,0 +1,662 @@ +package apimanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CacheClient is the apiManagement Client +type CacheClient struct { + BaseClient +} + +// NewCacheClient creates an instance of the CacheClient client. +func NewCacheClient(subscriptionID string) CacheClient { + return NewCacheClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCacheClientWithBaseURI creates an instance of the CacheClient client. +func NewCacheClientWithBaseURI(baseURI string, subscriptionID string) CacheClient { + return CacheClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an External Cache to be used in Api Management instance. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// cacheID - identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region +// identifier). +// parameters - create or Update parameters. +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client CacheClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheContract, ifMatch string) (result CacheContract, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: cacheID, + Constraints: []validation.Constraint{{Target: "cacheID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "cacheID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "cacheID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CacheContractProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CacheContractProperties.Description", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CacheContractProperties.Description", Name: validation.MaxLength, Rule: 2000, Chain: nil}}}, + {Target: "parameters.CacheContractProperties.ConnectionString", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.CacheContractProperties.ConnectionString", Name: validation.MaxLength, Rule: 300, Chain: nil}}}, + {Target: "parameters.CacheContractProperties.ResourceID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.CacheContractProperties.ResourceID", Name: validation.MaxLength, Rule: 2000, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, cacheID, parameters, ifMatch) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CacheClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheContract, ifMatch string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cacheId": autorest.Encode("path", cacheID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CacheClient) CreateOrUpdateResponder(resp *http.Response) (result CacheContract, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes specific Cache. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// cacheID - identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region +// identifier). +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. +func (client CacheClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: cacheID, + Constraints: []validation.Constraint{{Target: "cacheID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "cacheID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "cacheID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, cacheID, ifMatch) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CacheClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, ifMatch string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cacheId": autorest.Encode("path", cacheID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CacheClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the Cache specified by its identifier. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// cacheID - identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region +// identifier). +func (client CacheClient) Get(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result CacheContract, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: cacheID, + Constraints: []validation.Constraint{{Target: "cacheID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "cacheID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "cacheID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, cacheID) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client CacheClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cacheId": autorest.Encode("path", cacheID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CacheClient) GetResponder(resp *http.Response) (result CacheContract, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetEntityTag gets the entity state (Etag) version of the Cache specified by its identifier. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// cacheID - identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region +// identifier). +func (client CacheClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.GetEntityTag") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: cacheID, + Constraints: []validation.Constraint{{Target: "cacheID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "cacheID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "cacheID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "GetEntityTag", err.Error()) + } + + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, cacheID) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "GetEntityTag", nil, "Failure preparing request") + return + } + + resp, err := client.GetEntityTagSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "GetEntityTag", resp, "Failure sending request") + return + } + + result, err = client.GetEntityTagResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "GetEntityTag", resp, "Failure responding to request") + } + + return +} + +// GetEntityTagPreparer prepares the GetEntityTag request. +func (client CacheClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, cacheID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cacheId": autorest.Encode("path", cacheID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetEntityTagSender sends the GetEntityTag request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) GetEntityTagSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetEntityTagResponder handles the response to the GetEntityTag request. The method always +// closes the http.Response Body. +func (client CacheClient) GetEntityTagResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ListByService lists a collection of all external Caches in the specified service instance. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// top - number of records to return. +// skip - number of records to skip. +func (client CacheClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result CacheCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.ListByService") + defer func() { + sc := -1 + if result.cc.Response.Response != nil { + sc = result.cc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "ListByService", err.Error()) + } + + result.fn = client.listByServiceNextResults + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, top, skip) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "ListByService", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServiceSender(req) + if err != nil { + result.cc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "ListByService", resp, "Failure sending request") + return + } + + result.cc, err = client.ListByServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "ListByService", resp, "Failure responding to request") + } + + return +} + +// ListByServicePreparer prepares the ListByService request. +func (client CacheClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if skip != nil { + queryParameters["$skip"] = autorest.Encode("query", *skip) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServiceSender sends the ListByService request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) ListByServiceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByServiceResponder handles the response to the ListByService request. The method always +// closes the http.Response Body. +func (client CacheClient) ListByServiceResponder(resp *http.Response) (result CacheCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServiceNextResults retrieves the next set of results, if any. +func (client CacheClient) listByServiceNextResults(ctx context.Context, lastResults CacheCollection) (result CacheCollection, err error) { + req, err := lastResults.cacheCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "apimanagement.CacheClient", "listByServiceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServiceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "apimanagement.CacheClient", "listByServiceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "listByServiceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client CacheClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result CacheCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.ListByService") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, top, skip) + return +} + +// Update updates the details of the cache specified by its identifier. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// cacheID - identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region +// identifier). +// parameters - update parameters. +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. +func (client CacheClient) Update(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheUpdateParameters, ifMatch string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheClient.Update") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: cacheID, + Constraints: []validation.Constraint{{Target: "cacheID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "cacheID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "cacheID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.CacheClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, cacheID, parameters, ifMatch) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.CacheClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CacheClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, cacheID string, parameters CacheUpdateParameters, ifMatch string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "cacheId": autorest.Encode("path", cacheID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client CacheClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CacheClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go index 389389662506..a03546f83d50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go @@ -68,7 +68,7 @@ func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGrou {TargetValue: certificateID, Constraints: []validation.Constraint{{Target: "certificateID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "certificateID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "certificateID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "certificateID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.CertificateCreateOrUpdateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificateCreateOrUpdateProperties.Data", Name: validation.Null, Rule: true, Chain: nil}, @@ -107,7 +107,7 @@ func (client CertificateClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client CertificateClient) Delete(ctx context.Context, resourceGroupName st {TargetValue: certificateID, Constraints: []validation.Constraint{{Target: "certificateID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "certificateID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "certificateID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "certificateID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "Delete", err.Error()) } @@ -207,7 +207,7 @@ func (client CertificateClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +265,7 @@ func (client CertificateClient) Get(ctx context.Context, resourceGroupName strin {TargetValue: certificateID, Constraints: []validation.Constraint{{Target: "certificateID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "certificateID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "certificateID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "certificateID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "Get", err.Error()) } @@ -299,7 +299,7 @@ func (client CertificateClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +357,7 @@ func (client CertificateClient) GetEntityTag(ctx context.Context, resourceGroupN {TargetValue: certificateID, Constraints: []validation.Constraint{{Target: "certificateID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "certificateID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "certificateID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "certificateID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "GetEntityTag", err.Error()) } @@ -391,7 +391,7 @@ func (client CertificateClient) GetEntityTagPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,12 +427,12 @@ func (client CertificateClient) GetEntityTagResponder(resp *http.Response) (resu // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |----------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | expirationDate | ge, le, eq, ne, gt, lt | N/A | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| subject | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| thumbprint | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| expirationDate | filter | ge, le, eq, ne, gt, lt | +// |
// top - number of records to return. // skip - number of records to skip. func (client CertificateClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result CertificateCollectionPage, err error) { @@ -490,7 +490,7 @@ func (client CertificateClient) ListByServicePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go index a1e4456c4fa7..5a6b181313de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/client.go @@ -1,4 +1,4 @@ -// Package apimanagement implements the Azure ARM Apimanagement service API version 2018-01-01. +// Package apimanagement implements the Azure ARM Apimanagement service API version 2019-01-01. // // ApiManagement Client package apimanagement diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go index c9fd21e6de02..44c396c2bd04 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/delegationsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/delegationsettings.go @@ -46,7 +46,8 @@ func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID strin // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // parameters - create or update parameters. -func (client DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings) (result PortalDelegationSettings, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings, ifMatch string) (result PortalDelegationSettings, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DelegationSettingsClient.CreateOrUpdate") defer func() { @@ -65,7 +66,7 @@ func (client DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resou return result, validation.NewError("apimanagement.DelegationSettingsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.DelegationSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -87,14 +88,14 @@ func (client DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DelegationSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings) (*http.Request, error) { +func (client DelegationSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,6 +107,10 @@ func (client DelegationSettingsClient) CreateOrUpdatePreparer(ctx context.Contex autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -129,7 +134,7 @@ func (client DelegationSettingsClient) CreateOrUpdateResponder(resp *http.Respon return } -// Get get Delegation settings. +// Get get Delegation Settings for the Portal. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -181,7 +186,7 @@ func (client DelegationSettingsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +271,7 @@ func (client DelegationSettingsClient) GetEntityTagPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +358,7 @@ func (client DelegationSettingsClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go index 2fa671933e33..fa944f7208fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go @@ -67,10 +67,45 @@ func (client DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroup {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.LoggerID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Request.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Frontend.Response", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Frontend.Response.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Backend", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Request.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + {Target: "parameters.DiagnosticContractProperties.Backend.Response", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body.Bytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Backend.Response.Body.Bytes", Name: validation.InclusiveMaximum, Rule: int64(8192), Chain: nil}}}, + }}, + }}, + }}, + }}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "CreateOrUpdate", err.Error()) } @@ -104,7 +139,7 @@ func (client DiagnosticClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +204,7 @@ func (client DiagnosticClient) Delete(ctx context.Context, resourceGroupName str {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "Delete", err.Error()) } @@ -203,7 +238,7 @@ func (client DiagnosticClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,7 +295,7 @@ func (client DiagnosticClient) Get(ctx context.Context, resourceGroupName string {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "Get", err.Error()) } @@ -294,7 +329,7 @@ func (client DiagnosticClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -351,7 +386,7 @@ func (client DiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupNa {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "GetEntityTag", err.Error()) } @@ -385,7 +420,7 @@ func (client DiagnosticClient) GetEntityTagPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -421,9 +456,9 @@ func (client DiagnosticClient) GetEntityTagResponder(resp *http.Response) (resul // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result DiagnosticCollectionPage, err error) { @@ -481,7 +516,7 @@ func (client DiagnosticClient) ListByServicePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -587,7 +622,7 @@ func (client DiagnosticClient) Update(ctx context.Context, resourceGroupName str {TargetValue: diagnosticID, Constraints: []validation.Constraint{{Target: "diagnosticID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "diagnosticID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "Update", err.Error()) } @@ -621,7 +656,7 @@ func (client DiagnosticClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go index e4f7e2f9b944..d715ee291c20 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go @@ -106,7 +106,7 @@ func (client EmailTemplateClient) CreateOrUpdatePreparer(ctx context.Context, re "templateName": autorest.Encode("path", templateName), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -201,7 +201,7 @@ func (client EmailTemplateClient) DeletePreparer(ctx context.Context, resourceGr "templateName": autorest.Encode("path", templateName), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -288,7 +288,7 @@ func (client EmailTemplateClient) GetPreparer(ctx context.Context, resourceGroup "templateName": autorest.Encode("path", templateName), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -375,7 +375,7 @@ func (client EmailTemplateClient) GetEntityTagPreparer(ctx context.Context, reso "templateName": autorest.Encode("path", templateName), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -411,9 +411,12 @@ func (client EmailTemplateClient) GetEntityTagResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result EmailTemplateCollectionPage, err error) { +func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result EmailTemplateCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.ListByService") defer func() { @@ -439,7 +442,7 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, top, skip) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.EmailTemplateClient", "ListByService", nil, "Failure preparing request") return @@ -461,17 +464,20 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro } // ListByServicePreparer prepares the ListByService request. -func (client EmailTemplateClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (*http.Request, error) { +func (client EmailTemplateClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } @@ -529,7 +535,7 @@ func (client EmailTemplateClient) listByServiceNextResults(ctx context.Context, } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result EmailTemplateCollectionIterator, err error) { +func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result EmailTemplateCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.ListByService") defer func() { @@ -540,7 +546,7 @@ func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip) return } @@ -550,7 +556,9 @@ func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, res // serviceName - the name of the API Management service. // templateName - email Template Name Identifier. // parameters - update parameters. -func (client EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters) (result autorest.Response, err error) { +// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET +// request or it should be * for unconditional update. +func (client EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.Update") defer func() { @@ -569,7 +577,7 @@ func (client EmailTemplateClient) Update(ctx context.Context, resourceGroupName return result, validation.NewError("apimanagement.EmailTemplateClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, templateName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, templateName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.EmailTemplateClient", "Update", nil, "Failure preparing request") return @@ -591,7 +599,7 @@ func (client EmailTemplateClient) Update(ctx context.Context, resourceGroupName } // UpdatePreparer prepares the Update request. -func (client EmailTemplateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters) (*http.Request, error) { +func (client EmailTemplateClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), @@ -599,7 +607,7 @@ func (client EmailTemplateClient) UpdatePreparer(ctx context.Context, resourceGr "templateName": autorest.Encode("path", templateName), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -610,7 +618,8 @@ func (client EmailTemplateClient) UpdatePreparer(ctx context.Context, resourceGr autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", pathParameters), autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go index 25b4b7e010bb..2ab4725f57e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go @@ -65,9 +65,9 @@ func (client GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.GroupCreateParametersProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.GroupCreateParametersProperties.DisplayName", Name: validation.Null, Rule: true, @@ -108,7 +108,7 @@ func (client GroupClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,9 +171,9 @@ func (client GroupClient) Delete(ctx context.Context, resourceGroupName string, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "Delete", err.Error()) } @@ -207,7 +207,7 @@ func (client GroupClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -262,9 +262,9 @@ func (client GroupClient) Get(ctx context.Context, resourceGroupName string, ser {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "Get", err.Error()) } @@ -298,7 +298,7 @@ func (client GroupClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,9 +353,9 @@ func (client GroupClient) GetEntityTag(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "GetEntityTag", err.Error()) } @@ -389,7 +389,7 @@ func (client GroupClient) GetEntityTagPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -425,12 +425,11 @@ func (client GroupClient) GetEntityTagResponder(resp *http.Response) (result aut // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | type | eq, ne | N/A | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| aadObjectId | filter | eq | |
// top - number of records to return. // skip - number of records to skip. func (client GroupClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) { @@ -488,7 +487,7 @@ func (client GroupClient) ListByServicePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -592,9 +591,9 @@ func (client GroupClient) Update(ctx context.Context, resourceGroupName string, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "Update", err.Error()) } @@ -628,7 +627,7 @@ func (client GroupClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go similarity index 83% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go index 8b8418323f80..c22c27d93578 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go @@ -46,8 +46,8 @@ func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupU // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // groupID - group identifier. Must be unique in the current API Management service instance. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client GroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client GroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.CheckEntityExists") defer func() { @@ -64,17 +64,17 @@ func (client GroupUserClient) CheckEntityExists(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "CheckEntityExists", err.Error()) } - req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, groupID, UID) + req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, groupID, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.GroupUserClient", "CheckEntityExists", nil, "Failure preparing request") return @@ -96,16 +96,16 @@ func (client GroupUserClient) CheckEntityExists(ctx context.Context, resourceGro } // CheckEntityExistsPreparer prepares the CheckEntityExists request. -func (client GroupUserClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (*http.Request, error) { +func (client GroupUserClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "groupId": autorest.Encode("path", groupID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -113,7 +113,7 @@ func (client GroupUserClient) CheckEntityExistsPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -137,13 +137,13 @@ func (client GroupUserClient) CheckEntityExistsResponder(resp *http.Response) (r return } -// Create adds a user to the specified group. +// Create add existing user to existing group // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // groupID - group identifier. Must be unique in the current API Management service instance. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result UserContract, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result UserContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.Create") defer func() { @@ -160,17 +160,17 @@ func (client GroupUserClient) Create(ctx context.Context, resourceGroupName stri {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "Create", err.Error()) } - req, err := client.CreatePreparer(ctx, resourceGroupName, serviceName, groupID, UID) + req, err := client.CreatePreparer(ctx, resourceGroupName, serviceName, groupID, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.GroupUserClient", "Create", nil, "Failure preparing request") return @@ -192,16 +192,16 @@ func (client GroupUserClient) Create(ctx context.Context, resourceGroupName stri } // CreatePreparer prepares the Create request. -func (client GroupUserClient) CreatePreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (*http.Request, error) { +func (client GroupUserClient) CreatePreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "groupId": autorest.Encode("path", groupID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,7 +209,7 @@ func (client GroupUserClient) CreatePreparer(ctx context.Context, resourceGroupN preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -239,8 +239,8 @@ func (client GroupUserClient) CreateResponder(resp *http.Response) (result UserC // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // groupID - group identifier. Must be unique in the current API Management service instance. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.Delete") defer func() { @@ -257,17 +257,17 @@ func (client GroupUserClient) Delete(ctx context.Context, resourceGroupName stri {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, groupID, UID) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, groupID, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.GroupUserClient", "Delete", nil, "Failure preparing request") return @@ -289,16 +289,16 @@ func (client GroupUserClient) Delete(ctx context.Context, resourceGroupName stri } // DeletePreparer prepares the Delete request. -func (client GroupUserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (*http.Request, error) { +func (client GroupUserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, groupID string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "groupId": autorest.Encode("path", groupID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -306,7 +306,7 @@ func (client GroupUserClient) DeletePreparer(ctx context.Context, resourceGroupN preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -330,20 +330,18 @@ func (client GroupUserClient) DeleteResponder(resp *http.Response) (result autor return } -// List lists a collection of the members of the group, specified by its identifier. +// List lists a collection of user entities associated with the group. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // groupID - group identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |------------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | N/A | -// | registrationDate | ge, le, eq, ne, gt, lt | N/A | -// | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| registrationDate | filter | ge, le, eq, ne, gt, lt | |
| +// note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client GroupUserClient) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result UserCollectionPage, err error) { @@ -363,9 +361,9 @@ func (client GroupUserClient) List(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -406,7 +404,7 @@ func (client GroupUserClient) ListPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go index 16d2a80365e6..213780d12b43 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/identityprovider.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/identityprovider.go @@ -104,7 +104,7 @@ func (client IdentityProviderClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client IdentityProviderClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -286,7 +286,7 @@ func (client IdentityProviderClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -373,7 +373,7 @@ func (client IdentityProviderClient) GetEntityTagPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -458,7 +458,7 @@ func (client IdentityProviderClient) ListByServicePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -585,7 +585,7 @@ func (client IdentityProviderClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go new file mode 100644 index 000000000000..062b226562ad --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go @@ -0,0 +1,280 @@ +package apimanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// IssueClient is the apiManagement Client +type IssueClient struct { + BaseClient +} + +// NewIssueClient creates an instance of the IssueClient client. +func NewIssueClient(subscriptionID string) IssueClient { + return NewIssueClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewIssueClientWithBaseURI creates an instance of the IssueClient client. +func NewIssueClientWithBaseURI(baseURI string, subscriptionID string) IssueClient { + return IssueClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets API Management issue details +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// issueID - issue identifier. Must be unique in the current API Management service instance. +func (client IssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, issueID string) (result IssueContract, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IssueClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: issueID, + Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.IssueClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, issueID) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client IssueClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, issueID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "issueId": autorest.Encode("path", issueID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client IssueClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client IssueClient) GetResponder(resp *http.Response) (result IssueContract, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByService lists a collection of issues in the specified service instance. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| apiId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| title | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| authorName | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| state | filter | eq | |
+// top - number of records to return. +// skip - number of records to skip. +func (client IssueClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result IssueCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IssueClient.ListByService") + defer func() { + sc := -1 + if result.ic.Response.Response != nil { + sc = result.ic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("apimanagement.IssueClient", "ListByService", err.Error()) + } + + result.fn = client.listByServiceNextResults + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "ListByService", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServiceSender(req) + if err != nil { + result.ic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "ListByService", resp, "Failure sending request") + return + } + + result.ic, err = client.ListByServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "ListByService", resp, "Failure responding to request") + } + + return +} + +// ListByServicePreparer prepares the ListByService request. +func (client IssueClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if skip != nil { + queryParameters["$skip"] = autorest.Encode("query", *skip) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServiceSender sends the ListByService request. The method will close the +// http.Response Body if it receives an error. +func (client IssueClient) ListByServiceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByServiceResponder handles the response to the ListByService request. The method always +// closes the http.Response Body. +func (client IssueClient) ListByServiceResponder(resp *http.Response) (result IssueCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServiceNextResults retrieves the next set of results, if any. +func (client IssueClient) listByServiceNextResults(ctx context.Context, lastResults IssueCollection) (result IssueCollection, err error) { + req, err := lastResults.issueCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "apimanagement.IssueClient", "listByServiceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServiceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "apimanagement.IssueClient", "listByServiceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.IssueClient", "listByServiceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client IssueClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result IssueCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/IssueClient.ListByService") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go index 620b59f425c1..f9d209154fce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go @@ -45,10 +45,10 @@ func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerCli // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// loggerid - logger identifier. Must be unique in the API Management service instance. +// loggerID - logger identifier. Must be unique in the API Management service instance. // parameters - create parameters. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerContract, ifMatch string) (result LoggerContract, err error) { +func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerContract, ifMatch string) (result LoggerContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.CreateOrUpdate") defer func() { @@ -64,9 +64,9 @@ func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: loggerID, + Constraints: []validation.Constraint{{Target: "loggerID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "loggerID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.LoggerContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.LoggerContractProperties.Description", Name: validation.Null, Rule: false, @@ -76,7 +76,7 @@ func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName return result, validation.NewError("apimanagement.LoggerClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, loggerid, parameters, ifMatch) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, loggerID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -98,15 +98,15 @@ func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client LoggerClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerContract, ifMatch string) (*http.Request, error) { +func (client LoggerClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "loggerid": autorest.Encode("path", loggerid), + "loggerId": autorest.Encode("path", loggerID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -115,7 +115,7 @@ func (client LoggerClient) CreateOrUpdatePreparer(ctx context.Context, resourceG autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) if len(ifMatch) > 0 { @@ -149,10 +149,11 @@ func (client LoggerClient) CreateOrUpdateResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// loggerid - logger identifier. Must be unique in the API Management service instance. +// loggerID - logger identifier. Must be unique in the API Management service instance. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (result autorest.Response, err error) { +// force - force deletion even if diagnostic is attached. +func (client LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, force *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Delete") defer func() { @@ -168,13 +169,13 @@ func (client LoggerClient) Delete(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: loggerID, + Constraints: []validation.Constraint{{Target: "loggerID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "loggerID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, loggerid, ifMatch) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, loggerID, ifMatch, force) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "Delete", nil, "Failure preparing request") return @@ -196,23 +197,26 @@ func (client LoggerClient) Delete(ctx context.Context, resourceGroupName string, } // DeletePreparer prepares the Delete request. -func (client LoggerClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (*http.Request, error) { +func (client LoggerClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, ifMatch string, force *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ - "loggerid": autorest.Encode("path", loggerid), + "loggerId": autorest.Encode("path", loggerID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if force != nil { + queryParameters["force"] = autorest.Encode("query", *force) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", pathParameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -241,8 +245,8 @@ func (client LoggerClient) DeleteResponder(resp *http.Response) (result autorest // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result LoggerContract, err error) { +// loggerID - logger identifier. Must be unique in the API Management service instance. +func (client LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result LoggerContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Get") defer func() { @@ -258,13 +262,13 @@ func (client LoggerClient) Get(ctx context.Context, resourceGroupName string, se Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: loggerID, + Constraints: []validation.Constraint{{Target: "loggerID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "loggerID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, loggerid) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, loggerID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "Get", nil, "Failure preparing request") return @@ -286,15 +290,15 @@ func (client LoggerClient) Get(ctx context.Context, resourceGroupName string, se } // GetPreparer prepares the Get request. -func (client LoggerClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (*http.Request, error) { +func (client LoggerClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "loggerid": autorest.Encode("path", loggerid), + "loggerId": autorest.Encode("path", loggerID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -302,7 +306,7 @@ func (client LoggerClient) GetPreparer(ctx context.Context, resourceGroupName st preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -331,8 +335,8 @@ func (client LoggerClient) GetResponder(resp *http.Response) (result LoggerContr // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// loggerid - logger identifier. Must be unique in the API Management service instance. -func (client LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result autorest.Response, err error) { +// loggerID - logger identifier. Must be unique in the API Management service instance. +func (client LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.GetEntityTag") defer func() { @@ -348,13 +352,13 @@ func (client LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: loggerID, + Constraints: []validation.Constraint{{Target: "loggerID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "loggerID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "GetEntityTag", err.Error()) } - req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, loggerid) + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, loggerID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "GetEntityTag", nil, "Failure preparing request") return @@ -376,15 +380,15 @@ func (client LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName s } // GetEntityTagPreparer prepares the GetEntityTag request. -func (client LoggerClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (*http.Request, error) { +func (client LoggerClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "loggerid": autorest.Encode("path", loggerid), + "loggerId": autorest.Encode("path", loggerID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -392,7 +396,7 @@ func (client LoggerClient) GetEntityTagPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -420,10 +424,11 @@ func (client LoggerClient) GetEntityTagResponder(resp *http.Response) (result au // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | type | eq | | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| loggerType | filter | eq | |
| resourceId | +// filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result LoggerCollectionPage, err error) { @@ -481,7 +486,7 @@ func (client LoggerClient) ListByServicePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -564,11 +569,11 @@ func (client LoggerClient) ListByServiceComplete(ctx context.Context, resourceGr // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// loggerid - logger identifier. Must be unique in the API Management service instance. +// loggerID - logger identifier. Must be unique in the API Management service instance. // parameters - update parameters. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) { +func (client LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Update") defer func() { @@ -584,13 +589,13 @@ func (client LoggerClient) Update(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: loggerid, - Constraints: []validation.Constraint{{Target: "loggerid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "loggerid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: loggerID, + Constraints: []validation.Constraint{{Target: "loggerID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "loggerID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, loggerid, parameters, ifMatch) + req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, loggerID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "Update", nil, "Failure preparing request") return @@ -612,15 +617,15 @@ func (client LoggerClient) Update(ctx context.Context, resourceGroupName string, } // UpdatePreparer prepares the Update request. -func (client LoggerClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerUpdateContract, ifMatch string) (*http.Request, error) { +func (client LoggerClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, loggerID string, parameters LoggerUpdateContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "loggerid": autorest.Encode("path", loggerid), + "loggerId": autorest.Encode("path", loggerID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -629,7 +634,7 @@ func (client LoggerClient) UpdatePreparer(ctx context.Context, resourceGroupName autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go index 66cc9d44cc66..44a25c0eb6fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/models.go @@ -30,7 +30,20 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement" + +// AlwaysLog enumerates the values for always log. +type AlwaysLog string + +const ( + // AllErrors Always log all erroneous request regardless of sampling settings. + AllErrors AlwaysLog = "allErrors" +) + +// PossibleAlwaysLogValues returns an array of possible values for the AlwaysLog const type. +func PossibleAlwaysLogValues() []AlwaysLog { + return []AlwaysLog{AllErrors} +} // APIType enumerates the values for api type. type APIType string @@ -190,6 +203,12 @@ func PossibleConnectivityStatusTypeValues() []ConnectivityStatusType { type ContentFormat string const ( + // Openapi The contents are inline and Content Type is a OpenApi 3.0 Document in YAML format. + Openapi ContentFormat = "openapi" + // Openapijson The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format. + Openapijson ContentFormat = "openapi+json" + // OpenapiLink The Open Api 3.0 document is hosted on a publicly accessible internet address. + OpenapiLink ContentFormat = "openapi-link" // SwaggerJSON The contents are inline and Content Type is a OpenApi 2.0 Document. SwaggerJSON ContentFormat = "swagger-json" // SwaggerLinkJSON The Open Api 2.0 document is hosted on a publicly accessible internet address. @@ -206,13 +225,15 @@ const ( // PossibleContentFormatValues returns an array of possible values for the ContentFormat const type. func PossibleContentFormatValues() []ContentFormat { - return []ContentFormat{SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink} + return []ContentFormat{Openapi, Openapijson, OpenapiLink, SwaggerJSON, SwaggerLinkJSON, WadlLinkJSON, WadlXML, Wsdl, WsdlLink} } // ExportFormat enumerates the values for export format. type ExportFormat string const ( + // ExportFormatOpenapi Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. + ExportFormatOpenapi ExportFormat = "openapi-link" // ExportFormatSwagger Export the Api Definition in OpenApi Specification 2.0 format to the Storage Blob. ExportFormatSwagger ExportFormat = "swagger-link" // ExportFormatWadl Export the Api Definition in WADL Schema to Storage Blob. @@ -224,7 +245,28 @@ const ( // PossibleExportFormatValues returns an array of possible values for the ExportFormat const type. func PossibleExportFormatValues() []ExportFormat { - return []ExportFormat{ExportFormatSwagger, ExportFormatWadl, ExportFormatWsdl} + return []ExportFormat{ExportFormatOpenapi, ExportFormatSwagger, ExportFormatWadl, ExportFormatWsdl} +} + +// ExportResultFormat enumerates the values for export result format. +type ExportResultFormat string + +const ( + // ExportResultFormatOpenAPI Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. + ExportResultFormatOpenAPI ExportResultFormat = "openapi-link" + // ExportResultFormatSwagger The Api Definition is exported in OpenApi Specification 2.0 format to the + // Storage Blob. + ExportResultFormatSwagger ExportResultFormat = "swagger-link-json" + // ExportResultFormatWadl Export the Api Definition in WADL Schema to Storage Blob. + ExportResultFormatWadl ExportResultFormat = "wadl-link-json" + // ExportResultFormatWsdl The Api Definition is exported in WSDL Schema to Storage Blob. This is only + // supported for APIs of Type `soap` + ExportResultFormatWsdl ExportResultFormat = "wsdl-link+xml" +) + +// PossibleExportResultFormatValues returns an array of possible values for the ExportResultFormat const type. +func PossibleExportResultFormatValues() []ExportResultFormat { + return []ExportResultFormat{ExportResultFormatOpenAPI, ExportResultFormatSwagger, ExportResultFormatWadl, ExportResultFormatWsdl} } // GrantType enumerates the values for grant type. @@ -270,6 +312,8 @@ func PossibleGroupTypeValues() []GroupType { type HostnameType string const ( + // DeveloperPortal ... + DeveloperPortal HostnameType = "DeveloperPortal" // Management ... Management HostnameType = "Management" // Portal ... @@ -282,7 +326,7 @@ const ( // PossibleHostnameTypeValues returns an array of possible values for the HostnameType const type. func PossibleHostnameTypeValues() []HostnameType { - return []HostnameType{Management, Portal, Proxy, Scm} + return []HostnameType{DeveloperPortal, Management, Portal, Proxy, Scm} } // IdentityProviderType enumerates the values for identity provider type. @@ -406,6 +450,21 @@ func PossiblePolicyContentFormatValues() []PolicyContentFormat { return []PolicyContentFormat{Rawxml, RawxmlLink, XML, XMLLink} } +// PolicyExportFormat enumerates the values for policy export format. +type PolicyExportFormat string + +const ( + // PolicyExportFormatRawxml The contents are inline and Content type is a non XML encoded policy document. + PolicyExportFormatRawxml PolicyExportFormat = "rawxml" + // PolicyExportFormatXML The contents are inline and Content type is an XML document. + PolicyExportFormatXML PolicyExportFormat = "xml" +) + +// PossiblePolicyExportFormatValues returns an array of possible values for the PolicyExportFormat const type. +func PossiblePolicyExportFormatValues() []PolicyExportFormat { + return []PolicyExportFormat{PolicyExportFormatRawxml, PolicyExportFormatXML} +} + // PolicyScopeContract enumerates the values for policy scope contract. type PolicyScopeContract string @@ -461,11 +520,11 @@ func PossibleProtocolValues() []Protocol { type ResourceSkuCapacityScaleType string const ( - // Automatic ... + // Automatic Supported scale type automatic. Automatic ResourceSkuCapacityScaleType = "automatic" - // Manual ... + // Manual Supported scale type manual. Manual ResourceSkuCapacityScaleType = "manual" - // None ... + // None Scaling not supported. None ResourceSkuCapacityScaleType = "none" ) @@ -474,12 +533,27 @@ func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType return []ResourceSkuCapacityScaleType{Automatic, Manual, None} } +// SamplingType enumerates the values for sampling type. +type SamplingType string + +const ( + // Fixed Fixed-rate sampling. + Fixed SamplingType = "fixed" +) + +// PossibleSamplingTypeValues returns an array of possible values for the SamplingType const type. +func PossibleSamplingTypeValues() []SamplingType { + return []SamplingType{Fixed} +} + // SkuType enumerates the values for sku type. type SkuType string const ( // SkuTypeBasic Basic SKU of Api Management. SkuTypeBasic SkuType = "Basic" + // SkuTypeConsumption Consumption SKU of Api Management. + SkuTypeConsumption SkuType = "Consumption" // SkuTypeDeveloper Developer SKU of Api Management. SkuTypeDeveloper SkuType = "Developer" // SkuTypePremium Premium SKU of Api Management. @@ -490,7 +564,7 @@ const ( // PossibleSkuTypeValues returns an array of possible values for the SkuType const type. func PossibleSkuTypeValues() []SkuType { - return []SkuType{SkuTypeBasic, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard} + return []SkuType{SkuTypeBasic, SkuTypeConsumption, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard} } // SoapAPIType enumerates the values for soap api type. @@ -686,17 +760,56 @@ type AccessInformationContract struct { PrimaryKey *string `json:"primaryKey,omitempty"` // SecondaryKey - Secondary access key. SecondaryKey *string `json:"secondaryKey,omitempty"` - // Enabled - Tenant access information of the API Management service. + // Enabled - Determines whether direct access is enabled. Enabled *bool `json:"enabled,omitempty"` } -// AccessInformationUpdateParameters tenant access information update parameters of the API Management -// service. -type AccessInformationUpdateParameters struct { - // Enabled - Tenant access information of the API Management service. +// AccessInformationUpdateParameterProperties tenant access information update parameters of the API +// Management service +type AccessInformationUpdateParameterProperties struct { + // Enabled - Determines whether direct access is enabled. Enabled *bool `json:"enabled,omitempty"` } +// AccessInformationUpdateParameters tenant access information update parameters. +type AccessInformationUpdateParameters struct { + // AccessInformationUpdateParameterProperties - Tenant access information update parameter properties. + *AccessInformationUpdateParameterProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AccessInformationUpdateParameters. +func (aiup AccessInformationUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aiup.AccessInformationUpdateParameterProperties != nil { + objectMap["properties"] = aiup.AccessInformationUpdateParameterProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AccessInformationUpdateParameters struct. +func (aiup *AccessInformationUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var accessInformationUpdateParameterProperties AccessInformationUpdateParameterProperties + err = json.Unmarshal(*v, &accessInformationUpdateParameterProperties) + if err != nil { + return err + } + aiup.AccessInformationUpdateParameterProperties = &accessInformationUpdateParameterProperties + } + } + } + + return nil +} + // AdditionalLocation description of an additional API Management resource location. type AdditionalLocation struct { // Location - The location name of the additional region among Azure Data center regions. @@ -859,7 +972,7 @@ func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APIC return APICollectionPage{fn: getNextPage} } -// APIContract API details. +// APIContract api details. type APIContract struct { autorest.Response `json:"-"` // APIContractProperties - Api entity contract properties. @@ -934,14 +1047,17 @@ func (ac *APIContract) UnmarshalJSON(body []byte) error { // APIContractProperties api Entity Properties type APIContractProperties struct { - // DisplayName - API name. + // SourceAPIID - API identifier of the source API. + SourceAPIID *string `json:"sourceApiId,omitempty"` + // DisplayName - API name. Must be 1 to 300 characters long. DisplayName *string `json:"displayName,omitempty"` - // ServiceURL - Absolute URL of the backend service implementing this API. + // ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. ServiceURL *string `json:"serviceUrl,omitempty"` // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. Path *string `json:"path,omitempty"` // Protocols - Describes on which protocols the operations in this API can be invoked. - Protocols *[]Protocol `json:"protocols,omitempty"` + Protocols *[]Protocol `json:"protocols,omitempty"` + // APIVersionSet - Version set details APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"` // Description - Description of the API. May include HTML formatting tags. Description *string `json:"description,omitempty"` @@ -955,7 +1071,7 @@ type APIContractProperties struct { APIRevision *string `json:"apiRevision,omitempty"` // APIVersion - Indicates the Version identifier of the API if the API is versioned APIVersion *string `json:"apiVersion,omitempty"` - // IsCurrent - READ-ONLY; Indicates if API revision is current api revision. + // IsCurrent - Indicates if API revision is current api revision. IsCurrent *bool `json:"isCurrent,omitempty"` // IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway. IsOnline *bool `json:"isOnline,omitempty"` @@ -965,6 +1081,8 @@ type APIContractProperties struct { APIVersionDescription *string `json:"apiVersionDescription,omitempty"` // APIVersionSetID - A resource identifier for the related ApiVersionSet. APIVersionSetID *string `json:"apiVersionSetId,omitempty"` + // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` } // APIContractUpdateProperties API update contract properties. @@ -989,7 +1107,7 @@ type APIContractUpdateProperties struct { APIRevision *string `json:"apiRevision,omitempty"` // APIVersion - Indicates the Version identifier of the API if the API is versioned APIVersion *string `json:"apiVersion,omitempty"` - // IsCurrent - READ-ONLY; Indicates if API revision is current api revision. + // IsCurrent - Indicates if API revision is current api revision. IsCurrent *bool `json:"isCurrent,omitempty"` // IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway. IsOnline *bool `json:"isOnline,omitempty"` @@ -999,6 +1117,37 @@ type APIContractUpdateProperties struct { APIVersionDescription *string `json:"apiVersionDescription,omitempty"` // APIVersionSetID - A resource identifier for the related ApiVersionSet. APIVersionSetID *string `json:"apiVersionSetId,omitempty"` + // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` +} + +// APICreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type APICreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *APICreateOrUpdateFuture) Result(client APIClient) (ac APIContract, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("apimanagement.APICreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ac.Response.Response, err = future.GetResult(sender); err == nil && ac.Response.Response.StatusCode != http.StatusNoContent { + ac, err = client.CreateOrUpdateResponder(ac.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.APICreateOrUpdateFuture", "Result", ac.Response.Response, "Failure responding to request") + } + } + return } // APICreateOrUpdateParameter API Create or Update Parameters. @@ -1042,24 +1191,27 @@ func (acoup *APICreateOrUpdateParameter) UnmarshalJSON(body []byte) error { // APICreateOrUpdateProperties api Create or Update Properties. type APICreateOrUpdateProperties struct { - // ContentValue - Content value when Importing an API. - ContentValue *string `json:"contentValue,omitempty"` - // ContentFormat - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink' - ContentFormat ContentFormat `json:"contentFormat,omitempty"` + // Value - Content value when Importing an API. + Value *string `json:"value,omitempty"` + // Format - Format of the Content in which the API is getting imported. Possible values include: 'WadlXML', 'WadlLinkJSON', 'SwaggerJSON', 'SwaggerLinkJSON', 'Wsdl', 'WsdlLink', 'Openapi', 'Openapijson', 'OpenapiLink' + Format ContentFormat `json:"format,omitempty"` // WsdlSelector - Criteria to limit import of WSDL to a subset of the document. WsdlSelector *APICreateOrUpdatePropertiesWsdlSelector `json:"wsdlSelector,omitempty"` // SoapAPIType - Type of Api to create. // * `http` creates a SOAP to REST API // * `soap` creates a SOAP pass-through API. Possible values include: 'SoapToRest', 'SoapPassThrough' SoapAPIType SoapAPIType `json:"apiType,omitempty"` - // DisplayName - API name. + // SourceAPIID - API identifier of the source API. + SourceAPIID *string `json:"sourceApiId,omitempty"` + // DisplayName - API name. Must be 1 to 300 characters long. DisplayName *string `json:"displayName,omitempty"` - // ServiceURL - Absolute URL of the backend service implementing this API. + // ServiceURL - Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. ServiceURL *string `json:"serviceUrl,omitempty"` // Path - Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. Path *string `json:"path,omitempty"` // Protocols - Describes on which protocols the operations in this API can be invoked. - Protocols *[]Protocol `json:"protocols,omitempty"` + Protocols *[]Protocol `json:"protocols,omitempty"` + // APIVersionSet - Version set details APIVersionSet *APIVersionSetContractDetails `json:"apiVersionSet,omitempty"` // Description - Description of the API. May include HTML formatting tags. Description *string `json:"description,omitempty"` @@ -1073,7 +1225,7 @@ type APICreateOrUpdateProperties struct { APIRevision *string `json:"apiRevision,omitempty"` // APIVersion - Indicates the Version identifier of the API if the API is versioned APIVersion *string `json:"apiVersion,omitempty"` - // IsCurrent - READ-ONLY; Indicates if API revision is current api revision. + // IsCurrent - Indicates if API revision is current api revision. IsCurrent *bool `json:"isCurrent,omitempty"` // IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway. IsOnline *bool `json:"isOnline,omitempty"` @@ -1083,6 +1235,8 @@ type APICreateOrUpdateProperties struct { APIVersionDescription *string `json:"apiVersionDescription,omitempty"` // APIVersionSetID - A resource identifier for the related ApiVersionSet. APIVersionSetID *string `json:"apiVersionSetId,omitempty"` + // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` } // APICreateOrUpdatePropertiesWsdlSelector criteria to limit import of WSDL to a subset of the document. @@ -1107,7 +1261,7 @@ type APIEntityBaseContract struct { APIRevision *string `json:"apiRevision,omitempty"` // APIVersion - Indicates the Version identifier of the API if the API is versioned APIVersion *string `json:"apiVersion,omitempty"` - // IsCurrent - READ-ONLY; Indicates if API revision is current api revision. + // IsCurrent - Indicates if API revision is current api revision. IsCurrent *bool `json:"isCurrent,omitempty"` // IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway. IsOnline *bool `json:"isOnline,omitempty"` @@ -1117,11 +1271,23 @@ type APIEntityBaseContract struct { APIVersionDescription *string `json:"apiVersionDescription,omitempty"` // APIVersionSetID - A resource identifier for the related ApiVersionSet. APIVersionSetID *string `json:"apiVersionSetId,omitempty"` + // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` } -// APIExportResult API Export result Blob Uri. +// APIExportResult API Export result. type APIExportResult struct { autorest.Response `json:"-"` + // ID - ResourceId of the API which was exported. + ID *string `json:"id,omitempty"` + // ExportResultFormat - Format in which the Api Details are exported to the Storage Blob with Sas Key valid for 5 minutes. Possible values include: 'ExportResultFormatSwagger', 'ExportResultFormatWsdl', 'ExportResultFormatWadl', 'ExportResultFormatOpenAPI' + ExportResultFormat ExportResultFormat `json:"format,omitempty"` + // Value - The object defining the schema of the exported Api Detail + Value *APIExportResultValue `json:"value,omitempty"` +} + +// APIExportResultValue the object defining the schema of the exported Api Detail +type APIExportResultValue struct { // Link - Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. Link *string `json:"link,omitempty"` } @@ -1147,7 +1313,7 @@ func (ar ApimResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// APIReleaseCollection paged Api Revision list representation. +// APIReleaseCollection paged ApiRelease list representation. type APIReleaseCollection struct { autorest.Response `json:"-"` // Value - READ-ONLY; Page values. @@ -1293,10 +1459,10 @@ func NewAPIReleaseCollectionPage(getNextPage func(context.Context, APIReleaseCol return APIReleaseCollectionPage{fn: getNextPage} } -// APIReleaseContract api Release details. +// APIReleaseContract apiRelease details. type APIReleaseContract struct { autorest.Response `json:"-"` - // APIReleaseContractProperties - Properties of the Api Release Contract. + // APIReleaseContractProperties - ApiRelease entity contract properties. *APIReleaseContractProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource ID. ID *string `json:"id,omitempty"` @@ -1581,7 +1747,7 @@ type APITagResourceContractProperties struct { APIRevision *string `json:"apiRevision,omitempty"` // APIVersion - Indicates the Version identifier of the API if the API is versioned APIVersion *string `json:"apiVersion,omitempty"` - // IsCurrent - READ-ONLY; Indicates if API revision is current api revision. + // IsCurrent - Indicates if API revision is current api revision. IsCurrent *bool `json:"isCurrent,omitempty"` // IsOnline - READ-ONLY; Indicates if API revision is accessible via the gateway. IsOnline *bool `json:"isOnline,omitempty"` @@ -1591,6 +1757,8 @@ type APITagResourceContractProperties struct { APIVersionDescription *string `json:"apiVersionDescription,omitempty"` // APIVersionSetID - A resource identifier for the related ApiVersionSet. APIVersionSetID *string `json:"apiVersionSetId,omitempty"` + // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API. + SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` } // APIUpdateContract API update contract details. @@ -1856,6 +2024,8 @@ func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error { type APIVersionSetContractDetails struct { // ID - Identifier for existing API Version Set. Omit this value to create a new Version Set. ID *string `json:"id,omitempty"` + // Name - The display Name of the API Version Set. + Name *string `json:"name,omitempty"` // Description - Description of API Version Set. Description *string `json:"description,omitempty"` // VersioningScheme - An value that determines where the API Version identifer will be located in a HTTP request. Possible values include: 'VersioningScheme1Segment', 'VersioningScheme1Query', 'VersioningScheme1Header' @@ -2820,6 +2990,290 @@ func (bup *BackendUpdateParameters) UnmarshalJSON(body []byte) error { return nil } +// BodyDiagnosticSettings body logging settings. +type BodyDiagnosticSettings struct { + // Bytes - Number of request body bytes to log. + Bytes *int32 `json:"bytes,omitempty"` +} + +// CacheCollection paged Caches list representation. +type CacheCollection struct { + autorest.Response `json:"-"` + // Value - Page values. + Value *[]CacheContract `json:"value,omitempty"` + // NextLink - Next page link if any. + NextLink *string `json:"nextLink,omitempty"` +} + +// CacheCollectionIterator provides access to a complete listing of CacheContract values. +type CacheCollectionIterator struct { + i int + page CacheCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *CacheCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *CacheCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CacheCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter CacheCollectionIterator) Response() CacheCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter CacheCollectionIterator) Value() CacheContract { + if !iter.page.NotDone() { + return CacheContract{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CacheCollectionIterator type. +func NewCacheCollectionIterator(page CacheCollectionPage) CacheCollectionIterator { + return CacheCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cc CacheCollection) IsEmpty() bool { + return cc.Value == nil || len(*cc.Value) == 0 +} + +// cacheCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cc CacheCollection) cacheCollectionPreparer(ctx context.Context) (*http.Request, error) { + if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cc.NextLink))) +} + +// CacheCollectionPage contains a page of CacheContract values. +type CacheCollectionPage struct { + fn func(context.Context, CacheCollection) (CacheCollection, error) + cc CacheCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *CacheCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CacheCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.cc) + if err != nil { + return err + } + page.cc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *CacheCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CacheCollectionPage) NotDone() bool { + return !page.cc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CacheCollectionPage) Response() CacheCollection { + return page.cc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CacheCollectionPage) Values() []CacheContract { + if page.cc.IsEmpty() { + return nil + } + return *page.cc.Value +} + +// Creates a new instance of the CacheCollectionPage type. +func NewCacheCollectionPage(getNextPage func(context.Context, CacheCollection) (CacheCollection, error)) CacheCollectionPage { + return CacheCollectionPage{fn: getNextPage} +} + +// CacheContract cache details. +type CacheContract struct { + autorest.Response `json:"-"` + // CacheContractProperties - Cache properties details. + *CacheContractProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type for API Management resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for CacheContract. +func (cc CacheContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cc.CacheContractProperties != nil { + objectMap["properties"] = cc.CacheContractProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CacheContract struct. +func (cc *CacheContract) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var cacheContractProperties CacheContractProperties + err = json.Unmarshal(*v, &cacheContractProperties) + if err != nil { + return err + } + cc.CacheContractProperties = &cacheContractProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cc.Type = &typeVar + } + } + } + + return nil +} + +// CacheContractProperties properties of the Cache contract. +type CacheContractProperties struct { + // Description - Cache description + Description *string `json:"description,omitempty"` + // ConnectionString - Runtime connection string to cache + ConnectionString *string `json:"connectionString,omitempty"` + // ResourceID - Original uri of entity in external system cache points to + ResourceID *string `json:"resourceId,omitempty"` +} + +// CacheUpdateParameters cache update details. +type CacheUpdateParameters struct { + // CacheUpdateProperties - Cache update properties details. + *CacheUpdateProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for CacheUpdateParameters. +func (cup CacheUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cup.CacheUpdateProperties != nil { + objectMap["properties"] = cup.CacheUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CacheUpdateParameters struct. +func (cup *CacheUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var cacheUpdateProperties CacheUpdateProperties + err = json.Unmarshal(*v, &cacheUpdateProperties) + if err != nil { + return err + } + cup.CacheUpdateProperties = &cacheUpdateProperties + } + } + } + + return nil +} + +// CacheUpdateProperties parameters supplied to the Update Cache operation. +type CacheUpdateProperties struct { + // Description - Cache description + Description *string `json:"description,omitempty"` + // ConnectionString - Runtime connection string to cache + ConnectionString *string `json:"connectionString,omitempty"` + // ResourceID - Original uri of entity in external system cache points to + ResourceID *string `json:"resourceId,omitempty"` +} + // CertificateCollection paged Certificates list representation. type CertificateCollection struct { autorest.Response `json:"-"` @@ -3111,7 +3565,6 @@ type CertificateCreateOrUpdateProperties struct { // CertificateInformation SSL certificate information. type CertificateInformation struct { - autorest.Response `json:"-"` // Expiry - Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Expiry *date.Time `json:"expiry,omitempty"` // Thumbprint - Thumbprint of the certificate. @@ -3134,21 +3587,53 @@ type ConnectivityStatusContract struct { LastStatusChange *date.Time `json:"lastStatusChange,omitempty"` } -// CurrentUserIdentity ... -type CurrentUserIdentity struct { - autorest.Response `json:"-"` - // ID - API Management service user id. - ID *string `json:"id,omitempty"` -} - -// DeployConfigurationParameters parameters supplied to the Deploy Configuration operation. -type DeployConfigurationParameters struct { +// DeployConfigurationParameterProperties parameters supplied to the Deploy Configuration operation. +type DeployConfigurationParameterProperties struct { // Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database. Branch *string `json:"branch,omitempty"` // Force - The value enforcing deleting subscriptions to products that are deleted in this update. Force *bool `json:"force,omitempty"` } +// DeployConfigurationParameters deploy Tenant Configuration Contract. +type DeployConfigurationParameters struct { + // DeployConfigurationParameterProperties - Deploy Configuration Parameter contract properties. + *DeployConfigurationParameterProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployConfigurationParameters. +func (dcp DeployConfigurationParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dcp.DeployConfigurationParameterProperties != nil { + objectMap["properties"] = dcp.DeployConfigurationParameterProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for DeployConfigurationParameters struct. +func (dcp *DeployConfigurationParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var deployConfigurationParameterProperties DeployConfigurationParameterProperties + err = json.Unmarshal(*v, &deployConfigurationParameterProperties) + if err != nil { + return err + } + dcp.DeployConfigurationParameterProperties = &deployConfigurationParameterProperties + } + } + } + + return nil +} + // DiagnosticCollection paged Diagnostic list representation. type DiagnosticCollection struct { autorest.Response `json:"-"` @@ -3370,8 +3855,18 @@ func (dc *DiagnosticContract) UnmarshalJSON(body []byte) error { // DiagnosticContractProperties diagnostic Entity Properties type DiagnosticContractProperties struct { - // Enabled - Indicates whether a diagnostic should receive data or not. - Enabled *bool `json:"enabled,omitempty"` + // AlwaysLog - Specifies for what type of messages sampling settings should not apply. Possible values include: 'AllErrors' + AlwaysLog AlwaysLog `json:"alwaysLog,omitempty"` + // LoggerID - Resource Id of a target logger. + LoggerID *string `json:"loggerId,omitempty"` + // Sampling - Sampling settings for Diagnostic. + Sampling *SamplingSettings `json:"sampling,omitempty"` + // Frontend - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"` + // Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend + Backend *PipelineDiagnosticSettings `json:"backend,omitempty"` + // EnableHTTPCorrelationHeaders - Whether to process Correlation Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true. + EnableHTTPCorrelationHeaders *bool `json:"enableHttpCorrelationHeaders,omitempty"` } // EmailTemplateCollection paged email template list representation. @@ -3967,7 +4462,7 @@ type GroupContractProperties struct { BuiltIn *bool `json:"builtIn,omitempty"` // Type - Group type. Possible values include: 'Custom', 'System', 'External' Type GroupType `json:"type,omitempty"` - // ExternalID - For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + // ExternalID - For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. ExternalID *string `json:"externalId,omitempty"` } @@ -4018,7 +4513,7 @@ type GroupCreateParametersProperties struct { Description *string `json:"description,omitempty"` // Type - Group type. Possible values include: 'Custom', 'System', 'External' Type GroupType `json:"type,omitempty"` - // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. ExternalID *string `json:"externalId,omitempty"` } @@ -4069,13 +4564,13 @@ type GroupUpdateParametersProperties struct { Description *string `json:"description,omitempty"` // Type - Group type. Possible values include: 'Custom', 'System', 'External' Type GroupType `json:"type,omitempty"` - // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://.onmicrosoft.com/groups/; otherwise the value is null. + // ExternalID - Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. ExternalID *string `json:"externalId,omitempty"` } // HostnameConfiguration custom hostname configuration. type HostnameConfiguration struct { - // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' + // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm', 'DeveloperPortal' Type HostnameType `json:"type,omitempty"` // HostName - Hostname to configure on the Api Management service. HostName *string `json:"hostName,omitempty"` @@ -4093,14 +4588,12 @@ type HostnameConfiguration struct { Certificate *CertificateInformation `json:"certificate,omitempty"` } -// HostnameConfigurationOld custom hostname configuration. -type HostnameConfigurationOld struct { - // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' - Type HostnameType `json:"type,omitempty"` - // Hostname - Hostname to configure. - Hostname *string `json:"hostname,omitempty"` - // Certificate - Certificate information. - Certificate *CertificateInformation `json:"certificate,omitempty"` +// HTTPMessageDiagnostic http message diagnostic settings. +type HTTPMessageDiagnostic struct { + // Headers - Array of HTTP Headers to log. + Headers *[]string `json:"headers,omitempty"` + // Body - Body logging settings. + Body *BodyDiagnosticSettings `json:"body,omitempty"` } // IdentityProviderBaseParameters identity Provider Base Parameter Properties. @@ -4109,6 +4602,8 @@ type IdentityProviderBaseParameters struct { Type IdentityProviderType `json:"type,omitempty"` // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. AllowedTenants *[]string `json:"allowedTenants,omitempty"` + // Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string `json:"authority,omitempty"` // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. SignupPolicyName *string `json:"signupPolicyName,omitempty"` // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. @@ -4204,6 +4699,8 @@ type IdentityProviderContractProperties struct { Type IdentityProviderType `json:"type,omitempty"` // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. AllowedTenants *[]string `json:"allowedTenants,omitempty"` + // Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string `json:"authority,omitempty"` // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. SignupPolicyName *string `json:"signupPolicyName,omitempty"` // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. @@ -4409,6 +4906,8 @@ type IdentityProviderUpdateProperties struct { Type IdentityProviderType `json:"type,omitempty"` // AllowedTenants - List of Allowed Tenants when configuring Azure Active Directory login. AllowedTenants *[]string `json:"allowedTenants,omitempty"` + // Authority - OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + Authority *string `json:"authority,omitempty"` // SignupPolicyName - Signup Policy Name. Only applies to AAD B2C Identity Provider. SignupPolicyName *string `json:"signupPolicyName,omitempty"` // SigninPolicyName - Signin Policy Name. Only applies to AAD B2C Identity Provider. @@ -5418,6 +5917,8 @@ type LoggerContractProperties struct { Credentials map[string]*string `json:"credentials"` // IsBuffered - Whether records are buffered in the logger before publishing. Default is assumed to be true. IsBuffered *bool `json:"isBuffered,omitempty"` + // ResourceID - Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). + ResourceID *string `json:"resourceId,omitempty"` } // MarshalJSON is the custom marshaler for LoggerContractProperties. @@ -5435,6 +5936,9 @@ func (lcp LoggerContractProperties) MarshalJSON() ([]byte, error) { if lcp.IsBuffered != nil { objectMap["isBuffered"] = lcp.IsBuffered } + if lcp.ResourceID != nil { + objectMap["resourceId"] = lcp.ResourceID + } return json.Marshal(objectMap) } @@ -6599,12 +7103,20 @@ type ParameterContract struct { Type *string `json:"type,omitempty"` // DefaultValue - Default parameter value. DefaultValue *string `json:"defaultValue,omitempty"` - // Required - whether parameter is required or not. + // Required - Specifies whether parameter is required or not. Required *bool `json:"required,omitempty"` // Values - Parameter values. Values *[]string `json:"values,omitempty"` } +// PipelineDiagnosticSettings diagnostic settings for incoming/outgoing HTTP messages to the Gateway. +type PipelineDiagnosticSettings struct { + // Request - Diagnostic settings for request. + Request *HTTPMessageDiagnostic `json:"request,omitempty"` + // Response - Diagnostic settings for response. + Response *HTTPMessageDiagnostic `json:"response,omitempty"` +} + // PolicyCollection the response of the list policy operation. type PolicyCollection struct { autorest.Response `json:"-"` @@ -6689,10 +7201,10 @@ func (pc *PolicyContract) UnmarshalJSON(body []byte) error { // PolicyContractProperties policy contract Properties. type PolicyContractProperties struct { - // PolicyContent - Json escaped Xml Encoded contents of the Policy. - PolicyContent *string `json:"policyContent,omitempty"` - // ContentFormat - Format of the policyContent. Possible values include: 'XML', 'XMLLink', 'Rawxml', 'RawxmlLink' - ContentFormat PolicyContentFormat `json:"contentFormat,omitempty"` + // Value - Contents of the Policy as defined by the format. + Value *string `json:"value,omitempty"` + // Format - Format of the policyContent. Possible values include: 'XML', 'XMLLink', 'Rawxml', 'RawxmlLink' + Format PolicyContentFormat `json:"format,omitempty"` } // PolicySnippetContract policy snippet. @@ -7188,9 +7700,9 @@ type ProductContractProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -7204,9 +7716,9 @@ type ProductEntityBaseParameters struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -7224,9 +7736,9 @@ type ProductTagResourceContractProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -7281,9 +7793,9 @@ type ProductUpdateProperties struct { Terms *string `json:"terms,omitempty"` // SubscriptionRequired - Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"` - // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + // ApprovalRequired - whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. ApprovalRequired *bool `json:"approvalRequired,omitempty"` - // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + // SubscriptionsLimit - Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. SubscriptionsLimit *int32 `json:"subscriptionsLimit,omitempty"` // State - whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. Possible values include: 'NotPublished', 'Published' State ProductState `json:"state,omitempty"` @@ -8291,7 +8803,7 @@ type Resource struct { // ResourceSku describes an available API Management SKU. type ResourceSku struct { - // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic' + // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption' Name SkuType `json:"name,omitempty"` } @@ -8475,8 +8987,55 @@ type ResponseContract struct { Headers *[]ParameterContract `json:"headers,omitempty"` } -// SaveConfigurationParameter parameters supplied to the Save Tenant Configuration operation. +// SamplingSettings sampling settings for Diagnostic. +type SamplingSettings struct { + // SamplingType - Sampling type. Possible values include: 'Fixed' + SamplingType SamplingType `json:"samplingType,omitempty"` + // Percentage - Rate of sampling for fixed-rate sampling. + Percentage *float64 `json:"percentage,omitempty"` +} + +// SaveConfigurationParameter save Tenant Configuration Contract details. type SaveConfigurationParameter struct { + // SaveConfigurationParameterProperties - Properties of the Save Configuration Parameters. + *SaveConfigurationParameterProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SaveConfigurationParameter. +func (scp SaveConfigurationParameter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scp.SaveConfigurationParameterProperties != nil { + objectMap["properties"] = scp.SaveConfigurationParameterProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SaveConfigurationParameter struct. +func (scp *SaveConfigurationParameter) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var saveConfigurationParameterProperties SaveConfigurationParameterProperties + err = json.Unmarshal(*v, &saveConfigurationParameterProperties) + if err != nil { + return err + } + scp.SaveConfigurationParameterProperties = &saveConfigurationParameterProperties + } + } + } + + return nil +} + +// SaveConfigurationParameterProperties parameters supplied to the Save Tenant Configuration operation. +type SaveConfigurationParameterProperties struct { // Branch - The name of the Git branch in which to commit the current configuration snapshot. Branch *string `json:"branch,omitempty"` // Force - The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. @@ -8704,7 +9263,7 @@ func (sc *SchemaContract) UnmarshalJSON(body []byte) error { // SchemaContractProperties schema contract Properties. type SchemaContractProperties struct { - // ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). + // ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. ContentType *string `json:"contentType,omitempty"` // SchemaDocumentProperties - Properties of the Schema Document. *SchemaDocumentProperties `json:"document,omitempty"` @@ -8755,6 +9314,131 @@ func (scp *SchemaContractProperties) UnmarshalJSON(body []byte) error { return nil } +// SchemaCreateOrUpdateContract schema Contract details. +type SchemaCreateOrUpdateContract struct { + // SchemaCreateOrUpdateProperties - Properties of the Schema. + *SchemaCreateOrUpdateProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type for API Management resource. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SchemaCreateOrUpdateContract. +func (scouc SchemaCreateOrUpdateContract) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scouc.SchemaCreateOrUpdateProperties != nil { + objectMap["properties"] = scouc.SchemaCreateOrUpdateProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SchemaCreateOrUpdateContract struct. +func (scouc *SchemaCreateOrUpdateContract) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var schemaCreateOrUpdateProperties SchemaCreateOrUpdateProperties + err = json.Unmarshal(*v, &schemaCreateOrUpdateProperties) + if err != nil { + return err + } + scouc.SchemaCreateOrUpdateProperties = &schemaCreateOrUpdateProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + scouc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + scouc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + scouc.Type = &typeVar + } + } + } + + return nil +} + +// SchemaCreateOrUpdateProperties API Schema create or update contract Properties. +type SchemaCreateOrUpdateProperties struct { + // ContentType - Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
- `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
- `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
- `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
- `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + ContentType *string `json:"contentType,omitempty"` + // SchemaDocumentProperties - Create or update Properties of the Schema Document. + *SchemaDocumentProperties `json:"document,omitempty"` +} + +// MarshalJSON is the custom marshaler for SchemaCreateOrUpdateProperties. +func (scoup SchemaCreateOrUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if scoup.ContentType != nil { + objectMap["contentType"] = scoup.ContentType + } + if scoup.SchemaDocumentProperties != nil { + objectMap["document"] = scoup.SchemaDocumentProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SchemaCreateOrUpdateProperties struct. +func (scoup *SchemaCreateOrUpdateProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "contentType": + if v != nil { + var contentType string + err = json.Unmarshal(*v, &contentType) + if err != nil { + return err + } + scoup.ContentType = &contentType + } + case "document": + if v != nil { + var schemaDocumentProperties SchemaDocumentProperties + err = json.Unmarshal(*v, &schemaDocumentProperties) + if err != nil { + return err + } + scoup.SchemaDocumentProperties = &schemaDocumentProperties + } + } + } + + return nil +} + // SchemaDocumentProperties schema Document Properties. type SchemaDocumentProperties struct { // Value - Json escaped string defining the document representing the Schema. @@ -8873,6 +9557,8 @@ type ServiceBaseProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` + // EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"` // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -8898,6 +9584,9 @@ func (sbp ServiceBaseProperties) MarshalJSON() ([]byte, error) { if sbp.Certificates != nil { objectMap["certificates"] = sbp.Certificates } + if sbp.EnableClientCertificate != nil { + objectMap["enableClientCertificate"] = sbp.EnableClientCertificate + } if sbp.VirtualNetworkType != "" { objectMap["virtualNetworkType"] = sbp.VirtualNetworkType } @@ -8939,6 +9628,35 @@ func (future *ServiceCreateOrUpdateFuture) Result(client ServiceClient) (sr Serv return } +// ServiceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ServiceDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServiceDeleteFuture) Result(client ServiceClient) (sr ServiceResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceDeleteFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { + sr, err = client.DeleteResponder(sr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ServiceDeleteFuture", "Result", sr.Response.Response, "Failure responding to request") + } + } + return +} + // ServiceGetSsoTokenResult the response of the GetSsoToken operation. type ServiceGetSsoTokenResult struct { autorest.Response `json:"-"` @@ -9151,6 +9869,8 @@ type ServiceProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` + // EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"` // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9182,6 +9902,9 @@ func (sp ServiceProperties) MarshalJSON() ([]byte, error) { if sp.Certificates != nil { objectMap["certificates"] = sp.Certificates } + if sp.EnableClientCertificate != nil { + objectMap["enableClientCertificate"] = sp.EnableClientCertificate + } if sp.VirtualNetworkType != "" { objectMap["virtualNetworkType"] = sp.VirtualNetworkType } @@ -9359,9 +10082,9 @@ func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceReso // ServiceSkuProperties API Management service resource SKU properties. type ServiceSkuProperties struct { - // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic' + // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption' Name SkuType `json:"name,omitempty"` - // Capacity - Capacity of the SKU (number of deployed units of the SKU). The default value is 1. + // Capacity - Capacity of the SKU (number of deployed units of the SKU). Capacity *int32 `json:"capacity,omitempty"` } @@ -9394,43 +10117,6 @@ func (future *ServiceUpdateFuture) Result(client ServiceClient) (sr ServiceResou return } -// ServiceUpdateHostnameFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ServiceUpdateHostnameFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ServiceUpdateHostnameFuture) Result(client ServiceClient) (sr ServiceResource, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("apimanagement.ServiceUpdateHostnameFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { - sr, err = client.UpdateHostnameResponder(sr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceUpdateHostnameFuture", "Result", sr.Response.Response, "Failure responding to request") - } - } - return -} - -// ServiceUpdateHostnameParameters parameters supplied to the UpdateHostname operation. -type ServiceUpdateHostnameParameters struct { - // Update - Hostnames to create or update. - Update *[]HostnameConfigurationOld `json:"update,omitempty"` - // Delete - Hostnames types to delete. - Delete *[]HostnameType `json:"delete,omitempty"` -} - // ServiceUpdateParameters parameter supplied to Update Api Management Service. type ServiceUpdateParameters struct { // ServiceUpdateProperties - Properties of the API Management service. @@ -9594,6 +10280,8 @@ type ServiceUpdateProperties struct { CustomProperties map[string]*string `json:"customProperties"` // Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. Certificates *[]CertificateConfiguration `json:"certificates,omitempty"` + // EnableClientCertificate - Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + EnableClientCertificate *bool `json:"enableClientCertificate,omitempty"` // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal' VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"` } @@ -9625,23 +10313,15 @@ func (sup ServiceUpdateProperties) MarshalJSON() ([]byte, error) { if sup.Certificates != nil { objectMap["certificates"] = sup.Certificates } + if sup.EnableClientCertificate != nil { + objectMap["enableClientCertificate"] = sup.EnableClientCertificate + } if sup.VirtualNetworkType != "" { objectMap["virtualNetworkType"] = sup.VirtualNetworkType } return json.Marshal(objectMap) } -// ServiceUploadCertificateParameters parameters supplied to the Upload SSL certificate for an API -// Management service operation. -type ServiceUploadCertificateParameters struct { - // Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm' - Type HostnameType `json:"type,omitempty"` - // Certificate - Base64 Encoded certificate. - Certificate *string `json:"certificate,omitempty"` - // CertificatePassword - Certificate password. - CertificatePassword *string `json:"certificate_password,omitempty"` -} - // SubscriptionCollection paged Subscriptions list representation. type SubscriptionCollection struct { autorest.Response `json:"-"` @@ -9863,10 +10543,10 @@ func (sc *SubscriptionContract) UnmarshalJSON(body []byte) error { // SubscriptionContractProperties subscription details. type SubscriptionContractProperties struct { - // UserID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier. - UserID *string `json:"userId,omitempty"` - // ProductID - The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier. - ProductID *string `json:"productId,omitempty"` + // OwnerID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. + OwnerID *string `json:"ownerId,omitempty"` + // Scope - Scope like /products/{productId} or /apis or /apis/{apiId}. + Scope *string `json:"scope,omitempty"` // DisplayName - The name of the subscription, or null if the subscription has no name. DisplayName *string `json:"displayName,omitempty"` // State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled' @@ -9887,14 +10567,16 @@ type SubscriptionContractProperties struct { SecondaryKey *string `json:"secondaryKey,omitempty"` // StateComment - Optional subscription comment added by an administrator. StateComment *string `json:"stateComment,omitempty"` + // AllowTracing - Determines whether tracing is enabled + AllowTracing *bool `json:"allowTracing,omitempty"` } // SubscriptionCreateParameterProperties parameters supplied to the Create subscription operation. type SubscriptionCreateParameterProperties struct { - // UserID - User (user id path) for whom subscription is being created in form /users/{uid} - UserID *string `json:"userId,omitempty"` - // ProductID - Product (product id path) for which subscription is being created in form /products/{productId} - ProductID *string `json:"productId,omitempty"` + // OwnerID - User (user id path) for whom subscription is being created in form /users/{userId} + OwnerID *string `json:"ownerId,omitempty"` + // Scope - Scope like /products/{productId} or /apis or /apis/{apiId}. + Scope *string `json:"scope,omitempty"` // DisplayName - Subscription name. DisplayName *string `json:"displayName,omitempty"` // PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically. @@ -9903,6 +10585,8 @@ type SubscriptionCreateParameterProperties struct { SecondaryKey *string `json:"secondaryKey,omitempty"` // State - Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled' State SubscriptionState `json:"state,omitempty"` + // AllowTracing - Determines whether tracing can be enabled + AllowTracing *bool `json:"allowTracing,omitempty"` } // SubscriptionCreateParameters subscription create details. @@ -9960,10 +10644,10 @@ type SubscriptionsDelegationSettingsProperties struct { // SubscriptionUpdateParameterProperties parameters supplied to the Update subscription operation. type SubscriptionUpdateParameterProperties struct { - // UserID - User identifier path: /users/{uid} - UserID *string `json:"userId,omitempty"` - // ProductID - Product identifier path: /products/{productId} - ProductID *string `json:"productId,omitempty"` + // OwnerID - User identifier path: /users/{userId} + OwnerID *string `json:"ownerId,omitempty"` + // Scope - Scope like /products/{productId} or /apis or /apis/{apiId} + Scope *string `json:"scope,omitempty"` // ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. ExpirationDate *date.Time `json:"expirationDate,omitempty"` // DisplayName - Subscription name. @@ -9976,6 +10660,8 @@ type SubscriptionUpdateParameterProperties struct { State SubscriptionState `json:"state,omitempty"` // StateComment - Comments describing subscription state change by the administrator. StateComment *string `json:"stateComment,omitempty"` + // AllowTracing - Determines whether tracing can be enabled + AllowTracing *bool `json:"allowTracing,omitempty"` } // SubscriptionUpdateParameters subscription update details. @@ -10566,8 +11252,6 @@ type TagResourceCollection struct { autorest.Response `json:"-"` // Value - Page values. Value *[]TagResourceContract `json:"value,omitempty"` - // Count - Total record count number across all pages. - Count *int64 `json:"count,omitempty"` // NextLink - Next page link if any. NextLink *string `json:"nextLink,omitempty"` } @@ -11317,14 +12001,53 @@ type UserIdentityContract struct { ID *string `json:"id,omitempty"` } -// UserTokenParameters parameters supplied to the Get User Token operation. -type UserTokenParameters struct { +// UserTokenParameterProperties parameters supplied to the Get User Token operation. +type UserTokenParameterProperties struct { // KeyType - The Key to be used to generate token for user. Possible values include: 'Primary', 'Secondary' KeyType KeyType `json:"keyType,omitempty"` // Expiry - The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Expiry *date.Time `json:"expiry,omitempty"` } +// UserTokenParameters get User Token parameters. +type UserTokenParameters struct { + // UserTokenParameterProperties - User Token Parameter contract properties. + *UserTokenParameterProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for UserTokenParameters. +func (utp UserTokenParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if utp.UserTokenParameterProperties != nil { + objectMap["properties"] = utp.UserTokenParameterProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for UserTokenParameters struct. +func (utp *UserTokenParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var userTokenParameterProperties UserTokenParameterProperties + err = json.Unmarshal(*v, &userTokenParameterProperties) + if err != nil { + return err + } + utp.UserTokenParameterProperties = &userTokenParameterProperties + } + } + } + + return nil +} + // UserTokenResult get User Token response details. type UserTokenResult struct { autorest.Response `json:"-"` @@ -11406,4 +12129,4 @@ type X509CertificateName struct { Name *string `json:"name,omitempty"` // IssuerCertificateThumbprint - Thumbprint for the Issuer of the Certificate. IssuerCertificateThumbprint *string `json:"issuerCertificateThumbprint,omitempty"` -} +} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go index d4374d7b4c36..6baa9b8306a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/networkstatus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/networkstatus.go @@ -99,7 +99,7 @@ func (client NetworkStatusClient) ListByLocationPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,7 +185,7 @@ func (client NetworkStatusClient) ListByServicePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go index 89f789c04707..0d60360d9551 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go @@ -41,7 +41,7 @@ func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) Not return NotificationClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate updates an Notification. +// CreateOrUpdate create or Update API Management publisher notification. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -96,7 +96,7 @@ func (client NotificationClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -187,7 +187,7 @@ func (client NotificationClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,7 +281,7 @@ func (client NotificationClient) ListByServicePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go index 4c391059297f..a8d26e87e55c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientemail.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientemail.go @@ -97,7 +97,7 @@ func (client NotificationRecipientEmailClient) CheckEntityExistsPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,7 +185,7 @@ func (client NotificationRecipientEmailClient) CreateOrUpdatePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,7 +274,7 @@ func (client NotificationRecipientEmailClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -360,7 +360,7 @@ func (client NotificationRecipientEmailClient) ListByNotificationPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go index 3e0bd294dd5b..bc4aa6dfab94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/notificationrecipientuser.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/notificationrecipientuser.go @@ -46,8 +46,8 @@ func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionI // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // notificationName - notification Name Identifier. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client NotificationRecipientUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result autorest.Response, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client NotificationRecipientUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.CheckEntityExists") defer func() { @@ -63,14 +63,14 @@ func (client NotificationRecipientUserClient) CheckEntityExists(ctx context.Cont Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationRecipientUserClient", "CheckEntityExists", err.Error()) } - req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, notificationName, UID) + req, err := client.CheckEntityExistsPreparer(ctx, resourceGroupName, serviceName, notificationName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.NotificationRecipientUserClient", "CheckEntityExists", nil, "Failure preparing request") return @@ -92,16 +92,16 @@ func (client NotificationRecipientUserClient) CheckEntityExists(ctx context.Cont } // CheckEntityExistsPreparer prepares the CheckEntityExists request. -func (client NotificationRecipientUserClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (*http.Request, error) { +func (client NotificationRecipientUserClient) CheckEntityExistsPreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "notificationName": autorest.Encode("path", notificationName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -109,7 +109,7 @@ func (client NotificationRecipientUserClient) CheckEntityExistsPreparer(ctx cont preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -138,8 +138,8 @@ func (client NotificationRecipientUserClient) CheckEntityExistsResponder(resp *h // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // notificationName - notification Name Identifier. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result RecipientUserContract, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (result RecipientUserContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.CreateOrUpdate") defer func() { @@ -155,14 +155,14 @@ func (client NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationRecipientUserClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, notificationName, UID) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, notificationName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.NotificationRecipientUserClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -184,16 +184,16 @@ func (client NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client NotificationRecipientUserClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (*http.Request, error) { +func (client NotificationRecipientUserClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "notificationName": autorest.Encode("path", notificationName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -201,7 +201,7 @@ func (client NotificationRecipientUserClient) CreateOrUpdatePreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -231,8 +231,8 @@ func (client NotificationRecipientUserClient) CreateOrUpdateResponder(resp *http // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // notificationName - notification Name Identifier. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client NotificationRecipientUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result autorest.Response, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client NotificationRecipientUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.Delete") defer func() { @@ -248,14 +248,14 @@ func (client NotificationRecipientUserClient) Delete(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationRecipientUserClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, notificationName, UID) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, notificationName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.NotificationRecipientUserClient", "Delete", nil, "Failure preparing request") return @@ -277,16 +277,16 @@ func (client NotificationRecipientUserClient) Delete(ctx context.Context, resour } // DeletePreparer prepares the Delete request. -func (client NotificationRecipientUserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (*http.Request, error) { +func (client NotificationRecipientUserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "notificationName": autorest.Encode("path", notificationName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -294,7 +294,7 @@ func (client NotificationRecipientUserClient) DeletePreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -372,7 +372,7 @@ func (client NotificationRecipientUserClient) ListByNotificationPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go index f5e55fc26271..20a36eb4bec4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go @@ -107,7 +107,7 @@ func (client OpenIDConnectProviderClient) CreateOrUpdatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -205,7 +205,7 @@ func (client OpenIDConnectProviderClient) DeletePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -295,7 +295,7 @@ func (client OpenIDConnectProviderClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -385,7 +385,7 @@ func (client OpenIDConnectProviderClient) GetEntityTagPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -417,14 +417,14 @@ func (client OpenIDConnectProviderClient) GetEntityTagResponder(resp *http.Respo return } -// ListByService lists all OpenID Connect Providers. +// ListByService lists of all the OpenId Connect Providers. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result OpenIDConnectProviderCollectionPage, err error) { @@ -482,7 +482,7 @@ func (client OpenIDConnectProviderClient) ListByServicePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -621,7 +621,7 @@ func (client OpenIDConnectProviderClient) UpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go index 225a0098007d..3ee48ad04d98 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go @@ -47,17 +47,18 @@ func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) Operat // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| method | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) { +// includeNotTaggedOperations - include not tagged Operations. +func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result TagResourceCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OperationClient.ListByTags") defer func() { @@ -87,7 +88,7 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName } result.fn = client.listByTagsNextResults - req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, includeNotTaggedOperations) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.OperationClient", "ListByTags", nil, "Failure preparing request") return @@ -109,7 +110,7 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName } // ListByTagsPreparer prepares the ListByTags request. -func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -117,7 +118,7 @@ func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -130,6 +131,9 @@ func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGr if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if includeNotTaggedOperations != nil { + queryParameters["includeNotTaggedOperations"] = autorest.Encode("query", *includeNotTaggedOperations) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -181,7 +185,7 @@ func (client OperationClient) listByTagsNextResults(ctx context.Context, lastRes } // ListByTagsComplete enumerates all values, automatically crossing page boundaries as required. -func (client OperationClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagResourceCollectionIterator, err error) { +func (client OperationClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result TagResourceCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/OperationClient.ListByTags") defer func() { @@ -192,6 +196,6 @@ func (client OperationClient) ListByTagsComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, apiid, filter, top, skip) + result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, includeNotTaggedOperations) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go index 30ef72a43b4e..6149889fb304 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/operations.go @@ -76,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go index 66e5a4dba361..a7b0e111e383 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policy.go @@ -46,7 +46,8 @@ func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyCli // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // parameters - the policy contents to apply. -func (client PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PolicyContract) (result PolicyContract, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PolicyContract, ifMatch string) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.CreateOrUpdate") defer func() { @@ -64,11 +65,11 @@ func (client PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PolicyContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.PolicyContent", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.Value", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PolicyClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.PolicyClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -90,7 +91,7 @@ func (client PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PolicyClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PolicyContract) (*http.Request, error) { +func (client PolicyClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PolicyContract, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "policyId": autorest.Encode("path", "policy"), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -98,7 +99,7 @@ func (client PolicyClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -110,6 +111,10 @@ func (client PolicyClient) CreateOrUpdatePreparer(ctx context.Context, resourceG autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -188,7 +193,7 @@ func (client PolicyClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -225,7 +230,8 @@ func (client PolicyClient) DeleteResponder(resp *http.Response) (result autorest // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.Get") defer func() { @@ -244,7 +250,7 @@ func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, se return result, validation.NewError("apimanagement.PolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.PolicyClient", "Get", nil, "Failure preparing request") return @@ -266,7 +272,7 @@ func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, se } // GetPreparer prepares the Get request. -func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { +func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "policyId": autorest.Encode("path", "policy"), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -274,10 +280,15 @@ func (client PolicyClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -360,7 +371,7 @@ func (client PolicyClient) GetEntityTagPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -396,8 +407,7 @@ func (client PolicyClient) GetEntityTagResponder(resp *http.Response) (result au // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// scope - policy scope. -func (client PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (result PolicyCollection, err error) { +func (client PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result PolicyCollection, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.ListByService") defer func() { @@ -416,7 +426,7 @@ func (client PolicyClient) ListByService(ctx context.Context, resourceGroupName return result, validation.NewError("apimanagement.PolicyClient", "ListByService", err.Error()) } - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, scope) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.PolicyClient", "ListByService", nil, "Failure preparing request") return @@ -438,20 +448,17 @@ func (client PolicyClient) ListByService(ctx context.Context, resourceGroupName } // ListByServicePreparer prepares the ListByService request. -func (client PolicyClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (*http.Request, error) { +func (client PolicyClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(string(scope)) > 0 { - queryParameters["scope"] = autorest.Encode("query", scope) - } preparer := autorest.CreatePreparer( autorest.AsGet(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go similarity index 71% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go index e680cdb0b657..5e57768cab7d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/policysnippets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/policysnippet.go @@ -26,19 +26,19 @@ import ( "net/http" ) -// PolicySnippetsClient is the apiManagement Client -type PolicySnippetsClient struct { +// PolicySnippetClient is the apiManagement Client +type PolicySnippetClient struct { BaseClient } -// NewPolicySnippetsClient creates an instance of the PolicySnippetsClient client. -func NewPolicySnippetsClient(subscriptionID string) PolicySnippetsClient { - return NewPolicySnippetsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewPolicySnippetClient creates an instance of the PolicySnippetClient client. +func NewPolicySnippetClient(subscriptionID string) PolicySnippetClient { + return NewPolicySnippetClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySnippetsClientWithBaseURI creates an instance of the PolicySnippetsClient client. -func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetsClient { - return PolicySnippetsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewPolicySnippetClientWithBaseURI creates an instance of the PolicySnippetClient client. +func NewPolicySnippetClientWithBaseURI(baseURI string, subscriptionID string) PolicySnippetClient { + return PolicySnippetClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByService lists all policy snippets. @@ -46,9 +46,9 @@ func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) P // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // scope - policy scope. -func (client PolicySnippetsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (result PolicySnippetsCollection, err error) { +func (client PolicySnippetClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (result PolicySnippetsCollection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PolicySnippetsClient.ListByService") + ctx = tracing.StartSpan(ctx, fqdn+"/PolicySnippetClient.ListByService") defer func() { sc := -1 if result.Response.Response != nil { @@ -62,39 +62,39 @@ func (client PolicySnippetsClient) ListByService(ctx context.Context, resourceGr Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.PolicySnippetsClient", "ListByService", err.Error()) + return result, validation.NewError("apimanagement.PolicySnippetClient", "ListByService", err.Error()) } req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, scope) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetsClient", "ListByService", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetClient", "ListByService", nil, "Failure preparing request") return } resp, err := client.ListByServiceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetsClient", "ListByService", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetClient", "ListByService", resp, "Failure sending request") return } result, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetsClient", "ListByService", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.PolicySnippetClient", "ListByService", resp, "Failure responding to request") } return } // ListByServicePreparer prepares the ListByService request. -func (client PolicySnippetsClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (*http.Request, error) { +func (client PolicySnippetClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,14 +112,14 @@ func (client PolicySnippetsClient) ListByServicePreparer(ctx context.Context, re // ListByServiceSender sends the ListByService request. The method will close the // http.Response Body if it receives an error. -func (client PolicySnippetsClient) ListByServiceSender(req *http.Request) (*http.Response, error) { +func (client PolicySnippetClient) ListByServiceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListByServiceResponder handles the response to the ListByService request. The method always // closes the http.Response Body. -func (client PolicySnippetsClient) ListByServiceResponder(resp *http.Response) (result PolicySnippetsCollection, err error) { +func (client PolicySnippetClient) ListByServiceResponder(resp *http.Response) (result PolicySnippetsCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go index 8fce6712aee1..d567b8b86de7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go @@ -65,9 +65,9 @@ func (client ProductClient) CreateOrUpdate(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.ProductContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ProductContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -108,7 +108,7 @@ func (client ProductClient) CreateOrUpdatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,9 +172,9 @@ func (client ProductClient) Delete(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "Delete", err.Error()) } @@ -208,7 +208,7 @@ func (client ProductClient) DeletePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,9 +266,9 @@ func (client ProductClient) Get(ctx context.Context, resourceGroupName string, s {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "Get", err.Error()) } @@ -302,7 +302,7 @@ func (client ProductClient) GetPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,9 +357,9 @@ func (client ProductClient) GetEntityTag(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "GetEntityTag", err.Error()) } @@ -393,7 +393,7 @@ func (client ProductClient) GetEntityTagPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,18 +429,19 @@ func (client ProductClient) GetEntityTagResponder(resp *http.Response) (result a // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| state | filter | eq | |
| groups | expand | | | +//
// top - number of records to return. // skip - number of records to skip. // expandGroups - when set to true, the response contains an array of groups that have visibility to the // product. The default is false. -func (client ProductClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result ProductCollectionPage, err error) { +// tags - products which are part of a specific tag. +func (client ProductClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result ProductCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByService") defer func() { @@ -466,7 +467,7 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups, tags) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByService", nil, "Failure preparing request") return @@ -488,14 +489,14 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName } // ListByServicePreparer prepares the ListByService request. -func (client ProductClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (*http.Request, error) { +func (client ProductClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -511,6 +512,9 @@ func (client ProductClient) ListByServicePreparer(ctx context.Context, resourceG if expandGroups != nil { queryParameters["expandGroups"] = autorest.Encode("query", *expandGroups) } + if len(tags) > 0 { + queryParameters["tags"] = autorest.Encode("query", tags) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -562,7 +566,7 @@ func (client ProductClient) listByServiceNextResults(ctx context.Context, lastRe } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client ProductClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result ProductCollectionIterator, err error) { +func (client ProductClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool, tags string) (result ProductCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByService") defer func() { @@ -573,11 +577,162 @@ func (client ProductClient) ListByServiceComplete(ctx context.Context, resourceG tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups, tags) + return +} + +// ListByTags lists a collection of products associated with tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| terms | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| state | filter | eq | substringof, contains, startswith, endswith | +//
+// top - number of records to return. +// skip - number of records to skip. +// includeNotTaggedProducts - include not tagged Products. +func (client ProductClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result TagResourceCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByTags") + defer func() { + sc := -1 + if result.trc.Response.Response != nil { + sc = result.trc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + {TargetValue: skip, + Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("apimanagement.ProductClient", "ListByTags", err.Error()) + } + + result.fn = client.listByTagsNextResults + req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedProducts) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", nil, "Failure preparing request") + return + } + + resp, err := client.ListByTagsSender(req) + if err != nil { + result.trc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", resp, "Failure sending request") + return + } + + result.trc, err = client.ListByTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", resp, "Failure responding to request") + } + + return +} + +// ListByTagsPreparer prepares the ListByTags request. +func (client ProductClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if skip != nil { + queryParameters["$skip"] = autorest.Encode("query", *skip) + } + if includeNotTaggedProducts != nil { + queryParameters["includeNotTaggedProducts"] = autorest.Encode("query", *includeNotTaggedProducts) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByTagsSender sends the ListByTags request. The method will close the +// http.Response Body if it receives an error. +func (client ProductClient) ListByTagsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListByTagsResponder handles the response to the ListByTags request. The method always +// closes the http.Response Body. +func (client ProductClient) ListByTagsResponder(resp *http.Response) (result TagResourceCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByTagsNextResults retrieves the next set of results, if any. +func (client ProductClient) listByTagsNextResults(ctx context.Context, lastResults TagResourceCollection) (result TagResourceCollection, err error) { + req, err := lastResults.tagResourceCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByTagsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProductClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result TagResourceCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByTags") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedProducts) return } -// Update update product. +// Update update existing product details. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -602,9 +757,9 @@ func (client ProductClient) Update(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "Update", err.Error()) } @@ -638,7 +793,7 @@ func (client ProductClient) UpdatePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go index 6cf0dcede095..db5ebe89cde1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go @@ -65,9 +65,9 @@ func (client ProductAPIClient) CheckEntityExists(ctx context.Context, resourceGr {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -106,7 +106,7 @@ func (client ProductAPIClient) CheckEntityExistsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -132,7 +132,7 @@ func (client ProductAPIClient) CheckEntityExistsResponder(resp *http.Response) ( err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -162,9 +162,9 @@ func (client ProductAPIClient) CreateOrUpdate(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -203,7 +203,7 @@ func (client ProductAPIClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,9 +260,9 @@ func (client ProductAPIClient) Delete(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: apiid, Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -301,7 +301,7 @@ func (client ProductAPIClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -338,13 +338,13 @@ func (client ProductAPIClient) DeleteResponder(resp *http.Response) (result auto // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result APICollectionPage, err error) { @@ -364,9 +364,9 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -407,7 +407,7 @@ func (client ProductAPIClient) ListByProductPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go index 9cdb145c2fe7..3f0671bd015a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go @@ -64,13 +64,13 @@ func (client ProductGroupClient) CheckEntityExists(ctx context.Context, resource {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "CheckEntityExists", err.Error()) } @@ -105,7 +105,7 @@ func (client ProductGroupClient) CheckEntityExistsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -131,7 +131,7 @@ func (client ProductGroupClient) CheckEntityExistsResponder(resp *http.Response) err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -160,13 +160,13 @@ func (client ProductGroupClient) CreateOrUpdate(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "CreateOrUpdate", err.Error()) } @@ -201,7 +201,7 @@ func (client ProductGroupClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,13 +257,13 @@ func (client ProductGroupClient) Delete(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: groupID, - Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "Delete", err.Error()) } @@ -298,7 +298,7 @@ func (client ProductGroupClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,12 +335,9 @@ func (client ProductGroupClient) DeleteResponder(resp *http.Response) (result au // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | type | eq, ne | N/A | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | |
| displayName | filter | eq, ne | |
| description | filter | eq, ne | |
// top - number of records to return. // skip - number of records to skip. func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) { @@ -360,9 +357,9 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -403,7 +400,7 @@ func (client ProductGroupClient) ListByProductPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go index e93f8e961932..af027b29282d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productpolicy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productpolicy.go @@ -65,12 +65,12 @@ func (client ProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGr {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PolicyContractProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.PolicyContent", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.PolicyContractProperties.Value", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductPolicyClient", "CreateOrUpdate", err.Error()) } @@ -105,7 +105,7 @@ func (client ProductPolicyClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,9 +168,9 @@ func (client ProductPolicyClient) Delete(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductPolicyClient", "Delete", err.Error()) } @@ -205,7 +205,7 @@ func (client ProductPolicyClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,8 @@ func (client ProductPolicyClient) DeleteResponder(resp *http.Response) (result a // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result PolicyContract, err error) { +// formatParameter - policy Export Format. +func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string, formatParameter PolicyExportFormat) (result PolicyContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.Get") defer func() { @@ -260,13 +261,13 @@ func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductPolicyClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, productID) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, productID, formatParameter) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ProductPolicyClient", "Get", nil, "Failure preparing request") return @@ -288,7 +289,7 @@ func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName str } // GetPreparer prepares the Get request. -func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string) (*http.Request, error) { +func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, formatParameter PolicyExportFormat) (*http.Request, error) { pathParameters := map[string]interface{}{ "policyId": autorest.Encode("path", "policy"), "productId": autorest.Encode("path", productID), @@ -297,10 +298,15 @@ func (client ProductPolicyClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(formatParameter)) > 0 { + queryParameters["format"] = autorest.Encode("query", formatParameter) + } else { + queryParameters["format"] = autorest.Encode("query", "xml") + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -352,9 +358,9 @@ func (client ProductPolicyClient) GetEntityTag(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductPolicyClient", "GetEntityTag", err.Error()) } @@ -389,7 +395,7 @@ func (client ProductPolicyClient) GetEntityTagPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,9 +449,9 @@ func (client ProductPolicyClient) ListByProduct(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.ProductPolicyClient", "ListByProduct", err.Error()) } @@ -479,7 +485,7 @@ func (client ProductPolicyClient) ListByProductPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go index 3157e94441d7..a770b5929f64 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go @@ -46,14 +46,15 @@ func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID str // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |--------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| state | filter | eq | |
| user | expand | | |
// top - number of records to return. // skip - number of records to skip. func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) { @@ -73,9 +74,9 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -116,7 +117,7 @@ func (client ProductSubscriptionsClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go index 9de3170f7817..ae3707cc4211 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go @@ -65,8 +65,8 @@ func (client PropertyClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: propID, - Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "propID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "propID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.PropertyContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.PropertyContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -112,7 +112,7 @@ func (client PropertyClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,8 +175,8 @@ func (client PropertyClient) Delete(ctx context.Context, resourceGroupName strin {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: propID, - Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "propID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "propID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "Delete", err.Error()) } @@ -210,7 +210,7 @@ func (client PropertyClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,8 +265,8 @@ func (client PropertyClient) Get(ctx context.Context, resourceGroupName string, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: propID, - Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "propID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "propID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "Get", err.Error()) } @@ -300,7 +300,7 @@ func (client PropertyClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,8 +355,8 @@ func (client PropertyClient) GetEntityTag(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: propID, - Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "propID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "propID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "GetEntityTag", err.Error()) } @@ -390,7 +390,7 @@ func (client PropertyClient) GetEntityTagPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -426,10 +426,10 @@ func (client PropertyClient) GetEntityTagResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------|------------------------|-------------------------------------------------------| -// | tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| tags | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith, any, all |
| displayName | filter | ge, le, eq, ne, gt, +// lt | substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client PropertyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result PropertyCollectionPage, err error) { @@ -487,7 +487,7 @@ func (client PropertyClient) ListByServicePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -591,8 +591,8 @@ func (client PropertyClient) Update(ctx context.Context, resourceGroupName strin {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: propID, - Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "propID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "propID", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "propID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "Update", err.Error()) } @@ -626,7 +626,7 @@ func (client PropertyClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go index 8003ca763720..32e88badc8cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabycounterkeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabycounterkeys.go @@ -99,7 +99,7 @@ func (client QuotaByCounterKeysClient) ListByServicePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,7 +191,7 @@ func (client QuotaByCounterKeysClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go index 8338e2ff0c29..2b8a48f97a2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/quotabyperiodkeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/quotabyperiodkeys.go @@ -101,7 +101,7 @@ func (client QuotaByPeriodKeysClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,7 +194,7 @@ func (client QuotaByPeriodKeysClient) UpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go similarity index 66% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go index 1c8c024bf521..97bd0aa31765 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/regions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/region.go @@ -26,28 +26,28 @@ import ( "net/http" ) -// RegionsClient is the apiManagement Client -type RegionsClient struct { +// RegionClient is the apiManagement Client +type RegionClient struct { BaseClient } -// NewRegionsClient creates an instance of the RegionsClient client. -func NewRegionsClient(subscriptionID string) RegionsClient { - return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewRegionClient creates an instance of the RegionClient client. +func NewRegionClient(subscriptionID string) RegionClient { + return NewRegionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. -func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { - return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewRegionClientWithBaseURI creates an instance of the RegionClient client. +func NewRegionClientWithBaseURI(baseURI string, subscriptionID string) RegionClient { + return RegionClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByService lists all azure regions in which the service exists. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -func (client RegionsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultPage, err error) { +func (client RegionClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListByService") + ctx = tracing.StartSpan(ctx, fqdn+"/RegionClient.ListByService") defer func() { sc := -1 if result.rlr.Response.Response != nil { @@ -61,40 +61,40 @@ func (client RegionsClient) ListByService(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.RegionsClient", "ListByService", err.Error()) + return result, validation.NewError("apimanagement.RegionClient", "ListByService", err.Error()) } result.fn = client.listByServiceNextResults req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "ListByService", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "apimanagement.RegionClient", "ListByService", nil, "Failure preparing request") return } resp, err := client.ListByServiceSender(req) if err != nil { result.rlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "ListByService", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.RegionClient", "ListByService", resp, "Failure sending request") return } result.rlr, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "ListByService", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "apimanagement.RegionClient", "ListByService", resp, "Failure responding to request") } return } // ListByServicePreparer prepares the ListByService request. -func (client RegionsClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { +func (client RegionClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -109,14 +109,14 @@ func (client RegionsClient) ListByServicePreparer(ctx context.Context, resourceG // ListByServiceSender sends the ListByService request. The method will close the // http.Response Body if it receives an error. -func (client RegionsClient) ListByServiceSender(req *http.Request) (*http.Response, error) { +func (client RegionClient) ListByServiceSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) } // ListByServiceResponder handles the response to the ListByService request. The method always // closes the http.Response Body. -func (client RegionsClient) ListByServiceResponder(resp *http.Response) (result RegionListResult, err error) { +func (client RegionClient) ListByServiceResponder(resp *http.Response) (result RegionListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -128,10 +128,10 @@ func (client RegionsClient) ListByServiceResponder(resp *http.Response) (result } // listByServiceNextResults retrieves the next set of results, if any. -func (client RegionsClient) listByServiceNextResults(ctx context.Context, lastResults RegionListResult) (result RegionListResult, err error) { +func (client RegionClient) listByServiceNextResults(ctx context.Context, lastResults RegionListResult) (result RegionListResult, err error) { req, err := lastResults.regionListResultPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "listByServiceNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.RegionClient", "listByServiceNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -139,19 +139,19 @@ func (client RegionsClient) listByServiceNextResults(ctx context.Context, lastRe resp, err := client.ListByServiceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "listByServiceNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "apimanagement.RegionClient", "listByServiceNextResults", resp, "Failure sending next results request") } result, err = client.ListByServiceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "listByServiceNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "apimanagement.RegionClient", "listByServiceNextResults", resp, "Failure responding to next results request") } return } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegionsClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultIterator, err error) { +func (client RegionClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListByService") + ctx = tracing.StartSpan(ctx, fqdn+"/RegionClient.ListByService") defer func() { sc := -1 if result.Response().Response.Response != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go index 214970f4baf3..cc22027bc753 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go @@ -48,7 +48,8 @@ func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsC // filter - the filter to apply on the operation. // top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByAPI") defer func() { @@ -74,7 +75,7 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str } result.fn = client.listByAPINextResults - req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByAPIPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListByAPI", nil, "Failure preparing request") return @@ -96,14 +97,14 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str } // ListByAPIPreparer prepares the ListByAPI request. -func (client ReportsClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListByAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "$filter": autorest.Encode("query", filter), "api-version": APIVersion, @@ -114,6 +115,9 @@ func (client ReportsClient) ListByAPIPreparer(ctx context.Context, resourceGroup if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -165,7 +169,7 @@ func (client ReportsClient) listByAPINextResults(ctx context.Context, lastResult } // ListByAPIComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByAPI") defer func() { @@ -176,7 +180,7 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByAPI(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) return } @@ -184,7 +188,17 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| country | select | | |
| region | select | | |
| zip | select | | | +//
| apiRegion | filter | eq | |
| userId | filter | eq | |
| productId | filter | eq | +// |
| subscriptionId | filter | eq | |
| apiId | filter | eq | |
| operationId | filter +// | eq | |
| callCountSuccess | select | | |
| callCountBlocked | select | | | +//
| callCountFailed | select | | |
| callCountOther | select | | |
| bandwidth +// | select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | select +// | | |
| apiTimeAvg | select | | |
| apiTimeMin | select | | |
| +// apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | +// select | | |
| serviceTimeMax | select | | |
// top - number of records to return. // skip - number of records to skip. func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { @@ -242,13 +256,11 @@ func (client ReportsClient) ListByGeoPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), "api-version": APIVersion, } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } @@ -325,10 +337,22 @@ func (client ReportsClient) ListByGeoComplete(ctx context.Context, resourceGroup // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| displayName | select, orderBy | | |
| apiRegion | filter | eq | |
| userId | +// filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq | | +//
| apiId | filter | eq | |
| operationId | select, filter | eq | |
| callCountSuccess +// | select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| +// callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | |
| +// callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | |
| +// cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg | +// select, orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | +// |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| +// serviceTimeMax | select | | |
// top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByOperation") defer func() { @@ -354,7 +378,7 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa } result.fn = client.listByOperationNextResults - req, err := client.ListByOperationPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByOperationPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListByOperation", nil, "Failure preparing request") return @@ -376,14 +400,14 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa } // ListByOperationPreparer prepares the ListByOperation request. -func (client ReportsClient) ListByOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListByOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "$filter": autorest.Encode("query", filter), "api-version": APIVersion, @@ -394,6 +418,9 @@ func (client ReportsClient) ListByOperationPreparer(ctx context.Context, resourc if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -445,7 +472,7 @@ func (client ReportsClient) listByOperationNextResults(ctx context.Context, last } // ListByOperationComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByOperation") defer func() { @@ -456,7 +483,7 @@ func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByOperation(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByOperation(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) return } @@ -464,10 +491,21 @@ func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourc // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| displayName | select, orderBy | | |
| apiRegion | filter | eq | |
| userId | +// filter | eq | |
| productId | select, filter | eq | |
| subscriptionId | filter | eq | +// |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | select, orderBy | | +// |
| callCountFailed | select, orderBy | | |
| callCountOther | select, orderBy | | +// |
| callCountTotal | select, orderBy | | |
| bandwidth | select, orderBy | | | +//
| cacheHitsCount | select | | |
| cacheMissCount | select | | |
| apiTimeAvg +// | select, orderBy | | |
| apiTimeMin | select | | |
| apiTimeMax | select | | +// |
| serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| +// serviceTimeMax | select | | |
// top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByProduct") defer func() { @@ -493,7 +531,7 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName } result.fn = client.listByProductNextResults - req, err := client.ListByProductPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByProductPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListByProduct", nil, "Failure preparing request") return @@ -515,14 +553,14 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName } // ListByProductPreparer prepares the ListByProduct request. -func (client ReportsClient) ListByProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListByProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "$filter": autorest.Encode("query", filter), "api-version": APIVersion, @@ -533,6 +571,9 @@ func (client ReportsClient) ListByProductPreparer(ctx context.Context, resourceG if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -584,7 +625,7 @@ func (client ReportsClient) listByProductNextResults(ctx context.Context, lastRe } // ListByProductComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByProduct") defer func() { @@ -595,7 +636,7 @@ func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceG tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByProduct(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByProduct(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) return } @@ -603,7 +644,11 @@ func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceG // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| apiId | filter | eq | |
| operationId | filter | eq | |
| productId | filter | eq | +// |
| userId | filter | eq | |
| apiRegion | filter | eq | |
| subscriptionId | filter +// | eq | |
// top - number of records to return. // skip - number of records to skip. func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result RequestReportCollection, err error) { @@ -660,7 +705,7 @@ func (client ReportsClient) ListByRequestPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "$filter": autorest.Encode("query", filter), "api-version": APIVersion, @@ -704,10 +749,21 @@ func (client ReportsClient) ListByRequestResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| displayName | select, orderBy | | |
| apiRegion | filter | eq | |
| userId | +// select, filter | eq | |
| productId | select, filter | eq | |
| subscriptionId | select, +// filter | eq | |
| callCountSuccess | select, orderBy | | |
| callCountBlocked | +// select, orderBy | | |
| callCountFailed | select, orderBy | | |
| callCountOther | +// select, orderBy | | |
| callCountTotal | select, orderBy | | |
| bandwidth | +// select, orderBy | | |
| cacheHitsCount | select | | |
| cacheMissCount | select | +// | |
| apiTimeAvg | select, orderBy | | |
| apiTimeMin | select | | |
| +// apiTimeMax | select | | |
| serviceTimeAvg | select | | |
| serviceTimeMin | +// select | | |
| serviceTimeMax | select | | |
// top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListBySubscription") defer func() { @@ -733,7 +789,7 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou } result.fn = client.listBySubscriptionNextResults - req, err := client.ListBySubscriptionPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListBySubscriptionPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListBySubscription", nil, "Failure preparing request") return @@ -755,26 +811,27 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou } // ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client ReportsClient) ListBySubscriptionPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListBySubscriptionPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), "api-version": APIVersion, } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -826,7 +883,7 @@ func (client ReportsClient) listBySubscriptionNextResults(ctx context.Context, l } // ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListBySubscription") defer func() { @@ -837,7 +894,7 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListBySubscription(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListBySubscription(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) return } @@ -845,13 +902,24 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter, select | ge, le | +// |
| interval | select | | |
| apiRegion | filter | eq | |
| userId | filter | eq +// | |
| productId | filter | eq | |
| subscriptionId | filter | eq | |
| apiId | +// filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | select | | | +//
| callCountBlocked | select | | |
| callCountFailed | select | | |
| +// callCountOther | select | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount +// | select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select | | | +//
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| serviceTimeAvg | +// select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | select | | +// |
// interval - by time interval. Interval must be multiple of 15 minutes and may not be zero. The value should // be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert -// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) -// filter - the filter to apply on the operation. +// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). // top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, filter string, interval string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByTime") defer func() { @@ -877,7 +945,7 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st } result.fn = client.listByTimeNextResults - req, err := client.ListByTimePreparer(ctx, resourceGroupName, serviceName, interval, filter, top, skip) + req, err := client.ListByTimePreparer(ctx, resourceGroupName, serviceName, filter, interval, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListByTime", nil, "Failure preparing request") return @@ -899,27 +967,28 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st } // ListByTimePreparer prepares the ListByTime request. -func (client ReportsClient) ListByTimePreparer(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListByTimePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, interval string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), "api-version": APIVersion, "interval": autorest.Encode("query", interval), } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -971,7 +1040,7 @@ func (client ReportsClient) listByTimeNextResults(ctx context.Context, lastResul } // ListByTimeComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, interval string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByTime") defer func() { @@ -982,7 +1051,7 @@ func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGrou tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByTime(ctx, resourceGroupName, serviceName, interval, filter, top, skip) + result.page, err = client.ListByTime(ctx, resourceGroupName, serviceName, filter, interval, top, skip, orderby) return } @@ -990,10 +1059,22 @@ func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGrou // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - the filter to apply on the operation. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| timestamp | filter | ge, le | | +//
| displayName | select, orderBy | | |
| userId | select, filter | eq | |
| +// apiRegion | filter | eq | |
| productId | filter | eq | |
| subscriptionId | filter | eq | +// |
| apiId | filter | eq | |
| operationId | filter | eq | |
| callCountSuccess | +// select, orderBy | | |
| callCountBlocked | select, orderBy | | |
| callCountFailed +// | select, orderBy | | |
| callCountOther | select, orderBy | | |
| callCountTotal +// | select, orderBy | | |
| bandwidth | select, orderBy | | |
| cacheHitsCount | +// select | | |
| cacheMissCount | select | | |
| apiTimeAvg | select, orderBy | +// | |
| apiTimeMin | select | | |
| apiTimeMax | select | | |
| +// serviceTimeAvg | select | | |
| serviceTimeMin | select | | |
| serviceTimeMax | +// select | | |
// top - number of records to return. // skip - number of records to skip. -func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) { +// orderby - oData order by query option. +func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByUser") defer func() { @@ -1019,7 +1100,7 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st } result.fn = client.listByUserNextResults - req, err := client.ListByUserPreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByUserPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "ListByUser", nil, "Failure preparing request") return @@ -1041,14 +1122,14 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st } // ListByUserPreparer prepares the ListByUser request. -func (client ReportsClient) ListByUserPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client ReportsClient) ListByUserPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "$filter": autorest.Encode("query", filter), "api-version": APIVersion, @@ -1059,6 +1140,9 @@ func (client ReportsClient) ListByUserPreparer(ctx context.Context, resourceGrou if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(orderby) > 0 { + queryParameters["$orderby"] = autorest.Encode("query", orderby) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1110,7 +1194,7 @@ func (client ReportsClient) listByUserNextResults(ctx context.Context, lastResul } // ListByUserComplete enumerates all values, automatically crossing page boundaries as required. -func (client ReportsClient) ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) { +func (client ReportsClient) ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, orderby string) (result ReportCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByUser") defer func() { @@ -1121,6 +1205,6 @@ func (client ReportsClient) ListByUserComplete(ctx context.Context, resourceGrou tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByUser(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByUser(ctx, resourceGroupName, serviceName, filter, top, skip, orderby) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go similarity index 83% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go index 3ff5e77aadc2..e82d0dff2960 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/service.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/service.go @@ -91,7 +91,7 @@ func (client ServiceClient) ApplyNetworkConfigurationUpdatesPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -188,7 +188,7 @@ func (client ServiceClient) BackupPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -276,7 +276,7 @@ func (client ServiceClient) CheckNameAvailabilityPreparer(ctx context.Context, p "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -370,7 +370,7 @@ func (client ServiceClient) CreateOrUpdatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -416,13 +416,13 @@ func (client ServiceClient) CreateOrUpdateResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -func (client ServiceClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) { +func (client ServiceClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result ServiceDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Delete") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -441,18 +441,12 @@ func (client ServiceClient) Delete(ctx context.Context, resourceGroupName string return } - resp, err := client.DeleteSender(req) + result, err = client.DeleteSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "Delete", result.Response(), "Failure sending request") return } - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "Delete", resp, "Failure responding to request") - } - return } @@ -464,7 +458,7 @@ func (client ServiceClient) DeletePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -479,20 +473,27 @@ func (client ServiceClient) DeletePreparer(ctx context.Context, resourceGroupNam // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client ServiceClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, +func (client ServiceClient) DeleteSender(req *http.Request) (future ServiceDeleteFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ServiceClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client ServiceClient) DeleteResponder(resp *http.Response) (result ServiceResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } @@ -548,7 +549,7 @@ func (client ServiceClient) GetPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -633,7 +634,7 @@ func (client ServiceClient) GetSsoTokenPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -706,7 +707,7 @@ func (client ServiceClient) ListPreparer(ctx context.Context) (*http.Request, er "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -819,7 +820,7 @@ func (client ServiceClient) ListByResourceGroupPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -942,7 +943,7 @@ func (client ServiceClient) RestorePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1030,7 +1031,7 @@ func (client ServiceClient) UpdatePreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1071,185 +1072,3 @@ func (client ServiceClient) UpdateResponder(resp *http.Response) (result Service result.Response = autorest.Response{Response: resp} return } - -// UpdateHostname creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname -// can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to -// complete. This operation will be deprecated in the next version update. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// parameters - parameters supplied to the UpdateHostname operation. -func (client ServiceClient) UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateHostnameParameters) (result ServiceUpdateHostnameFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.UpdateHostname") - defer func() { - sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.ServiceClient", "UpdateHostname", err.Error()) - } - - req, err := client.UpdateHostnamePreparer(ctx, resourceGroupName, serviceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "UpdateHostname", nil, "Failure preparing request") - return - } - - result, err = client.UpdateHostnameSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "UpdateHostname", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdateHostnamePreparer prepares the UpdateHostname request. -func (client ServiceClient) UpdateHostnamePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateHostnameParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateHostnameSender sends the UpdateHostname request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceClient) UpdateHostnameSender(req *http.Request) (future ServiceUpdateHostnameFuture, err error) { - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return -} - -// UpdateHostnameResponder handles the response to the UpdateHostname request. The method always -// closes the http.Response Body. -func (client ServiceClient) UpdateHostnameResponder(resp *http.Response) (result ServiceResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// UploadCertificate upload Custom Domain SSL certificate for an API Management service. This operation will be -// deprecated in future releases. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -// parameters - parameters supplied to the Upload SSL certificate for an API Management service operation. -func (client ServiceClient) UploadCertificate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUploadCertificateParameters) (result CertificateInformation, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.UploadCertificate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Certificate", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.CertificatePassword", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.ServiceClient", "UploadCertificate", err.Error()) - } - - req, err := client.UploadCertificatePreparer(ctx, resourceGroupName, serviceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "UploadCertificate", nil, "Failure preparing request") - return - } - - resp, err := client.UploadCertificateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "UploadCertificate", resp, "Failure sending request") - return - } - - result, err = client.UploadCertificateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "UploadCertificate", resp, "Failure responding to request") - } - - return -} - -// UploadCertificatePreparer prepares the UploadCertificate request. -func (client ServiceClient) UploadCertificatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUploadCertificateParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatecertificate", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UploadCertificateSender sends the UploadCertificate request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceClient) UploadCertificateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// UploadCertificateResponder handles the response to the UploadCertificate request. The method always -// closes the http.Response Body. -func (client ServiceClient) UploadCertificateResponder(resp *http.Response) (result CertificateInformation, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go index d7a6c2ae8778..77b9a2a25a69 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/serviceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/serviceskus.go @@ -94,7 +94,7 @@ func (client ServiceSkusClient) ListAvailableServiceSkusPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go index 0793337fd21c..120f6e7e7fa9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signinsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signinsettings.go @@ -46,7 +46,8 @@ func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) S // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // parameters - create or update parameters. -func (client SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings) (result PortalSigninSettings, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings, ifMatch string) (result PortalSigninSettings, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SignInSettingsClient.CreateOrUpdate") defer func() { @@ -65,7 +66,7 @@ func (client SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceG return result, validation.NewError("apimanagement.SignInSettingsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.SignInSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -87,14 +88,14 @@ func (client SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceG } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SignInSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings) (*http.Request, error) { +func (client SignInSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,6 +107,10 @@ func (client SignInSettingsClient) CreateOrUpdatePreparer(ctx context.Context, r autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -129,7 +134,7 @@ func (client SignInSettingsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Get get Sign-In settings. +// Get get Sign In Settings for the Portal // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -181,7 +186,7 @@ func (client SignInSettingsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +271,7 @@ func (client SignInSettingsClient) GetEntityTagPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +358,7 @@ func (client SignInSettingsClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go index 9db07bdbe861..0c19af715c20 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/signupsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/signupsettings.go @@ -46,7 +46,8 @@ func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) S // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // parameters - create or update parameters. -func (client SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings) (result PortalSignupSettings, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings, ifMatch string) (result PortalSignupSettings, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SignUpSettingsClient.CreateOrUpdate") defer func() { @@ -65,7 +66,7 @@ func (client SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceG return result, validation.NewError("apimanagement.SignUpSettingsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.SignUpSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -87,14 +88,14 @@ func (client SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceG } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SignUpSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings) (*http.Request, error) { +func (client SignUpSettingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,6 +107,10 @@ func (client SignUpSettingsClient) CreateOrUpdatePreparer(ctx context.Context, r autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -129,7 +134,7 @@ func (client SignUpSettingsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Get get Sign-Up settings. +// Get get Sign Up Settings for the Portal // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -181,7 +186,7 @@ func (client SignUpSettingsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +271,7 @@ func (client SignUpSettingsClient) GetEntityTagPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +358,7 @@ func (client SignUpSettingsClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go index 77dfe38ae184..c25d4f3f1ccf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go @@ -69,12 +69,11 @@ func (client SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.UserID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.SubscriptionCreateParameterProperties.ProductID", Name: validation.Null, Rule: true, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.Scope", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.MinLength, Rule: 1, Chain: nil}, @@ -121,7 +120,7 @@ func (client SubscriptionClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -188,8 +187,8 @@ func (client SubscriptionClient) Delete(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "Delete", err.Error()) } @@ -223,7 +222,7 @@ func (client SubscriptionClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,8 +278,8 @@ func (client SubscriptionClient) Get(ctx context.Context, resourceGroupName stri {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "Get", err.Error()) } @@ -314,7 +313,7 @@ func (client SubscriptionClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -370,8 +369,8 @@ func (client SubscriptionClient) GetEntityTag(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "GetEntityTag", err.Error()) } @@ -405,7 +404,7 @@ func (client SubscriptionClient) GetEntityTagPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -441,14 +440,15 @@ func (client SubscriptionClient) GetEntityTagResponder(resp *http.Response) (res // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |--------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| state | filter | eq | |
| user | expand | | |
// top - number of records to return. // skip - number of records to skip. func (client SubscriptionClient) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) { @@ -506,7 +506,7 @@ func (client SubscriptionClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -608,8 +608,8 @@ func (client SubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resou {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "RegeneratePrimaryKey", err.Error()) } @@ -643,7 +643,7 @@ func (client SubscriptionClient) RegeneratePrimaryKeyPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -698,8 +698,8 @@ func (client SubscriptionClient) RegenerateSecondaryKey(ctx context.Context, res {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "RegenerateSecondaryKey", err.Error()) } @@ -733,7 +733,7 @@ func (client SubscriptionClient) RegenerateSecondaryKeyPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -794,8 +794,8 @@ func (client SubscriptionClient) Update(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: sid, - Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "sid", Name: validation.MaxLength, Rule: 256, Chain: nil}, + {Target: "sid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "Update", err.Error()) } @@ -829,7 +829,7 @@ func (client SubscriptionClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go index 7f59c28874fa..509afdb30c27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go @@ -48,8 +48,7 @@ func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient { // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result TagContract, err error) { +func (client TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result TagContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToAPI") defer func() { @@ -72,11 +71,11 @@ func (client TagClient) AssignToAPI(ctx context.Context, resourceGroupName strin {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "AssignToAPI", err.Error()) } - req, err := client.AssignToAPIPreparer(ctx, resourceGroupName, serviceName, apiid, tagID, ifMatch) + req, err := client.AssignToAPIPreparer(ctx, resourceGroupName, serviceName, apiid, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "AssignToAPI", nil, "Failure preparing request") return @@ -98,7 +97,7 @@ func (client TagClient) AssignToAPI(ctx context.Context, resourceGroupName strin } // AssignToAPIPreparer prepares the AssignToAPI request. -func (client TagClient) AssignToAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) AssignToAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -107,7 +106,7 @@ func (client TagClient) AssignToAPIPreparer(ctx context.Context, resourceGroupNa "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -117,10 +116,6 @@ func (client TagClient) AssignToAPIPreparer(ctx context.Context, resourceGroupNa autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -153,8 +148,7 @@ func (client TagClient) AssignToAPIResponder(resp *http.Response) (result TagCon // operationID - operation identifier within an API. Must be unique in the current API Management service // instance. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (result TagContract, err error) { +func (client TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result TagContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToOperation") defer func() { @@ -177,15 +171,15 @@ func (client TagClient) AssignToOperation(ctx context.Context, resourceGroupName {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "AssignToOperation", err.Error()) } - req, err := client.AssignToOperationPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, tagID, ifMatch) + req, err := client.AssignToOperationPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "AssignToOperation", nil, "Failure preparing request") return @@ -207,7 +201,7 @@ func (client TagClient) AssignToOperation(ctx context.Context, resourceGroupName } // AssignToOperationPreparer prepares the AssignToOperation request. -func (client TagClient) AssignToOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) AssignToOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "operationId": autorest.Encode("path", operationID), @@ -217,7 +211,7 @@ func (client TagClient) AssignToOperationPreparer(ctx context.Context, resourceG "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -227,10 +221,6 @@ func (client TagClient) AssignToOperationPreparer(ctx context.Context, resourceG autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -260,8 +250,7 @@ func (client TagClient) AssignToOperationResponder(resp *http.Response) (result // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (result TagContract, err error) { +func (client TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result TagContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToProduct") defer func() { @@ -278,17 +267,17 @@ func (client TagClient) AssignToProduct(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "AssignToProduct", err.Error()) } - req, err := client.AssignToProductPreparer(ctx, resourceGroupName, serviceName, productID, tagID, ifMatch) + req, err := client.AssignToProductPreparer(ctx, resourceGroupName, serviceName, productID, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "AssignToProduct", nil, "Failure preparing request") return @@ -310,7 +299,7 @@ func (client TagClient) AssignToProduct(ctx context.Context, resourceGroupName s } // AssignToProductPreparer prepares the AssignToProduct request. -func (client TagClient) AssignToProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) AssignToProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "productId": autorest.Encode("path", productID), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -319,7 +308,7 @@ func (client TagClient) AssignToProductPreparer(ctx context.Context, resourceGro "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,10 +318,6 @@ func (client TagClient) AssignToProductPreparer(ctx context.Context, resourceGro autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", pathParameters), autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -362,7 +347,8 @@ func (client TagClient) AssignToProductResponder(resp *http.Response) (result Ta // serviceName - the name of the API Management service. // tagID - tag identifier. Must be unique in the current API Management service instance. // parameters - create parameters. -func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters) (result TagContract, err error) { +// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. +func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, ifMatch string) (result TagContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.CreateOrUpdate") defer func() { @@ -381,7 +367,7 @@ func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName st {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.TagContractProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.TagContractProperties.DisplayName", Name: validation.Null, Rule: true, @@ -392,7 +378,7 @@ func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName st return result, validation.NewError("apimanagement.TagClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, tagID, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, tagID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -414,7 +400,7 @@ func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName st } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client TagClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters) (*http.Request, error) { +func (client TagClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), @@ -422,7 +408,7 @@ func (client TagClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,6 +420,10 @@ func (client TagClient) CreateOrUpdatePreparer(ctx context.Context, resourceGrou autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) + if len(ifMatch) > 0 { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithHeader("If-Match", autorest.String(ifMatch))) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -483,7 +473,7 @@ func (client TagClient) Delete(ctx context.Context, resourceGroupName string, se {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "Delete", err.Error()) } @@ -517,7 +507,7 @@ func (client TagClient) DeletePreparer(ctx context.Context, resourceGroupName st "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -557,9 +547,7 @@ func (client TagClient) DeleteResponder(resp *http.Response) (result autorest.Re // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET -// request or it should be * for unconditional update. -func (client TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result autorest.Response, err error) { +func (client TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromAPI") defer func() { @@ -582,11 +570,11 @@ func (client TagClient) DetachFromAPI(ctx context.Context, resourceGroupName str {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "DetachFromAPI", err.Error()) } - req, err := client.DetachFromAPIPreparer(ctx, resourceGroupName, serviceName, apiid, tagID, ifMatch) + req, err := client.DetachFromAPIPreparer(ctx, resourceGroupName, serviceName, apiid, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "DetachFromAPI", nil, "Failure preparing request") return @@ -608,7 +596,7 @@ func (client TagClient) DetachFromAPI(ctx context.Context, resourceGroupName str } // DetachFromAPIPreparer prepares the DetachFromAPI request. -func (client TagClient) DetachFromAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) DetachFromAPIPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -617,7 +605,7 @@ func (client TagClient) DetachFromAPIPreparer(ctx context.Context, resourceGroup "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -626,8 +614,7 @@ func (client TagClient) DetachFromAPIPreparer(ctx context.Context, resourceGroup autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -659,9 +646,7 @@ func (client TagClient) DetachFromAPIResponder(resp *http.Response) (result auto // operationID - operation identifier within an API. Must be unique in the current API Management service // instance. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET -// request or it should be * for unconditional update. -func (client TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (result autorest.Response, err error) { +func (client TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromOperation") defer func() { @@ -684,15 +669,15 @@ func (client TagClient) DetachFromOperation(ctx context.Context, resourceGroupNa {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "DetachFromOperation", err.Error()) } - req, err := client.DetachFromOperationPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, tagID, ifMatch) + req, err := client.DetachFromOperationPreparer(ctx, resourceGroupName, serviceName, apiid, operationID, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "DetachFromOperation", nil, "Failure preparing request") return @@ -714,7 +699,7 @@ func (client TagClient) DetachFromOperation(ctx context.Context, resourceGroupNa } // DetachFromOperationPreparer prepares the DetachFromOperation request. -func (client TagClient) DetachFromOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) DetachFromOperationPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "apiId": autorest.Encode("path", apiid), "operationId": autorest.Encode("path", operationID), @@ -724,7 +709,7 @@ func (client TagClient) DetachFromOperationPreparer(ctx context.Context, resourc "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -733,8 +718,7 @@ func (client TagClient) DetachFromOperationPreparer(ctx context.Context, resourc autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -763,9 +747,7 @@ func (client TagClient) DetachFromOperationResponder(resp *http.Response) (resul // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. // tagID - tag identifier. Must be unique in the current API Management service instance. -// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET -// request or it should be * for unconditional update. -func (client TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (result autorest.Response, err error) { +func (client TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromProduct") defer func() { @@ -782,17 +764,17 @@ func (client TagClient) DetachFromProduct(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "DetachFromProduct", err.Error()) } - req, err := client.DetachFromProductPreparer(ctx, resourceGroupName, serviceName, productID, tagID, ifMatch) + req, err := client.DetachFromProductPreparer(ctx, resourceGroupName, serviceName, productID, tagID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "DetachFromProduct", nil, "Failure preparing request") return @@ -814,7 +796,7 @@ func (client TagClient) DetachFromProduct(ctx context.Context, resourceGroupName } // DetachFromProductPreparer prepares the DetachFromProduct request. -func (client TagClient) DetachFromProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (*http.Request, error) { +func (client TagClient) DetachFromProductPreparer(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "productId": autorest.Encode("path", productID), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -823,7 +805,7 @@ func (client TagClient) DetachFromProductPreparer(ctx context.Context, resourceG "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -832,8 +814,7 @@ func (client TagClient) DetachFromProductPreparer(ctx context.Context, resourceG autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", pathParameters), - autorest.WithQueryParameters(queryParameters), - autorest.WithHeader("If-Match", autorest.String(ifMatch))) + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -880,7 +861,7 @@ func (client TagClient) Get(ctx context.Context, resourceGroupName string, servi {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "Get", err.Error()) } @@ -914,7 +895,7 @@ func (client TagClient) GetPreparer(ctx context.Context, resourceGroupName strin "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -977,7 +958,7 @@ func (client TagClient) GetByAPI(ctx context.Context, resourceGroupName string, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetByAPI", err.Error()) } @@ -1012,7 +993,7 @@ func (client TagClient) GetByAPIPreparer(ctx context.Context, resourceGroupName "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1077,11 +1058,11 @@ func (client TagClient) GetByOperation(ctx context.Context, resourceGroupName st {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetByOperation", err.Error()) } @@ -1117,7 +1098,7 @@ func (client TagClient) GetByOperationPreparer(ctx context.Context, resourceGrou "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1173,13 +1154,13 @@ func (client TagClient) GetByProduct(ctx context.Context, resourceGroupName stri {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetByProduct", err.Error()) } @@ -1214,7 +1195,7 @@ func (client TagClient) GetByProductPreparer(ctx context.Context, resourceGroupN "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1271,7 +1252,7 @@ func (client TagClient) GetEntityState(ctx context.Context, resourceGroupName st {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetEntityState", err.Error()) } @@ -1305,7 +1286,7 @@ func (client TagClient) GetEntityStatePreparer(ctx context.Context, resourceGrou "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1367,7 +1348,7 @@ func (client TagClient) GetEntityStateByAPI(ctx context.Context, resourceGroupNa {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetEntityStateByAPI", err.Error()) } @@ -1402,7 +1383,7 @@ func (client TagClient) GetEntityStateByAPIPreparer(ctx context.Context, resourc "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1466,11 +1447,11 @@ func (client TagClient) GetEntityStateByOperation(ctx context.Context, resourceG {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetEntityStateByOperation", err.Error()) } @@ -1506,7 +1487,7 @@ func (client TagClient) GetEntityStateByOperationPreparer(ctx context.Context, r "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1561,13 +1542,13 @@ func (client TagClient) GetEntityStateByProduct(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "GetEntityStateByProduct", err.Error()) } @@ -1602,7 +1583,7 @@ func (client TagClient) GetEntityStateByProductPreparer(ctx context.Context, res "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1640,10 +1621,10 @@ func (client TagClient) GetEntityStateByProductResponder(resp *http.Response) (r // serviceName - the name of the API Management service. // apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current // revision has ;rev=n as a suffix where n is the revision number. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) { @@ -1706,7 +1687,7 @@ func (client TagClient) ListByAPIPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1793,13 +1774,10 @@ func (client TagClient) ListByAPIComplete(ctx context.Context, resourceGroupName // revision has ;rev=n as a suffix where n is the revision number. // operationID - operation identifier within an API. Must be unique in the current API Management service // instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) { @@ -1825,7 +1803,7 @@ func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName s {TargetValue: operationID, Constraints: []validation.Constraint{{Target: "operationID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -1867,7 +1845,7 @@ func (client TagClient) ListByOperationPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1951,10 +1929,10 @@ func (client TagClient) ListByOperationComplete(ctx context.Context, resourceGro // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. // productID - product identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| displayName | filter | ge, le, eq, ne, +// gt, lt | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) { @@ -1974,9 +1952,9 @@ func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: productID, - Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + Constraints: []validation.Constraint{{Target: "productID", Name: validation.MaxLength, Rule: 256, Chain: nil}, {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -2017,7 +1995,7 @@ func (client TagClient) ListByProductPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2100,13 +2078,14 @@ func (client TagClient) ListByProductComplete(ctx context.Context, resourceGroup // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client TagClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) { +// scope - scope like 'apis', 'products' or 'apis/{apiId} +func (client TagClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result TagCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByService") defer func() { @@ -2132,7 +2111,7 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, scope) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "ListByService", nil, "Failure preparing request") return @@ -2154,14 +2133,14 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str } // ListByServicePreparer prepares the ListByService request. -func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2174,6 +2153,9 @@ func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroup if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if len(scope) > 0 { + queryParameters["scope"] = autorest.Encode("query", scope) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -2225,7 +2207,7 @@ func (client TagClient) listByServiceNextResults(ctx context.Context, lastResult } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagCollectionIterator, err error) { +func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result TagCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByService") defer func() { @@ -2236,7 +2218,7 @@ func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, scope) return } @@ -2267,7 +2249,7 @@ func (client TagClient) Update(ctx context.Context, resourceGroupName string, se {TargetValue: tagID, Constraints: []validation.Constraint{{Target: "tagID", Name: validation.MaxLength, Rule: 80, Chain: nil}, {Target: "tagID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "tagID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {Target: "tagID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "Update", err.Error()) } @@ -2301,7 +2283,7 @@ func (client TagClient) UpdatePreparer(ctx context.Context, resourceGroupName st "tagId": autorest.Encode("path", tagID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go index 9a517bedf603..b31dbe4b9f13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go @@ -45,21 +45,19 @@ func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagR // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| aid | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| name | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, +// endswith |
| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, +// endswith |
| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith +// |
| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| +// urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| terms | +// filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
| state | filter | eq | +// |
| isCurrent | filter | eq | |
// top - number of records to return. // skip - number of records to skip. func (client TagResourceClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) { @@ -117,7 +115,7 @@ func (client TagResourceClient) ListByServicePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go index 0ce401116f51..b41348f1db90 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccess.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccess.go @@ -41,7 +41,7 @@ func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) Ten return TenantAccessClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get get tenant access information details. +// Get get tenant access information details // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -94,7 +94,7 @@ func (client TenantAccessClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,7 +127,92 @@ func (client TenantAccessClient) GetResponder(resp *http.Response) (result Acces return } -// RegeneratePrimaryKey regenerate primary access key. +// GetEntityTag tenant access metadata +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +func (client TenantAccessClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessClient.GetEntityTag") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.TenantAccessClient", "GetEntityTag", err.Error()) + } + + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.TenantAccessClient", "GetEntityTag", nil, "Failure preparing request") + return + } + + resp, err := client.GetEntityTagSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "apimanagement.TenantAccessClient", "GetEntityTag", resp, "Failure sending request") + return + } + + result, err = client.GetEntityTagResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.TenantAccessClient", "GetEntityTag", resp, "Failure responding to request") + } + + return +} + +// GetEntityTagPreparer prepares the GetEntityTag request. +func (client TenantAccessClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accessName": autorest.Encode("path", "access"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetEntityTagSender sends the GetEntityTag request. The method will close the +// http.Response Body if it receives an error. +func (client TenantAccessClient) GetEntityTagSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetEntityTagResponder handles the response to the GetEntityTag request. The method always +// closes the http.Response Body. +func (client TenantAccessClient) GetEntityTagResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RegeneratePrimaryKey regenerate primary access key // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -180,7 +265,7 @@ func (client TenantAccessClient) RegeneratePrimaryKeyPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -212,7 +297,7 @@ func (client TenantAccessClient) RegeneratePrimaryKeyResponder(resp *http.Respon return } -// RegenerateSecondaryKey regenerate secondary access key. +// RegenerateSecondaryKey regenerate secondary access key // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. @@ -265,7 +350,7 @@ func (client TenantAccessClient) RegenerateSecondaryKeyPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +438,7 @@ func (client TenantAccessClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go index c9ce2fa2495f..2c820eacc183 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantaccessgit.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantaccessgit.go @@ -94,7 +94,7 @@ func (client TenantAccessGitClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +180,7 @@ func (client TenantAccessGitClient) RegeneratePrimaryKeyPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +265,7 @@ func (client TenantAccessGitClient) RegenerateSecondaryKeyPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go index 8c589d40a64d..9c58554cde57 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/tenantconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/tenantconfiguration.go @@ -64,7 +64,8 @@ func (client TenantConfigurationClient) Deploy(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.DeployConfigurationParameterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DeployConfigurationParameterProperties.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TenantConfigurationClient", "Deploy", err.Error()) } @@ -92,7 +93,7 @@ func (client TenantConfigurationClient) DeployPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -187,7 +188,7 @@ func (client TenantConfigurationClient) GetSyncStatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +244,8 @@ func (client TenantConfigurationClient) Save(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.SaveConfigurationParameterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.SaveConfigurationParameterProperties.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TenantConfigurationClient", "Save", err.Error()) } @@ -271,7 +273,7 @@ func (client TenantConfigurationClient) SavePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +337,8 @@ func (client TenantConfigurationClient) Validate(ctx context.Context, resourceGr {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.DeployConfigurationParameterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DeployConfigurationParameterProperties.Branch", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TenantConfigurationClient", "Validate", err.Error()) } @@ -363,7 +366,7 @@ func (client TenantConfigurationClient) ValidatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go index 1364af2f9fde..916e11c184b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go @@ -45,10 +45,10 @@ func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. +// userID - user identifier. Must be unique in the current API Management service instance. // parameters - create or update parameters. // ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity. -func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserCreateParameters, ifMatch string) (result UserContract, err error) { +func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, ifMatch string) (result UserContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.CreateOrUpdate") defer func() { @@ -64,10 +64,10 @@ func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.UserCreateParameterProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.UserCreateParameterProperties.Email", Name: validation.Null, Rule: true, @@ -86,7 +86,7 @@ func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName s return result, validation.NewError("apimanagement.UserClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, UID, parameters, ifMatch) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, userID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -108,15 +108,15 @@ func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName s } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client UserClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserCreateParameters, ifMatch string) (*http.Request, error) { +func (client UserClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserCreateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,7 +125,7 @@ func (client UserClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) if len(ifMatch) > 0 { @@ -159,12 +159,12 @@ func (client UserClient) CreateOrUpdateResponder(resp *http.Response) (result Us // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. +// userID - user identifier. Must be unique in the current API Management service instance. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. // deleteSubscriptions - whether to delete user's subscription or not. // notify - send an Account Closed Email notification to the User. -func (client UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, UID string, ifMatch string, deleteSubscriptions *bool, notify *bool) (result autorest.Response, err error) { +func (client UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, deleteSubscriptions *bool, notify *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Delete") defer func() { @@ -180,14 +180,14 @@ func (client UserClient) Delete(ctx context.Context, resourceGroupName string, s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, UID, ifMatch, deleteSubscriptions, notify) + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, userID, ifMatch, deleteSubscriptions, notify) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "Delete", nil, "Failure preparing request") return @@ -209,15 +209,15 @@ func (client UserClient) Delete(ctx context.Context, resourceGroupName string, s } // DeletePreparer prepares the Delete request. -func (client UserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, ifMatch string, deleteSubscriptions *bool, notify *bool) (*http.Request, error) { +func (client UserClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, ifMatch string, deleteSubscriptions *bool, notify *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -231,7 +231,7 @@ func (client UserClient) DeletePreparer(ctx context.Context, resourceGroupName s preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -261,8 +261,8 @@ func (client UserClient) DeleteResponder(resp *http.Response) (result autorest.R // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result GenerateSsoURLResult, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result GenerateSsoURLResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GenerateSsoURL") defer func() { @@ -278,14 +278,14 @@ func (client UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "GenerateSsoURL", err.Error()) } - req, err := client.GenerateSsoURLPreparer(ctx, resourceGroupName, serviceName, UID) + req, err := client.GenerateSsoURLPreparer(ctx, resourceGroupName, serviceName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GenerateSsoURL", nil, "Failure preparing request") return @@ -307,15 +307,15 @@ func (client UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName s } // GenerateSsoURLPreparer prepares the GenerateSsoURL request. -func (client UserClient) GenerateSsoURLPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string) (*http.Request, error) { +func (client UserClient) GenerateSsoURLPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client UserClient) GenerateSsoURLPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/generateSsoUrl", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -352,8 +352,8 @@ func (client UserClient) GenerateSsoURLResponder(resp *http.Response) (result Ge // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserContract, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result UserContract, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Get") defer func() { @@ -369,14 +369,14 @@ func (client UserClient) Get(ctx context.Context, resourceGroupName string, serv Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, UID) + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "Get", nil, "Failure preparing request") return @@ -398,15 +398,15 @@ func (client UserClient) Get(ctx context.Context, resourceGroupName string, serv } // GetPreparer prepares the Get request. -func (client UserClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string) (*http.Request, error) { +func (client UserClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -414,7 +414,7 @@ func (client UserClient) GetPreparer(ctx context.Context, resourceGroupName stri preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -443,8 +443,8 @@ func (client UserClient) GetResponder(resp *http.Response) (result UserContract, // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result autorest.Response, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetEntityTag") defer func() { @@ -460,14 +460,14 @@ func (client UserClient) GetEntityTag(ctx context.Context, resourceGroupName str Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "GetEntityTag", err.Error()) } - req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, UID) + req, err := client.GetEntityTagPreparer(ctx, resourceGroupName, serviceName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetEntityTag", nil, "Failure preparing request") return @@ -489,15 +489,15 @@ func (client UserClient) GetEntityTag(ctx context.Context, resourceGroupName str } // GetEntityTagPreparer prepares the GetEntityTag request. -func (client UserClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string) (*http.Request, error) { +func (client UserClient) GetEntityTagPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -505,7 +505,7 @@ func (client UserClient) GetEntityTagPreparer(ctx context.Context, resourceGroup preparer := autorest.CreatePreparer( autorest.AsHead(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -529,98 +529,13 @@ func (client UserClient) GetEntityTagResponder(resp *http.Response) (result auto return } -// GetIdentity returns calling user identity information. -// Parameters: -// resourceGroupName - the name of the resource group. -// serviceName - the name of the API Management service. -func (client UserClient) GetIdentity(ctx context.Context, resourceGroupName string, serviceName string) (result CurrentUserIdentity, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetIdentity") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: serviceName, - Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("apimanagement.UserClient", "GetIdentity", err.Error()) - } - - req, err := client.GetIdentityPreparer(ctx, resourceGroupName, serviceName) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", nil, "Failure preparing request") - return - } - - resp, err := client.GetIdentitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", resp, "Failure sending request") - return - } - - result, err = client.GetIdentityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", resp, "Failure responding to request") - } - - return -} - -// GetIdentityPreparer prepares the GetIdentity request. -func (client UserClient) GetIdentityPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serviceName": autorest.Encode("path", serviceName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-01-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identity", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetIdentitySender sends the GetIdentity request. The method will close the -// http.Response Body if it receives an error. -func (client UserClient) GetIdentitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) -} - -// GetIdentityResponder handles the response to the GetIdentity request. The method always -// closes the http.Response Body. -func (client UserClient) GetIdentityResponder(resp *http.Response) (result CurrentUserIdentity, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // GetSharedAccessToken gets the Shared Access Authorization Token for the User. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. +// userID - user identifier. Must be unique in the current API Management service instance. // parameters - create Authorization Token parameters. -func (client UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserTokenParameters) (result UserTokenResult, err error) { +func (client UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters) (result UserTokenResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetSharedAccessToken") defer func() { @@ -636,16 +551,17 @@ func (client UserClient) GetSharedAccessToken(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Expiry", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.UserTokenParameterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.UserTokenParameterProperties.Expiry", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "GetSharedAccessToken", err.Error()) } - req, err := client.GetSharedAccessTokenPreparer(ctx, resourceGroupName, serviceName, UID, parameters) + req, err := client.GetSharedAccessTokenPreparer(ctx, resourceGroupName, serviceName, userID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetSharedAccessToken", nil, "Failure preparing request") return @@ -667,15 +583,15 @@ func (client UserClient) GetSharedAccessToken(ctx context.Context, resourceGroup } // GetSharedAccessTokenPreparer prepares the GetSharedAccessToken request. -func (client UserClient) GetSharedAccessTokenPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserTokenParameters) (*http.Request, error) { +func (client UserClient) GetSharedAccessTokenPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserTokenParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -684,7 +600,7 @@ func (client UserClient) GetSharedAccessTokenPreparer(ctx context.Context, resou autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/token", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -714,18 +630,18 @@ func (client UserClient) GetSharedAccessTokenResponder(resp *http.Response) (res // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// filter - | Field | Supported operators | Supported functions | -// |------------------|------------------------|-----------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | N/A | -// | registrationDate | ge, le, eq, ne, gt, lt | N/A | -// | note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| firstName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| lastName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| email | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| state | filter | eq | |
| registrationDate | filter | ge, +// le, eq, ne, gt, lt | |
| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| groups | expand | | |
// top - number of records to return. // skip - number of records to skip. -func (client UserClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result UserCollectionPage, err error) { +// expandGroups - detailed Group in response. +func (client UserClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result UserCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.ListByService") defer func() { @@ -751,7 +667,7 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st } result.fn = client.listByServiceNextResults - req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip) + req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "ListByService", nil, "Failure preparing request") return @@ -773,14 +689,14 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st } // ListByServicePreparer prepares the ListByService request. -func (client UserClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client UserClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -793,6 +709,9 @@ func (client UserClient) ListByServicePreparer(ctx context.Context, resourceGrou if skip != nil { queryParameters["$skip"] = autorest.Encode("query", *skip) } + if expandGroups != nil { + queryParameters["expandGroups"] = autorest.Encode("query", *expandGroups) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -844,7 +763,7 @@ func (client UserClient) listByServiceNextResults(ctx context.Context, lastResul } // ListByServiceComplete enumerates all values, automatically crossing page boundaries as required. -func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result UserCollectionIterator, err error) { +func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result UserCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.ListByService") defer func() { @@ -855,7 +774,7 @@ func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGrou tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip) + result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups) return } @@ -863,11 +782,11 @@ func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGrou // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. +// userID - user identifier. Must be unique in the current API Management service instance. // parameters - update parameters. // ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET // request or it should be * for unconditional update. -func (client UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserUpdateParameters, ifMatch string) (result autorest.Response, err error) { +func (client UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserUpdateParameters, ifMatch string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Update") defer func() { @@ -883,14 +802,14 @@ func (client UserClient) Update(ctx context.Context, resourceGroupName string, s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, UID, parameters, ifMatch) + req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, userID, parameters, ifMatch) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "Update", nil, "Failure preparing request") return @@ -912,15 +831,15 @@ func (client UserClient) Update(ctx context.Context, resourceGroupName string, s } // UpdatePreparer prepares the Update request. -func (client UserClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserUpdateParameters, ifMatch string) (*http.Request, error) { +func (client UserClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, parameters UserUpdateParameters, ifMatch string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -929,7 +848,7 @@ func (client UserClient) UpdatePreparer(ctx context.Context, resourceGroupName s autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("If-Match", autorest.String(ifMatch))) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go new file mode 100644 index 000000000000..9ce9491728da --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/userconfirmationpassword.go @@ -0,0 +1,132 @@ +package apimanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// UserConfirmationPasswordClient is the apiManagement Client +type UserConfirmationPasswordClient struct { + BaseClient +} + +// NewUserConfirmationPasswordClient creates an instance of the UserConfirmationPasswordClient client. +func NewUserConfirmationPasswordClient(subscriptionID string) UserConfirmationPasswordClient { + return NewUserConfirmationPasswordClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUserConfirmationPasswordClientWithBaseURI creates an instance of the UserConfirmationPasswordClient client. +func NewUserConfirmationPasswordClientWithBaseURI(baseURI string, subscriptionID string) UserConfirmationPasswordClient { + return UserConfirmationPasswordClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Send sends confirmation +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the API Management service. +// userID - user identifier. Must be unique in the current API Management service instance. +func (client UserConfirmationPasswordClient) Send(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UserConfirmationPasswordClient.Send") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("apimanagement.UserConfirmationPasswordClient", "Send", err.Error()) + } + + req, err := client.SendPreparer(ctx, resourceGroupName, serviceName, userID) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.UserConfirmationPasswordClient", "Send", nil, "Failure preparing request") + return + } + + resp, err := client.SendSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "apimanagement.UserConfirmationPasswordClient", "Send", resp, "Failure sending request") + return + } + + result, err = client.SendResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "apimanagement.UserConfirmationPasswordClient", "Send", resp, "Failure responding to request") + } + + return +} + +// SendPreparer prepares the Send request. +func (client UserConfirmationPasswordClient) SendPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "userId": autorest.Encode("path", userID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SendSender sends the Send request. The method will close the +// http.Response Body if it receives an error. +func (client UserConfirmationPasswordClient) SendSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// SendResponder handles the response to the Send request. The method always +// closes the http.Response Body. +func (client UserConfirmationPasswordClient) SendResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go index cc890dcb8b19..26067b1e3f51 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go @@ -45,15 +45,15 @@ func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGr // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |-------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | +// userID - user identifier. Must be unique in the current API Management service instance. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| description | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client UserGroupClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) { +func (client UserGroupClient) List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserGroupClient.List") defer func() { @@ -69,10 +69,10 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -83,7 +83,7 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, UID, filter, top, skip) + req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, userID, filter, top, skip) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserGroupClient", "List", nil, "Failure preparing request") return @@ -105,15 +105,15 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string } // ListPreparer prepares the List request. -func (client UserGroupClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client UserGroupClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -130,7 +130,7 @@ func (client UserGroupClient) ListPreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/groups", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -177,7 +177,7 @@ func (client UserGroupClient) listNextResults(ctx context.Context, lastResults G } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UserGroupClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result GroupCollectionIterator, err error) { +func (client UserGroupClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result GroupCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserGroupClient.List") defer func() { @@ -188,6 +188,6 @@ func (client UserGroupClient) ListComplete(ctx context.Context, resourceGroupNam tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, serviceName, UID, filter, top, skip) + result.page, err = client.List(ctx, resourceGroupName, serviceName, userID, filter, top, skip) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go index 0342cfd3117e..145bae193237 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/useridentities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/useridentities.go @@ -41,12 +41,12 @@ func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) U return UserIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all user identities. +// List list of all user identities. // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -func (client UserIdentitiesClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserIdentityCollectionPage, err error) { +// userID - user identifier. Must be unique in the current API Management service instance. +func (client UserIdentitiesClient) List(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result UserIdentityCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentitiesClient.List") defer func() { @@ -62,15 +62,15 @@ func (client UserIdentitiesClient) List(ctx context.Context, resourceGroupName s Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}}); err != nil { + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil { return result, validation.NewError("apimanagement.UserIdentitiesClient", "List", err.Error()) } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, UID) + req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, userID) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserIdentitiesClient", "List", nil, "Failure preparing request") return @@ -92,15 +92,15 @@ func (client UserIdentitiesClient) List(ctx context.Context, resourceGroupName s } // ListPreparer prepares the List request. -func (client UserIdentitiesClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string) (*http.Request, error) { +func (client UserIdentitiesClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -108,7 +108,7 @@ func (client UserIdentitiesClient) ListPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -155,7 +155,7 @@ func (client UserIdentitiesClient) listNextResults(ctx context.Context, lastResu } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UserIdentitiesClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserIdentityCollectionIterator, err error) { +func (client UserIdentitiesClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string) (result UserIdentityCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentitiesClient.List") defer func() { @@ -166,6 +166,6 @@ func (client UserIdentitiesClient) ListComplete(ctx context.Context, resourceGro tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, serviceName, UID) + result.page, err = client.List(ctx, resourceGroupName, serviceName, userID) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go index 5e432b3ec4e8..2e2e343dc607 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go @@ -45,18 +45,19 @@ func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) // Parameters: // resourceGroupName - the name of the resource group. // serviceName - the name of the API Management service. -// UID - user identifier. Must be unique in the current API Management service instance. -// filter - | Field | Supported operators | Supported functions | -// |--------------|------------------------|---------------------------------------------| -// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith | -// | state | eq | | +// userID - user identifier. Must be unique in the current API Management service instance. +// filter - | Field | Usage | Supported operators | Supported functions +// |
|-------------|-------------|-------------|-------------|
| name | filter | ge, le, eq, ne, gt, lt +// | substringof, contains, startswith, endswith |
| displayName | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| stateComment | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| ownerId | filter | ge, le, eq, ne, gt, lt | +// substringof, contains, startswith, endswith |
| scope | filter | ge, le, eq, ne, gt, lt | substringof, +// contains, startswith, endswith |
| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, +// startswith, endswith |
// top - number of records to return. // skip - number of records to skip. -func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) { +func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserSubscriptionClient.List") defer func() { @@ -72,10 +73,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, - {TargetValue: UID, - Constraints: []validation.Constraint{{Target: "UID", Name: validation.MaxLength, Rule: 80, Chain: nil}, - {Target: "UID", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, + {TargetValue: userID, + Constraints: []validation.Constraint{{Target: "userID", Name: validation.MaxLength, Rule: 80, Chain: nil}, + {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, @@ -86,7 +87,7 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, UID, filter, top, skip) + req, err := client.ListPreparer(ctx, resourceGroupName, serviceName, userID, filter, top, skip) if err != nil { err = autorest.NewErrorWithError(err, "apimanagement.UserSubscriptionClient", "List", nil, "Failure preparing request") return @@ -108,15 +109,15 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName } // ListPreparer prepares the List request. -func (client UserSubscriptionClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (*http.Request, error) { +func (client UserSubscriptionClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "uid": autorest.Encode("path", UID), + "userId": autorest.Encode("path", userID), } - const APIVersion = "2018-01-01" + const APIVersion = "2019-01-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -133,7 +134,7 @@ func (client UserSubscriptionClient) ListPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -180,7 +181,7 @@ func (client UserSubscriptionClient) listNextResults(ctx context.Context, lastRe } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client UserSubscriptionClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionIterator, err error) { +func (client UserSubscriptionClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, userID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/UserSubscriptionClient.List") defer func() { @@ -191,6 +192,6 @@ func (client UserSubscriptionClient) ListComplete(ctx context.Context, resourceG tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, serviceName, UID, filter, top, skip) + result.page, err = client.List(ctx, resourceGroupName, serviceName, userID, filter, top, skip) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/version.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/version.go index 9147ce76f472..091107ce05f4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " apimanagement/2018-01-01" + return "Azure-SDK-For-Go/" + version.Number + " apimanagement/2019-01-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/modules.txt b/vendor/modules.txt index 83bb8426fbfa..d60d40128923 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -10,7 +10,7 @@ cloud.google.com/go/compute/metadata contrib.go.opencensus.io/exporter/ocagent # github.com/Azure/azure-sdk-for-go v29.0.0+incompatible github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources -github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2018-01-01/apimanagement +github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2018-12-01/batch diff --git a/website/docs/guides/2.0-upgrade-guide.html.markdown b/website/docs/guides/2.0-upgrade-guide.html.markdown index 05ce2d46324c..e45c5d3c59aa 100644 --- a/website/docs/guides/2.0-upgrade-guide.html.markdown +++ b/website/docs/guides/2.0-upgrade-guide.html.markdown @@ -161,6 +161,10 @@ Azure Scheduler is being retired in favour of Logic Apps ([more information can The deprecated field `address_space` will be removed. +### Resource: `azurerm_api_management_subscription` + +The deprecated field `product_id` will be removed. This has been deprecated in favour of `scope` field. + ### Resource: `azurerm_app_service_plan` The fields in the `properties` block (`app_service_environment_id`, `reserved` and `per_site_scaling`) have been moved to the top level - as such the `properties` block will be removed. diff --git a/website/docs/r/api_management.html.markdown b/website/docs/r/api_management.html.markdown index 13c1fde22afa..6fed7855f2cb 100644 --- a/website/docs/r/api_management.html.markdown +++ b/website/docs/r/api_management.html.markdown @@ -68,6 +68,8 @@ The following arguments are supported: * `sign_up` - (Optional) A `sign_up` block as defined below. +* `virtual_network_configuration` - (Optional) A `virtual_network_configuration` block as defined below. + * `tags` - (Optional) A mapping of tags assigned to the resource. --- @@ -215,6 +217,13 @@ A `terms_of_service` block supports the following: * `text` - (Required) The Terms of Service which users are required to agree to in order to sign up. +--- + +A `virtual_network_configuration` block supports the following: + +* `type` - (Required) The type of VPN in which API Management service needs to be configured in. Possible values include: `None`, `External`, `Internal`. + +* `subnet_id` - (Required) The resource ID of a subnet in a virtual network to deploy the API Management service in. ## Attributes Reference diff --git a/website/docs/r/api_management_subscription.html.markdown b/website/docs/r/api_management_subscription.html.markdown index 3a8911d13da6..e309fec6f96a 100644 --- a/website/docs/r/api_management_subscription.html.markdown +++ b/website/docs/r/api_management_subscription.html.markdown @@ -35,7 +35,7 @@ resource "azurerm_api_management_subscription" "test" { api_management_name = "${data.azurerm_api_management.test.name}" resource_group_name = "${data.azurerm_api_management.test.resource_group_name}" user_id = "${data.azurerm_api_management_user.test.id}" - product_id = "${data.azurerm_api_management_product.test.id}" + scope = "${data.azurerm_api_management_product.test.id}" display_name = "Parser API" } ``` @@ -51,7 +51,11 @@ The following arguments are supported: * `resource_group_name` - (Required) The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. -* `product_id` - (Required) The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created. +* `product_id` - (Optional / **Deprecated**) The ID of the Product which should be assigned to this Subscription. Changing this forces a new resource to be created. + +~> **NOTE:** This field has been replaced by `scope` and will be removed in version 2.0 of the AzureRM Provider. + +* `scope` - (Optional) The ID of the Product (`/products/123`), API (`/apis/123`) or all API's (`/apis`) which should be assigned to this Subscription. Changing this forces a new resource to be created. * `user_id` - (Required) The ID of the User which should be assigned to this Subscription. Changing this forces a new resource to be created.