Update lesson-1-create-stored-access-policy-and-shared-access-signatures #296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was unable to get the original code working, and as the comments for the page indicated, there were typos. This new code should work better.
Page Comments:
Jon_Kennerly3 5 days ago
Getting errors now, but this was working before. Did an update to the SDK change things?
Cannot find an overload for "Add" and the argument count: "2"
$permissions.SharedAccessPolicies.Add($policyName, $policy)
Cannot find an overload for "GetSharedAccessSignature" and the argument count: "2"
$sas = $cbc.GetSharedAccessSignature($policy, $policyName)
Charlie_Pyne Jul 6, 2017
CREATE CREDENTIAL command created via the PS script would not work for me.
Generating the shared access signiture via Azure Portal and adding to the CREATE CREDENTIAL statement, (minus the leading "?"), worked fine.
Kent_Gaardmand Jun 25, 2017
Also $policyName = $policyName is not needed
Kent_Gaardmand Jun 25, 2017
$policy = new-object 'Microsoft.WindowsAzure.Storage.Blob.SharedAccessBlobPolicy' is listed twice, resulting in it being emtpy for creating $sas