diff --git a/resource-manager/compute/2022-03-02/disks/method_grantaccess.go b/resource-manager/compute/2022-03-02/disks/method_grantaccess.go index 03555c9c9a0..5519c6cd216 100644 --- a/resource-manager/compute/2022-03-02/disks/method_grantaccess.go +++ b/resource-manager/compute/2022-03-02/disks/method_grantaccess.go @@ -48,6 +48,9 @@ func (c DisksClient) GrantAccess(ctx context.Context, id commonids.ManagedDiskId if resp != nil { result.OData = resp.OData result.HttpResponse = resp.Response + + var model AccessUri + result.Model = &model } if err != nil { return @@ -62,15 +65,19 @@ func (c DisksClient) GrantAccess(ctx context.Context, id commonids.ManagedDiskId } // GrantAccessThenPoll performs GrantAccess then polls until it's completed -func (c DisksClient) GrantAccessThenPoll(ctx context.Context, id commonids.ManagedDiskId, input GrantAccessData) error { - result, err := c.GrantAccess(ctx, id, input) +func (c DisksClient) GrantAccessThenPoll(ctx context.Context, id commonids.ManagedDiskId, input GrantAccessData) (result GrantAccessOperationResponse, err error) { + result, err = c.GrantAccess(ctx, id, input) if err != nil { - return fmt.Errorf("performing GrantAccess: %+v", err) + return result, fmt.Errorf("performing GrantAccess: %+v", err) } if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GrantAccess: %+v", err) + return result, fmt.Errorf("polling after GrantAccess: %+v", err) + } + + if err := result.Poller.FinalResult(result.Model); err != nil { + return result, fmt.Errorf("performing FinalResult: %+v", err) } - return nil + return } diff --git a/resource-manager/compute/2022-03-02/disks/model_accessuri.go b/resource-manager/compute/2022-03-02/disks/model_accessuri.go index 58d3760048f..4f546ed1be8 100644 --- a/resource-manager/compute/2022-03-02/disks/model_accessuri.go +++ b/resource-manager/compute/2022-03-02/disks/model_accessuri.go @@ -4,6 +4,9 @@ package disks // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type AccessUri struct { - AccessSAS *string `json:"accessSAS,omitempty"` - SecurityDataAccessSAS *string `json:"securityDataAccessSAS,omitempty"` + StartTime *string `json:"startTime,omitempty"` + EndTime *string `json:"endTime,omitempty"` + Status *string `json:"status,omitempty"` + Name *string `json:"name,omitempty"` + Properties *AccessUriProperties `json:"properties,omitempty"` } diff --git a/resource-manager/compute/2022-03-02/disks/model_accessurioutput.go b/resource-manager/compute/2022-03-02/disks/model_accessurioutput.go new file mode 100644 index 00000000000..ac04a86825b --- /dev/null +++ b/resource-manager/compute/2022-03-02/disks/model_accessurioutput.go @@ -0,0 +1,8 @@ +package disks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessUriOutput struct { + AccessSAS *string `json:"accessSAS,omitempty"` +} diff --git a/resource-manager/compute/2022-03-02/disks/model_accessuriproperties.go b/resource-manager/compute/2022-03-02/disks/model_accessuriproperties.go new file mode 100644 index 00000000000..6e68045b390 --- /dev/null +++ b/resource-manager/compute/2022-03-02/disks/model_accessuriproperties.go @@ -0,0 +1,8 @@ +package disks + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AccessUriProperties struct { + Output *AccessUriOutput `json:"output,omitempty"` +}