Appconfiguration: Get-AzAppConfigurationStoreKeyValue does not work as expected

Created on 27 Dec 2019  路  13Comments  路  Source: Azure/AppConfiguration

Module version

image

Call and its debug output

PS C:\temp> Get-AzAppConfigurationStoreKeyValue -Name vnextpoc-appconfiguration -ResourceGroupName vnextpoc -Key * -Verbose -debug       
DEBUG: 6:20:01 PM - GetAzureRMContextCommand begin processing with ParameterSet 'GetSingleContext'.
DEBUG: 6:20:01 PM - using account id '[email protected]'...
DEBUG: AzureQoSEvent: CommandName - Get-AzContext; IsSuccess - True; Duration - 00:00:00.0016005; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 6:20:02 PM - GetAzureRMContextCommand end processing.
DEBUG: 6:20:02 PM - GetAzureRMContextCommand end processing.
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:
Confirm
Are you sure you want to perform this action?
Performing the operation "Get-AzAppConfigurationStoreKeyValue_ListExpanded" on target "Call remote 'ConfigurationStoresListKeyValue' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Yes"): A
DEBUG: [CmdletProcessRecordAsyncStart]: Created new QosEvent for command 'Get-AzAppConfigurationStoreKeyValue_ListExpanded': AzureQoSEvent: CommandName - Get-AzAppConfigurationStoreKeyValue_ListExpanded; IsSuccess - False; Duration - 00:00:00; Exception - ;
DEBUG: CmdletProcessRecordAsyncStart:
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: https://management.azure.com/subscriptions/067b9938-4d03-4f34-88c4-b13d25a4fb26/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: RequestCreated: https://management.azure.com/subscriptions/067b9938-4d03-4f34-88c4-b13d25a4fb26/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: HeaderParametersAdded: https://management.azure.com/subscriptions/067b9938-4d03-4f34-88c4-b13d25a4fb26/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: BodyContentSet: https://management.azure.com/subscriptions/067b9938-4d03-4f34-88c4-b13d25a4fb26/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/067b9938-4d03-4f34-88c4-b13d25a4fb26/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview

Headers:

Body:
{
  "key": "*"
}


DEBUG: BeforeCall:
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4447996Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4448657Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4448983Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: === Token Acquisition started:
        CacheType: null
        Authentication Target: User
        , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4449243Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: === Token Acquisition started:
        Authority: https://login.microsoftonline.com/e205bfab-7c3a-4369-86f3-030001469257/
        Resource: https://management.core.windows.net/
        ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
        CacheType: null
        Authentication Target: User

DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4449631Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4449872Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4480251Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4480994Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4481219Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4481476Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4481677Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4481885Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An expired or near expiry token was found in the cache
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4482072Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An expired or near expiry token was found in the cache
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4482254Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache   
DEBUG: [ADAL]: Information: 2019-12-27T02:20:03.4482441Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache   
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4483438Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Refreshing access token...
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:03.4483674Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Refreshing access token...
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:04.1789965Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Storing token in the cache...
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:04.1791569Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: Storing token in the cache...
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:04.1793082Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An item was stored in the cache
DEBUG: [ADAL]: Verbose: 2019-12-27T02:20:04.1793902Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: An item was stored in the cache
DEBUG: [ADAL]: Information: 2019-12-27T02:20:04.1796179Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 12/27/2019 3:20:03 AM +00:00
DEBUG: [ADAL]: Information: 2019-12-27T02:20:04.1796997Z: af4bdc80-79e4-44b0-bfe5-cfc2fec8fefb - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 12/27/2019 3:20:03 AM +00:00Access Token Hash: hrmsytrftqrtudstcwrtd/qwerfrtysdety=
         User id: bdf6d3a9-d627-4970-a941-5220173224eb
