Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added listAccountSas TLE #125

Merged
merged 3 commits into from
Aug 13, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions assets/ExpressionMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,21 @@
"minimumArguments": 2,
"maximumArguments": 2
},
{
"name": "listAccountSas",
"expectedUsage": "listAccountSas(resourceId, apiVersion, requestContent)",
"description": "Creates and returns a SAS token with the specified permissions and expiry from the requestContent. The requestContent object must contain the signedServices, signedResourceTypes, signedPermission and signedExpiry properties.",
"minimumArguments": 3,
"maximumArguments": 3,
"returnValueMembers": [
{
"name": "accountSasToken"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is correct. Does it return an object with a accountSasToken property (as you have here), or does it simply return the account SAS token? Thx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns an object with exactly one property named accountSasToken

}
]
},
{
"name": "listKeys",
"expectedUsage": "listKeys(resourceName\/resourceIdentifier, apiVersion)",
"expectedUsage": "listKeys(resourceId, apiVersion)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes? The API specifically lists the argument as resource name or ID:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resourceId is correct, resourceName is shorthand. The definitions were inconsistent and I may have over simplified - don't have a strong opinion (other than to be consistent).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is, can you pass in just a resource name and have it work? If no, stick with resourceId, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the test failures are due to the resourceName/Id change. The unit tests are over testing right now - I've loosened it up a bit but not enough. Do you want me to handle fixing them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the change (and made the last one consistent) - so that should be back to previous behavior... let's see what happens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So can you actually pass in just the resource name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can - provided that resource is defined in the template... if not, then you need the fulll resourceId.

"description": "Returns the keys of a storage account. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName. You can use the function to get the primaryKey and secondaryKey.",
"minimumArguments": 2,
"maximumArguments": 2,
Expand All @@ -268,7 +280,7 @@
},
{
"name": "listCallbackUrl",
"expectedUsage": "listCallbackUrl(resourceName\/resourceIdentifier, apiVersion)",
"expectedUsage": "listCallbackUrl(resourceId, apiVersion)",
"description": "Get callback URL for a trigger of a workflow version. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName. See https://docs.microsoft.com/en-us/rest/api/logic/WorkflowVersions/ListCallbackUrl#workflowtriggercallbackurl for more information.",
"minimumArguments": 2,
"maximumArguments": 2,
Expand All @@ -295,7 +307,7 @@
},
{
"name": "listSecrets",
"expectedUsage": "listSecrets(resourceName\/resourceIdentifier, apiVersion)",
"expectedUsage": "listSecrets(resourceId, apiVersion)",
"description": "List the secrets of a key vault. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName.",
"minimumArguments": 2,
"maximumArguments": 2
Expand Down