Migrate BlobInventoryPolicy related cmdelts and Invoke-AzStorageAccountFailover to Track2 SDK #17
Conversation
| this.ResourceGroupName, | ||
| this.StorageAccountName); | ||
| Track2.BlobInventoryPolicyResource policy = | ||
| this.StorageClientTrack2.GetBlobInventoryPolicyResource(this.ResourceGroupName, this.StorageAccountName, "default").Get(); |
There was a problem hiding this comment.
It'd be better if the static string in a place that can be shared by other files also use the it (Set/RemoveAzureStorageBlobInventoryPolicy.cs).
There was a problem hiding this comment.
Sorry totally missed this comment. Will include this change in the next PR. Thanks a lot!
| this.Enabled = policy.Data.Policy.Enabled; | ||
|
|
||
| this.Enabled = policy.Policy.Enabled; | ||
| this.Destination = policy.Policy.Destination; |
There was a problem hiding this comment.
Might need to add a comments to add the destination which is on a later API version.
| Enabled = this.Enabled, | ||
| //Destination = this.Destination, | ||
| Rules = invRules | ||
| Policy = policySchema, |
There was a problem hiding this comment.
It looks still still missing ID, Name, LastModified...
There was a problem hiding this comment.
This might not be an issue, since this function is only used in set-AzstorageStorageBlobInventoryPolicy, to parse the input the policy (PSH object) to the policy (SDK object) to set.
And I can understand SDK not allow to set them, since they should only be read from server, but not set by customer.
In a word, if PSH code works with it, I believe this will not be an issue.

Description
This PR includes migration of BlobInventoryPolicy related cmdlets and Invoke-AzStorageAccountFailover to Track2 SDK.
BlobInventoryPolicy related cmdlets include Get-AzStorageBlobInventoryPolicy, New-AzStorageBlobInventoryPolicyRule, Remove-AzStorageBlobInventoryPolicy, Set-AzStorageBlobInventoryPolicy
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added