DEBUG: [ADAL]: Information: 2019-12-27T02:20:04.1798023Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Serializing token cache with 6 items.
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1199
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : 511d9958-1366-40b7-bc83-7eace98f5bf9
x-ms-correlation-request-id   : 0a239b01-5600-4a10-a69a-d864e791f29d
Server                        : openresty/1.15.8.1
x-ms-routing-request-id       : NORTHCENTRALUS:20191227T022010Z:0a239b01-5600-4a10-a69a-d864e791f29d
X-Content-Type-Options        : nosniff
Date                          : Fri, 27 Dec 2019 02:20:09 GMT

Body:
{
  "code": "EntityNotFound",
  "message": "The resource with id '*' was not found."
}


DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
Get-AzAppConfigurationStoreKeyValue : The resource with id '*' was not found.
At line:1 char:1
+ Get-AzAppConfigurationStoreKeyValue -Name vnextpoc-appconfiguration - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: ({ SubscriptionId = \u2026eyValueParameters }:<>f__AnonymousType1`4) [Get-AzAppConfigurat\u2026yValue_ListExpanded], Exception
+ FullyQualifiedErrorId : EntityNotFound,Microsoft.Azure.PowerShell.Cmdlets.AppConfiguration.Cmdlets.GetAzAppConfigurationStoreKeyValue_ListExpanded
DEBUG: Finally:
DEBUG: CmdletAfterAPICall:
DEBUG: [CmdletProcessRecordAsyncEnd]: Sending new QosEvent for command 'Get-AzAppConfigurationStoreKeyValue_ListExpanded': AzureQoSEvent: CommandName - Get-AzAppConfigurationStoreKeyValue_ListExpanded; IsSuccess - True; Duration - 00:00:00; Exception - ;
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletProcessRecordEnd:
DEBUG: CmdletEndProcessing:
PowerShell enhancement

Most helpful comment

The ask here is for key-value operation feature parity between Azure CLI and PowerShell.

All 13 comments

@bangbingsyb @jimmyca15 is this the API for the ARM template scenario? Is it supposed to work by any callers?

@zhenlan Yes it is that API. Anyone can call it. I was not aware it was already added into PowerShell. We don't want PowerShell to promote getting key-values using that API rather than using the Data Plane.

@eosfor Get-AzAppConfigurationStoreKeyValue returns a single key-value. For a more complete set of utilities you can utilize the Azure CLI. The CLI provides a way to retrieve multiple key-values at once.

Was this PowerShell cmdlet generated automatically or we actually implemented it? I think it would cause more confusion with this cmdlet.

As Jimmy said, the API intented to return a single key by giving an EXACT key name. It is not made for general key value queries outside of ARM template deployment.

The poweshell is generated from the swagger by a tool. A new build was just released a few weeks ago.

Do we see any reasons @eosfor ran into the issues?

@eosfor Get-AzAppConfigurationStoreKeyValue returns a single key-value. For a more complete set of utilities you can utilize the Azure CLI. The CLI provides a way to retrieve multiple key-values at once.

Hello @jimmyca15, the toolset I build is based on PowerShell, I don't want to add any additional dependencies to it. I want it to be distributed as a single PowerShell module. Adding CLI simply breaks the whole idea. That is why I'm looking to have consistent PowerShell-based expirience.

cc @SteveL-MSFT

As Jimmy said, the API intented to return a single key by giving an EXACT key name. It is not made for general key value queries outside of ARM template deployment.

I'll try it once again with exact key name, but as I recall it does not work either.

Also, it is really critical to me to be able to not only read kv pairs, but also write them :). And I don't really thing it is good idea for us to reinvent the wheel and write our own implementation. So it would be really great, if you guys, could make a working PowerShell module, that could read and update kv pairs.

Thank you so much!

The ask here is for key-value operation feature parity between Azure CLI and PowerShell.

Hi @jimmyca15 , first of all, I have tested this cmdlet with the exact key name and it fails. It looks like it tries to use Azure API endpoint, but it looks like az CLI uses App Config service endpoint. So additional question, is it correct and how actually works? ).

But, the main question is - when we can expect a working PowerShell module that could read key/values and put key/values into the App Config Service?

image

PS C:\temp> Get-AzAppConfigurationStoreKeyValue -Name vnextpoc-appconfiguration -ResourceGroupName vnextpoc -Key "ConnectionStrings:sqlDbConnectionString" -Verbose -debug
DEBUG: 12:50:10 PM - GetAzureRMContextCommand begin processing with ParameterSet 'GetSingleContext'.
DEBUG: 12:50:10 PM - using account id '[email protected]'...
DEBUG: AzureQoSEvent: CommandName - Get-AzContext; IsSuccess - True; Duration - 00:00:00.0106648; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 12:50:10 PM - GetAzureRMContextCommand end processing.
DEBUG: 12:50:10 PM - GetAzureRMContextCommand end processing.
DEBUG: CmdletBeginProcessing:
DEBUG: CmdletProcessRecordStart:

Confirm
Are you sure you want to perform this action?
Performing the operation "Get-AzAppConfigurationStoreKeyValue_ListExpanded" on target "Call remote 'ConfigurationStoresListKeyValue' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: [CmdletProcessRecordAsyncStart]: Created new QosEvent for command 'Get-AzAppConfigurationStoreKeyValue_ListExpanded': AzureQoSEvent: CommandName - Get-AzAppConfigurationStoreKeyValue_ListExpanded; IsSuccess - False; Duration - 00:00:00; Exception - ;
DEBUG: CmdletProcessRecordAsyncStart:
DEBUG: CmdletGetPipeline:
DEBUG: CmdletBeforeAPICall:
DEBUG: URLCreated: https://management.azure.com/subscriptions/d26a1882-d27f-4451-9964-0dbf93cccbff/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: RequestCreated: https://management.azure.com/subscriptions/d26a1882-d27f-4451-9964-0dbf93cccbff/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: HeaderParametersAdded: https://management.azure.com/subscriptions/d26a1882-d27f-4451-9964-0dbf93cccbff/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: BodyContentSet: https://management.azure.com/subscriptions/d26a1882-d27f-4451-9964-0dbf93cccbff/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/d26a1882-d27f-4451-9964-0dbf93cccbff/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration/listKeyValue?api-version=2019-02-01-preview

Headers:

Body:
{
  "key": "ConnectionStrings:sqlDbConnectionString"
}


DEBUG: BeforeCall:
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6088903Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6089625Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6090045Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: === Token Acquisition started:
        CacheType: null
        Authentication Target: User
        , Authority Host: login.microsoftonline.com
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6090356Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: === Token Acquisition started:
        Authority: https://login.microsoftonline.com/e205bfab-7c3a-4369-86f3-030001469257/
        Resource: https://management.core.windows.net/
        ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
        CacheType: null
        Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-01-07T20:50:12.6091187Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Verbose: 2020-01-07T20:50:12.6091497Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: Loading from cache.
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6124540Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 6 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-01-07T20:50:12.6125707Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Verbose: 2020-01-07T20:50:12.6126054Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: Looking up cache for a token...
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6126623Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6126917Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: An item matching the requested resource was found in the cache
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6127601Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: 56.4856207383333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6127849Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: 56.4856207383333 minutes left until token in cache expires
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6128153Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6128601Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6129725Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 1/7/2020 9:46:41 PM +00:00
DEBUG: [ADAL]: Information: 2020-01-07T20:50:12.6129992Z: 6a6d523d-a373-4ce2-b283-32efc399232c - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 1/7/2020 9:46:41 PM +00:00Access Token Hash: bHf70/M/4WnIBQokSJu/V+njcphcXqg53x+2gJxsk5I=
         User id: c4f31f55-98ba-4aa9-8f61-a46251928fd1
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1198
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-request-id               : 805da731-4802-427c-a181-ed73f9408353
x-ms-correlation-request-id   : 222825be-c2b0-4f62-8c5a-dd10f9c43ff1
Server                        : openresty/1.15.8.1
x-ms-routing-request-id       : EASTUS:20200107T205012Z:222825be-c2b0-4f62-8c5a-dd10f9c43ff1
X-Content-Type-Options        : nosniff
Date                          : Tue, 07 Jan 2020 20:50:11 GMT

Body:
{
  "code": "EntityNotFound",
  "message": "The resource with id 'ConnectionStrings:sqlDbConnectionString' was not found."
}


DEBUG: ResponseCreated:
DEBUG: BeforeResponseDispatch:
Get-AzAppConfigurationStoreKeyValue : The resource with id 'ConnectionStrings:sqlDbConnectionString' was not found.
At line:1 char:1
+ Get-AzAppConfigurationStoreKeyValue -Name vnextpoc-appconfiguration - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: ({ SubscriptionId = \u2026eyValueParameters }:<>f__AnonymousType1`4) [Get-AzAppConfigurat\u2026yValue_ListExpanded], Exception
+ FullyQualifiedErrorId : EntityNotFound,Microsoft.Azure.PowerShell.Cmdlets.AppConfiguration.Cmdlets.GetAzAppConfigurationStoreKeyValue_ListExpanded
DEBUG: Finally:
DEBUG: CmdletAfterAPICall:
DEBUG: [CmdletProcessRecordAsyncEnd]: Sending new QosEvent for command 'Get-AzAppConfigurationStoreKeyValue_ListExpanded': AzureQoSEvent: CommandName - Get-AzAppConfigurationStoreKeyValue_ListExpanded; IsSuccess - True; Duration - 00:00:00; Exception - ;
DEBUG: CmdletProcessRecordAsyncEnd:
DEBUG: CmdletProcessRecordEnd:
DEBUG: CmdletEndProcessing:

