From 5692cde1c4bb5a390efd62f0de706d368a9ff7d4 Mon Sep 17 00:00:00 2001 From: aristosvo <8375124+aristosvo@users.noreply.github.com> Date: Fri, 15 Oct 2021 18:11:56 +0200 Subject: [PATCH] `servicebus`: Update SDK to `2021-06-01-preview` (#13701) Required for at least #13514 and #9740 Builds on Upgrade to v58.0.0 of Azure/azure-sdk-for-go #13613 --- internal/services/servicebus/client/client.go | 2 +- internal/services/servicebus/internal.go | 20 +- ...s_namespace_authorization_rule_resource.go | 2 +- ...space_disaster_recovery_config_resource.go | 8 +- ...cebus_queue_authorization_rule_resource.go | 2 +- .../servicebus_queue_data_source.go | 4 +- .../servicebus/servicebus_queue_resource.go | 24 +- .../servicebus_subscription_resource.go | 10 +- .../servicebus_subscription_rule_resource.go | 2 +- ...cebus_topic_authorization_rule_resource.go | 2 +- .../servicebus_topic_data_source.go | 4 +- .../servicebus/servicebus_topic_resource.go | 10 +- .../servicebus/CHANGELOG.md | 0 .../2021-06-01-preview/servicebus/_meta.json | 11 + .../2021-06-01-preview}/servicebus/client.go | 4 +- .../servicebus/disasterrecoveryconfigs.go | 41 +- .../2021-06-01-preview/servicebus/enums.go | 310 ++++++ .../servicebus/migrationconfigs.go | 15 +- .../2021-06-01-preview}/servicebus/models.go | 972 ++++++++++-------- .../servicebus/namespaces.go | 125 +-- .../servicebus/operations.go | 4 +- .../servicebus/privateendpointconnections.go | 431 ++++++++ .../servicebus/privatelinkresources.go | 119 +++ .../2021-06-01-preview}/servicebus/queues.go | 24 +- .../2021-06-01-preview}/servicebus/rules.go | 22 +- .../servicebus/subscriptions.go | 11 +- .../2021-06-01-preview}/servicebus/topics.go | 24 +- .../2021-06-01-preview}/servicebus/version.go | 2 +- .../mgmt/2017-04-01/servicebus/_meta.json | 11 - .../mgmt/2017-04-01/servicebus/enums.go | 238 ----- .../mgmt/2017-04-01/servicebus/eventhubs.go | 160 --- .../servicebus/premiummessagingregions.go | 145 --- .../mgmt/2017-04-01/servicebus/regions.go | 155 --- vendor/modules.txt | 2 +- 34 files changed, 1570 insertions(+), 1346 deletions(-) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/CHANGELOG.md (100%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/client.go (96%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/disasterrecoveryconfigs.go (97%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/enums.go rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/migrationconfigs.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/models.go (83%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/namespaces.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/operations.go (97%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privateendpointconnections.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privatelinkresources.go rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/queues.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/rules.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/subscriptions.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/topics.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/{servicebus/mgmt/2017-04-01 => preview/servicebus/mgmt/2021-06-01-preview}/servicebus/version.go (89%) delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/enums.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/regions.go diff --git a/internal/services/servicebus/client/client.go b/internal/services/servicebus/client/client.go index f4ac397b8cf0..79747a558cea 100644 --- a/internal/services/servicebus/client/client.go +++ b/internal/services/servicebus/client/client.go @@ -2,7 +2,7 @@ package client import ( servicebusPreview "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/internal/common" ) diff --git a/internal/services/servicebus/internal.go b/internal/services/servicebus/internal.go index 2b6363aadf68..3fb7ff5cb55b 100644 --- a/internal/services/servicebus/internal.go +++ b/internal/services/servicebus/internal.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" @@ -17,15 +17,15 @@ func expandAuthorizationRuleRights(d *pluginsdk.ResourceData) *[]servicebus.Acce rights := make([]servicebus.AccessRights, 0) if d.Get("listen").(bool) { - rights = append(rights, servicebus.Listen) + rights = append(rights, servicebus.AccessRightsListen) } if d.Get("send").(bool) { - rights = append(rights, servicebus.SendEnumValue) + rights = append(rights, servicebus.AccessRightsSend) } if d.Get("manage").(bool) { - rights = append(rights, servicebus.Manage) + rights = append(rights, servicebus.AccessRightsManage) } return &rights @@ -37,11 +37,11 @@ func flattenAuthorizationRuleRights(rights *[]servicebus.AccessRights) (listen, if rights != nil { for _, right := range *rights { switch right { - case servicebus.Listen: + case servicebus.AccessRightsListen: listen = true - case servicebus.SendEnumValue: + case servicebus.AccessRightsSend: send = true - case servicebus.Manage: + case servicebus.AccessRightsManage: manage = true default: log.Printf("[DEBUG] Unknown Authorization Rule Right '%s'", right) @@ -148,8 +148,8 @@ func waitForPairedNamespaceReplication(ctx context.Context, meta interface{}, re aliasName := *disasterRecoveryResponse.Values()[0].Name stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{string(servicebus.Accepted)}, - Target: []string{string(servicebus.Succeeded)}, + Pending: []string{string(servicebus.ProvisioningStateDRAccepted)}, + Target: []string{string(servicebus.ProvisioningStateDRSucceeded)}, MinTimeout: 30 * time.Second, Timeout: timeout, Refresh: func() (interface{}, string, error) { @@ -159,7 +159,7 @@ func waitForPairedNamespaceReplication(ctx context.Context, meta interface{}, re } if props := read.ArmDisasterRecoveryProperties; props != nil { - if props.ProvisioningState == servicebus.Failed { + if props.ProvisioningState == servicebus.ProvisioningStateDRFailed { return read, "failed", fmt.Errorf("replication for Service Bus Namespace Disaster Recovery Configs %q (Namespace %q / Resource Group %q) failed", aliasName, namespaceName, resourceGroup) } return read, string(props.ProvisioningState), nil diff --git a/internal/services/servicebus/servicebus_namespace_authorization_rule_resource.go b/internal/services/servicebus/servicebus_namespace_authorization_rule_resource.go index 4c1612b4c845..bd42b56f1637 100644 --- a/internal/services/servicebus/servicebus_namespace_authorization_rule_resource.go +++ b/internal/services/servicebus/servicebus_namespace_authorization_rule_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_resource.go b/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_resource.go index 4df69d3c1324..ed7eb84a6c21 100644 --- a/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_resource.go +++ b/internal/services/servicebus/servicebus_namespace_disaster_recovery_config_resource.go @@ -8,7 +8,7 @@ import ( "strconv" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -300,8 +300,8 @@ func resourceServiceBusNamespaceDisasterRecoveryConfigDelete(d *pluginsdk.Resour func resourceServiceBusNamespaceDisasterRecoveryConfigWaitForState(ctx context.Context, client *servicebus.DisasterRecoveryConfigsClient, resourceGroup, namespaceName, name string, timeout time.Duration) error { stateConf := &pluginsdk.StateChangeConf{ - Pending: []string{string(servicebus.Accepted)}, - Target: []string{string(servicebus.Succeeded)}, + Pending: []string{string(servicebus.ProvisioningStateDRAccepted)}, + Target: []string{string(servicebus.ProvisioningStateDRSucceeded)}, MinTimeout: 30 * time.Second, Timeout: timeout, Refresh: func() (interface{}, string, error) { @@ -311,7 +311,7 @@ func resourceServiceBusNamespaceDisasterRecoveryConfigWaitForState(ctx context.C } if props := read.ArmDisasterRecoveryProperties; props != nil { - if props.ProvisioningState == servicebus.Failed { + if props.ProvisioningState == servicebus.ProvisioningStateDRFailed { return read, "failed", fmt.Errorf("replication for Service Bus Namespace Disaster Recovery Configs %q (Namespace %q / Resource Group %q) failed", name, namespaceName, resourceGroup) } return read, string(props.ProvisioningState), nil diff --git a/internal/services/servicebus/servicebus_queue_authorization_rule_resource.go b/internal/services/servicebus/servicebus_queue_authorization_rule_resource.go index 3cbd495b54a9..ef93bcdf739e 100644 --- a/internal/services/servicebus/servicebus_queue_authorization_rule_resource.go +++ b/internal/services/servicebus/servicebus_queue_authorization_rule_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/servicebus/servicebus_queue_data_source.go b/internal/services/servicebus/servicebus_queue_data_source.go index 4a5a6dc18547..35ec071c59d6 100644 --- a/internal/services/servicebus/servicebus_queue_data_source.go +++ b/internal/services/servicebus/servicebus_queue_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" @@ -164,7 +164,7 @@ func dataSourceServiceBusQueueRead(d *pluginsdk.ResourceData, meta interface{}) return err } - if namespace.Sku.Name != servicebus.Premium { + if namespace.Sku.Name != servicebus.SkuNamePremium { const partitionCount = 16 maxSizeInMegabytes = int(*apiMaxSizeInMegabytes / partitionCount) } diff --git a/internal/services/servicebus/servicebus_queue_resource.go b/internal/services/servicebus/servicebus_queue_resource.go index b939c84b0683..e0aba3813079 100644 --- a/internal/services/servicebus/servicebus_queue_resource.go +++ b/internal/services/servicebus/servicebus_queue_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -151,16 +151,16 @@ func resourceServiceBusQueue() *pluginsdk.Resource { "status": { Type: pluginsdk.TypeString, Optional: true, - Default: string(servicebus.Active), + Default: string(servicebus.EntityStatusActive), ValidateFunc: validation.StringInSlice([]string{ - string(servicebus.Active), - string(servicebus.Creating), - string(servicebus.Deleting), - string(servicebus.Disabled), - string(servicebus.ReceiveDisabled), - string(servicebus.Renaming), - string(servicebus.SendDisabled), - string(servicebus.Unknown), + string(servicebus.EntityStatusActive), + string(servicebus.EntityStatusCreating), + string(servicebus.EntityStatusDeleting), + string(servicebus.EntityStatusDisabled), + string(servicebus.EntityStatusReceiveDisabled), + string(servicebus.EntityStatusRenaming), + string(servicebus.EntityStatusSendDisabled), + string(servicebus.EntityStatusUnknown), }, false), }, }, @@ -247,7 +247,7 @@ func resourceServiceBusQueueCreateUpdate(d *pluginsdk.ResourceData, meta interfa // Enforce Premium namespace to have Express Entities disabled in Terraform since they are not supported for // Premium SKU. - if namespace.Sku.Name == servicebus.Premium && d.Get("enable_express").(bool) { + if namespace.Sku.Name == servicebus.SkuNamePremium && d.Get("enable_express").(bool) { return fmt.Errorf("ServiceBus Queue %q does not support Express Entities in Premium SKU and must be disabled", resourceId.Name) } @@ -310,7 +310,7 @@ func resourceServiceBusQueueRead(d *pluginsdk.ResourceData, meta interface{}) er return err } - if namespace.Sku.Name != servicebus.Premium { + if namespace.Sku.Name != servicebus.SkuNamePremium { const partitionCount = 16 maxSizeInMegabytes = int(*apiMaxSizeInMegabytes / partitionCount) } diff --git a/internal/services/servicebus/servicebus_subscription_resource.go b/internal/services/servicebus/servicebus_subscription_resource.go index 78740441ae35..7be8ac7253a5 100644 --- a/internal/services/servicebus/servicebus_subscription_resource.go +++ b/internal/services/servicebus/servicebus_subscription_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -119,11 +119,11 @@ func resourceServiceBusSubscription() *pluginsdk.Resource { "status": { Type: pluginsdk.TypeString, Optional: true, - Default: string(servicebus.Active), + Default: string(servicebus.EntityStatusActive), ValidateFunc: validation.StringInSlice([]string{ - string(servicebus.Active), - string(servicebus.Disabled), - string(servicebus.ReceiveDisabled), + string(servicebus.EntityStatusActive), + string(servicebus.EntityStatusDisabled), + string(servicebus.EntityStatusReceiveDisabled), }, false), }, }, diff --git a/internal/services/servicebus/servicebus_subscription_rule_resource.go b/internal/services/servicebus/servicebus_subscription_rule_resource.go index af8083656c5a..13b0c434934e 100644 --- a/internal/services/servicebus/servicebus_subscription_rule_resource.go +++ b/internal/services/servicebus/servicebus_subscription_rule_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/go-azure-helpers/response" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" diff --git a/internal/services/servicebus/servicebus_topic_authorization_rule_resource.go b/internal/services/servicebus/servicebus_topic_authorization_rule_resource.go index 9c359993ec21..02cdff2acdd8 100644 --- a/internal/services/servicebus/servicebus_topic_authorization_rule_resource.go +++ b/internal/services/servicebus/servicebus_topic_authorization_rule_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" diff --git a/internal/services/servicebus/servicebus_topic_data_source.go b/internal/services/servicebus/servicebus_topic_data_source.go index c7d4878e7498..a1fe3040c887 100644 --- a/internal/services/servicebus/servicebus_topic_data_source.go +++ b/internal/services/servicebus/servicebus_topic_data_source.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse" @@ -138,7 +138,7 @@ func dataSourceServiceBusTopicRead(d *pluginsdk.ResourceData, meta interface{}) return err } - if namespace.Sku.Name != servicebus.Premium { + if namespace.Sku.Name != servicebus.SkuNamePremium { const partitionCount = 16 maxSize = int(*props.MaxSizeInMegabytes / partitionCount) } diff --git a/internal/services/servicebus/servicebus_topic_resource.go b/internal/services/servicebus/servicebus_topic_resource.go index 26584e585dce..e9e6dac38bb2 100644 --- a/internal/services/servicebus/servicebus_topic_resource.go +++ b/internal/services/servicebus/servicebus_topic_resource.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" + "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/helpers/validate" @@ -58,10 +58,10 @@ func resourceServiceBusTopic() *pluginsdk.Resource { "status": { Type: pluginsdk.TypeString, Optional: true, - Default: string(servicebus.Active), + Default: string(servicebus.EntityStatusActive), ValidateFunc: validation.StringInSlice([]string{ - string(servicebus.Active), - string(servicebus.Disabled), + string(servicebus.EntityStatusActive), + string(servicebus.EntityStatusDisabled), }, true), DiffSuppressFunc: suppress.CaseDifference, }, @@ -237,7 +237,7 @@ func resourceServiceBusTopicRead(d *pluginsdk.ResourceData, meta interface{}) er return err } - if namespace.Sku.Name != servicebus.Premium { + if namespace.Sku.Name != servicebus.SkuNamePremium { const partitionCount = 16 maxSize = int(*props.MaxSizeInMegabytes / partitionCount) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/CHANGELOG.md rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/CHANGELOG.md diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json new file mode 100644 index 000000000000..d8e825b4f75c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/_meta.json @@ -0,0 +1,11 @@ +{ + "commit": "af463c3f9502d353b8a009685177f13335adb8cd", + "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", + "tag": "package-2021-06-preview", + "use": "@microsoft.azure/autorest.go@2.1.187", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-06-preview --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", + "additional_properties": { + "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + } +} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/client.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/client.go index b88e0c46cfcb..149da60ad477 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/client.go @@ -1,6 +1,6 @@ -// Package servicebus implements the Azure ARM Servicebus service API version 2017-04-01. +// Package servicebus implements the Azure ARM Servicebus service API version 2021-06-01-preview. +// // -// Azure Service Bus client package servicebus // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/disasterrecoveryconfigs.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/disasterrecoveryconfigs.go index 51629c2ce601..e9857e1e57f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/disasterrecoveryconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/disasterrecoveryconfigs.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// DisasterRecoveryConfigsClient is the azure Service Bus client +// DisasterRecoveryConfigsClient is the client for the DisasterRecoveryConfigs methods of the Servicebus service. type DisasterRecoveryConfigsClient struct { BaseClient } @@ -93,7 +93,7 @@ func (client DisasterRecoveryConfigsClient) BreakPairingPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -181,7 +181,7 @@ func (client DisasterRecoveryConfigsClient) CheckNameAvailabilityMethodPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -275,11 +275,12 @@ func (client DisasterRecoveryConfigsClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -368,7 +369,7 @@ func (client DisasterRecoveryConfigsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -403,7 +404,8 @@ func (client DisasterRecoveryConfigsClient) DeleteResponder(resp *http.Response) // resourceGroupName - name of the Resource group within the Azure subscription. // namespaceName - the namespace name // alias - the Disaster Recovery configuration name -func (client DisasterRecoveryConfigsClient) FailOver(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result autorest.Response, err error) { +// parameters - parameters required to create an Alias(Disaster Recovery configuration) +func (client DisasterRecoveryConfigsClient) FailOver(ctx context.Context, resourceGroupName string, namespaceName string, alias string, parameters *FailoverProperties) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.FailOver") defer func() { @@ -427,7 +429,7 @@ func (client DisasterRecoveryConfigsClient) FailOver(ctx context.Context, resour return result, validation.NewError("servicebus.DisasterRecoveryConfigsClient", "FailOver", err.Error()) } - req, err := client.FailOverPreparer(ctx, resourceGroupName, namespaceName, alias) + req, err := client.FailOverPreparer(ctx, resourceGroupName, namespaceName, alias, parameters) if err != nil { err = autorest.NewErrorWithError(err, "servicebus.DisasterRecoveryConfigsClient", "FailOver", nil, "Failure preparing request") return @@ -450,7 +452,7 @@ func (client DisasterRecoveryConfigsClient) FailOver(ctx context.Context, resour } // FailOverPreparer prepares the FailOver request. -func (client DisasterRecoveryConfigsClient) FailOverPreparer(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (*http.Request, error) { +func (client DisasterRecoveryConfigsClient) FailOverPreparer(ctx context.Context, resourceGroupName string, namespaceName string, alias string, parameters *FailoverProperties) (*http.Request, error) { pathParameters := map[string]interface{}{ "alias": autorest.Encode("path", alias), "namespaceName": autorest.Encode("path", namespaceName), @@ -458,16 +460,21 @@ func (client DisasterRecoveryConfigsClient) FailOverPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" 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.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover", pathParameters), autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -548,7 +555,7 @@ func (client DisasterRecoveryConfigsClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -644,7 +651,7 @@ func (client DisasterRecoveryConfigsClient) GetAuthorizationRulePreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -652,7 +659,7 @@ func (client DisasterRecoveryConfigsClient) GetAuthorizationRulePreparer(ctx con preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -735,7 +742,7 @@ func (client DisasterRecoveryConfigsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -868,7 +875,7 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesPreparer(ctx c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -876,7 +883,7 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesPreparer(ctx c preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -1001,7 +1008,7 @@ func (client DisasterRecoveryConfigsClient) ListKeysPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1009,7 +1016,7 @@ func (client DisasterRecoveryConfigsClient) ListKeysPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/enums.go new file mode 100644 index 000000000000..52ad60d6ba50 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/enums.go @@ -0,0 +1,310 @@ +package servicebus + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AccessRights enumerates the values for access rights. +type AccessRights string + +const ( + // AccessRightsListen ... + AccessRightsListen AccessRights = "Listen" + // AccessRightsManage ... + AccessRightsManage AccessRights = "Manage" + // AccessRightsSend ... + AccessRightsSend AccessRights = "Send" +) + +// PossibleAccessRightsValues returns an array of possible values for the AccessRights const type. +func PossibleAccessRightsValues() []AccessRights { + return []AccessRights{AccessRightsListen, AccessRightsManage, AccessRightsSend} +} + +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // CreatedByTypeApplication ... + CreatedByTypeApplication CreatedByType = "Application" + // CreatedByTypeKey ... + CreatedByTypeKey CreatedByType = "Key" + // CreatedByTypeManagedIdentity ... + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + // CreatedByTypeUser ... + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} +} + +// DefaultAction enumerates the values for default action. +type DefaultAction string + +const ( + // DefaultActionAllow ... + DefaultActionAllow DefaultAction = "Allow" + // DefaultActionDeny ... + DefaultActionDeny DefaultAction = "Deny" +) + +// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. +func PossibleDefaultActionValues() []DefaultAction { + return []DefaultAction{DefaultActionAllow, DefaultActionDeny} +} + +// EndPointProvisioningState enumerates the values for end point provisioning state. +type EndPointProvisioningState string + +const ( + // EndPointProvisioningStateCanceled ... + EndPointProvisioningStateCanceled EndPointProvisioningState = "Canceled" + // EndPointProvisioningStateCreating ... + EndPointProvisioningStateCreating EndPointProvisioningState = "Creating" + // EndPointProvisioningStateDeleting ... + EndPointProvisioningStateDeleting EndPointProvisioningState = "Deleting" + // EndPointProvisioningStateFailed ... + EndPointProvisioningStateFailed EndPointProvisioningState = "Failed" + // EndPointProvisioningStateSucceeded ... + EndPointProvisioningStateSucceeded EndPointProvisioningState = "Succeeded" + // EndPointProvisioningStateUpdating ... + EndPointProvisioningStateUpdating EndPointProvisioningState = "Updating" +) + +// PossibleEndPointProvisioningStateValues returns an array of possible values for the EndPointProvisioningState const type. +func PossibleEndPointProvisioningStateValues() []EndPointProvisioningState { + return []EndPointProvisioningState{EndPointProvisioningStateCanceled, EndPointProvisioningStateCreating, EndPointProvisioningStateDeleting, EndPointProvisioningStateFailed, EndPointProvisioningStateSucceeded, EndPointProvisioningStateUpdating} +} + +// EntityStatus enumerates the values for entity status. +type EntityStatus string + +const ( + // EntityStatusActive ... + EntityStatusActive EntityStatus = "Active" + // EntityStatusCreating ... + EntityStatusCreating EntityStatus = "Creating" + // EntityStatusDeleting ... + EntityStatusDeleting EntityStatus = "Deleting" + // EntityStatusDisabled ... + EntityStatusDisabled EntityStatus = "Disabled" + // EntityStatusReceiveDisabled ... + EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled" + // EntityStatusRenaming ... + EntityStatusRenaming EntityStatus = "Renaming" + // EntityStatusRestoring ... + EntityStatusRestoring EntityStatus = "Restoring" + // EntityStatusSendDisabled ... + EntityStatusSendDisabled EntityStatus = "SendDisabled" + // EntityStatusUnknown ... + EntityStatusUnknown EntityStatus = "Unknown" +) + +// PossibleEntityStatusValues returns an array of possible values for the EntityStatus const type. +func PossibleEntityStatusValues() []EntityStatus { + return []EntityStatus{EntityStatusActive, EntityStatusCreating, EntityStatusDeleting, EntityStatusDisabled, EntityStatusReceiveDisabled, EntityStatusRenaming, EntityStatusRestoring, EntityStatusSendDisabled, EntityStatusUnknown} +} + +// FilterType enumerates the values for filter type. +type FilterType string + +const ( + // FilterTypeCorrelationFilter ... + FilterTypeCorrelationFilter FilterType = "CorrelationFilter" + // FilterTypeSQLFilter ... + FilterTypeSQLFilter FilterType = "SqlFilter" +) + +// PossibleFilterTypeValues returns an array of possible values for the FilterType const type. +func PossibleFilterTypeValues() []FilterType { + return []FilterType{FilterTypeCorrelationFilter, FilterTypeSQLFilter} +} + +// KeySource enumerates the values for key source. +type KeySource string + +const ( + // KeySourceMicrosoftKeyVault ... + KeySourceMicrosoftKeyVault KeySource = "Microsoft.KeyVault" +) + +// PossibleKeySourceValues returns an array of possible values for the KeySource const type. +func PossibleKeySourceValues() []KeySource { + return []KeySource{KeySourceMicrosoftKeyVault} +} + +// KeyType enumerates the values for key type. +type KeyType string + +const ( + // KeyTypePrimaryKey ... + KeyTypePrimaryKey KeyType = "PrimaryKey" + // KeyTypeSecondaryKey ... + KeyTypeSecondaryKey KeyType = "SecondaryKey" +) + +// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{KeyTypePrimaryKey, KeyTypeSecondaryKey} +} + +// ManagedServiceIdentityType enumerates the values for managed service identity type. +type ManagedServiceIdentityType string + +const ( + // ManagedServiceIdentityTypeNone ... + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + // ManagedServiceIdentityTypeSystemAssigned ... + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + // ManagedServiceIdentityTypeSystemAssignedUserAssigned ... + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" + // ManagedServiceIdentityTypeUserAssigned ... + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns an array of possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned, ManagedServiceIdentityTypeSystemAssignedUserAssigned, ManagedServiceIdentityTypeUserAssigned} +} + +// NetworkRuleIPAction enumerates the values for network rule ip action. +type NetworkRuleIPAction string + +const ( + // NetworkRuleIPActionAllow ... + NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow" +) + +// PossibleNetworkRuleIPActionValues returns an array of possible values for the NetworkRuleIPAction const type. +func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction { + return []NetworkRuleIPAction{NetworkRuleIPActionAllow} +} + +// PrivateLinkConnectionStatus enumerates the values for private link connection status. +type PrivateLinkConnectionStatus string + +const ( + // PrivateLinkConnectionStatusApproved ... + PrivateLinkConnectionStatusApproved PrivateLinkConnectionStatus = "Approved" + // PrivateLinkConnectionStatusDisconnected ... + PrivateLinkConnectionStatusDisconnected PrivateLinkConnectionStatus = "Disconnected" + // PrivateLinkConnectionStatusPending ... + PrivateLinkConnectionStatusPending PrivateLinkConnectionStatus = "Pending" + // PrivateLinkConnectionStatusRejected ... + PrivateLinkConnectionStatusRejected PrivateLinkConnectionStatus = "Rejected" +) + +// PossiblePrivateLinkConnectionStatusValues returns an array of possible values for the PrivateLinkConnectionStatus const type. +func PossiblePrivateLinkConnectionStatusValues() []PrivateLinkConnectionStatus { + return []PrivateLinkConnectionStatus{PrivateLinkConnectionStatusApproved, PrivateLinkConnectionStatusDisconnected, PrivateLinkConnectionStatusPending, PrivateLinkConnectionStatusRejected} +} + +// ProvisioningStateDR enumerates the values for provisioning state dr. +type ProvisioningStateDR string + +const ( + // ProvisioningStateDRAccepted ... + ProvisioningStateDRAccepted ProvisioningStateDR = "Accepted" + // ProvisioningStateDRFailed ... + ProvisioningStateDRFailed ProvisioningStateDR = "Failed" + // ProvisioningStateDRSucceeded ... + ProvisioningStateDRSucceeded ProvisioningStateDR = "Succeeded" +) + +// PossibleProvisioningStateDRValues returns an array of possible values for the ProvisioningStateDR const type. +func PossibleProvisioningStateDRValues() []ProvisioningStateDR { + return []ProvisioningStateDR{ProvisioningStateDRAccepted, ProvisioningStateDRFailed, ProvisioningStateDRSucceeded} +} + +// PublicNetworkAccessFlag enumerates the values for public network access flag. +type PublicNetworkAccessFlag string + +const ( + // PublicNetworkAccessFlagDisabled ... + PublicNetworkAccessFlagDisabled PublicNetworkAccessFlag = "Disabled" + // PublicNetworkAccessFlagEnabled ... + PublicNetworkAccessFlagEnabled PublicNetworkAccessFlag = "Enabled" +) + +// PossiblePublicNetworkAccessFlagValues returns an array of possible values for the PublicNetworkAccessFlag const type. +func PossiblePublicNetworkAccessFlagValues() []PublicNetworkAccessFlag { + return []PublicNetworkAccessFlag{PublicNetworkAccessFlagDisabled, PublicNetworkAccessFlagEnabled} +} + +// RoleDisasterRecovery enumerates the values for role disaster recovery. +type RoleDisasterRecovery string + +const ( + // RoleDisasterRecoveryPrimary ... + RoleDisasterRecoveryPrimary RoleDisasterRecovery = "Primary" + // RoleDisasterRecoveryPrimaryNotReplicating ... + RoleDisasterRecoveryPrimaryNotReplicating RoleDisasterRecovery = "PrimaryNotReplicating" + // RoleDisasterRecoverySecondary ... + RoleDisasterRecoverySecondary RoleDisasterRecovery = "Secondary" +) + +// PossibleRoleDisasterRecoveryValues returns an array of possible values for the RoleDisasterRecovery const type. +func PossibleRoleDisasterRecoveryValues() []RoleDisasterRecovery { + return []RoleDisasterRecovery{RoleDisasterRecoveryPrimary, RoleDisasterRecoveryPrimaryNotReplicating, RoleDisasterRecoverySecondary} +} + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // SkuNameBasic ... + SkuNameBasic SkuName = "Basic" + // SkuNamePremium ... + SkuNamePremium SkuName = "Premium" + // SkuNameStandard ... + SkuNameStandard SkuName = "Standard" +) + +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() []SkuName { + return []SkuName{SkuNameBasic, SkuNamePremium, SkuNameStandard} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // SkuTierBasic ... + SkuTierBasic SkuTier = "Basic" + // SkuTierPremium ... + SkuTierPremium SkuTier = "Premium" + // SkuTierStandard ... + SkuTierStandard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{SkuTierBasic, SkuTierPremium, SkuTierStandard} +} + +// UnavailableReason enumerates the values for unavailable reason. +type UnavailableReason string + +const ( + // UnavailableReasonInvalidName ... + UnavailableReasonInvalidName UnavailableReason = "InvalidName" + // UnavailableReasonNameInLockdown ... + UnavailableReasonNameInLockdown UnavailableReason = "NameInLockdown" + // UnavailableReasonNameInUse ... + UnavailableReasonNameInUse UnavailableReason = "NameInUse" + // UnavailableReasonNone ... + UnavailableReasonNone UnavailableReason = "None" + // UnavailableReasonSubscriptionIsDisabled ... + UnavailableReasonSubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled" + // UnavailableReasonTooManyNamespaceInCurrentSubscription ... + UnavailableReasonTooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription" +) + +// PossibleUnavailableReasonValues returns an array of possible values for the UnavailableReason const type. +func PossibleUnavailableReasonValues() []UnavailableReason { + return []UnavailableReason{UnavailableReasonInvalidName, UnavailableReasonNameInLockdown, UnavailableReasonNameInUse, UnavailableReasonNone, UnavailableReasonSubscriptionIsDisabled, UnavailableReasonTooManyNamespaceInCurrentSubscription} +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/migrationconfigs.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/migrationconfigs.go index 919f1a9614e0..4157d2940a9c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/migrationconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/migrationconfigs.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// MigrationConfigsClient is the azure Service Bus client +// MigrationConfigsClient is the client for the MigrationConfigs methods of the Servicebus service. type MigrationConfigsClient struct { BaseClient } @@ -90,7 +90,7 @@ func (client MigrationConfigsClient) CompleteMigrationPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,11 +176,12 @@ func (client MigrationConfigsClient) CreateAndStartMigrationPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -275,7 +276,7 @@ func (client MigrationConfigsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -361,7 +362,7 @@ func (client MigrationConfigsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,7 +453,7 @@ func (client MigrationConfigsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -576,7 +577,7 @@ func (client MigrationConfigsClient) RevertPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/models.go similarity index 83% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/models.go index 452c480b69cb..13755feaedd0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/models.go @@ -18,7 +18,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus" // AccessKeys namespace/ServiceBus Connection String type AccessKeys struct { @@ -61,6 +61,8 @@ type ArmDisasterRecovery struct { autorest.Response `json:"-"` // ArmDisasterRecoveryProperties - Properties required to the Create Or Update Alias(Disaster Recovery configurations) *ArmDisasterRecoveryProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -96,6 +98,15 @@ func (adr *ArmDisasterRecovery) UnmarshalJSON(body []byte) error { } adr.ArmDisasterRecoveryProperties = &armDisasterRecoveryProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + adr.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -301,7 +312,7 @@ func NewArmDisasterRecoveryListResultPage(cur ArmDisasterRecoveryListResult, get // ArmDisasterRecoveryProperties properties required to the Create Or Update Alias(Disaster Recovery // configurations) type ArmDisasterRecoveryProperties struct { - // ProvisioningState - READ-ONLY; Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed' + // ProvisioningState - READ-ONLY; Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'ProvisioningStateDRAccepted', 'ProvisioningStateDRSucceeded', 'ProvisioningStateDRFailed' ProvisioningState ProvisioningStateDR `json:"provisioningState,omitempty"` // PendingReplicationOperationsCount - READ-ONLY; Number of entities pending to be replicated. PendingReplicationOperationsCount *int64 `json:"pendingReplicationOperationsCount,omitempty"` @@ -309,7 +320,7 @@ type ArmDisasterRecoveryProperties struct { PartnerNamespace *string `json:"partnerNamespace,omitempty"` // AlternateName - Primary/Secondary eventhub namespace name, which is part of GEO DR pairing AlternateName *string `json:"alternateName,omitempty"` - // Role - READ-ONLY; role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary' + // Role - READ-ONLY; role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'RoleDisasterRecoveryPrimary', 'RoleDisasterRecoveryPrimaryNotReplicating', 'RoleDisasterRecoverySecondary' Role RoleDisasterRecovery `json:"role,omitempty"` } @@ -325,20 +336,6 @@ func (adr ArmDisasterRecoveryProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// CaptureDescription properties to configure capture description for eventhub -type CaptureDescription struct { - // Enabled - A value that indicates whether capture description is enabled. - Enabled *bool `json:"enabled,omitempty"` - // Encoding - Enumerates the possible values for the encoding format of capture description. Possible values include: 'Avro', 'AvroDeflate' - Encoding EncodingCaptureDescription `json:"encoding,omitempty"` - // IntervalInSeconds - The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds - IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` - // SizeLimitInBytes - The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 and 524288000 bytes - SizeLimitInBytes *int32 `json:"sizeLimitInBytes,omitempty"` - // Destination - Properties of Destination where capture will be stored. (Storage Account, Blob Names) - Destination *Destination `json:"destination,omitempty"` -} - // CheckNameAvailability description of a Check Name availability request properties. type CheckNameAvailability struct { // Name - The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number. @@ -352,7 +349,7 @@ type CheckNameAvailabilityResult struct { Message *string `json:"message,omitempty"` // NameAvailable - Value indicating namespace is availability, true if the namespace is available; otherwise, false. NameAvailable *bool `json:"nameAvailable,omitempty"` - // Reason - The reason for unavailability of a namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription' + // Reason - The reason for unavailability of a namespace. Possible values include: 'UnavailableReasonNone', 'UnavailableReasonInvalidName', 'UnavailableReasonSubscriptionIsDisabled', 'UnavailableReasonNameInUse', 'UnavailableReasonNameInLockdown', 'UnavailableReasonTooManyNamespaceInCurrentSubscription' Reason UnavailableReason `json:"reason,omitempty"` } @@ -368,6 +365,14 @@ func (cnar CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ConnectionState connectionState information. +type ConnectionState struct { + // Status - Status of the connection. Possible values include: 'PrivateLinkConnectionStatusPending', 'PrivateLinkConnectionStatusApproved', 'PrivateLinkConnectionStatusRejected', 'PrivateLinkConnectionStatusDisconnected' + Status PrivateLinkConnectionStatus `json:"status,omitempty"` + // Description - Description of the connection state. + Description *string `json:"description,omitempty"` +} + // CorrelationFilter represents the correlation filter expression. type CorrelationFilter struct { // Properties - dictionary object for custom filters @@ -428,68 +433,14 @@ func (cf CorrelationFilter) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// Destination capture storage details for capture description -type Destination struct { - // Name - Name for capture destination - Name *string `json:"name,omitempty"` - // DestinationProperties - Properties describing the storage account, blob container and archive name format for capture destination - *DestinationProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for Destination. -func (d Destination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.Name != nil { - objectMap["name"] = d.Name - } - if d.DestinationProperties != nil { - objectMap["properties"] = d.DestinationProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Destination struct. -func (d *Destination) 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 "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - d.Name = &name - } - case "properties": - if v != nil { - var destinationProperties DestinationProperties - err = json.Unmarshal(*v, &destinationProperties) - if err != nil { - return err - } - d.DestinationProperties = &destinationProperties - } - } - } - - return nil -} - -// DestinationProperties properties describing the storage account, blob container and archive name format -// for capture destination -type DestinationProperties struct { - // StorageAccountResourceID - Resource id of the storage account to be used to create the blobs - StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` - // BlobContainer - Blob container Name - BlobContainer *string `json:"blobContainer,omitempty"` - // ArchiveNameFormat - Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order - ArchiveNameFormat *string `json:"archiveNameFormat,omitempty"` +// Encryption properties to configure Encryption +type Encryption struct { + // KeyVaultProperties - Properties of KeyVault + KeyVaultProperties *[]KeyVaultProperties `json:"keyVaultProperties,omitempty"` + // KeySource - Enumerates the possible value of keySource for Encryption. Possible values include: 'KeySourceMicrosoftKeyVault' + KeySource KeySource `json:"keySource,omitempty"` + // RequireInfrastructureEncryption - Enable Infrastructure Encryption (Double Encryption) + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` } // ErrorAdditionalInfo the resource management error additional info. @@ -532,29 +483,24 @@ func (er ErrorResponseError) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// Eventhub single item in List or Get Event Hub operation -type Eventhub struct { - // EventhubProperties - Properties supplied to the Create Or Update Event Hub operation. - *EventhubProperties `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 - Type *string `json:"type,omitempty"` +// FailoverProperties safe failover is to indicate the service should wait for pending replication to +// finish before switching to the secondary. +type FailoverProperties struct { + // FailoverPropertiesProperties - Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. + *FailoverPropertiesProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for Eventhub. -func (e Eventhub) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for FailoverProperties. +func (fp FailoverProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if e.EventhubProperties != nil { - objectMap["properties"] = e.EventhubProperties + if fp.FailoverPropertiesProperties != nil { + objectMap["properties"] = fp.FailoverPropertiesProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Eventhub struct. -func (e *Eventhub) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for FailoverProperties struct. +func (fp *FailoverProperties) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -564,39 +510,12 @@ func (e *Eventhub) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var eventhubProperties EventhubProperties - err = json.Unmarshal(*v, &eventhubProperties) - if err != nil { - return err - } - e.EventhubProperties = &eventhubProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - e.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var failoverPropertiesProperties FailoverPropertiesProperties + err = json.Unmarshal(*v, &failoverPropertiesProperties) if err != nil { return err } - e.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - e.Type = &typeVar + fp.FailoverPropertiesProperties = &failoverPropertiesProperties } } } @@ -604,210 +523,48 @@ func (e *Eventhub) UnmarshalJSON(body []byte) error { return nil } -// EventHubListResult the result of the List EventHubs operation. -type EventHubListResult struct { - autorest.Response `json:"-"` - // Value - Result of the List EventHubs operation. - Value *[]Eventhub `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of EventHubs. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for EventHubListResult. -func (ehlr EventHubListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ehlr.Value != nil { - objectMap["value"] = ehlr.Value - } - return json.Marshal(objectMap) -} - -// EventHubListResultIterator provides access to a complete listing of Eventhub values. -type EventHubListResultIterator struct { - i int - page EventHubListResultPage -} - -// 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 *EventHubListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventHubListResultIterator.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 *EventHubListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EventHubListResultIterator) 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 EventHubListResultIterator) Response() EventHubListResult { - 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 EventHubListResultIterator) Value() Eventhub { - if !iter.page.NotDone() { - return Eventhub{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EventHubListResultIterator type. -func NewEventHubListResultIterator(page EventHubListResultPage) EventHubListResultIterator { - return EventHubListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ehlr EventHubListResult) IsEmpty() bool { - return ehlr.Value == nil || len(*ehlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (ehlr EventHubListResult) hasNextLink() bool { - return ehlr.NextLink != nil && len(*ehlr.NextLink) != 0 -} - -// eventHubListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ehlr EventHubListResult) eventHubListResultPreparer(ctx context.Context) (*http.Request, error) { - if !ehlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ehlr.NextLink))) -} - -// EventHubListResultPage contains a page of Eventhub values. -type EventHubListResultPage struct { - fn func(context.Context, EventHubListResult) (EventHubListResult, error) - ehlr EventHubListResult -} - -// 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 *EventHubListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventHubListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.ehlr) - if err != nil { - return err - } - page.ehlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - 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 *EventHubListResultPage) Next() error { - return page.NextWithContext(context.Background()) +// FailoverPropertiesProperties safe failover is to indicate the service should wait for pending +// replication to finish before switching to the secondary. +type FailoverPropertiesProperties struct { + // IsSafeFailover - Safe failover is to indicate the service should wait for pending replication to finish before switching to the secondary. + IsSafeFailover *bool `json:"IsSafeFailover,omitempty"` } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EventHubListResultPage) NotDone() bool { - return !page.ehlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EventHubListResultPage) Response() EventHubListResult { - return page.ehlr +// Identity properties to configure User Assigned Identities for Bring your Own Keys +type Identity struct { + // PrincipalID - READ-ONLY; ObjectId from the KeyVault + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; TenantId from the KeyVault + TenantID *string `json:"tenantId,omitempty"` + // Type - Type of managed service identity. Possible values include: 'ManagedServiceIdentityTypeSystemAssigned', 'ManagedServiceIdentityTypeUserAssigned', 'ManagedServiceIdentityTypeSystemAssignedUserAssigned', 'ManagedServiceIdentityTypeNone' + Type ManagedServiceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - Properties for User Assigned Identities + UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities"` } -// Values returns the slice of values for the current page or nil if there are no values. -func (page EventHubListResultPage) Values() []Eventhub { - if page.ehlr.IsEmpty() { - return nil - } - return *page.ehlr.Value -} - -// Creates a new instance of the EventHubListResultPage type. -func NewEventHubListResultPage(cur EventHubListResult, getNextPage func(context.Context, EventHubListResult) (EventHubListResult, error)) EventHubListResultPage { - return EventHubListResultPage{ - fn: getNextPage, - ehlr: cur, - } -} - -// EventhubProperties properties supplied to the Create Or Update Event Hub operation. -type EventhubProperties struct { - // PartitionIds - READ-ONLY; Current number of shards on the Event Hub. - PartitionIds *[]string `json:"partitionIds,omitempty"` - // CreatedAt - READ-ONLY; Exact time the Event Hub was created. - CreatedAt *date.Time `json:"createdAt,omitempty"` - // UpdatedAt - READ-ONLY; The exact time the message was updated. - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - // MessageRetentionInDays - Number of days to retain the events for this Event Hub, value should be 1 to 7 days - MessageRetentionInDays *int64 `json:"messageRetentionInDays,omitempty"` - // PartitionCount - Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. - PartitionCount *int64 `json:"partitionCount,omitempty"` - // Status - Enumerates the possible values for the status of a Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' - Status EntityStatus `json:"status,omitempty"` - // CaptureDescription - Properties of capture description - CaptureDescription *CaptureDescription `json:"captureDescription,omitempty"` -} - -// MarshalJSON is the custom marshaler for EventhubProperties. -func (e EventhubProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Identity. +func (i Identity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if e.MessageRetentionInDays != nil { - objectMap["messageRetentionInDays"] = e.MessageRetentionInDays - } - if e.PartitionCount != nil { - objectMap["partitionCount"] = e.PartitionCount + if i.Type != "" { + objectMap["type"] = i.Type } - if e.Status != "" { - objectMap["status"] = e.Status - } - if e.CaptureDescription != nil { - objectMap["captureDescription"] = e.CaptureDescription + if i.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = i.UserAssignedIdentities } return json.Marshal(objectMap) } +// KeyVaultProperties properties to configure keyVault Properties +type KeyVaultProperties struct { + // KeyName - Name of the Key from KeyVault + KeyName *string `json:"keyName,omitempty"` + // KeyVaultURI - Uri of KeyVault + KeyVaultURI *string `json:"keyVaultUri,omitempty"` + // KeyVersion - Version of KeyVault + KeyVersion *string `json:"keyVersion,omitempty"` + Identity *UserAssignedIdentityProperties `json:"identity,omitempty"` +} + // MessageCountDetails message Count Details. type MessageCountDetails struct { // ActiveMessageCount - READ-ONLY; Number of active messages in the queue, topic, or subscription. @@ -1002,6 +759,8 @@ type MigrationConfigProperties struct { autorest.Response `json:"-"` // MigrationConfigPropertiesProperties - Properties required to the Create Migration Configuration *MigrationConfigPropertiesProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1037,6 +796,15 @@ func (mcp *MigrationConfigProperties) UnmarshalJSON(body []byte) error { } mcp.MigrationConfigPropertiesProperties = &migrationConfigPropertiesProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + mcp.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -1224,6 +992,8 @@ type NetworkRuleSet struct { autorest.Response `json:"-"` // NetworkRuleSetProperties - NetworkRuleSet properties *NetworkRuleSetProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1259,6 +1029,15 @@ func (nrs *NetworkRuleSet) UnmarshalJSON(body []byte) error { } nrs.NetworkRuleSetProperties = &networkRuleSetProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + nrs.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -1453,12 +1232,16 @@ func NewNetworkRuleSetListResultPage(cur NetworkRuleSetListResult, getNextPage f // NetworkRuleSetProperties networkRuleSet properties type NetworkRuleSetProperties struct { - // DefaultAction - Default Action for Network Rule Set. Possible values include: 'Allow', 'Deny' + // TrustedServiceAccessEnabled - Value that indicates whether Trusted Service Access is Enabled or not. + TrustedServiceAccessEnabled *bool `json:"trustedServiceAccessEnabled,omitempty"` + // DefaultAction - Default Action for Network Rule Set. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny' DefaultAction DefaultAction `json:"defaultAction,omitempty"` // VirtualNetworkRules - List VirtualNetwork Rules VirtualNetworkRules *[]NWRuleSetVirtualNetworkRules `json:"virtualNetworkRules,omitempty"` // IPRules - List of IpRules IPRules *[]NWRuleSetIPRules `json:"ipRules,omitempty"` + // PublicNetworkAccess - This determines if traffic is allowed over public network. By default it is enabled. Possible values include: 'PublicNetworkAccessFlagEnabled', 'PublicNetworkAccessFlagDisabled' + PublicNetworkAccess PublicNetworkAccessFlag `json:"publicNetworkAccess,omitempty"` } // NWRuleSetIPRules description of NetWorkRuleSet - IpRules resource. @@ -1676,13 +1459,19 @@ func NewOperationListResultPage(cur OperationListResult, getNextPage func(contex } } -// PremiumMessagingRegions premium Messaging Region -type PremiumMessagingRegions struct { - Properties *PremiumMessagingRegionsProperties `json:"properties,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` +// PrivateEndpoint privateEndpoint information. +type PrivateEndpoint struct { + // ID - The ARM identifier for Private Endpoint. + ID *string `json:"id,omitempty"` +} + +// PrivateEndpointConnection properties of the PrivateEndpointConnection. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnection. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1691,51 +1480,96 @@ type PremiumMessagingRegions struct { Type *string `json:"type,omitempty"` } -// MarshalJSON is the custom marshaler for PremiumMessagingRegions. -func (pmr PremiumMessagingRegions) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pmr.Properties != nil { - objectMap["properties"] = pmr.Properties + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties } - if pmr.Location != nil { - objectMap["location"] = pmr.Location + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. +func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - if pmr.Tags != nil { - objectMap["tags"] = pmr.Tags + for k, v := range m { + switch k { + case "properties": + if v != nil { + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + pec.SystemData = &systemData + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pec.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pec.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pec.Type = &typeVar + } + } } - return json.Marshal(objectMap) + + return nil } -// PremiumMessagingRegionsListResult the response of the List PremiumMessagingRegions operation. -type PremiumMessagingRegionsListResult struct { +// PrivateEndpointConnectionListResult result of the list of all private endpoint connections operation. +type PrivateEndpointConnectionListResult struct { autorest.Response `json:"-"` - // Value - Result of the List PremiumMessagingRegions type. - Value *[]PremiumMessagingRegions `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of PremiumMessagingRegions. + // Value - A collection of private endpoint connection resources. + Value *[]PrivateEndpointConnection `json:"value,omitempty"` + // NextLink - A link for the next page of private endpoint connection resources. NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for PremiumMessagingRegionsListResult. -func (pmrlr PremiumMessagingRegionsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pmrlr.Value != nil { - objectMap["value"] = pmrlr.Value - } - return json.Marshal(objectMap) -} - -// PremiumMessagingRegionsListResultIterator provides access to a complete listing of -// PremiumMessagingRegions values. -type PremiumMessagingRegionsListResultIterator struct { +// PrivateEndpointConnectionListResultIterator provides access to a complete listing of +// PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultIterator struct { i int - page PremiumMessagingRegionsListResultPage + page PrivateEndpointConnectionListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *PremiumMessagingRegionsListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PremiumMessagingRegionsListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -1760,67 +1594,67 @@ func (iter *PremiumMessagingRegionsListResultIterator) NextWithContext(ctx conte // 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 *PremiumMessagingRegionsListResultIterator) Next() error { +func (iter *PrivateEndpointConnectionListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PremiumMessagingRegionsListResultIterator) NotDone() bool { +func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter PremiumMessagingRegionsListResultIterator) Response() PremiumMessagingRegionsListResult { +func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter PremiumMessagingRegionsListResultIterator) Value() PremiumMessagingRegions { +func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection { if !iter.page.NotDone() { - return PremiumMessagingRegions{} + return PrivateEndpointConnection{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the PremiumMessagingRegionsListResultIterator type. -func NewPremiumMessagingRegionsListResultIterator(page PremiumMessagingRegionsListResultPage) PremiumMessagingRegionsListResultIterator { - return PremiumMessagingRegionsListResultIterator{page: page} +// Creates a new instance of the PrivateEndpointConnectionListResultIterator type. +func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator { + return PrivateEndpointConnectionListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (pmrlr PremiumMessagingRegionsListResult) IsEmpty() bool { - return pmrlr.Value == nil || len(*pmrlr.Value) == 0 +func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool { + return peclr.Value == nil || len(*peclr.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (pmrlr PremiumMessagingRegionsListResult) hasNextLink() bool { - return pmrlr.NextLink != nil && len(*pmrlr.NextLink) != 0 +func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool { + return peclr.NextLink != nil && len(*peclr.NextLink) != 0 } -// premiumMessagingRegionsListResultPreparer prepares a request to retrieve the next set of results. +// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (pmrlr PremiumMessagingRegionsListResult) premiumMessagingRegionsListResultPreparer(ctx context.Context) (*http.Request, error) { - if !pmrlr.hasNextLink() { +func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if !peclr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(pmrlr.NextLink))) + autorest.WithBaseURL(to.String(peclr.NextLink))) } -// PremiumMessagingRegionsListResultPage contains a page of PremiumMessagingRegions values. -type PremiumMessagingRegionsListResultPage struct { - fn func(context.Context, PremiumMessagingRegionsListResult) (PremiumMessagingRegionsListResult, error) - pmrlr PremiumMessagingRegionsListResult +// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values. +type PrivateEndpointConnectionListResultPage struct { + fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error) + peclr PrivateEndpointConnectionListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *PremiumMessagingRegionsListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PremiumMessagingRegionsListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -1830,11 +1664,11 @@ func (page *PremiumMessagingRegionsListResultPage) NextWithContext(ctx context.C }() } for { - next, err := page.fn(ctx, page.pmrlr) + next, err := page.fn(ctx, page.peclr) if err != nil { return err } - page.pmrlr = next + page.peclr = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -1845,54 +1679,186 @@ func (page *PremiumMessagingRegionsListResultPage) NextWithContext(ctx context.C // 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 *PremiumMessagingRegionsListResultPage) Next() error { +func (page *PrivateEndpointConnectionListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PremiumMessagingRegionsListResultPage) NotDone() bool { - return !page.pmrlr.IsEmpty() +func (page PrivateEndpointConnectionListResultPage) NotDone() bool { + return !page.peclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page PremiumMessagingRegionsListResultPage) Response() PremiumMessagingRegionsListResult { - return page.pmrlr +func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult { + return page.peclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page PremiumMessagingRegionsListResultPage) Values() []PremiumMessagingRegions { - if page.pmrlr.IsEmpty() { +func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection { + if page.peclr.IsEmpty() { return nil } - return *page.pmrlr.Value + return *page.peclr.Value } -// Creates a new instance of the PremiumMessagingRegionsListResultPage type. -func NewPremiumMessagingRegionsListResultPage(cur PremiumMessagingRegionsListResult, getNextPage func(context.Context, PremiumMessagingRegionsListResult) (PremiumMessagingRegionsListResult, error)) PremiumMessagingRegionsListResultPage { - return PremiumMessagingRegionsListResultPage{ +// Creates a new instance of the PrivateEndpointConnectionListResultPage type. +func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage { + return PrivateEndpointConnectionListResultPage{ fn: getNextPage, - pmrlr: cur, + peclr: cur, } } -// PremiumMessagingRegionsProperties ... -type PremiumMessagingRegionsProperties struct { - // Code - READ-ONLY; Region code - Code *string `json:"code,omitempty"` - // FullName - READ-ONLY; Full name of the region - FullName *string `json:"fullName,omitempty"` +// PrivateEndpointConnectionProperties properties of the private endpoint connection resource. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - The Private Endpoint resource for this Connection. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Details about the state of the connection. + PrivateLinkServiceConnectionState *ConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - Provisioning state of the Private Endpoint Connection. Possible values include: 'EndPointProvisioningStateCreating', 'EndPointProvisioningStateUpdating', 'EndPointProvisioningStateDeleting', 'EndPointProvisioningStateSucceeded', 'EndPointProvisioningStateCanceled', 'EndPointProvisioningStateFailed' + ProvisioningState EndPointProvisioningState `json:"provisioningState,omitempty"` } -// MarshalJSON is the custom marshaler for PremiumMessagingRegionsProperties. -func (pmr PremiumMessagingRegionsProperties) MarshalJSON() ([]byte, error) { +// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointConnectionsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(PrivateEndpointConnectionsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result. +func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("servicebus.PrivateEndpointConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// PrivateLinkResource information of the private link resource. +type PrivateLinkResource struct { + // PrivateLinkResourceProperties - Properties of the private link resource. + *PrivateLinkResourceProperties `json:"properties,omitempty"` + // ID - Fully qualified identifier of the resource. + ID *string `json:"id,omitempty"` + // Name - Name of the resource + Name *string `json:"name,omitempty"` + // Type - Type of the resource + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkResource. +func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if plr.PrivateLinkResourceProperties != nil { + objectMap["properties"] = plr.PrivateLinkResourceProperties + } + if plr.ID != nil { + objectMap["id"] = plr.ID + } + if plr.Name != nil { + objectMap["name"] = plr.Name + } + if plr.Type != nil { + objectMap["type"] = plr.Type + } return json.Marshal(objectMap) } +// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct. +func (plr *PrivateLinkResource) 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 privateLinkResourceProperties PrivateLinkResourceProperties + err = json.Unmarshal(*v, &privateLinkResourceProperties) + if err != nil { + return err + } + plr.PrivateLinkResourceProperties = &privateLinkResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + plr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + plr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + plr.Type = &typeVar + } + } + } + + return nil +} + +// PrivateLinkResourceProperties properties of PrivateLinkResource +type PrivateLinkResourceProperties struct { + GroupID *string `json:"groupId,omitempty"` + // RequiredMembers - Required Members + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + // RequiredZoneNames - Required Zone Names + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} + +// PrivateLinkResourcesListResult result of the List private link resources operation. +type PrivateLinkResourcesListResult struct { + autorest.Response `json:"-"` + // Value - A collection of private link resources + Value *[]PrivateLinkResource `json:"value,omitempty"` + // NextLink - A link for the next page of private link resources. + NextLink *string `json:"nextLink,omitempty"` +} + // RegenerateAccessKeyParameters parameters supplied to the Regenerate Authorization Rule operation, // specifies which key needs to be reset. type RegenerateAccessKeyParameters struct { - // KeyType - The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey' + // KeyType - The access key to regenerate. Possible values include: 'KeyTypePrimaryKey', 'KeyTypeSecondaryKey' KeyType KeyType `json:"keyType,omitempty"` // Key - Optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType Key *string `json:"key,omitempty"` @@ -1945,6 +1911,8 @@ type Rule struct { autorest.Response `json:"-"` // Ruleproperties - Properties of Rule resource *Ruleproperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -1980,6 +1948,15 @@ func (r *Rule) UnmarshalJSON(body []byte) error { } r.Ruleproperties = &ruleproperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + r.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -2189,6 +2166,8 @@ type SBAuthorizationRule struct { autorest.Response `json:"-"` // SBAuthorizationRuleProperties - AuthorizationRule properties. *SBAuthorizationRuleProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -2224,6 +2203,15 @@ func (sar *SBAuthorizationRule) UnmarshalJSON(body []byte) error { } sar.SBAuthorizationRuleProperties = &sBAuthorizationRuleProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + sar.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -2423,11 +2411,25 @@ type SBAuthorizationRuleProperties struct { Rights *[]AccessRights `json:"rights,omitempty"` } +// SBClientAffineProperties properties specific to client affine subscriptions. +type SBClientAffineProperties struct { + // ClientID - Indicates the Client ID of the application that created the client-affine subscription. + ClientID *string `json:"clientId,omitempty"` + // IsDurable - For client-affine subscriptions, this value indicates whether the subscription is durable or not. + IsDurable *bool `json:"isDurable,omitempty"` + // IsShared - For client-affine subscriptions, this value indicates whether the subscription is shared or not. + IsShared *bool `json:"isShared,omitempty"` +} + // SBNamespace description of a namespace resource. type SBNamespace struct { autorest.Response `json:"-"` - // Sku - Properties of Sku + // Sku - Properties of SKU Sku *SBSku `json:"sku,omitempty"` + // Identity - Properties of BYOK Identity description + Identity *Identity `json:"identity,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // SBNamespaceProperties - Properties of the namespace. *SBNamespaceProperties `json:"properties,omitempty"` // Location - The Geo-location where the resource lives @@ -2448,6 +2450,9 @@ func (sn SBNamespace) MarshalJSON() ([]byte, error) { if sn.Sku != nil { objectMap["sku"] = sn.Sku } + if sn.Identity != nil { + objectMap["identity"] = sn.Identity + } if sn.SBNamespaceProperties != nil { objectMap["properties"] = sn.SBNamespaceProperties } @@ -2478,6 +2483,24 @@ func (sn *SBNamespace) UnmarshalJSON(body []byte) error { } sn.Sku = &sku } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + sn.Identity = &identity + } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + sn.SystemData = &systemData + } case "properties": if v != nil { var sBNamespaceProperties SBNamespaceProperties @@ -2697,17 +2720,13 @@ func NewSBNamespaceListResultPage(cur SBNamespaceListResult, getNextPage func(co } } -// SBNamespaceMigrate namespace Migrate Object -type SBNamespaceMigrate struct { - // TargetNamespaceType - Type of namespaces. Possible values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', 'Relay' - TargetNamespaceType NameSpaceType `json:"targetNamespaceType,omitempty"` -} - // SBNamespaceProperties properties of the namespace. type SBNamespaceProperties struct { // ProvisioningState - READ-ONLY; Provisioning state of the namespace. ProvisioningState *string `json:"provisioningState,omitempty"` - // CreatedAt - READ-ONLY; The time the namespace was created. + // Status - READ-ONLY; Status of the namespace. + Status *string `json:"status,omitempty"` + // CreatedAt - READ-ONLY; The time the namespace was created CreatedAt *date.Time `json:"createdAt,omitempty"` // UpdatedAt - READ-ONLY; The time the namespace was updated. UpdatedAt *date.Time `json:"updatedAt,omitempty"` @@ -2715,20 +2734,42 @@ type SBNamespaceProperties struct { ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` // MetricID - READ-ONLY; Identifier for Azure Insights metrics MetricID *string `json:"metricId,omitempty"` + // ZoneRedundant - Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. + ZoneRedundant *bool `json:"zoneRedundant,omitempty"` + // Encryption - Properties of BYOK Encryption description + Encryption *Encryption `json:"encryption,omitempty"` + // PrivateEndpointConnections - List of private endpoint connections. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // DisableLocalAuth - This property disables SAS authentication for the Service Bus namespace. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` } // MarshalJSON is the custom marshaler for SBNamespaceProperties. func (snp SBNamespaceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if snp.ZoneRedundant != nil { + objectMap["zoneRedundant"] = snp.ZoneRedundant + } + if snp.Encryption != nil { + objectMap["encryption"] = snp.Encryption + } + if snp.PrivateEndpointConnections != nil { + objectMap["privateEndpointConnections"] = snp.PrivateEndpointConnections + } + if snp.DisableLocalAuth != nil { + objectMap["disableLocalAuth"] = snp.DisableLocalAuth + } return json.Marshal(objectMap) } // SBNamespaceUpdateParameters description of a namespace resource. type SBNamespaceUpdateParameters struct { - // Sku - Properties of Sku + // Sku - Properties of SKU Sku *SBSku `json:"sku,omitempty"` // SBNamespaceProperties - Properties of the namespace. *SBNamespaceProperties `json:"properties,omitempty"` + // Identity - Properties of BYOK Identity description + Identity *Identity `json:"identity,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` // Tags - Resource tags @@ -2750,6 +2791,9 @@ func (snup SBNamespaceUpdateParameters) MarshalJSON() ([]byte, error) { if snup.SBNamespaceProperties != nil { objectMap["properties"] = snup.SBNamespaceProperties } + if snup.Identity != nil { + objectMap["identity"] = snup.Identity + } if snup.Location != nil { objectMap["location"] = snup.Location } @@ -2786,6 +2830,15 @@ func (snup *SBNamespaceUpdateParameters) UnmarshalJSON(body []byte) error { } snup.SBNamespaceProperties = &sBNamespaceProperties } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + snup.Identity = &identity + } case "location": if v != nil { var location string @@ -2842,6 +2895,8 @@ type SBQueue struct { autorest.Response `json:"-"` // SBQueueProperties - Queue Properties *SBQueueProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -2877,6 +2932,15 @@ func (sq *SBQueue) UnmarshalJSON(body []byte) error { } sq.SBQueueProperties = &sBQueueProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + sq.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -3087,6 +3151,8 @@ type SBQueueProperties struct { LockDuration *string `json:"lockDuration,omitempty"` // MaxSizeInMegabytes - The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. MaxSizeInMegabytes *int32 `json:"maxSizeInMegabytes,omitempty"` + // MaxMessageSizeInKilobytes - Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. + MaxMessageSizeInKilobytes *int64 `json:"maxMessageSizeInKilobytes,omitempty"` // RequiresDuplicateDetection - A value indicating if this queue requires duplicate detection. RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` // RequiresSession - A value that indicates whether the queue supports the concept of sessions. @@ -3099,7 +3165,7 @@ type SBQueueProperties struct { DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` // MaxDeliveryCount - The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10. MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` - // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' + // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'EntityStatusActive', 'EntityStatusDisabled', 'EntityStatusRestoring', 'EntityStatusSendDisabled', 'EntityStatusReceiveDisabled', 'EntityStatusCreating', 'EntityStatusDeleting', 'EntityStatusRenaming', 'EntityStatusUnknown' Status EntityStatus `json:"status,omitempty"` // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled. EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` @@ -3124,6 +3190,9 @@ func (sqp SBQueueProperties) MarshalJSON() ([]byte, error) { if sqp.MaxSizeInMegabytes != nil { objectMap["maxSizeInMegabytes"] = sqp.MaxSizeInMegabytes } + if sqp.MaxMessageSizeInKilobytes != nil { + objectMap["maxMessageSizeInKilobytes"] = sqp.MaxMessageSizeInKilobytes + } if sqp.RequiresDuplicateDetection != nil { objectMap["requiresDuplicateDetection"] = sqp.RequiresDuplicateDetection } @@ -3168,7 +3237,7 @@ func (sqp SBQueueProperties) MarshalJSON() ([]byte, error) { // SBSku SKU of the namespace. type SBSku struct { - // Name - Name of this SKU. Possible values include: 'Basic', 'Standard', 'Premium' + // Name - Name of this SKU. Possible values include: 'SkuNameBasic', 'SkuNameStandard', 'SkuNamePremium' Name SkuName `json:"name,omitempty"` // Tier - The billing tier of this particular SKU. Possible values include: 'SkuTierBasic', 'SkuTierStandard', 'SkuTierPremium' Tier SkuTier `json:"tier,omitempty"` @@ -3181,6 +3250,8 @@ type SBSubscription struct { autorest.Response `json:"-"` // SBSubscriptionProperties - Properties of subscriptions resource. *SBSubscriptionProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -3216,6 +3287,15 @@ func (ss *SBSubscription) UnmarshalJSON(body []byte) error { } ss.SBSubscriptionProperties = &sBSubscriptionProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + ss.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -3434,7 +3514,7 @@ type SBSubscriptionProperties struct { DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` // MaxDeliveryCount - Number of maximum deliveries. MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` - // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' + // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'EntityStatusActive', 'EntityStatusDisabled', 'EntityStatusRestoring', 'EntityStatusSendDisabled', 'EntityStatusReceiveDisabled', 'EntityStatusCreating', 'EntityStatusDeleting', 'EntityStatusRenaming', 'EntityStatusUnknown' Status EntityStatus `json:"status,omitempty"` // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled. EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` @@ -3444,6 +3524,10 @@ type SBSubscriptionProperties struct { ForwardTo *string `json:"forwardTo,omitempty"` // ForwardDeadLetteredMessagesTo - Queue/Topic name to forward the Dead Letter message ForwardDeadLetteredMessagesTo *string `json:"forwardDeadLetteredMessagesTo,omitempty"` + // IsClientAffine - Value that indicates whether the subscription has an affinity to the client id. + IsClientAffine *bool `json:"isClientAffine,omitempty"` + // ClientAffineProperties - Properties specific to client affine subscriptions. + ClientAffineProperties *SBClientAffineProperties `json:"clientAffineProperties,omitempty"` } // MarshalJSON is the custom marshaler for SBSubscriptionProperties. @@ -3485,6 +3569,12 @@ func (ssp SBSubscriptionProperties) MarshalJSON() ([]byte, error) { if ssp.ForwardDeadLetteredMessagesTo != nil { objectMap["forwardDeadLetteredMessagesTo"] = ssp.ForwardDeadLetteredMessagesTo } + if ssp.IsClientAffine != nil { + objectMap["isClientAffine"] = ssp.IsClientAffine + } + if ssp.ClientAffineProperties != nil { + objectMap["clientAffineProperties"] = ssp.ClientAffineProperties + } return json.Marshal(objectMap) } @@ -3493,6 +3583,8 @@ type SBTopic struct { autorest.Response `json:"-"` // SBTopicProperties - Properties of topic resource. *SBTopicProperties `json:"properties,omitempty"` + // SystemData - READ-ONLY; The system meta data relating to this resource. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -3528,6 +3620,15 @@ func (st *SBTopic) UnmarshalJSON(body []byte) error { } st.SBTopicProperties = &sBTopicProperties } + case "systemData": + if v != nil { + var systemData SystemData + err = json.Unmarshal(*v, &systemData) + if err != nil { + return err + } + st.SystemData = &systemData + } case "id": if v != nil { var ID string @@ -3738,13 +3839,15 @@ type SBTopicProperties struct { DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` // MaxSizeInMegabytes - Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024. MaxSizeInMegabytes *int32 `json:"maxSizeInMegabytes,omitempty"` + // MaxMessageSizeInKilobytes - Maximum size (in KB) of the message payload that can be accepted by the topic. This property is only used in Premium today and default is 1024. + MaxMessageSizeInKilobytes *int64 `json:"maxMessageSizeInKilobytes,omitempty"` // RequiresDuplicateDetection - Value indicating if this topic requires duplicate detection. RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` // DuplicateDetectionHistoryTimeWindow - ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` // EnableBatchedOperations - Value that indicates whether server-side batched operations are enabled. EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` - // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown' + // Status - Enumerates the possible values for the status of a messaging entity. Possible values include: 'EntityStatusActive', 'EntityStatusDisabled', 'EntityStatusRestoring', 'EntityStatusSendDisabled', 'EntityStatusReceiveDisabled', 'EntityStatusCreating', 'EntityStatusDeleting', 'EntityStatusRenaming', 'EntityStatusUnknown' Status EntityStatus `json:"status,omitempty"` // SupportOrdering - Value that indicates whether the topic supports ordering. SupportOrdering *bool `json:"supportOrdering,omitempty"` @@ -3765,6 +3868,9 @@ func (stp SBTopicProperties) MarshalJSON() ([]byte, error) { if stp.MaxSizeInMegabytes != nil { objectMap["maxSizeInMegabytes"] = stp.MaxSizeInMegabytes } + if stp.MaxMessageSizeInKilobytes != nil { + objectMap["maxMessageSizeInKilobytes"] = stp.MaxMessageSizeInKilobytes + } if stp.RequiresDuplicateDetection != nil { objectMap["requiresDuplicateDetection"] = stp.RequiresDuplicateDetection } @@ -3820,6 +3926,22 @@ type Subnet struct { ID *string `json:"id,omitempty"` } +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The type of identity that last modified the resource. + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` +} + // TrackedResource the Resource definition. type TrackedResource struct { // Location - The Geo-location where the resource lives @@ -3845,3 +3967,23 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { } return json.Marshal(objectMap) } + +// UserAssignedIdentity recognized Dictionary value. +type UserAssignedIdentity struct { + // PrincipalID - READ-ONLY; Principal Id of user assigned identity + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; Client Id of user assigned identity + ClientID *string `json:"clientId,omitempty"` +} + +// MarshalJSON is the custom marshaler for UserAssignedIdentity. +func (uai UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// UserAssignedIdentityProperties ... +type UserAssignedIdentityProperties struct { + // UserAssignedIdentity - ARM ID of user Identity selected for encryption + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/namespaces.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/namespaces.go index bced629196ae..6e34c5da36d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/namespaces.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// NamespacesClient is the azure Service Bus client +// NamespacesClient is the client for the Namespaces methods of the Servicebus service. type NamespacesClient struct { BaseClient } @@ -79,7 +79,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,11 +159,12 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -266,11 +267,12 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -355,11 +357,12 @@ func (client NamespacesClient) CreateOrUpdateNetworkRuleSetPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -436,7 +439,7 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +539,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -621,7 +624,7 @@ func (client NamespacesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -712,7 +715,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -798,7 +801,7 @@ func (client NamespacesClient) GetNetworkRuleSetPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -874,7 +877,7 @@ func (client NamespacesClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1002,7 +1005,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1125,7 +1128,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1253,7 +1256,7 @@ func (client NamespacesClient) ListKeysPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1344,7 +1347,7 @@ func (client NamespacesClient) ListNetworkRuleSetsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1412,94 +1415,6 @@ func (client NamespacesClient) ListNetworkRuleSetsComplete(ctx context.Context, return } -// Migrate this operation Migrate the given namespace to provided name type -// Parameters: -// resourceGroupName - name of the Resource group within the Azure subscription. -// namespaceName - the namespace name -// parameters - parameters supplied to migrate namespace type. -func (client NamespacesClient) Migrate(ctx context.Context, resourceGroupName string, namespaceName string, parameters SBNamespaceMigrate) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Migrate") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: namespaceName, - Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { - return result, validation.NewError("servicebus.NamespacesClient", "Migrate", err.Error()) - } - - req, err := client.MigratePreparer(ctx, resourceGroupName, namespaceName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "Migrate", nil, "Failure preparing request") - return - } - - resp, err := client.MigrateSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "Migrate", resp, "Failure sending request") - return - } - - result, err = client.MigrateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "Migrate", resp, "Failure responding to request") - return - } - - return -} - -// MigratePreparer prepares the Migrate request. -func (client NamespacesClient) MigratePreparer(ctx context.Context, resourceGroupName string, namespaceName string, parameters SBNamespaceMigrate) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "namespaceName": autorest.Encode("path", namespaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-04-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.ServiceBus/namespaces/{namespaceName}/migrate", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// MigrateSender sends the Migrate request. The method will close the -// http.Response Body if it receives an error. -func (client NamespacesClient) MigrateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// MigrateResponder handles the response to the Migrate request. The method always -// closes the http.Response Body. -func (client NamespacesClient) MigrateResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByClosing()) - result.Response = resp - return -} - // RegenerateKeys regenerates the primary or secondary connection strings for the namespace. // Parameters: // resourceGroupName - name of the Resource group within the Azure subscription. @@ -1561,7 +1476,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1651,7 +1566,7 @@ func (client NamespacesClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/operations.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/operations.go index 58feeaa3fcdb..9bcd98ac66db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/operations.go @@ -14,7 +14,7 @@ import ( "net/http" ) -// OperationsClient is the azure Service Bus client +// OperationsClient is the client for the Operations methods of the Servicebus service. type OperationsClient struct { BaseClient } @@ -71,7 +71,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 = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privateendpointconnections.go new file mode 100644 index 000000000000..d6ea029c1544 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privateendpointconnections.go @@ -0,0 +1,431 @@ +package servicebus + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateEndpointConnectionsClient is the client for the PrivateEndpointConnections methods of the Servicebus service. +type PrivateEndpointConnectionsClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates PrivateEndpointConnections of service namespace. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +// privateEndpointConnectionName - the PrivateEndpointConnection name +// parameters - parameters supplied to update Status of PrivateEndPoint Connection to namespace resource. +func (client PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.PrivateEndpointConnectionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, namespaceName, privateEndpointConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateEndpointConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.SystemData = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(parameters), + 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 PrivateEndpointConnectionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing Private Endpoint Connection. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +// privateEndpointConnectionName - the PrivateEndpointConnection name +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, namespaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionsDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a description for the specified Private Endpoint Connection. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +// privateEndpointConnectionName - the PrivateEndpointConnection name +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, namespaceName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}", 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 PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the available PrivateEndpointConnections within a namespace. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, namespaceName string) (result PrivateEndpointConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.peclr.Response.Response != nil { + sc = result.peclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.PrivateEndpointConnectionsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.peclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.peclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + return + } + if result.peclr.hasNextLink() && result.peclr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client PrivateEndpointConnectionsClient) listNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) { + req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateEndpointConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateEndpointConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result PrivateEndpointConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, namespaceName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privatelinkresources.go new file mode 100644 index 000000000000..456d9a3947bb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/privatelinkresources.go @@ -0,0 +1,119 @@ +package servicebus + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// 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" +) + +// PrivateLinkResourcesClient is the client for the PrivateLinkResources methods of the Servicebus service. +type PrivateLinkResourcesClient struct { + BaseClient +} + +// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client. +func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient { + return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets lists of resources that supports Privatelinks. +// Parameters: +// resourceGroupName - name of the Resource group within the Azure subscription. +// namespaceName - the namespace name +func (client PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string) (result PrivateLinkResourcesListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.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: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicebus.PrivateLinkResourcesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateLinkResourcesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.PrivateLinkResourcesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PrivateLinkResourcesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkResourcesClient) GetPreparer(ctx context.Context, resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/privateLinkResources", 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 PrivateLinkResourcesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) GetResponder(resp *http.Response) (result PrivateLinkResourcesListResult, err error) { + err = autorest.Respond( + resp, + 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/servicebus/mgmt/2017-04-01/servicebus/queues.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/queues.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/queues.go index 6b2ac7423093..51860ed7400f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/queues.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/queues.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// QueuesClient is the azure Service Bus client +// QueuesClient is the client for the Queues methods of the Servicebus service. type QueuesClient struct { BaseClient } @@ -91,11 +91,12 @@ func (client QueuesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -192,11 +193,12 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -284,7 +286,7 @@ func (client QueuesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +380,7 @@ func (client QueuesClient) DeleteAuthorizationRulePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -467,7 +469,7 @@ func (client QueuesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,7 +564,7 @@ func (client QueuesClient) GetAuthorizationRulePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -657,7 +659,7 @@ func (client QueuesClient) ListAuthorizationRulesPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +801,7 @@ func (client QueuesClient) ListByNamespacePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -937,7 +939,7 @@ func (client QueuesClient) ListKeysPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1033,7 +1035,7 @@ func (client QueuesClient) RegenerateKeysPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/rules.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/rules.go index 279297a95868..9fd10bb35e11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/rules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/rules.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// RulesClient is the azure Service Bus client +// RulesClient is the client for the Rules methods of the Servicebus service. type RulesClient struct { BaseClient } @@ -64,16 +64,7 @@ func (client RulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName {Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: ruleName, Constraints: []validation.Constraint{{Target: "ruleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "ruleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Ruleproperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.InclusiveMinimum, Rule: int64(20), Chain: nil}, - }}, - }}, - }}}}}); err != nil { + {Target: "ruleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("servicebus.RulesClient", "CreateOrUpdate", err.Error()) } @@ -110,11 +101,12 @@ func (client RulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -212,7 +204,7 @@ func (client RulesClient) DeletePreparer(ctx context.Context, resourceGroupName "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -311,7 +303,7 @@ func (client RulesClient) GetPreparer(ctx context.Context, resourceGroupName str "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -425,7 +417,7 @@ func (client RulesClient) ListBySubscriptionsPreparer(ctx context.Context, resou "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/subscriptions.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/subscriptions.go index c10b53b1f2df..0f78e281c66e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/subscriptions.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// SubscriptionsClient is the azure Service Bus client +// SubscriptionsClient is the client for the Subscriptions methods of the Servicebus service. type SubscriptionsClient struct { BaseClient } @@ -96,11 +96,12 @@ func (client SubscriptionsClient) CreateOrUpdatePreparer(ctx context.Context, re "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -193,7 +194,7 @@ func (client SubscriptionsClient) DeletePreparer(ctx context.Context, resourceGr "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,7 +288,7 @@ func (client SubscriptionsClient) GetPreparer(ctx context.Context, resourceGroup "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -396,7 +397,7 @@ func (client SubscriptionsClient) ListByTopicPreparer(ctx context.Context, resou "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/topics.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/topics.go index 985e2f35cbcf..91462d403a84 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/topics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/topics.go @@ -15,7 +15,7 @@ import ( "net/http" ) -// TopicsClient is the azure Service Bus client +// TopicsClient is the client for the Topics methods of the Servicebus service. type TopicsClient struct { BaseClient } @@ -91,11 +91,12 @@ func (client TopicsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -192,11 +193,12 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(ctx context.C "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -284,7 +286,7 @@ func (client TopicsClient) DeletePreparer(ctx context.Context, resourceGroupName "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,7 +380,7 @@ func (client TopicsClient) DeleteAuthorizationRulePreparer(ctx context.Context, "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -467,7 +469,7 @@ func (client TopicsClient) GetPreparer(ctx context.Context, resourceGroupName st "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,7 +564,7 @@ func (client TopicsClient) GetAuthorizationRulePreparer(ctx context.Context, res "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -657,7 +659,7 @@ func (client TopicsClient) ListAuthorizationRulesPreparer(ctx context.Context, r "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +801,7 @@ func (client TopicsClient) ListByNamespacePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -937,7 +939,7 @@ func (client TopicsClient) ListKeysPreparer(ctx context.Context, resourceGroupNa "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1033,7 +1035,7 @@ func (client TopicsClient) RegenerateKeysPreparer(ctx context.Context, resourceG "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-04-01" + const APIVersion = "2021-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/version.go similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/version.go index e814f30dc523..3da1a0663295 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/version.go @@ -10,7 +10,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() + " servicebus/2017-04-01" + return "Azure-SDK-For-Go/" + Version() + " servicebus/2021-06-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json deleted file mode 100644 index 2ed4aa51e048..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", - "tag": "package-2017-04", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2017-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/servicebus/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/enums.go deleted file mode 100644 index d45a52af771b..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/enums.go +++ /dev/null @@ -1,238 +0,0 @@ -package servicebus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// AccessRights enumerates the values for access rights. -type AccessRights string - -const ( - // Listen ... - Listen AccessRights = "Listen" - // Manage ... - Manage AccessRights = "Manage" - // SendEnumValue ... - SendEnumValue AccessRights = "Send" -) - -// PossibleAccessRightsValues returns an array of possible values for the AccessRights const type. -func PossibleAccessRightsValues() []AccessRights { - return []AccessRights{Listen, Manage, SendEnumValue} -} - -// DefaultAction enumerates the values for default action. -type DefaultAction string - -const ( - // Allow ... - Allow DefaultAction = "Allow" - // Deny ... - Deny DefaultAction = "Deny" -) - -// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type. -func PossibleDefaultActionValues() []DefaultAction { - return []DefaultAction{Allow, Deny} -} - -// EncodingCaptureDescription enumerates the values for encoding capture description. -type EncodingCaptureDescription string - -const ( - // Avro ... - Avro EncodingCaptureDescription = "Avro" - // AvroDeflate ... - AvroDeflate EncodingCaptureDescription = "AvroDeflate" -) - -// PossibleEncodingCaptureDescriptionValues returns an array of possible values for the EncodingCaptureDescription const type. -func PossibleEncodingCaptureDescriptionValues() []EncodingCaptureDescription { - return []EncodingCaptureDescription{Avro, AvroDeflate} -} - -// EntityStatus enumerates the values for entity status. -type EntityStatus string - -const ( - // Active ... - Active EntityStatus = "Active" - // Creating ... - Creating EntityStatus = "Creating" - // Deleting ... - Deleting EntityStatus = "Deleting" - // Disabled ... - Disabled EntityStatus = "Disabled" - // ReceiveDisabled ... - ReceiveDisabled EntityStatus = "ReceiveDisabled" - // Renaming ... - Renaming EntityStatus = "Renaming" - // Restoring ... - Restoring EntityStatus = "Restoring" - // SendDisabled ... - SendDisabled EntityStatus = "SendDisabled" - // Unknown ... - Unknown EntityStatus = "Unknown" -) - -// PossibleEntityStatusValues returns an array of possible values for the EntityStatus const type. -func PossibleEntityStatusValues() []EntityStatus { - return []EntityStatus{Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, Restoring, SendDisabled, Unknown} -} - -// FilterType enumerates the values for filter type. -type FilterType string - -const ( - // FilterTypeCorrelationFilter ... - FilterTypeCorrelationFilter FilterType = "CorrelationFilter" - // FilterTypeSQLFilter ... - FilterTypeSQLFilter FilterType = "SqlFilter" -) - -// PossibleFilterTypeValues returns an array of possible values for the FilterType const type. -func PossibleFilterTypeValues() []FilterType { - return []FilterType{FilterTypeCorrelationFilter, FilterTypeSQLFilter} -} - -// KeyType enumerates the values for key type. -type KeyType string - -const ( - // PrimaryKey ... - PrimaryKey KeyType = "PrimaryKey" - // SecondaryKey ... - SecondaryKey KeyType = "SecondaryKey" -) - -// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. -func PossibleKeyTypeValues() []KeyType { - return []KeyType{PrimaryKey, SecondaryKey} -} - -// NameSpaceType enumerates the values for name space type. -type NameSpaceType string - -const ( - // EventHub ... - EventHub NameSpaceType = "EventHub" - // Messaging ... - Messaging NameSpaceType = "Messaging" - // Mixed ... - Mixed NameSpaceType = "Mixed" - // NotificationHub ... - NotificationHub NameSpaceType = "NotificationHub" - // Relay ... - Relay NameSpaceType = "Relay" -) - -// PossibleNameSpaceTypeValues returns an array of possible values for the NameSpaceType const type. -func PossibleNameSpaceTypeValues() []NameSpaceType { - return []NameSpaceType{EventHub, Messaging, Mixed, NotificationHub, Relay} -} - -// NetworkRuleIPAction enumerates the values for network rule ip action. -type NetworkRuleIPAction string - -const ( - // NetworkRuleIPActionAllow ... - NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow" -) - -// PossibleNetworkRuleIPActionValues returns an array of possible values for the NetworkRuleIPAction const type. -func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction { - return []NetworkRuleIPAction{NetworkRuleIPActionAllow} -} - -// ProvisioningStateDR enumerates the values for provisioning state dr. -type ProvisioningStateDR string - -const ( - // Accepted ... - Accepted ProvisioningStateDR = "Accepted" - // Failed ... - Failed ProvisioningStateDR = "Failed" - // Succeeded ... - Succeeded ProvisioningStateDR = "Succeeded" -) - -// PossibleProvisioningStateDRValues returns an array of possible values for the ProvisioningStateDR const type. -func PossibleProvisioningStateDRValues() []ProvisioningStateDR { - return []ProvisioningStateDR{Accepted, Failed, Succeeded} -} - -// RoleDisasterRecovery enumerates the values for role disaster recovery. -type RoleDisasterRecovery string - -const ( - // Primary ... - Primary RoleDisasterRecovery = "Primary" - // PrimaryNotReplicating ... - PrimaryNotReplicating RoleDisasterRecovery = "PrimaryNotReplicating" - // Secondary ... - Secondary RoleDisasterRecovery = "Secondary" -) - -// PossibleRoleDisasterRecoveryValues returns an array of possible values for the RoleDisasterRecovery const type. -func PossibleRoleDisasterRecoveryValues() []RoleDisasterRecovery { - return []RoleDisasterRecovery{Primary, PrimaryNotReplicating, Secondary} -} - -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // Basic ... - Basic SkuName = "Basic" - // Premium ... - Premium SkuName = "Premium" - // Standard ... - Standard SkuName = "Standard" -) - -// PossibleSkuNameValues returns an array of possible values for the SkuName const type. -func PossibleSkuNameValues() []SkuName { - return []SkuName{Basic, Premium, Standard} -} - -// SkuTier enumerates the values for sku tier. -type SkuTier string - -const ( - // SkuTierBasic ... - SkuTierBasic SkuTier = "Basic" - // SkuTierPremium ... - SkuTierPremium SkuTier = "Premium" - // SkuTierStandard ... - SkuTierStandard SkuTier = "Standard" -) - -// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. -func PossibleSkuTierValues() []SkuTier { - return []SkuTier{SkuTierBasic, SkuTierPremium, SkuTierStandard} -} - -// UnavailableReason enumerates the values for unavailable reason. -type UnavailableReason string - -const ( - // InvalidName ... - InvalidName UnavailableReason = "InvalidName" - // NameInLockdown ... - NameInLockdown UnavailableReason = "NameInLockdown" - // NameInUse ... - NameInUse UnavailableReason = "NameInUse" - // None ... - None UnavailableReason = "None" - // SubscriptionIsDisabled ... - SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled" - // TooManyNamespaceInCurrentSubscription ... - TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription" -) - -// PossibleUnavailableReasonValues returns an array of possible values for the UnavailableReason const type. -func PossibleUnavailableReasonValues() []UnavailableReason { - return []UnavailableReason{InvalidName, NameInLockdown, NameInUse, None, SubscriptionIsDisabled, TooManyNamespaceInCurrentSubscription} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go deleted file mode 100644 index ce7a19873acc..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/eventhubs.go +++ /dev/null @@ -1,160 +0,0 @@ -package servicebus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// EventHubsClient is the azure Service Bus client -type EventHubsClient struct { - BaseClient -} - -// NewEventHubsClient creates an instance of the EventHubsClient client. -func NewEventHubsClient(subscriptionID string) EventHubsClient { - return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { - return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListByNamespace gets all the Event Hubs in a service bus Namespace. -// Parameters: -// resourceGroupName - name of the Resource group within the Azure subscription. -// namespaceName - the namespace name -func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string) (result EventHubListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListByNamespace") - defer func() { - sc := -1 - if result.ehlr.Response.Response != nil { - sc = result.ehlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: namespaceName, - Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { - return result, validation.NewError("servicebus.EventHubsClient", "ListByNamespace", err.Error()) - } - - result.fn = client.listByNamespaceNextResults - req, err := client.ListByNamespacePreparer(ctx, resourceGroupName, namespaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", nil, "Failure preparing request") - return - } - - resp, err := client.ListByNamespaceSender(req) - if err != nil { - result.ehlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure sending request") - return - } - - result.ehlr, err = client.ListByNamespaceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure responding to request") - return - } - if result.ehlr.hasNextLink() && result.ehlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByNamespacePreparer prepares the ListByNamespace request. -func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resourceGroupName string, namespaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "namespaceName": autorest.Encode("path", namespaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-04-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.ServiceBus/namespaces/{namespaceName}/eventhubs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByNamespaceSender sends the ListByNamespace request. The method will close the -// http.Response Body if it receives an error. -func (client EventHubsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always -// closes the http.Response Body. -func (client EventHubsClient) ListByNamespaceResponder(resp *http.Response) (result EventHubListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByNamespaceNextResults retrieves the next set of results, if any. -func (client EventHubsClient) listByNamespaceNextResults(ctx context.Context, lastResults EventHubListResult) (result EventHubListResult, err error) { - req, err := lastResults.eventHubListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "listByNamespaceNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByNamespaceSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "listByNamespaceNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByNamespaceResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "listByNamespaceNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByNamespaceComplete enumerates all values, automatically crossing page boundaries as required. -func (client EventHubsClient) ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result EventHubListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListByNamespace") - 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.ListByNamespace(ctx, resourceGroupName, namespaceName) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go deleted file mode 100644 index 429c3dbcdb43..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/premiummessagingregions.go +++ /dev/null @@ -1,145 +0,0 @@ -package servicebus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PremiumMessagingRegionsClient is the azure Service Bus client -type PremiumMessagingRegionsClient struct { - BaseClient -} - -// NewPremiumMessagingRegionsClient creates an instance of the PremiumMessagingRegionsClient client. -func NewPremiumMessagingRegionsClient(subscriptionID string) PremiumMessagingRegionsClient { - return NewPremiumMessagingRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPremiumMessagingRegionsClientWithBaseURI creates an instance of the PremiumMessagingRegionsClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). -func NewPremiumMessagingRegionsClientWithBaseURI(baseURI string, subscriptionID string) PremiumMessagingRegionsClient { - return PremiumMessagingRegionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// List gets the available premium messaging regions for servicebus -func (client PremiumMessagingRegionsClient) List(ctx context.Context) (result PremiumMessagingRegionsListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PremiumMessagingRegionsClient.List") - defer func() { - sc := -1 - if result.pmrlr.Response.Response != nil { - sc = result.pmrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.pmrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure sending request") - return - } - - result.pmrlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure responding to request") - return - } - if result.pmrlr.hasNextLink() && result.pmrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client PremiumMessagingRegionsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/premiumMessagingRegions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client PremiumMessagingRegionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client PremiumMessagingRegionsClient) ListResponder(resp *http.Response) (result PremiumMessagingRegionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client PremiumMessagingRegionsClient) listNextResults(ctx context.Context, lastResults PremiumMessagingRegionsListResult) (result PremiumMessagingRegionsListResult, err error) { - req, err := lastResults.premiumMessagingRegionsListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PremiumMessagingRegionsClient) ListComplete(ctx context.Context) (result PremiumMessagingRegionsListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PremiumMessagingRegionsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx) - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/regions.go deleted file mode 100644 index bd177d486c42..000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus/regions.go +++ /dev/null @@ -1,155 +0,0 @@ -package servicebus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// 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" -) - -// RegionsClient is the azure Service Bus client -type RegionsClient struct { - BaseClient -} - -// NewRegionsClient creates an instance of the RegionsClient client. -func NewRegionsClient(subscriptionID string) RegionsClient { - return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { - return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// ListBySku gets the available Regions for a given sku -// Parameters: -// sku - the sku type. -func (client RegionsClient) ListBySku(ctx context.Context, sku string) (result PremiumMessagingRegionsListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListBySku") - defer func() { - sc := -1 - if result.pmrlr.Response.Response != nil { - sc = result.pmrlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - if err := validation.Validate([]validation.Validation{ - {TargetValue: sku, - Constraints: []validation.Constraint{{Target: "sku", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "sku", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("servicebus.RegionsClient", "ListBySku", err.Error()) - } - - result.fn = client.listBySkuNextResults - req, err := client.ListBySkuPreparer(ctx, sku) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySkuSender(req) - if err != nil { - result.pmrlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure sending request") - return - } - - result.pmrlr, err = client.ListBySkuResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure responding to request") - return - } - if result.pmrlr.hasNextLink() && result.pmrlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListBySkuPreparer prepares the ListBySku request. -func (client RegionsClient) ListBySkuPreparer(ctx context.Context, sku string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "sku": autorest.Encode("path", sku), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2017-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/sku/{sku}/regions", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBySkuSender sends the ListBySku request. The method will close the -// http.Response Body if it receives an error. -func (client RegionsClient) ListBySkuSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListBySkuResponder handles the response to the ListBySku request. The method always -// closes the http.Response Body. -func (client RegionsClient) ListBySkuResponder(resp *http.Response) (result PremiumMessagingRegionsListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listBySkuNextResults retrieves the next set of results, if any. -func (client RegionsClient) listBySkuNextResults(ctx context.Context, lastResults PremiumMessagingRegionsListResult) (result PremiumMessagingRegionsListResult, err error) { - req, err := lastResults.premiumMessagingRegionsListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.RegionsClient", "listBySkuNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListBySkuSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.RegionsClient", "listBySkuNextResults", resp, "Failure sending next results request") - } - result, err = client.ListBySkuResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "listBySkuNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListBySkuComplete enumerates all values, automatically crossing page boundaries as required. -func (client RegionsClient) ListBySkuComplete(ctx context.Context, sku string) (result PremiumMessagingRegionsListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListBySku") - 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.ListBySku(ctx, sku) - return -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 6f855f3aaead..5093ecedbe30 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -93,6 +93,7 @@ github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2019-06-01-pre github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v3.0/security github.com/Azure/azure-sdk-for-go/services/preview/securityinsight/mgmt/2019-01-01-preview/securityinsight github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2018-01-01-preview/servicebus +github.com/Azure/azure-sdk-for-go/services/preview/servicebus/mgmt/2021-06-01-preview/servicebus github.com/Azure/azure-sdk-for-go/services/preview/servicefabricmesh/mgmt/2018-09-01-preview/servicefabricmesh github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2017-03-01-preview/sql github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2018-06-01-preview/sql @@ -116,7 +117,6 @@ github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-09-01/policy github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-11-01/subscriptions github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources github.com/Azure/azure-sdk-for-go/services/search/mgmt/2020-03-13/search -github.com/Azure/azure-sdk-for-go/services/servicebus/mgmt/2017-04-01/servicebus github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2021-06-01/servicefabric github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-01-01/storage github.com/Azure/azure-sdk-for-go/services/storagecache/mgmt/2021-03-01/storagecache