diff --git a/pkg/volume/azure_dd/BUILD b/pkg/volume/azure_dd/BUILD index 9e607d94ef0..15de9f12356 100644 --- a/pkg/volume/azure_dd/BUILD +++ b/pkg/volume/azure_dd/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", diff --git a/pkg/volume/azure_dd/azure_dd.go b/pkg/volume/azure_dd/azure_dd.go index 02de3a1473e..13b8e10aef4 100644 --- a/pkg/volume/azure_dd/azure_dd.go +++ b/pkg/volume/azure_dd/azure_dd.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" "k8s.io/klog" v1 "k8s.io/api/core/v1" diff --git a/pkg/volume/azure_dd/azure_provision.go b/pkg/volume/azure_dd/azure_provision.go index 6936e40428d..4d7153b94fe 100644 --- a/pkg/volume/azure_dd/azure_provision.go +++ b/pkg/volume/azure_dd/azure_provision.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/volume/azure_file/BUILD b/pkg/volume/azure_file/BUILD index 1c4640f78a0..a04646ce255 100644 --- a/pkg/volume/azure_file/BUILD +++ b/pkg/volume/azure_file/BUILD @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", diff --git a/pkg/volume/azure_file/azure_provision.go b/pkg/volume/azure_file/azure_provision.go index 64b95712a1d..bdae2a3660c 100644 --- a/pkg/volume/azure_file/azure_provision.go +++ b/pkg/volume/azure_file/azure_provision.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD b/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD index df5b16f3b52..93284148831 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/BUILD @@ -69,7 +69,7 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/auth:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library", @@ -118,7 +118,7 @@ go_test( "//staging/src/k8s.io/legacy-cloud-providers/azure/auth:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go index d6b5ee5e96f..eb7aef1bdbf 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go @@ -30,7 +30,7 @@ import ( "sync/atomic" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" azstorage "github.com/Azure/azure-sdk-for-go/storage" "github.com/Azure/go-autorest/autorest/to" "github.com/rubiojr/go-vhd/vhd" @@ -344,7 +344,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e } // account exists but not ready yet - if provisionState != storage.Succeeded { + if provisionState != storage.ProvisioningStateSucceeded { // we don't want many attempts to validate the account readiness // here hence we are locking counter := 1 @@ -375,7 +375,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e return false, nil // error performing the query - retryable } - if provisionState == storage.Succeeded { + if provisionState == storage.ProvisioningStateSucceeded { return true, nil } diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go index 822bcf82f6b..b165f8a0c2b 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_client.go @@ -26,7 +26,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/adal" diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go index 8772cb7143c..eb563fa2224 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_fakes.go @@ -28,7 +28,7 @@ import ( "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/to" diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go index 4fa273756f1..9ca06434a1a 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage.go @@ -21,7 +21,7 @@ package azure import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" "k8s.io/klog" ) diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go index ae912ae8f55..778e5441c81 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storage_test.go @@ -21,7 +21,7 @@ package azure import ( "testing" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" ) func TestCreateFileShare(t *testing.T) { diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go index 890ce4988b5..e7bb1d812af 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" "github.com/Azure/go-autorest/autorest/to" "k8s.io/klog" diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go index d57b43be06b..02bbdebca5b 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_storageaccount_test.go @@ -22,7 +22,7 @@ import ( "fmt" "testing" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" ) func TestGetStorageAccessKeys(t *testing.T) { diff --git a/vendor/BUILD b/vendor/BUILD index 6089943ca91..123d9dc10e9 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -14,7 +14,7 @@ filegroup( "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:all-srcs", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:all-srcs", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/storage:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/version:all-srcs", "//vendor/github.com/Azure/go-ansiterm:all-srcs", diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/BUILD similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/BUILD index dcfecd8f106..b134576cde4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/BUILD @@ -12,12 +12,14 @@ go_library( "managementpolicies.go", "models.go", "operations.go", + "privateendpointconnections.go", + "privatelinkresources.go", "skus.go", "usages.go", "version.go", ], - importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage", - importpath = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage", + importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage", + importpath = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage", visibility = ["//visibility:public"], deps = [ "//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library", diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go index 9b5daba19e5..2ac4600dc91 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go @@ -92,7 +92,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -203,7 +203,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -303,7 +303,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -390,7 +390,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -490,7 +490,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -573,7 +573,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -705,7 +705,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -794,7 +794,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -887,7 +887,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -987,7 +987,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1084,7 +1084,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1178,7 +1178,7 @@ func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1275,7 +1275,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go index ed9b69fef18..402a0135ada 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go @@ -111,7 +111,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -223,7 +223,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +335,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +443,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,7 +548,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -658,7 +658,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -763,7 +763,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -867,7 +867,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -972,7 +972,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1017,10 +1017,9 @@ func (client BlobContainersClient) LeaseResponder(resp *http.Response) (result L // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// skipToken - optional. Continuation token for the list operation. // maxpagesize - optional. Specified maximum number of containers that can be included in the list. // filter - optional. When specified, only container names starting with the filter will be listed. -func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result ListContainerItemsPage, err error) { +func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") defer func() { @@ -1045,7 +1044,7 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, skipToken, maxpagesize, filter) + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", nil, "Failure preparing request") return @@ -1067,20 +1066,17 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s } // ListPreparer prepares the List request. -func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (*http.Request, error) { +func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } if len(maxpagesize) > 0 { queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) } @@ -1138,7 +1134,7 @@ func (client BlobContainersClient) listNextResults(ctx context.Context, lastResu } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result ListContainerItemsIterator, err error) { +func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") defer func() { @@ -1149,7 +1145,7 @@ func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGro tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, accountName, skipToken, maxpagesize, filter) + result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter) return } @@ -1223,7 +1219,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1327,7 +1323,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1431,7 +1427,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go index e9eb9cb0d94..bd3dc1ea0b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go @@ -102,7 +102,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,7 +194,7 @@ func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -299,7 +299,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go index 95300b88908..98630b5d4e1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go @@ -1,4 +1,4 @@ -// Package storage implements the Azure ARM Storage service API version 2019-04-01. +// Package storage implements the Azure ARM Storage service API version 2019-06-01. // // The Azure Storage Management API. package storage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go index 8de550d6af1..8e51cb0cb25 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go @@ -102,7 +102,7 @@ func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,7 +194,7 @@ func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -290,7 +290,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go index 560e3a1033a..eb5ca77d05a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/fileshares.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go @@ -116,7 +116,7 @@ func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -217,7 +217,7 @@ func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -354,10 +354,9 @@ func (client FileSharesClient) GetResponder(resp *http.Response) (result FileSha // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// skipToken - optional. Continuation token for the list operation. // maxpagesize - optional. Specified maximum number of shares that can be included in the list. // filter - optional. When specified, only share names starting with the filter will be listed. -func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result FileShareItemsPage, err error) { +func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -382,7 +381,7 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, skipToken, maxpagesize, filter) + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", nil, "Failure preparing request") return @@ -404,20 +403,17 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin } // ListPreparer prepares the List request. -func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (*http.Request, error) { +func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(skipToken) > 0 { - queryParameters["$skipToken"] = autorest.Encode("query", skipToken) - } if len(maxpagesize) > 0 { queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) } @@ -475,7 +471,7 @@ func (client FileSharesClient) listNextResults(ctx context.Context, lastResults } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result FileShareItemsIterator, err error) { +func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -486,7 +482,7 @@ func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupNa tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, accountName, skipToken, maxpagesize, filter) + result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter) return } @@ -558,7 +554,7 @@ func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go index 5fe6688904f..c91d84c2062 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go @@ -107,7 +107,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -202,7 +202,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -294,7 +294,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go index b6326d0faba..7a0a714f741 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" // AccessTier enumerates the values for access tier. type AccessTier string @@ -380,21 +380,58 @@ func PossiblePermissionsValues() []Permissions { return []Permissions{A, C, D, L, P, R, U, W} } +// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection +// provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + // Creating ... + Creating PrivateEndpointConnectionProvisioningState = "Creating" + // Deleting ... + Deleting PrivateEndpointConnectionProvisioningState = "Deleting" + // Failed ... + Failed PrivateEndpointConnectionProvisioningState = "Failed" + // Succeeded ... + Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Failed, Succeeded} +} + +// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + // Approved ... + Approved PrivateEndpointServiceConnectionStatus = "Approved" + // Pending ... + Pending PrivateEndpointServiceConnectionStatus = "Pending" + // Rejected ... + Rejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{Approved, Pending, Rejected} +} + // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string const ( - // Creating ... - Creating ProvisioningState = "Creating" - // ResolvingDNS ... - ResolvingDNS ProvisioningState = "ResolvingDNS" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" + // ProvisioningStateCreating ... + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateResolvingDNS ... + ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" ) // PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Creating, ResolvingDNS, Succeeded} + return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateResolvingDNS, ProvisioningStateSucceeded} } // PublicAccess enumerates the values for public access. @@ -1005,7 +1042,7 @@ func NewAccountListResultPage(getNextPage func(context.Context, AccountListResul // AccountProperties properties of the storage account. type AccountProperties struct { - // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded' + // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateResolvingDNS', 'ProvisioningStateSucceeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"` @@ -1043,6 +1080,8 @@ type AccountProperties struct { FailoverInProgress *bool `json:"failoverInProgress,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` + // PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` } // AccountPropertiesCreateParameters the parameters used to create the storage account. @@ -1644,6 +1683,14 @@ type Endpoints struct { Dfs *string `json:"dfs,omitempty"` } +// ErrorResponse an error response from the storage resource provider. +type ErrorResponse struct { + // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + Code *string `json:"code,omitempty"` + // Message - A message describing the error, intended to be suitable for display in a user interface. + Message *string `json:"message,omitempty"` +} + // FileServiceItems ... type FileServiceItems struct { autorest.Response `json:"-"` @@ -2826,6 +2873,195 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } +// PrivateEndpoint the Private Endpoint resource. +type PrivateEndpoint struct { + // ID - READ-ONLY; The ARM identifier for Private Endpoint + ID *string `json:"id,omitempty"` +} + +// PrivateEndpointConnection the Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource properties. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + 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 + } + 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 "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 nil +} + +// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} + +// PrivateLinkResource a private link resource +type PrivateLinkResource struct { + // PrivateLinkResourceProperties - Resource properties. + *PrivateLinkResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + 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 + } + 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 +} + +// PrivateLinkResourceListResult a list of private link resources +type PrivateLinkResourceListResult struct { + autorest.Response `json:"-"` + // Value - Array of private link resources + Value *[]PrivateLinkResource `json:"value,omitempty"` +} + +// PrivateLinkResourceProperties properties of a private link resource. +type PrivateLinkResourceProperties struct { + // GroupID - READ-ONLY; The private link resource group id. + GroupID *string `json:"groupId,omitempty"` + // RequiredMembers - READ-ONLY; The private link resource required member names. + RequiredMembers *[]string `json:"requiredMembers,omitempty"` + // RequiredZoneNames - The private link resource Private link DNS zone name. + RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` +} + +// PrivateLinkServiceConnectionState a collection of information about the state of the connection between +// service consumer and provider. +type PrivateLinkServiceConnectionState struct { + // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected' + Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + // Description - The reason for approval/rejection of the connection. + Description *string `json:"description,omitempty"` + // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionRequired *string `json:"actionRequired,omitempty"` +} + // ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than // required location and tags type ProxyResource struct { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go index 3ddad68b155..cd01bf13559 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go @@ -75,7 +75,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go new file mode 100644 index 00000000000..4cad9cb301b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go @@ -0,0 +1,332 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the the Azure Storage Management API. +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. +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete deletes the specified private endpoint connection associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage +// Account +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/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) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private endpoint connection associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage +// Account +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.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, "storage.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Put update the state of specified private endpoint connection associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage +// Account +// properties - the private endpoint connection properties. +func (client PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Put") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: properties, + Constraints: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "Put", err.Error()) + } + + req, err := client.PutPreparer(ctx, resourceGroupName, accountName, privateEndpointConnectionName, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", nil, "Failure preparing request") + return + } + + resp, err := client.PutSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", resp, "Failure sending request") + return + } + + result, err = client.PutResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "Put", resp, "Failure responding to request") + } + + return +} + +// PutPreparer prepares the Put request. +func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutSender sends the Put request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) PutSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// PutResponder handles the response to the Put request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) PutResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go new file mode 100644 index 00000000000..369db691e30 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go @@ -0,0 +1,134 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkResourcesClient is the the Azure Storage Management API. +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. +func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { + return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByStorageAccount gets the private link resources that need to be created for a storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client PrivateLinkResourcesClient) ListByStorageAccount(ctx context.Context, resourceGroupName string, accountName string) (result PrivateLinkResourceListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.ListByStorageAccount") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.PrivateLinkResourcesClient", "ListByStorageAccount", err.Error()) + } + + req, err := client.ListByStorageAccountPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByStorageAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByStorageAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateLinkResourcesClient", "ListByStorageAccount", resp, "Failure responding to request") + } + + return +} + +// ListByStorageAccountPreparer prepares the ListByStorageAccount request. +func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-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.Storage/storageAccounts/{accountName}/privateLinkResources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByStorageAccountSender sends the ListByStorageAccount request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateLinkResourcesClient) ListByStorageAccountSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByStorageAccountResponder handles the response to the ListByStorageAccount request. The method always +// closes the http.Response Body. +func (client PrivateLinkResourcesClient) ListByStorageAccountResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go index b2eff204a66..db346f8fbb5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go @@ -86,7 +86,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go index 8f85c7cab7e..60d0d4bdc5d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go @@ -89,7 +89,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go index 5f4c3ec9ddf..7f2a6a74305 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " storage/2019-04-01" + return "Azure-SDK-For-Go/" + version.Number + " storage/2019-06-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/modules.txt b/vendor/modules.txt index 42124e2f252..39b3bc7c1c6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,7 @@ cloud.google.com/go/compute/metadata github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network -github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage +github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/version # github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 => github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78