@eosfor it looks like you're missing the label of the keyvalue. I see in the picture it says the key-value has a label of "connectionString".

Also, this API was designed for ARM template usage. There are a couple of side effects that come as a part of that including different throttling limits. Right now PowerShell is not equipped with a suite of key-value operations.

@jimmyca15, I did some quick and dirty implementation of some of our immediate needs: https://github.com/eosfor/psapcfg

However, implementing this as a binary module for Powershell did not go well: PowerShell/PowerShell#11560

Ok, one more thing, @jimmyca15, if you don't mind. i'm still looking for some answers :). I've found that the below piece of code works (I replaced the GUID). It returns everything that I need, no issues.

Invoke-AzResourceAction -ResourceId /subscriptions/f0254159-f5ea-4960-ad9e-1c953c19c8b6/resourceGroups/vnextpoc/providers/Microsoft.AppConfiguration/configurationStores/vnextpoc-appconfiguration -Action "ListKeyValue" -verbose -debug -Parameters @{key="ConnectionStrings:sqlDbConnectionString"; label="connectionString"}

The question is now, how can I list all keys, what should I put as a parameter? For example, the below pieces fail

image

as well as below calls

image

@MiYanni , sorry to bother you, but, maybe, you can point me out to where I can find some details about how can I use Invoke-AzResourceAction for things like Microsoft.AppConfiguration/configurationStores/keyValues/read or Microsoft.AppConfiguration/configurationStores/keyValues/write?

Thanks so much!

@eosfor Sorry, I'm not on the Azure PowerShell team anymore. And when I was, I didn't work with Invoke-AzResourceAction cmdlet. If it doesn't have the information in the documentation, the only other place would be to look at the scripts for the tests of that cmdlet. However, I don't see it being called in any of the tests, so it might be from before tests were required for every cmdlet. https://github.com/Azure/azure-powershell/tree/master/src/Resources/Resources.Test/ScenarioTests

The Get-AzAppConfigurationStoreKeyValue command has been removed from the future release of App Configuration PowerShell to avoid any future confusion as the API is meant for ARM template use only.

The open request for PowerShell support of key-value operations is tracked in #267. With this, I am closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamalsivalingam picture kamalsivalingam  路  3Comments

WarrenFerrell picture WarrenFerrell  路  5Comments

ssulei7 picture ssulei7  路  6Comments

mmigala picture mmigala  路  4Comments

xin9le picture xin9le  路  4Comments