From acbce42a59a15bbc6aa4fea403217884a904ddcd Mon Sep 17 00:00:00 2001 From: "Brian Moore (AZURE RESOURCE MANAGER)" Date: Mon, 6 Aug 2018 13:23:10 -0500 Subject: [PATCH 1/3] added listAccountSas TLE --- assets/ExpressionMetadata.json | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/assets/ExpressionMetadata.json b/assets/ExpressionMetadata.json index cce577484..09e2ff361 100644 --- a/assets/ExpressionMetadata.json +++ b/assets/ExpressionMetadata.json @@ -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" + } + ] + }, { "name": "listKeys", - "expectedUsage": "listKeys(resourceName\/resourceIdentifier, apiVersion)", + "expectedUsage": "listKeys(resourceId, apiVersion)", "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, @@ -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, @@ -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 From 6e3fd7d7a6634081985f80c687bfb555699d0dbf Mon Sep 17 00:00:00 2001 From: "Brian Moore (AZURE RESOURCE MANAGER)" Date: Mon, 6 Aug 2018 15:21:23 -0500 Subject: [PATCH 2/3] revert/update resource param --- assets/ExpressionMetadata.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/ExpressionMetadata.json b/assets/ExpressionMetadata.json index 09e2ff361..bb50d0e1f 100644 --- a/assets/ExpressionMetadata.json +++ b/assets/ExpressionMetadata.json @@ -249,7 +249,7 @@ }, { "name": "listAccountSas", - "expectedUsage": "listAccountSas(resourceId, apiVersion, requestContent)", + "expectedUsage": "listAccountSas(resourceName\/resourceIdentifier, 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, @@ -261,7 +261,7 @@ }, { "name": "listKeys", - "expectedUsage": "listKeys(resourceId, apiVersion)", + "expectedUsage": "listKeys(resourceName\/resourceIdentifier, apiVersion)", "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, @@ -273,14 +273,14 @@ }, { "name": "listPackage", - "expectedUsage": "listPackage(resourceId, apiVersion)", + "expectedUsage": "listPackage(resourceName\/resourceIdentifier, apiVersion)", "description": "Lists the virtual network gateway package. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName.", "minimumArguments": 2, "maximumArguments": 2 }, { "name": "listCallbackUrl", - "expectedUsage": "listCallbackUrl(resourceId, apiVersion)", + "expectedUsage": "listCallbackUrl(resourceName\/resourceIdentifier, 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, @@ -307,7 +307,7 @@ }, { "name": "listSecrets", - "expectedUsage": "listSecrets(resourceId, apiVersion)", + "expectedUsage": "listSecrets(resourceName\/resourceIdentifier, 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 From 559c05ae5ed7e01d309fac1dc2f5195e2fe682b6 Mon Sep 17 00:00:00 2001 From: Stephen Weatherford Date: Mon, 6 Aug 2018 15:57:23 -0700 Subject: [PATCH 3/3] Fix tests --- test/AzureRMAssets.test.ts | 2 +- test/PositionContext.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/AzureRMAssets.test.ts b/test/AzureRMAssets.test.ts index 3ce2a6b0d..67796dfe3 100644 --- a/test/AzureRMAssets.test.ts +++ b/test/AzureRMAssets.test.ts @@ -184,7 +184,7 @@ suite("AzureRMAssets", () => { }, { "name": "listPackage", - "expectedUsage": "listPackage(resourceId, apiVersion)", + "expectedUsage": "listPackage(resourceName\/resourceIdentifier, apiVersion)", "minimumArguments": 2, "maximumArguments": 2 }, diff --git a/test/PositionContext.test.ts b/test/PositionContext.test.ts index d7dca601f..266d17f60 100644 --- a/test/PositionContext.test.ts +++ b/test/PositionContext.test.ts @@ -578,7 +578,7 @@ suite("PositionContext", () => { } function listPackageCompletion(startIndex: number, length: number): Completion.Item { - return new Completion.Item("listPackage", "listPackage($0)", new language.Span(startIndex, length), "(function) listPackage(resourceId, apiVersion)", "Lists the virtual network gateway package. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName.", Completion.CompletionKind.Function); + return new Completion.Item("listPackage", "listPackage($0)", new language.Span(startIndex, length), "(function) listPackage(resourceName\/resourceIdentifier, apiVersion)", "Lists the virtual network gateway package. The resourceId can be specified by using the resourceId function or by using the format providerNamespace/resourceType/resourceName.", Completion.CompletionKind.Function); } function modCompletion(startIndex: number, length: number): Completion.Item {