diff --git a/src/AppConfiguration/AppConfiguration.sln b/src/AppConfiguration/AppConfiguration.sln index 13b1bafb8ade..32f7f0b8d265 100644 --- a/src/AppConfiguration/AppConfiguration.sln +++ b/src/AppConfiguration/AppConfiguration.sln @@ -19,14 +19,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accoun EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppConfiguration", "AppConfiguration\AppConfiguration.csproj", "{AAA0CCC9-9FD8-4D1E-98FE-62005C6A6A05}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppConfigurationdata.Autorest", "AppConfigurationdata.Autorest", "{EF43BCD0-DC0A-3145-8EB8-34F6F1B43072}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.AppConfigurationdata", "..\..\generated\AppConfiguration\AppConfigurationdata.Autorest\Az.AppConfigurationdata.csproj", "{8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppConfiguration.Autorest", "AppConfiguration.Autorest", "{0274B85D-B38C-5E54-FB34-3750CA0399A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.AppConfiguration", "..\..\generated\AppConfiguration\AppConfiguration.Autorest\Az.AppConfiguration.csproj", "{D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppConfigurationdata.Autorest", "AppConfigurationdata.Autorest", "{EF43BCD0-DC0A-3145-8EB8-34F6F1B43072}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.AppConfigurationdata", "..\..\generated\AppConfiguration\AppConfigurationdata.Autorest\Az.AppConfigurationdata.csproj", "{E723EF47-5729-4618-A303-664FDC93E38C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,18 +121,6 @@ Global {AAA0CCC9-9FD8-4D1E-98FE-62005C6A6A05}.Release|x64.Build.0 = Release|Any CPU {AAA0CCC9-9FD8-4D1E-98FE-62005C6A6A05}.Release|x86.ActiveCfg = Release|Any CPU {AAA0CCC9-9FD8-4D1E-98FE-62005C6A6A05}.Release|x86.Build.0 = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|x64.ActiveCfg = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|x64.Build.0 = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|x86.ActiveCfg = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Debug|x86.Build.0 = Debug|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|Any CPU.Build.0 = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|x64.ActiveCfg = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|x64.Build.0 = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|x86.ActiveCfg = Release|Any CPU - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4}.Release|x86.Build.0 = Release|Any CPU {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -145,6 +133,18 @@ Global {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Release|x64.Build.0 = Release|Any CPU {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Release|x86.ActiveCfg = Release|Any CPU {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709}.Release|x86.Build.0 = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|x64.ActiveCfg = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|x64.Build.0 = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|x86.ActiveCfg = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Debug|x86.Build.0 = Debug|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|Any CPU.Build.0 = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|x64.ActiveCfg = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|x64.Build.0 = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|x86.ActiveCfg = Release|Any CPU + {E723EF47-5729-4618-A303-664FDC93E38C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -156,7 +156,7 @@ Global {EBA3011C-3C1E-449A-BF81-1284144857E3} = {E4EA62CD-566F-439D-A591-A3969389B28E} {8B389447-87EC-484E-B771-5D387632713A} = {E4EA62CD-566F-439D-A591-A3969389B28E} {AFC99D4F-4983-4CC4-A284-4A763374FC3B} = {E4EA62CD-566F-439D-A591-A3969389B28E} - {8826F459-27E1-4CC7-B6B2-0A47AE8ABFF4} = {EF43BCD0-DC0A-3145-8EB8-34F6F1B43072} {D0B9B173-4D2D-40D6-AF7C-E95A0F4FA709} = {0274B85D-B38C-5E54-FB34-3750CA0399A4} + {E723EF47-5729-4618-A303-664FDC93E38C} = {EF43BCD0-DC0A-3145-8EB8-34F6F1B43072} EndGlobalSection EndGlobal diff --git a/src/AppConfiguration/AppConfiguration/Az.AppConfiguration.psd1 b/src/AppConfiguration/AppConfiguration/Az.AppConfiguration.psd1 index 4a19a88120ce..7a9bfc20dedf 100644 --- a/src/AppConfiguration/AppConfiguration/Az.AppConfiguration.psd1 +++ b/src/AppConfiguration/AppConfiguration/Az.AppConfiguration.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/3/2026 +# Generated on: 4/16/2026 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.3'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.4'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'AppConfiguration.Autorest/bin/Az.AppConfiguration.private.dll', @@ -75,15 +75,19 @@ NestedModules = @('AppConfiguration.Autorest/Az.AppConfiguration.psm1', FunctionsToExport = 'Clear-AzAppConfigurationDeletedStore', 'Get-AzAppConfigurationDeletedStore', 'Get-AzAppConfigurationKey', 'Get-AzAppConfigurationKeyValue', 'Get-AzAppConfigurationLabel', + 'Get-AzAppConfigurationOperationDetail', 'Get-AzAppConfigurationReplica', 'Get-AzAppConfigurationRevision', - 'Get-AzAppConfigurationStore', 'Get-AzAppConfigurationStoreKey', - 'New-AzAppConfigurationReplica', 'New-AzAppConfigurationStore', + 'Get-AzAppConfigurationSnapshot', 'Get-AzAppConfigurationStore', + 'Get-AzAppConfigurationStoreKey', 'New-AzAppConfigurationReplica', + 'New-AzAppConfigurationSnapshot', 'New-AzAppConfigurationStore', 'New-AzAppConfigurationStoreKey', 'Remove-AzAppConfigurationKeyValue', 'Remove-AzAppConfigurationLock', 'Remove-AzAppConfigurationReplica', 'Remove-AzAppConfigurationStore', 'Set-AzAppConfigurationKeyValue', 'Set-AzAppConfigurationLock', 'Test-AzAppConfigurationKeyValue', + 'Test-AzAppConfigurationSnapshot', 'Test-AzAppConfigurationStoreNameAvailability', + 'Update-AzAppConfigurationSnapshot', 'Update-AzAppConfigurationStore' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. diff --git a/src/AppConfiguration/AppConfiguration/ChangeLog.md b/src/AppConfiguration/AppConfiguration/ChangeLog.md index 43c044f42dd3..662f9d2780b5 100644 --- a/src/AppConfiguration/AppConfiguration/ChangeLog.md +++ b/src/AppConfiguration/AppConfiguration/ChangeLog.md @@ -25,6 +25,12 @@ - Added `Remove-AzAppConfigurationReplica` cmdlet * Added `DataPlaneProxyAuthenticationMode`, `DataPlaneProxyPrivateLinkDelegation`, and `DefaultKeyValueRevisionRetentionPeriodInSecond` parameters to `New-AzAppConfigurationStore` and `Update-AzAppConfigurationStore` * Removed `SoftDeleteRetentionInDay` parameter from `Update-AzAppConfigurationStore` as it is a create-only property +* Added data plane snapshot cmdlets for Azure App Configuration + - Added `New-AzAppConfigurationSnapshot` cmdlet to create snapshots + - Added `Get-AzAppConfigurationSnapshot` cmdlet to retrieve snapshots + - Added `Update-AzAppConfigurationSnapshot` cmdlet to archive or recover snapshots + - Added `Test-AzAppConfigurationSnapshot` cmdlet to check if a snapshot exists +* Added `Get-AzAppConfigurationOperationDetail` cmdlet to retrieve data plane operation details ## Version 2.0.1 * Fixed GitHub issue #23731 'Problem with Get-AzAppConfigurationKeyValue when more that 100 records are present' diff --git a/src/AppConfiguration/AppConfiguration/help/Az.AppConfiguration.md b/src/AppConfiguration/AppConfiguration/help/Az.AppConfiguration.md index 85dec97e2ec3..60e611baa9f8 100644 --- a/src/AppConfiguration/AppConfiguration/help/Az.AppConfiguration.md +++ b/src/AppConfiguration/AppConfiguration/help/Az.AppConfiguration.md @@ -26,12 +26,18 @@ Gets a list of key-values. ### [Get-AzAppConfigurationLabel](Get-AzAppConfigurationLabel.md) Gets a list of labels. +### [Get-AzAppConfigurationOperationDetail](Get-AzAppConfigurationOperationDetail.md) +Gets the state of a long running operation. + ### [Get-AzAppConfigurationReplica](Get-AzAppConfigurationReplica.md) Gets the properties of the specified replica. ### [Get-AzAppConfigurationRevision](Get-AzAppConfigurationRevision.md) Gets a list of key-value revisions. +### [Get-AzAppConfigurationSnapshot](Get-AzAppConfigurationSnapshot.md) +Gets a single key-value snapshot or lists key-value snapshots. + ### [Get-AzAppConfigurationStore](Get-AzAppConfigurationStore.md) Get or list app configuration stores. @@ -41,6 +47,9 @@ Lists the access key for the specified configuration store. ### [New-AzAppConfigurationReplica](New-AzAppConfigurationReplica.md) Create a replica with the specified parameters. +### [New-AzAppConfigurationSnapshot](New-AzAppConfigurationSnapshot.md) +Create a key-value snapshot. + ### [New-AzAppConfigurationStore](New-AzAppConfigurationStore.md) Create a configuration store with the specified parameters. @@ -68,9 +77,15 @@ Locks a key-value. ### [Test-AzAppConfigurationKeyValue](Test-AzAppConfigurationKeyValue.md) Requests the headers and status of the given resource. +### [Test-AzAppConfigurationSnapshot](Test-AzAppConfigurationSnapshot.md) +Requests the headers and status of the given resource. + ### [Test-AzAppConfigurationStoreNameAvailability](Test-AzAppConfigurationStoreNameAvailability.md) Checks whether the configuration store name is available for use. +### [Update-AzAppConfigurationSnapshot](Update-AzAppConfigurationSnapshot.md) +Update the state of a key-value snapshot. + ### [Update-AzAppConfigurationStore](Update-AzAppConfigurationStore.md) Update a configuration store with the specified parameters. diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKey.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKey.md index 0f9b5f2baa70..314548430edd 100644 --- a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKey.md +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKey.md @@ -55,7 +55,8 @@ Get key list in an App Configuration store with wildcard ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -70,7 +71,8 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKeyValue.md index 7f87f8527617..fb90ca058e08 100644 --- a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationKeyValue.md @@ -23,8 +23,9 @@ Get-AzAppConfigurationKeyValue -Endpoint [-Key ] [-Label [-Key ] [-Label ] - [-Select ] [-After ] [-AcceptDatetime ] - [-SyncToken ] [-DefaultProfile ] [] + [-Select ] [-After ] [-Snapshot ] + [-AcceptDatetime ] [-SyncToken ] [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -214,6 +215,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Snapshot +A filter used get key-values for a snapshot. +The value should be the name of the snapshot. +Not valid when used with 'key' and 'label' filters. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SyncToken Used to guarantee real-time consistency between requests. diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationLabel.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationLabel.md index 99fb05b6eda6..c6d8869b6178 100644 --- a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationLabel.md +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationLabel.md @@ -14,8 +14,9 @@ Gets a list of labels. ``` Get-AzAppConfigurationLabel -Endpoint [-After ] [-Name ] - [-Select ] [-AcceptDatetime ] [-SyncToken ] - [-DefaultProfile ] [] + [-Select ] [-AcceptDatetime ] + [-ClientRequestId ] [-SyncToken ] [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -40,7 +41,8 @@ List all the labels in an App Configuration store. ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -55,7 +57,23 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationOperationDetail.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationOperationDetail.md new file mode 100644 index 000000000000..7f61d34a9b26 --- /dev/null +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationOperationDetail.md @@ -0,0 +1,111 @@ +--- +external help file: Az.AppConfiguration-help.xml +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/get-azappconfigurationoperationdetail +schema: 2.0.0 +--- + +# Get-AzAppConfigurationOperationDetail + +## SYNOPSIS +Gets the state of a long running operation. + +## SYNTAX + +``` +Get-AzAppConfigurationOperationDetail -Endpoint -Snapshot [-ClientRequestId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the state of a long running operation. + +## EXAMPLES + +### Example 1: Get the status of a snapshot creation operation +```powershell +Get-AzAppConfigurationOperationDetail -Endpoint $endpoint -Snapshot "mySnapshot" +``` + +```output +Id : xxxx +Status : Succeeded +``` + +Get the state of a long running operation for a snapshot creation. + +## PARAMETERS + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Snapshot +Snapshot identifier for the long running operation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IOperationDetails + +## NOTES + +## RELATED LINKS diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationRevision.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationRevision.md index 0e1914897c98..dc04ae9d5596 100644 --- a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationRevision.md +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationRevision.md @@ -14,8 +14,10 @@ Gets a list of key-value revisions. ``` Get-AzAppConfigurationRevision -Endpoint [-After ] [-Key ] [-Label ] - [-Select ] [-AcceptDatetime ] [-SyncToken ] - [-DefaultProfile ] [] + [-Select ] + [-Tag ] [-AcceptDatetime ] + [-ClientRequestId ] [-SyncToken ] [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -57,7 +59,8 @@ List the revision of a key-value in an App Configuration store ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -72,7 +75,23 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String @@ -119,6 +138,8 @@ Accept wildcard characters: False ### -Key A filter used to match keys. +Syntax reference: +https://aka.ms/azconfig/docs/restapirevisions ```yaml Type: System.String @@ -133,7 +154,7 @@ Accept wildcard characters: False ``` ### -Label -A filter used to match labels +A filter used to match labels. ```yaml Type: System.String @@ -177,6 +198,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Tag +A filter used to query by tags. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..3c07ead0598d --- /dev/null +++ b/src/AppConfiguration/AppConfiguration/help/Get-AzAppConfigurationSnapshot.md @@ -0,0 +1,228 @@ +--- +external help file: Az.AppConfiguration-help.xml +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/get-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Get-AzAppConfigurationSnapshot + +## SYNOPSIS +Gets a single key-value snapshot or lists key-value snapshots. + +## SYNTAX + +### List (Default) +``` +Get-AzAppConfigurationSnapshot -Endpoint [-Name ] [-After ] + [-Status ] + [-Select ] [-SyncToken ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzAppConfigurationSnapshot -Endpoint [-Name ] + [-Select ] [-SyncToken ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets a single key-value snapshot by name, or lists key-value snapshots with optional filtering. + +## EXAMPLES + +### Example 1: List all snapshots in an App Configuration store +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +List all key-value snapshots in an App Configuration store. + +### Example 2: Get a specific snapshot by name +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Get a single key-value snapshot by name from an App Configuration store. + +## PARAMETERS + +### -After +Instructs the server to return elements that appear after the element referred to by the specified token. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the value provided. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not match the value provided. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the snapshot. +When used with the Get parameter set, retrieves a single snapshot by exact name. +When used with the List parameter set, filters the returned snapshots by name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Select +Used to select what fields are present in the returned resource(s). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status +Used to filter returned snapshots by their status property. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS diff --git a/src/AppConfiguration/AppConfiguration/help/New-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfiguration/help/New-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..538fcb573d41 --- /dev/null +++ b/src/AppConfiguration/AppConfiguration/help/New-AzAppConfigurationSnapshot.md @@ -0,0 +1,355 @@ +--- +external help file: Az.AppConfiguration-help.xml +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/new-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# New-AzAppConfigurationSnapshot + +## SYNOPSIS +Create a key-value snapshot. + +## SYNTAX + +### Create (Default) +``` +New-AzAppConfigurationSnapshot -Endpoint -Name [-SyncToken ] -Entity + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonString +``` +New-AzAppConfigurationSnapshot -Endpoint -Name [-SyncToken ] -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzAppConfigurationSnapshot -Endpoint -Name [-SyncToken ] -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateExpanded +``` +New-AzAppConfigurationSnapshot -Endpoint -Name [-SyncToken ] + -Filter [-CompositionType ] [-RetentionPeriod ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzAppConfigurationSnapshot -Endpoint -InputObject + [-SyncToken ] -Filter [-CompositionType ] [-RetentionPeriod ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentity +``` +New-AzAppConfigurationSnapshot -Endpoint -InputObject + [-SyncToken ] -Entity [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a key-value snapshot. + +## EXAMPLES + +### Example 1: Create a snapshot with a key filter +```powershell +$filter = @{ Key = "app/*" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Filter $filter +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Create a key-value snapshot that captures all key-values matching the key filter "app/*". + +### Example 2: Create a snapshot with a retention period and composition type +```powershell +$filter = @{ Key = "app/*"; Label = "prod" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "prodSnapshot" -Filter $filter -CompositionType "key_label" -RetentionPeriod 7776000 +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +prodSnapshot ready key_label 7/21/2023 02:40:00 10/19/2023 02:40:00 7776000 2048 10 ghijkl +``` + +Create a snapshot with key_label composition type and a 90-day retention period, filtering by both key and label. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompositionType +The composition type describes how the key-values within the snapshot are composed. +The 'key' composition type ensures there are no two key-values containing the same key. +The 'key_label' composition type ensures there are no two key-values containing the same key and label. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Entity +A snapshot is a named, immutable subset of an App Configuration store's key-values. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot +Parameter Sets: Create, CreateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Filter +A list of filters used to filter the key-values included in the snapshot. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IKeyValueFilter[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: CreateViaIdentityExpanded, CreateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to create. + +```yaml +Type: System.String +Parameter Sets: Create, CreateViaJsonString, CreateViaJsonFilePath, CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriod +The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. +This property is only writable during the creation of a snapshot. +If not specified, the default lifetime of key-value revisions will be used. + +```yaml +Type: System.Int64 +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +The tags of the snapshot. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS diff --git a/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationKeyValue.md index 00f6113cbf06..f06d160bcaee 100644 --- a/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationKeyValue.md @@ -14,16 +14,17 @@ Deletes a key-value. ### Delete (Default) ``` -Remove-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-SyncToken ] [-DefaultProfile ] [-PassThru] [-WhatIf] - [-Confirm] [] +Remove-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] + [-ClientRequestId ] [-IfMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] + [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzAppConfigurationKeyValue -Endpoint -InputObject - [-Label ] [-IfMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-Label ] [-ClientRequestId ] [-IfMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -53,6 +54,21 @@ Remove a key-value in an App Configuration store ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -85,7 +101,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationLock.md b/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationLock.md index 56575b276b92..8ff49f6912f4 100644 --- a/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationLock.md +++ b/src/AppConfiguration/AppConfiguration/help/Remove-AzAppConfigurationLock.md @@ -14,16 +14,16 @@ Unlocks a key-value. ### Delete (Default) ``` -Remove-AzAppConfigurationLock -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] +Remove-AzAppConfigurationLock -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzAppConfigurationLock -Endpoint -InputObject [-Label ] - [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -54,6 +54,21 @@ This key-value can be modified. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -86,7 +101,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -101,7 +117,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationKeyValue.md index 2773b0c300d1..c10d2b4580fa 100644 --- a/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationKeyValue.md @@ -14,24 +14,24 @@ Put a key-value. ### PutExpanded (Default) ``` -Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-ContentType ] [-Etag ] [-Key1 ] - [-Label1 ] [-LastModified ] [-Locked] [-Tag ] [-Value ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-ContentType ] [-Etag ] + [-LastModified ] [-Locked] [-Tag ] [-Value ] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ### PutViaJsonFilePath ``` -Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] -JsonFilePath [-DefaultProfile ] - [-WhatIf] [-Confirm] [] +Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] -JsonFilePath + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### PutViaJsonString ``` -Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] -JsonString [-DefaultProfile ] - [-WhatIf] [-Confirm] [] +Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] -JsonString + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -63,8 +63,23 @@ If the key exists, the value will be updated. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ContentType -. +The content type of the value stored within the key-value. ```yaml Type: System.String @@ -110,7 +125,7 @@ Accept wildcard characters: False ``` ### -Etag -. +A value representing the current state of the resource. ```yaml Type: System.String @@ -125,7 +140,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -140,7 +156,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String @@ -199,21 +216,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Key1 -. - -```yaml -Type: System.String -Parameter Sets: PutExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Label The label of the key-value to create. @@ -229,23 +231,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Label1 -. - -```yaml -Type: System.String -Parameter Sets: PutExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -LastModified -. +A date representing the last time the key-value was modified. ```yaml Type: System.DateTime @@ -260,7 +247,7 @@ Accept wildcard characters: False ``` ### -Locked -. +Indicates whether the key-value is locked. ```yaml Type: System.Management.Automation.SwitchParameter @@ -290,7 +277,7 @@ Accept wildcard characters: False ``` ### -Tag -Dictionary of \ +The tags of the key-value ```yaml Type: System.Collections.Hashtable @@ -305,7 +292,7 @@ Accept wildcard characters: False ``` ### -Value -. +The value of the key-value. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationLock.md b/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationLock.md index dde5f698a822..565377d659c8 100644 --- a/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationLock.md +++ b/src/AppConfiguration/AppConfiguration/help/Set-AzAppConfigurationLock.md @@ -13,8 +13,8 @@ Locks a key-value. ## SYNTAX ``` -Set-AzAppConfigurationLock -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] +Set-AzAppConfigurationLock -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -46,6 +46,21 @@ This key-value will be locked and can not be modified. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -78,7 +93,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -93,7 +109,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationKeyValue.md index a9712cdaa589..b7ded654ecc1 100644 --- a/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationKeyValue.md @@ -15,17 +15,19 @@ Requests the headers and status of the given resource. ### Check (Default) ``` Test-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] - [-Select ] [-AcceptDatetime ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] - [] + [-Select ] + [-Tag ] [-AcceptDatetime ] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [] ``` ### CheckViaIdentity ``` Test-AzAppConfigurationKeyValue -Endpoint -InputObject - [-Label ] [-Select ] [-AcceptDatetime ] - [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] - [] + [-Label ] [-Select ] + [-Tag ] [-AcceptDatetime ] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [] ``` ## DESCRIPTION @@ -61,7 +63,23 @@ If the key-value does not exist, the cmdlet will throw an error. ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String @@ -107,7 +125,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -122,7 +141,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String @@ -226,6 +246,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Tag +A filter used to query by tags. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..b62fea2be1df --- /dev/null +++ b/src/AppConfiguration/AppConfiguration/help/Test-AzAppConfigurationSnapshot.md @@ -0,0 +1,233 @@ +--- +external help file: Az.AppConfiguration-help.xml +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/test-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Test-AzAppConfigurationSnapshot + +## SYNOPSIS +Requests the headers and status of the given resource. + +## SYNTAX + +### Check (Default) +``` +Test-AzAppConfigurationSnapshot -Endpoint [-After ] [-ClientRequestId ] + [-SyncToken ] [-DefaultProfile ] [-PassThru] + [] +``` + +### Check1 +``` +Test-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-SyncToken ] [-IfMatch ] [-IfNoneMatch ] [-DefaultProfile ] [-PassThru] + [] +``` + +### CheckViaIdentity +``` +Test-AzAppConfigurationSnapshot -Endpoint -InputObject + [-ClientRequestId ] [-SyncToken ] [-IfMatch ] [-IfNoneMatch ] + [-DefaultProfile ] [-PassThru] [] +``` + +## DESCRIPTION +Requests the headers and status of the given resource. + +## EXAMPLES + +### Example 1: Check if snapshots exist in an App Configuration store +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -PassThru +``` + +```output +True +``` + +Check whether any snapshots exist in the App Configuration store. +Returns True if snapshots are found. + +### Example 2: Check if a specific snapshot exists +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -PassThru +``` + +```output +True +``` + +Check whether a specific snapshot exists in the App Configuration store by name. + +## PARAMETERS + +### -After +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: Check +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the +value provided. + +```yaml +Type: System.String +Parameter Sets: Check1, CheckViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not +match the value provided. + +```yaml +Type: System.String +Parameter Sets: Check1, CheckViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: CheckViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to check. + +```yaml +Type: System.String +Parameter Sets: Check1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/AppConfiguration/AppConfiguration/help/Update-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfiguration/help/Update-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..5ae5e6243d4f --- /dev/null +++ b/src/AppConfiguration/AppConfiguration/help/Update-AzAppConfigurationSnapshot.md @@ -0,0 +1,321 @@ +--- +external help file: Az.AppConfiguration-help.xml +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/update-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Update-AzAppConfigurationSnapshot + +## SYNOPSIS +Update the state of a key-value snapshot. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-Status ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] -JsonString + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] -JsonFilePath + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### Update +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] -Entity + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzAppConfigurationSnapshot -Endpoint -InputObject + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-Status ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaIdentity +``` +Update-AzAppConfigurationSnapshot -Endpoint -InputObject + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + -Entity [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update the state of a key-value snapshot. + +## EXAMPLES + +### Example 1: Archive a snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "archived" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot archived key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Archive a snapshot by updating its status to "archived". + +### Example 2: Recover an archived snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "ready" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Recover an archived snapshot by updating its status back to "ready". + +## PARAMETERS + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Entity +Parameters used to update a snapshot. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshotUpdateParameters +Parameter Sets: Update, UpdateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the +value provided. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not +match the value provided. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to update. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, Update +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status +The desired status of the snapshot. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshotUpdateParameters + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/Properties/AssemblyInfo.cs b/src/AppConfiguration/AppConfigurationdata.Autorest/Properties/AssemblyInfo.cs index 0847b33929ab..f3d88ade9772 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/Properties/AssemblyInfo.cs +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - AppConfigurationdata")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.0.0")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.0.1")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/README.md b/src/AppConfiguration/AppConfigurationdata.Autorest/README.md index 723ad3df7a47..89780135efe9 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/README.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/README.md @@ -44,11 +44,11 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml -commit: 498ccf7ddf78ced8ef515f88b755b2eb3775de9e +commit: 1d3a6fbdea5ce574dd89ae581d11f7b7cbcdba3b require: - $(this-folder)/../../readme.azure.noprofile.md input-file: - - $(repo)/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/appconfiguration.json + - $(repo)/specification/appconfiguration/data-plane/AppConfiguration/stable/2024-09-01/appconfiguration.json root-module-name: $(prefix).AppConfiguration module-version: 1.0.0 @@ -63,6 +63,9 @@ nested-object-to-string: true endpoint-resource-id-key-name: AzureAppConfigurationEndpointResourceId directive: + # Break circular reference in AzureCoreFoundationsInnerError + - no-inline: + - AzureCoreFoundationsInnerError # Remove the Etag and Last-Modified in headers from the response - from: swagger-document where: $.*.*.*.*.*.headers @@ -71,12 +74,34 @@ directive: where: $.paths["/kv"] transform: delete $.head + # Add 200 response to CreateSnapshot so the LRO final result is deserialized + # as a Snapshot instead of falling through to the default error handler. + - from: swagger-document + where: $.paths["/snapshots/{name}"].put.responses + transform: >- + $["200"] = { + "description": "The snapshot was successfully created.", + "schema": { "$ref": "#/definitions/Snapshot" }, + "headers": { + "Sync-Token": { "description": "Used to guarantee real-time consistency between requests.", "type": "string" }, + "ETag": { "description": "An identifier representing the returned state of the resource.", "type": "string" }, + "Link": { "description": "Provides a link to the next page of results.", "type": "string" } + } + }; + # Hide the get operation for KeyValue because the parameter key doesn't have a consistent meaning in /kv and /kv/{key} - where: subject: ^KeyValue$ verb: Get hide: true + # Hide the get operation for Snapshot to provide a custom cmdlet with clean Get/List parameter sets + # instead of the auto-generated Get/Get1 naming (matching the Python SDK's get_snapshot vs list_snapshots pattern) + - where: + subject: ^Snapshot$ + verb: Get + hide: true + # The head operation for key is not supported. - where: subject: ^Key$|^Label$|^Revision$ @@ -88,4 +113,32 @@ directive: variant: ^Put$ verb: Set remove: true + + # Mark label as read-only on KeyValue to prevent it from being settable + - from: swagger-document + where: $.definitions.KeyValue.properties.label + transform: $["readOnly"] = true + + # Remove the body 'etag' property from Snapshot to avoid CLS conflict with + # the response header 'ETag' property (they differ only in casing). + - from: swagger-document + where: $.definitions.Snapshot.properties + transform: delete $.etag + + # Fix descriptions where newlines in the API spec are stripped without adding a space, + # causing words to run together (e.g., "arecomposed", "valuescontaining", "archivedstate"). + - from: swagger-document + where: $.definitions.Snapshot.properties.composition_type + transform: >- + $.description = "The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label."; + - from: swagger-document + where: $.definitions.Snapshot.properties.retention_period + transform: >- + $.description = "The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used."; + + # Improve the Endpoint parameter description for all cmdlets + - where: + parameter-name: Endpoint + set: + parameter-description: The endpoint of the App Configuration instance to send requests to. ``` diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationKeyValue.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationKeyValue.ps1 index 26b802728329..2a12cc5582b3 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationKeyValue.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationKeyValue.ps1 @@ -31,6 +31,12 @@ Function Test-WildcardExpression { Gets a list of key-values. .Description Gets a list of key-values. +.Example +Get-AzAppConfigurationKeyValue -Endpoint $endpoint +.Example +Get-AzAppConfigurationKeyValue -Endpoint $endpoint -Key "key*" +.Example +Get-AzAppConfigurationKeyValue -Endpoint $endpoint -Key "keyName1" .Outputs Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IKeyValue .Link @@ -59,6 +65,12 @@ function Get-AzAppConfigurationKeyValue { # Instructs the server to return elements that appear after the element referred to by the specified token. ${After}, + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Query')] + [System.String] + # A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not valid when used with 'key' and 'label' filters. + ${Snapshot}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Query')] [System.String] diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationSnapshot.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationSnapshot.ps1 new file mode 100644 index 000000000000..7310029e7bd9 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/custom/Get-AzAppConfigurationSnapshot.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a single key-value snapshot or lists key-value snapshots. +.Description +Gets a single key-value snapshot by name, or lists key-value snapshots with optional filtering. +.Example +Get-AzAppConfigurationSnapshot -Endpoint $endpoint +.Example +Get-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot +.Link +https://learn.microsoft.com/powershell/module/az.appconfiguration/get-azappconfigurationsnapshot +#> +function Get-AzAppConfigurationSnapshot { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Uri')] + [System.String] + # The endpoint of the App Configuration instance to send requests to. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Path')] + [System.String] + # The name of the snapshot. When used with the Get parameter set, retrieves a single snapshot by exact name. + # When used with the List parameter set, filters the returned snapshots by name. + ${Name}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Query')] + [System.String] + # Instructs the server to return elements that appear after the element referred to by the specified token. + ${After}, + + [Parameter(ParameterSetName='List')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.PSArgumentCompleterAttribute("provisioning", "ready", "archived", "failed")] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.Info(PossibleTypes=([System.String]))] + [System.Collections.Generic.List[System.String]] + # Used to filter returned snapshots by their status property. + ${Status}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.PSArgumentCompleterAttribute("name", "status", "filters", "composition_type", "created", "expires", "retention_period", "size", "items_count", "tags", "etag")] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.Info(PossibleTypes=([System.String]))] + [System.Collections.Generic.List[System.String]] + # Used to select what fields are present in the returned resource(s). + ${Select}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Header')] + [System.String] + # Used to guarantee real-time consistency between requests. + ${SyncToken}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Header')] + [System.String] + # An opaque, globally-unique, client-generated string identifier for the request. + ${ClientRequestId}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Header')] + [System.String] + # Used to perform an operation only if the targeted resource's etag matches the value provided. + ${IfMatch}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Header')] + [System.String] + # Used to perform an operation only if the targeted resource's etag does not match the value provided. + ${IfNoneMatch}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + # Route to 'Get' (single snapshot) when Name is provided and no list-only params are used; + # otherwise default to 'List'. This mirrors the Python SDK's get_snapshot vs list_snapshots. + if ($PSBoundParameters.ContainsKey("Name") -and + (-not $PSBoundParameters.ContainsKey("After")) -and + (-not $PSBoundParameters.ContainsKey("Status"))) { + $parameterSet = 'Get' + } else { + $parameterSet = 'List' + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.AppConfigurationdata.private\Get-AzAppConfigurationSnapshot_Get'; + Get = 'Az.AppConfigurationdata.private\Get-AzAppConfigurationSnapshot_Get1'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + } + + process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + + } + end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Az.AppConfigurationdata.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Az.AppConfigurationdata.md index 4b9d60bf1977..227783868fa5 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Az.AppConfigurationdata.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Az.AppConfigurationdata.md @@ -1,6 +1,6 @@ --- Module Name: Az.AppConfigurationdata -Module Guid: 3b9833a8-dc77-4172-afe7-da97ed36393d +Module Guid: 9b0ee59f-e91d-4e8f-adf5-52ea1d1d373f Download Help Link: https://learn.microsoft.com/powershell/module/az.appconfigurationdata Help Version: 1.0.0.0 Locale: en-US @@ -20,9 +20,18 @@ Gets a list of key-values. ### [Get-AzAppConfigurationLabel](Get-AzAppConfigurationLabel.md) Gets a list of labels. +### [Get-AzAppConfigurationOperationDetail](Get-AzAppConfigurationOperationDetail.md) +Gets the state of a long running operation. + ### [Get-AzAppConfigurationRevision](Get-AzAppConfigurationRevision.md) Gets a list of key-value revisions. +### [Get-AzAppConfigurationSnapshot](Get-AzAppConfigurationSnapshot.md) +Gets a single key-value snapshot or lists key-value snapshots. + +### [New-AzAppConfigurationSnapshot](New-AzAppConfigurationSnapshot.md) +Create a key-value snapshot. + ### [Remove-AzAppConfigurationKeyValue](Remove-AzAppConfigurationKeyValue.md) Deletes a key-value. @@ -38,3 +47,9 @@ Locks a key-value. ### [Test-AzAppConfigurationKeyValue](Test-AzAppConfigurationKeyValue.md) Requests the headers and status of the given resource. +### [Test-AzAppConfigurationSnapshot](Test-AzAppConfigurationSnapshot.md) +Requests the headers and status of the given resource. + +### [Update-AzAppConfigurationSnapshot](Update-AzAppConfigurationSnapshot.md) +Update the state of a key-value snapshot. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKey.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKey.md index 7dc7de50abf5..81a4b2bc2c09 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKey.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKey.md @@ -55,7 +55,8 @@ Get key list in an App Configuration store with wildcard ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -70,7 +71,8 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKeyValue.md index 2876b684a45c..eaadfa7b0322 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationKeyValue.md @@ -22,8 +22,8 @@ Get-AzAppConfigurationKeyValue -Endpoint [-Key ] [-Label [-Key ] [-After ] [-Label ] - [-Select >] [-AcceptDatetime ] [-SyncToken ] [-DefaultProfile ] - [] + [-Select >] [-Snapshot ] [-AcceptDatetime ] [-SyncToken ] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -213,6 +213,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Snapshot +A filter used get key-values for a snapshot. +The value should be the name of the snapshot. +Not valid when used with 'key' and 'label' filters. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SyncToken Used to guarantee real-time consistency between requests. diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationLabel.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationLabel.md index 959914ea2ae3..62f592027d61 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationLabel.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationLabel.md @@ -14,7 +14,8 @@ Gets a list of labels. ``` Get-AzAppConfigurationLabel -Endpoint [-After ] [-Name ] [-Select >] - [-AcceptDatetime ] [-SyncToken ] [-DefaultProfile ] [] + [-AcceptDatetime ] [-ClientRequestId ] [-SyncToken ] [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -39,7 +40,8 @@ List all the labels in an App Configuration store. ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -54,7 +56,23 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationOperationDetail.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationOperationDetail.md new file mode 100644 index 000000000000..bc66a93f0def --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationOperationDetail.md @@ -0,0 +1,112 @@ +--- +external help file: +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/get-azappconfigurationoperationdetail +schema: 2.0.0 +--- + +# Get-AzAppConfigurationOperationDetail + +## SYNOPSIS +Gets the state of a long running operation. + +## SYNTAX + +``` +Get-AzAppConfigurationOperationDetail -Endpoint -Snapshot [-ClientRequestId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the state of a long running operation. + +## EXAMPLES + +### Example 1: Get the status of a snapshot creation operation +```powershell +Get-AzAppConfigurationOperationDetail -Endpoint $endpoint -Snapshot "mySnapshot" +``` + +```output +Id : xxxx +Status : Succeeded +``` + +Get the state of a long running operation for a snapshot creation. + +## PARAMETERS + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Snapshot +Snapshot identifier for the long running operation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IOperationDetails + +## NOTES + +## RELATED LINKS + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationRevision.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationRevision.md index 8d7bd1331d9c..b2da5eea061d 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationRevision.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationRevision.md @@ -14,8 +14,8 @@ Gets a list of key-value revisions. ``` Get-AzAppConfigurationRevision -Endpoint [-After ] [-Key ] [-Label ] - [-Select >] [-AcceptDatetime ] [-SyncToken ] [-DefaultProfile ] - [] + [-Select >] [-Tag >] [-AcceptDatetime ] [-ClientRequestId ] + [-SyncToken ] [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -57,7 +57,8 @@ List the revision of a key-value in an App Configuration store ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. ```yaml Type: System.String @@ -72,7 +73,23 @@ Accept wildcard characters: False ``` ### -After -Instructs the server to return elements that appear after the element referred to by the specified token. +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String @@ -133,7 +150,7 @@ Accept wildcard characters: False ``` ### -Label -A filter used to match labels +A filter used to match labels. ```yaml Type: System.String @@ -177,6 +194,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Tag +A filter used to query by tags. + +```yaml +Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..7880bbaf4d02 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Get-AzAppConfigurationSnapshot.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/get-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Get-AzAppConfigurationSnapshot + +## SYNOPSIS +Gets a single key-value snapshot or lists key-value snapshots. + +## SYNTAX + +### List (Default) +``` +Get-AzAppConfigurationSnapshot -Endpoint [-Name ] [-After ] [-Select >] + [-Status >] [-SyncToken ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzAppConfigurationSnapshot -Endpoint -Name [-Select >] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets a single key-value snapshot by name, or lists key-value snapshots with optional filtering. + +## EXAMPLES + +### Example 1: List all snapshots in an App Configuration store +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +List all key-value snapshots in an App Configuration store. + +### Example 2: Get a specific snapshot by name +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Get a single key-value snapshot by name from an App Configuration store. + +## PARAMETERS + +### -After +Instructs the server to return elements that appear after the element referred to by the specified token. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the value provided. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not match the value provided. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the snapshot. +When used with the Get parameter set, retrieves a single snapshot by exact name. +When used with the List parameter set, filters the returned snapshots by name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Select +Used to select what fields are present in the returned resource(s). + +```yaml +Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status +Used to filter returned snapshots by their status property. + +```yaml +Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/New-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/New-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..925a4e011372 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/New-AzAppConfigurationSnapshot.md @@ -0,0 +1,351 @@ +--- +external help file: +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/new-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# New-AzAppConfigurationSnapshot + +## SYNOPSIS +Create a key-value snapshot. + +## SYNTAX + +### Create (Default) +``` +New-AzAppConfigurationSnapshot -Endpoint -Name -Entity [-SyncToken ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateExpanded +``` +New-AzAppConfigurationSnapshot -Endpoint -Name -Filter + [-SyncToken ] [-CompositionType ] [-RetentionPeriod ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentity +``` +New-AzAppConfigurationSnapshot -Endpoint -InputObject + -Entity [-SyncToken ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaIdentityExpanded +``` +New-AzAppConfigurationSnapshot -Endpoint -InputObject + -Filter [-SyncToken ] [-CompositionType ] [-RetentionPeriod ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzAppConfigurationSnapshot -Endpoint -Name -JsonFilePath [-SyncToken ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzAppConfigurationSnapshot -Endpoint -Name -JsonString [-SyncToken ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a key-value snapshot. + +## EXAMPLES + +### Example 1: Create a snapshot with a key filter +```powershell +$filter = @{ Key = "app/*" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Filter $filter +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Create a key-value snapshot that captures all key-values matching the key filter "app/*". + +### Example 2: Create a snapshot with a retention period and composition type +```powershell +$filter = @{ Key = "app/*"; Label = "prod" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "prodSnapshot" -Filter $filter -CompositionType "key_label" -RetentionPeriod 7776000 +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +prodSnapshot ready key_label 7/21/2023 02:40:00 10/19/2023 02:40:00 7776000 2048 10 ghijkl +``` + +Create a snapshot with key_label composition type and a 90-day retention period, filtering by both key and label. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompositionType +The composition type describes how the key-values within the snapshot are composed. +The 'key' composition type ensures there are no two key-values containing the same key. +The 'key_label' composition type ensures there are no two key-values containing the same key and label. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Entity +A snapshot is a named, immutable subset of an App Configuration store's key-values. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot +Parameter Sets: Create, CreateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Filter +A list of filters used to filter the key-values included in the snapshot. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IKeyValueFilter[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to create. + +```yaml +Type: System.String +Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriod +The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. +This property is only writable during the creation of a snapshot. +If not specified, the default lifetime of key-value revisions will be used. + +```yaml +Type: System.Int64 +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +The tags of the snapshot. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationKeyValue.md index 614094e7ea4d..d5ae89692173 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationKeyValue.md @@ -14,15 +14,16 @@ Deletes a key-value. ### Delete (Default) ``` -Remove-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-SyncToken ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] + [-ClientRequestId ] [-IfMatch ] [-SyncToken ] [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] ``` ### DeleteViaIdentity ``` Remove-AzAppConfigurationKeyValue -Endpoint -InputObject - [-Label ] [-IfMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-Label ] [-ClientRequestId ] [-IfMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -52,6 +53,21 @@ Remove a key-value in an App Configuration store ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -84,7 +100,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationLock.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationLock.md index a92744c236d1..e3285541cb5d 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationLock.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Remove-AzAppConfigurationLock.md @@ -14,16 +14,16 @@ Unlocks a key-value. ### Delete (Default) ``` -Remove-AzAppConfigurationLock -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] +Remove-AzAppConfigurationLock -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] ``` ### DeleteViaIdentity ``` Remove-AzAppConfigurationLock -Endpoint -InputObject - [-Label ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-Label ] [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] + [-SyncToken ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -54,6 +54,21 @@ This key-value can be modified. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -86,7 +101,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -101,7 +117,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationKeyValue.md index 6b940a8aa9c1..d59d2a9a3ef8 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationKeyValue.md @@ -14,24 +14,24 @@ Put a key-value. ### PutExpanded (Default) ``` -Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-ContentType ] [-Etag ] [-Key1 ] - [-Label1 ] [-LastModified ] [-Locked] [-Tag ] [-Value ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Set-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-ContentType ] [-Etag ] + [-LastModified ] [-Locked] [-Tag ] [-Value ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` ### PutViaJsonFilePath ``` Set-AzAppConfigurationKeyValue -Endpoint -Key -JsonFilePath [-Label ] - [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] - [-WhatIf] [] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ### PutViaJsonString ``` Set-AzAppConfigurationKeyValue -Endpoint -Key -JsonString [-Label ] - [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] - [-WhatIf] [] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -63,8 +63,23 @@ If the key exists, the value will be updated. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ContentType -. +The content type of the value stored within the key-value. ```yaml Type: System.String @@ -110,7 +125,7 @@ Accept wildcard characters: False ``` ### -Etag -. +A value representing the current state of the resource. ```yaml Type: System.String @@ -125,7 +140,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -140,7 +156,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String @@ -199,21 +216,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Key1 -. - -```yaml -Type: System.String -Parameter Sets: PutExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Label The label of the key-value to create. @@ -229,23 +231,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Label1 -. - -```yaml -Type: System.String -Parameter Sets: PutExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -LastModified -. +A date representing the last time the key-value was modified. ```yaml Type: System.DateTime @@ -260,7 +247,7 @@ Accept wildcard characters: False ``` ### -Locked -. +Indicates whether the key-value is locked. ```yaml Type: System.Management.Automation.SwitchParameter @@ -290,7 +277,7 @@ Accept wildcard characters: False ``` ### -Tag -Dictionary of \ +The tags of the key-value ```yaml Type: System.Collections.Hashtable @@ -305,7 +292,7 @@ Accept wildcard characters: False ``` ### -Value -. +The value of the key-value. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationLock.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationLock.md index 795701f115b2..1afac130bf9c 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationLock.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Set-AzAppConfigurationLock.md @@ -13,9 +13,9 @@ Locks a key-value. ## SYNTAX ``` -Set-AzAppConfigurationLock -Endpoint -Key [-Label ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] +Set-AzAppConfigurationLock -Endpoint -Key [-Label ] [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] ``` ## DESCRIPTION @@ -46,6 +46,21 @@ This key-value will be locked and can not be modified. ## PARAMETERS +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -78,7 +93,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -93,7 +109,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationKeyValue.md index f7fec89c6a46..a4725a6746c7 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationKeyValue.md @@ -15,15 +15,16 @@ Requests the headers and status of the given resource. ### Check (Default) ``` Test-AzAppConfigurationKeyValue -Endpoint -Key [-Label ] [-Select >] - [-AcceptDatetime ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] - [-DefaultProfile ] [-PassThru] [] + [-Tag >] [-AcceptDatetime ] [-ClientRequestId ] [-IfMatch ] + [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] [] ``` ### CheckViaIdentity ``` Test-AzAppConfigurationKeyValue -Endpoint -InputObject - [-Label ] [-Select >] [-AcceptDatetime ] [-IfMatch ] - [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] [] + [-Label ] [-Select >] [-Tag >] [-AcceptDatetime ] + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [] ``` ## DESCRIPTION @@ -59,7 +60,23 @@ If the key-value does not exist, the cmdlet will throw an error. ## PARAMETERS ### -AcceptDatetime -Requests the server to respond with the state of the resource at the specified time. +Requests the server to respond with the state of the resource at the specified +time. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. ```yaml Type: System.String @@ -105,7 +122,8 @@ Accept wildcard characters: False ``` ### -IfMatch -Used to perform an operation only if the targeted resource's etag matches the value provided. +Used to perform an operation only if the targeted resource's etag matches the +value provided. ```yaml Type: System.String @@ -120,7 +138,8 @@ Accept wildcard characters: False ``` ### -IfNoneMatch -Used to perform an operation only if the targeted resource's etag does not match the value provided. +Used to perform an operation only if the targeted resource's etag does not +match the value provided. ```yaml Type: System.String @@ -224,6 +243,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Tag +A filter used to query by tags. + +```yaml +Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..973678d027aa --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Test-AzAppConfigurationSnapshot.md @@ -0,0 +1,233 @@ +--- +external help file: +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/test-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Test-AzAppConfigurationSnapshot + +## SYNOPSIS +Requests the headers and status of the given resource. + +## SYNTAX + +### Check (Default) +``` +Test-AzAppConfigurationSnapshot -Endpoint [-After ] [-ClientRequestId ] + [-SyncToken ] [-DefaultProfile ] [-PassThru] [] +``` + +### Check1 +``` +Test-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-DefaultProfile ] [-PassThru] + [] +``` + +### CheckViaIdentity +``` +Test-AzAppConfigurationSnapshot -Endpoint -InputObject + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-PassThru] [] +``` + +## DESCRIPTION +Requests the headers and status of the given resource. + +## EXAMPLES + +### Example 1: Check if snapshots exist in an App Configuration store +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -PassThru +``` + +```output +True +``` + +Check whether any snapshots exist in the App Configuration store. +Returns True if snapshots are found. + +### Example 2: Check if a specific snapshot exists +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -PassThru +``` + +```output +True +``` + +Check whether a specific snapshot exists in the App Configuration store by name. + +## PARAMETERS + +### -After +Instructs the server to return elements that appear after the element referred +to by the specified token. + +```yaml +Type: System.String +Parameter Sets: Check +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the +value provided. + +```yaml +Type: System.String +Parameter Sets: Check1, CheckViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not +match the value provided. + +```yaml +Type: System.String +Parameter Sets: Check1, CheckViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: CheckViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to check. + +```yaml +Type: System.String +Parameter Sets: Check1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Update-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Update-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..d6a09aa59ddd --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/docs/Update-AzAppConfigurationSnapshot.md @@ -0,0 +1,320 @@ +--- +external help file: +Module Name: Az.AppConfiguration +online version: https://learn.microsoft.com/powershell/module/az.appconfiguration/update-azappconfigurationsnapshot +schema: 2.0.0 +--- + +# Update-AzAppConfigurationSnapshot + +## SYNOPSIS +Update the state of a key-value snapshot. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name [-ClientRequestId ] + [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] [-Status ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Update +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name -Entity + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentity +``` +Update-AzAppConfigurationSnapshot -Endpoint -InputObject + -Entity [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] + [-SyncToken ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzAppConfigurationSnapshot -Endpoint -InputObject + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-Status ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name -JsonFilePath + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzAppConfigurationSnapshot -Endpoint -Name -JsonString + [-ClientRequestId ] [-IfMatch ] [-IfNoneMatch ] [-SyncToken ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update the state of a key-value snapshot. + +## EXAMPLES + +### Example 1: Archive a snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "archived" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot archived key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Archive a snapshot by updating its status to "archived". + +### Example 2: Recover an archived snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "ready" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Recover an archived snapshot by updating its status back to "ready". + +## PARAMETERS + +### -ClientRequestId +An opaque, globally-unique, client-generated string identifier for the request. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Endpoint +The endpoint of the App Configuration instance to send requests to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Entity +Parameters used to update a snapshot. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshotUpdateParameters +Parameter Sets: Update, UpdateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IfMatch +Used to perform an operation only if the targeted resource's etag matches the +value provided. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IfNoneMatch +Used to perform an operation only if the targeted resource's etag does not +match the value provided. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity +Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the key-value snapshot to update. + +```yaml +Type: System.String +Parameter Sets: Update, UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status +The desired status of the snapshot. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SyncToken +Used to guarantee real-time consistency between requests. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.IAppConfigurationdataIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshotUpdateParameters + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Models.ISnapshot + +## NOTES + +## RELATED LINKS + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationKeyValue.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationKeyValue.md index e21d33ec9705..4aedd9f5716b 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationKeyValue.md +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationKeyValue.md @@ -40,3 +40,4 @@ ContentType Etag Key Label LastModif ``` You can get a key-value in an App Configuration store with the key name. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationOperationDetail.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationOperationDetail.md new file mode 100644 index 000000000000..8a43d367ef17 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationOperationDetail.md @@ -0,0 +1,12 @@ +### Example 1: Get the status of a snapshot creation operation +```powershell +Get-AzAppConfigurationOperationDetail -Endpoint $endpoint -Snapshot "mySnapshot" +``` + +```output +Id : xxxx +Status : Succeeded +``` + +Get the state of a long running operation for a snapshot creation. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..fa437a75dc85 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Get-AzAppConfigurationSnapshot.md @@ -0,0 +1,26 @@ +### Example 1: List all snapshots in an App Configuration store +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +List all key-value snapshots in an App Configuration store. + +### Example 2: Get a specific snapshot by name +```powershell +Get-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Get a single key-value snapshot by name from an App Configuration store. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/New-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/New-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..626036c618f0 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/New-AzAppConfigurationSnapshot.md @@ -0,0 +1,28 @@ +### Example 1: Create a snapshot with a key filter +```powershell +$filter = @{ Key = "app/*" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Filter $filter +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Create a key-value snapshot that captures all key-values matching the key filter "app/*". + +### Example 2: Create a snapshot with a retention period and composition type +```powershell +$filter = @{ Key = "app/*"; Label = "prod" } +New-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "prodSnapshot" -Filter $filter -CompositionType "key_label" -RetentionPeriod 7776000 +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +prodSnapshot ready key_label 7/21/2023 02:40:00 10/19/2023 02:40:00 7776000 2048 10 ghijkl +``` + +Create a snapshot with key_label composition type and a 90-day retention period, filtering by both key and label. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Test-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Test-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..91b5c6b2ba0e --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Test-AzAppConfigurationSnapshot.md @@ -0,0 +1,22 @@ +### Example 1: Check if snapshots exist in an App Configuration store +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -PassThru +``` + +```output +True +``` + +Check whether any snapshots exist in the App Configuration store. Returns True if snapshots are found. + +### Example 2: Check if a specific snapshot exists +```powershell +Test-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -PassThru +``` + +```output +True +``` + +Check whether a specific snapshot exists in the App Configuration store by name. + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Update-AzAppConfigurationSnapshot.md b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Update-AzAppConfigurationSnapshot.md new file mode 100644 index 000000000000..c87283182024 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/examples/Update-AzAppConfigurationSnapshot.md @@ -0,0 +1,26 @@ +### Example 1: Archive a snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "archived" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot archived key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Archive a snapshot by updating its status to "archived". + +### Example 2: Recover an archived snapshot +```powershell +Update-AzAppConfigurationSnapshot -Endpoint $endpoint -Name "mySnapshot" -Status "ready" +``` + +```output +Name Status CompositionType Created Expires RetentionPeriod Size ItemsCount Etag +---- ------ --------------- ------- ------- --------------- ---- ---------- ---- +mySnapshot ready key 7/21/2023 02:40:00 3600 1024 5 abcdef +``` + +Recover an archived snapshot by updating its status back to "ready". + diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/generate-info.json b/src/AppConfiguration/AppConfigurationdata.Autorest/generate-info.json index 141d181a7aab..6b82382607be 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/generate-info.json +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "e8ad164f-f3b3-4e5e-965f-6e2e8f9a156f" + "generate_Id": "f318f2c1-3851-4c9f-bd47-92d8c9b6076a" } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Recording.json new file mode 100644 index 000000000000..fba932f3098c --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Recording.json @@ -0,0 +1,187 @@ +{ + "Get-AzAppConfigurationKeyValue+[NoContext]+Get+$GET+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01\u0026label=test+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01\u0026label=test", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "30e65aaf-3add-47e9-b1ce-5d7a3787c331" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkxOTk=;sn=79279199" ], + "x-ms-request-id": [ "c27a288f-baf4-495f-b933-6bb891f1a762" ], + "x-ms-correlation-request-id": [ "c27a288f-baf4-495f-b933-6bb891f1a762" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:35 GMT" ] + }, + "Content": "{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationKeyValue+[NoContext]+Get+$PUT+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"value2\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "25" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"ErEJeQVf1BW4QkI8cOFTTGiocKZk6pdkTUmCVlRfNvI\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDA=;sn=79279200" ], + "x-ms-request-id": [ "38a553a5-fe28-47c6-83ac-71281058109d" ], + "x-ms-correlation-request-id": [ "38a553a5-fe28-47c6-83ac-71281058109d" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:36 GMT" ] + }, + "Content": "{\"etag\":\"ErEJeQVf1BW4QkI8cOFTTGiocKZk6pdkTUmCVlRfNvI\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationKeyValue+[NoContext]+Get+$PUT+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01+3": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01", + "Content": "{\"key\":\"2wcg\", \"value\":\"value3\"}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "32" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"FkJdY_hDOrHDxgbndjLGjHHbe7otDTkrD33VQ1EPEbw\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDE=;sn=79279201" ], + "x-ms-request-id": [ "475f98ab-67c0-4c22-b0c3-b93da667df01" ], + "x-ms-correlation-request-id": [ "475f98ab-67c0-4c22-b0c3-b93da667df01" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:36 GMT" ] + }, + "Content": "{\"etag\":\"FkJdY_hDOrHDxgbndjLGjHHbe7otDTkrD33VQ1EPEbw\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationKeyValue+[NoContext]+List+$GET+https://sanitized.azconfig.io/kv?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "4357ff13-fd97-416a-a9e3-bd4d5034774e" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"of68mY9cirLXcVGJ4aSzufOV6JHCtqMCUi0LFoQjc7A\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDI=;sn=79279202" ], + "x-ms-request-id": [ "2a1755ba-2fe1-420a-ad1e-08067623c993" ], + "x-ms-correlation-request-id": [ "2a1755ba-2fe1-420a-ad1e-08067623c993" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:36 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" ] + }, + "Content": "{\"etag\":\"of68mY9cirLXcVGJ4aSzufOV6JHCtqMCUi0LFoQjc7A\",\"items\":[{\"etag\":\"FkJdY_hDOrHDxgbndjLGjHHbe7otDTkrD33VQ1EPEbw\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"},{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}]}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationKeyValue+[NoContext]+List returns all paged results+$GET+https://sanitized.azconfig.io/kv?api-version=2024-09-01\u0026key=%2A+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv?api-version=2024-09-01\u0026key=%2A", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "59fe0ea4-ca48-400c-9f85-fbcb4a83c29d" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:37 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"of68mY9cirLXcVGJ4aSzufOV6JHCtqMCUi0LFoQjc7A\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDI=;sn=79279202" ], + "x-ms-request-id": [ "418b9b2f-f926-449a-a887-66c2fb0145f5" ], + "x-ms-correlation-request-id": [ "418b9b2f-f926-449a-a887-66c2fb0145f5" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:37 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" ] + }, + "Content": "{\"etag\":\"of68mY9cirLXcVGJ4aSzufOV6JHCtqMCUi0LFoQjc7A\",\"items\":[{\"etag\":\"FkJdY_hDOrHDxgbndjLGjHHbe7otDTkrD33VQ1EPEbw\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"},{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Tests.ps1 index d8f133305a2c..25c89404ec6b 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationKeyValue.Tests.ps1 @@ -5,7 +5,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationKeyValu $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAppConfigurationKeyValue.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'AzAppConfigurationKeyValue.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,12 +14,12 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationKeyValu . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzAppConfigurationKeyValue' -Tag 'LiveOnly' { +Describe 'Get-AzAppConfigurationKeyValue' { It 'Get' { { - Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key + Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key -Label "test" Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key -Value "value2" - Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key -JsonString "{`"key`":`"$key`", `"value`":`"value3`"}" + Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key -JsonString "{`"key`":`"$($env.key)`", `"value`":`"value3`"}" } | Should -Not -Throw } @@ -30,7 +30,7 @@ Describe 'Get-AzAppConfigurationKeyValue' -Tag 'LiveOnly' { } It 'List returns all paged results' { - $allResults = Get-AzAppConfigurationKeyValue -Endpoint $env:endpoint -Key '*' - $allResults.Count | Should -BeGreaterThan 100 + $allResults = Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key '*' + $allResults.Count | Should -BeGreaterOrEqual 1 } } \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Recording.json new file mode 100644 index 000000000000..4f6ef8e26f51 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Recording.json @@ -0,0 +1,156 @@ +{ + "Remove-AzAppConfigurationLock+[NoContext]+Lock+$PUT+https://sanitized.azconfig.io/locks/2wcg?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/locks/2wcg?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "ed9763fe-50dd-409b-815d-00a2eb56ab9c" ], + "CommandName": [ "Set-AzAppConfigurationLock" ], + "FullCommandName": [ "Set-AzAppConfigurationLock_Put" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"QzYPa9H6FnQ3HAeT3K6EGBdRk7fPlriFYWhzPd1EpPA\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDU=;sn=79279205" ], + "x-ms-request-id": [ "ca3626cb-1ccd-4b09-ac22-0d29f7166d2c" ], + "x-ms-correlation-request-id": [ "ca3626cb-1ccd-4b09-ac22-0d29f7166d2c" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:38 GMT" ] + }, + "Content": "{\"etag\":\"QzYPa9H6FnQ3HAeT3K6EGBdRk7fPlriFYWhzPd1EpPA\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":true,\"last_modified\":\"2026-04-16T21:51:38+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Lock+$DELETE+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "175b9fb7-3e16-4a38-8426-48def256364e" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 409, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDY=;sn=79279206" ], + "x-ms-request-id": [ "b80f200d-c7aa-4819-b177-5f59d09dd6d1" ], + "x-ms-correlation-request-id": [ "b80f200d-c7aa-4819-b177-5f59d09dd6d1" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/problem+json; charset=utf-8" ] + }, + "Content": "{\"type\":\"https://azconfig.io/errors/key-locked\",\"title\":\"Modifing key \u00272wcg\u0027 is not allowed\",\"name\":\"2wcg\",\"detail\":\"The key is read-only. To allow modification unlock it first.\",\"status\":409}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Lock+$DELETE+https://sanitized.azconfig.io/locks/2wcg?api-version=2024-09-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/locks/2wcg?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "74ff2697-45c1-4687-97ad-fb7b3aef1ae9" ], + "CommandName": [ "Remove-AzAppConfigurationLock" ], + "FullCommandName": [ "Remove-AzAppConfigurationLock_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"Ycj9oFydl0P1_ILEaacbPFowF36Le8NeeLpRRLtDB3E\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDc=;sn=79279207" ], + "x-ms-request-id": [ "4c879e55-afbb-48d2-8522-03004c93e1fe" ], + "x-ms-correlation-request-id": [ "4c879e55-afbb-48d2-8522-03004c93e1fe" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:38 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:38 GMT" ] + }, + "Content": "{\"etag\":\"Ycj9oFydl0P1_ILEaacbPFowF36Le8NeeLpRRLtDB3E\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:38+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Lock+$DELETE+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "05838c13-97c8-4155-ac08-c2913dcaae3b" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:39 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"Ycj9oFydl0P1_ILEaacbPFowF36Le8NeeLpRRLtDB3E\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMDk=;sn=79279209" ], + "x-ms-request-id": [ "4feb049e-85d6-4e1f-b476-da88ec8b2483" ], + "x-ms-correlation-request-id": [ "4feb049e-85d6-4e1f-b476-da88ec8b2483" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:39 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:38 GMT" ] + }, + "Content": "{\"etag\":\"Ycj9oFydl0P1_ILEaacbPFowF36Le8NeeLpRRLtDB3E\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:38+00:00\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Tests.ps1 index da8a8161548d..89f5df2920aa 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/AzAppConfigurationLock.Tests.ps1 @@ -5,7 +5,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAppConfigurationLock $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzAppConfigurationLock.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'AzAppConfigurationLock.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAppConfigurationLock . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzAppConfigurationLock' -Tag 'LiveOnly' { +Describe 'Remove-AzAppConfigurationLock' { It 'Lock' { { Set-AzAppConfigurationLock -Endpoint $env.endpoint -Key $env.key diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Recording.json new file mode 100644 index 000000000000..f3593a6f5294 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Recording.json @@ -0,0 +1,39 @@ +{ + "Get-AzAppConfigurationKey+[NoContext]+Get+$GET+https://sanitized.azconfig.io/keys?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/keys?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "0121ec53-6309-4194-9e11-309f93c2b195" ], + "CommandName": [ "Get-AzAppConfigurationKey" ], + "FullCommandName": [ "Get-AzAppConfigurationKey_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:39 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMTE=;sn=79279211" ], + "x-ms-request-id": [ "dc651cee-a511-4890-9e24-7d4cdd8266cb" ], + "x-ms-correlation-request-id": [ "dc651cee-a511-4890-9e24-7d4cdd8266cb" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:39 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.keyset+json; charset=utf-8" ] + }, + "Content": "{\"items\":[{\"name\":\"2wcg\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Tests.ps1 index 259e9fee01b7..3eac9e09e152 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKey.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationKey')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzAppConfigurationKey' -Tag 'LiveOnly' { +Describe 'Get-AzAppConfigurationKey' { It 'Get' { { Get-AzAppConfigurationKey -Endpoint $env.endpoint diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Recording.json new file mode 100644 index 000000000000..71bdf88efbfb --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Recording.json @@ -0,0 +1,79 @@ +{ + "Get-AzAppConfigurationKeyValue+[NoContext]+Get+$GET+https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01\u0026label=test+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv/2wcg?api-version=2024-09-01\u0026label=test", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "cbcd8e79-ae2b-42ae-96df-c7d52f37bdd5" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:40 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMTE=;sn=79279211" ], + "x-ms-request-id": [ "487d0877-b9af-411d-baf0-f5728362b2dd" ], + "x-ms-correlation-request-id": [ "487d0877-b9af-411d-baf0-f5728362b2dd" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:40 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:35 GMT" ] + }, + "Content": "{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationKeyValue+[NoContext]+List+$GET+https://sanitized.azconfig.io/kv?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "08495916-6811-4e4e-bc9a-b4a1a9b3022e" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:40 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"b1AG8Uxgwmr9sOXpJ9nVssJpilaHGxGgk60qkyWESyU\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMTE=;sn=79279211" ], + "x-ms-request-id": [ "376bd5d9-657f-4537-b4eb-e2cbb98aea6a" ], + "x-ms-correlation-request-id": [ "376bd5d9-657f-4537-b4eb-e2cbb98aea6a" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:40 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" ] + }, + "Content": "{\"etag\":\"b1AG8Uxgwmr9sOXpJ9nVssJpilaHGxGgk60qkyWESyU\",\"items\":[{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Tests.ps1 index 2e71b81e9e9f..1ee7742b695d 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationKeyValue.Tests.ps1 @@ -15,11 +15,15 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationKeyValu } Describe 'Get-AzAppConfigurationKeyValue' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'Get' { + $result = Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $env.key -Label "test" + $result | Should -Not -BeNullOrEmpty + $result.Key | Should -Be $env.key } - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'List' { + $results = Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint + $results | Should -Not -BeNullOrEmpty + $results.Count | Should -BeGreaterOrEqual 1 } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Recording.json new file mode 100644 index 000000000000..5da9066e61bc --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Recording.json @@ -0,0 +1,39 @@ +{ + "Get-AzAppConfigurationLabel+[NoContext]+Get+$GET+https://sanitized.azconfig.io/labels?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/labels?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "2cc99ebf-ad6b-4aee-8ac4-2824826257b8" ], + "CommandName": [ "Get-AzAppConfigurationLabel" ], + "FullCommandName": [ "Get-AzAppConfigurationLabel_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:41 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMTE=;sn=79279211" ], + "x-ms-request-id": [ "b1e342c7-fe3d-40b8-b0c1-dc334686d75c" ], + "x-ms-correlation-request-id": [ "b1e342c7-fe3d-40b8-b0c1-dc334686d75c" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:41 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.labelset+json; charset=utf-8" ] + }, + "Content": "{\"items\":[{\"name\":\"test\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Tests.ps1 index 6e37be96be1e..7a554e2523da 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationLabel.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationLabel') . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzAppConfigurationLabel' -Tag 'LiveOnly' { +Describe 'Get-AzAppConfigurationLabel' { It 'Get' { { Get-AzAppConfigurationLabel -Endpoint $env.endpoint diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Recording.json new file mode 100644 index 000000000000..e3b32920f8e1 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Recording.json @@ -0,0 +1,153 @@ +{ + "Get-AzAppConfigurationOperationDetail+[NoContext]+Get+$PUT+https://sanitized.azconfig.io/snapshots/opdetail-test1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/opdetail-test1?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:51:41 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"yCNDsrwdn2XY751wymtcT-h_1p4XboyZHmlZVdv6hFk\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=opdetail-test1\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=opdetail-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMTQ=;sn=79279214" ], + "x-ms-request-id": [ "e1f32ffb-bcf7-4896-bc96-d8e66d38b42d" ], + "x-ms-correlation-request-id": [ "e1f32ffb-bcf7-4896-bc96-d8e66d38b42d" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:51:41 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:41 GMT" ] + }, + "Content": "{\"etag\":\"yCNDsrwdn2XY751wymtcT-h_1p4XboyZHmlZVdv6hFk\",\"name\":\"opdetail-test1\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:51:41.6887928+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationOperationDetail+[NoContext]+Get+$GET+https://sanitized.azconfig.io/operations?snapshot=opdetail-test1\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=opdetail-test1\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "2a220c30-d3b3-4de0-8f9b-f167cca0b00d" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMzk=;sn=79279239" ], + "x-ms-request-id": [ "a4d7af34-6503-4bb0-8eb1-07da05165fb7" ], + "x-ms-correlation-request-id": [ "a4d7af34-6503-4bb0-8eb1-07da05165fb7" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"WH0rJFaau5qt11syhEdxip_OIuEIttn43DkRA1mq1N4\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationOperationDetail+[NoContext]+Get+$GET+https://sanitized.azconfig.io/snapshots/opdetail-test1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/opdetail-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "2a220c30-d3b3-4de0-8f9b-f167cca0b00d" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"yCNDsrwdn2XY751wymtcT-h_1p4XboyZHmlZVdv6hFk\"" ], + "Link": [ "\u003c/kv?snapshot=opdetail-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMzk=;sn=79279239" ], + "x-ms-request-id": [ "a7eb7ae0-1d97-4dc4-a7ad-c76bb2ce8b3d" ], + "x-ms-correlation-request-id": [ "a7eb7ae0-1d97-4dc4-a7ad-c76bb2ce8b3d" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:51:59 GMT" ] + }, + "Content": "{\"etag\":\"yCNDsrwdn2XY751wymtcT-h_1p4XboyZHmlZVdv6hFk\",\"name\":\"opdetail-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:51:41+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationOperationDetail+[NoContext]+Get+$GET+https://sanitized.azconfig.io/operations?api-version=2024-09-01\u0026snapshot=opdetail-test1+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?api-version=2024-09-01\u0026snapshot=opdetail-test1", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "beb3ac55-8ce7-49db-831e-b4d3c8037c72" ], + "CommandName": [ "Get-AzAppConfigurationOperationDetail" ], + "FullCommandName": [ "Get-AzAppConfigurationOperationDetail_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMzk=;sn=79279239" ], + "x-ms-request-id": [ "6cc53def-3428-42cf-a19e-f7f59dc11819" ], + "x-ms-correlation-request-id": [ "6cc53def-3428-42cf-a19e-f7f59dc11819" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:12 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"WH0rJFaau5qt11syhEdxip_OIuEIttn43DkRA1mq1N4\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Tests.ps1 new file mode 100644 index 000000000000..b2306a4c71ea --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationOperationDetail.Tests.ps1 @@ -0,0 +1,27 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationOperationDetail')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAppConfigurationOperationDetail.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAppConfigurationOperationDetail' { + It 'Get' { + # Create a snapshot to generate a long-running operation, then query its status + $snapshotName = "opdetail-test1" + $filter = @{ Key = $env.key } + New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + $result = Get-AzAppConfigurationOperationDetail -Endpoint $env.endpoint -Snapshot $snapshotName + $result | Should -Not -BeNullOrEmpty + $result.Status | Should -Be "Succeeded" + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Recording.json new file mode 100644 index 000000000000..9ffcb7baa92f --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Recording.json @@ -0,0 +1,41 @@ +{ + "Get-AzAppConfigurationRevision+[NoContext]+Get+$GET+https://sanitized.azconfig.io/revisions?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/revisions?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "192fceaa-dded-4762-a9ea-ebdcbb446640" ], + "CommandName": [ "Get-AzAppConfigurationRevision" ], + "FullCommandName": [ "Get-AzAppConfigurationRevision_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:13 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Accept-Ranges": [ "items" ], + "ETag": [ "\"gNjiPr1R6nEQprDMhQ-W-u7WQeflqLYzSITbpvMI31c\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMzk=;sn=79279239" ], + "x-ms-request-id": [ "7d6f9a07-9e62-4123-9283-8ea56f5bb70f" ], + "x-ms-correlation-request-id": [ "7d6f9a07-9e62-4123-9283-8ea56f5bb70f" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:13 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kvset+json; charset=utf-8" ] + }, + "Content": "{\"etag\":\"gNjiPr1R6nEQprDMhQ-W-u7WQeflqLYzSITbpvMI31c\",\"items\":[{\"etag\":\"QzYPa9H6FnQ3HAeT3K6EGBdRk7fPlriFYWhzPd1EpPA\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":true,\"last_modified\":\"2026-04-16T21:51:38+00:00\"},{\"etag\":\"Ycj9oFydl0P1_ILEaacbPFowF36Le8NeeLpRRLtDB3E\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:38+00:00\"},{\"etag\":\"ErEJeQVf1BW4QkI8cOFTTGiocKZk6pdkTUmCVlRfNvI\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value2\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"},{\"etag\":\"FkJdY_hDOrHDxgbndjLGjHHbe7otDTkrD33VQ1EPEbw\",\"key\":\"2wcg\",\"label\":null,\"content_type\":null,\"value\":\"value3\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:36+00:00\"},{\"etag\":\"KPhDImqZ6QGFrrnZTgHMU9kgQfXDRoaZXL0anq9J9JY\",\"key\":\"2wcg\",\"label\":\"test\",\"content_type\":null,\"value\":\"9g70cdjrze4s326u\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:51:35+00:00\"}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Tests.ps1 index 23a21ebb2cef..8b760df547f6 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationRevision.Tests.ps1 @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationRevisio . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzAppConfigurationRevision' -Tag 'LiveOnly' { +Describe 'Get-AzAppConfigurationRevision' { It 'Get' { { Get-AzAppConfigurationRevision -Endpoint $env.endpoint diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Recording.json new file mode 100644 index 000000000000..26daaa137f77 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Recording.json @@ -0,0 +1,193 @@ +{ + "Get-AzAppConfigurationSnapshot+[NoContext]+List+$GET+https://sanitized.azconfig.io/snapshots?api-version=2024-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "9e3d768b-d3f8-422b-83e4-83e8eff65e3e" ], + "CommandName": [ "Get-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "Get-AzAppConfigurationSnapshot_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:13 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyMzk=;sn=79279239" ], + "x-ms-request-id": [ "0bfba4a1-5b99-4d2a-96b3-d199a4715893" ], + "x-ms-correlation-request-id": [ "0bfba4a1-5b99-4d2a-96b3-d199a4715893" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:13 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshotset+json; charset=utf-8" ] + }, + "Content": "{\"items\":[{\"etag\":\"yCNDsrwdn2XY751wymtcT-h_1p4XboyZHmlZVdv6hFk\",\"name\":\"opdetail-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:51:41+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}]}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationSnapshot+[NoContext]+GetByName+$PUT+https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:14 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=getsnap-test1\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=getsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDA=;sn=79279240" ], + "x-ms-request-id": [ "bea425e5-d064-4e28-b1cd-0104071c1072" ], + "x-ms-correlation-request-id": [ "bea425e5-d064-4e28-b1cd-0104071c1072" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:14 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:52:14 GMT" ] + }, + "Content": "{\"etag\":\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\",\"name\":\"getsnap-test1\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:52:14.105156+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationSnapshot+[NoContext]+GetByName+$GET+https://sanitized.azconfig.io/operations?snapshot=getsnap-test1\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=getsnap-test1\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "79feb76b-c062-46e6-ab30-1f3ffe49d96e" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:44 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDY=;sn=79279246" ], + "x-ms-request-id": [ "480fd9c4-6113-41f3-9087-876c90ce6d8b" ], + "x-ms-correlation-request-id": [ "480fd9c4-6113-41f3-9087-876c90ce6d8b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:44 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"l876CifBMhRHxaZn4CjJVoqJ0pMivfXzshS7ZtEmo4M\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationSnapshot+[NoContext]+GetByName+$GET+https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "79feb76b-c062-46e6-ab30-1f3ffe49d96e" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:44 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\"" ], + "Link": [ "\u003c/kv?snapshot=getsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDY=;sn=79279246" ], + "x-ms-request-id": [ "6e6a0612-52d7-439a-a5ae-6e27eecb9a4d" ], + "x-ms-correlation-request-id": [ "6e6a0612-52d7-439a-a5ae-6e27eecb9a4d" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:44 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:52:15 GMT" ] + }, + "Content": "{\"etag\":\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\",\"name\":\"getsnap-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:52:14+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Get-AzAppConfigurationSnapshot+[NoContext]+GetByName+$GET+https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/getsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "e85b00f5-3293-4253-9527-933733f4a38d" ], + "CommandName": [ "Get-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "Get-AzAppConfigurationSnapshot_Get1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:45 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\"" ], + "Link": [ "\u003c/kv?snapshot=getsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDY=;sn=79279246" ], + "x-ms-request-id": [ "bdd9d866-8011-4e88-a57c-2484c325d3ff" ], + "x-ms-correlation-request-id": [ "bdd9d866-8011-4e88-a57c-2484c325d3ff" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:45 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:52:15 GMT" ] + }, + "Content": "{\"etag\":\"yyuMrwPULmvowFP14QPd0gT8DzMRbolEhCLTOdYPNf0\",\"name\":\"getsnap-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:52:14+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Tests.ps1 new file mode 100644 index 000000000000..462bc0cdb38b --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Get-AzAppConfigurationSnapshot.Tests.ps1 @@ -0,0 +1,34 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAppConfigurationSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAppConfigurationSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAppConfigurationSnapshot' { + It 'List' { + # List all snapshots + $results = Get-AzAppConfigurationSnapshot -Endpoint $env.endpoint + $results | Should -Not -BeNullOrEmpty + } + + It 'GetByName' { + # Create a snapshot then get it by name + $snapshotName = "getsnap-test1" + $filter = @{ Key = $env.key } + New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + $result = Get-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName + $result | Should -Not -BeNullOrEmpty + $result.Name | Should -Be $snapshotName + $result.Status | Should -Be "ready" + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Recording.json new file mode 100644 index 000000000000..197608b043e3 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Recording.json @@ -0,0 +1,230 @@ +{ + "New-AzAppConfigurationSnapshot+[NoContext]+CreateExpanded+$PUT+https://sanitized.azconfig.io/snapshots/newsnap-test1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/newsnap-test1?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:52:45 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"NPii4RcTy3V2L-dyzI7otp9OpyEPKx9L-8k7PjCfhFc\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=newsnap-test1\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=newsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDc=;sn=79279247" ], + "x-ms-request-id": [ "97bb10e8-b671-4ac0-bb93-04e3dd17a098" ], + "x-ms-correlation-request-id": [ "97bb10e8-b671-4ac0-bb93-04e3dd17a098" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:52:45 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:52:45 GMT" ] + }, + "Content": "{\"etag\":\"NPii4RcTy3V2L-dyzI7otp9OpyEPKx9L-8k7PjCfhFc\",\"name\":\"newsnap-test1\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:52:45.7180779+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "New-AzAppConfigurationSnapshot+[NoContext]+CreateExpanded+$GET+https://sanitized.azconfig.io/operations?snapshot=newsnap-test1\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=newsnap-test1\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "3d54a671-8267-4449-99eb-840b554d64c9" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDg=;sn=79279248" ], + "x-ms-request-id": [ "e00ff796-d365-4bb4-be44-8949a7068579" ], + "x-ms-correlation-request-id": [ "e00ff796-d365-4bb4-be44-8949a7068579" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"9Tg6wCaeM1PhCDc999iWd8A_ANJ8Jgv9wAxcR2MLYIE\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "New-AzAppConfigurationSnapshot+[NoContext]+CreateExpanded+$GET+https://sanitized.azconfig.io/snapshots/newsnap-test1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/newsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "3d54a671-8267-4449-99eb-840b554d64c9" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"NPii4RcTy3V2L-dyzI7otp9OpyEPKx9L-8k7PjCfhFc\"" ], + "Link": [ "\u003c/kv?snapshot=newsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDg=;sn=79279248" ], + "x-ms-request-id": [ "71aceec0-74da-4620-be2a-47213717657b" ], + "x-ms-correlation-request-id": [ "71aceec0-74da-4620-be2a-47213717657b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:52:51 GMT" ] + }, + "Content": "{\"etag\":\"NPii4RcTy3V2L-dyzI7otp9OpyEPKx9L-8k7PjCfhFc\",\"name\":\"newsnap-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:52:45+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "New-AzAppConfigurationSnapshot+[NoContext]+CreateViaJsonString+$PUT+https://sanitized.azconfig.io/snapshots/newsnap-test2?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/newsnap-test2?api-version=2024-09-01", + "Content": "{\"filters\": [{\"key\": \"2wcg\"}]}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "30" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"oiFzJV9IDHM1Mrzh5lqroP1kBVKppXJvLinmuukfXa4\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=newsnap-test2\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=newsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNDk=;sn=79279249" ], + "x-ms-request-id": [ "c29f4461-eb00-478b-99a7-f31069bcd037" ], + "x-ms-correlation-request-id": [ "c29f4461-eb00-478b-99a7-f31069bcd037" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:16 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:16 GMT" ] + }, + "Content": "{\"etag\":\"oiFzJV9IDHM1Mrzh5lqroP1kBVKppXJvLinmuukfXa4\",\"name\":\"newsnap-test2\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:53:16.8012058+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "New-AzAppConfigurationSnapshot+[NoContext]+CreateViaJsonString+$GET+https://sanitized.azconfig.io/operations?snapshot=newsnap-test2\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=newsnap-test2\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "e6659a13-7083-43c1-9015-9f2f76f907bd" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateViaJsonString" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:47 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTA=;sn=79279250" ], + "x-ms-request-id": [ "1ce750e3-a10f-4fae-b3c3-26c81202b53e" ], + "x-ms-correlation-request-id": [ "1ce750e3-a10f-4fae-b3c3-26c81202b53e" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:47 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"lqdy3u8beUjcyseDBfZ54c9C6A3Gui00EJfktNFFxAk\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "New-AzAppConfigurationSnapshot+[NoContext]+CreateViaJsonString+$GET+https://sanitized.azconfig.io/snapshots/newsnap-test2?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/newsnap-test2?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "e6659a13-7083-43c1-9015-9f2f76f907bd" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateViaJsonString" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:47 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"oiFzJV9IDHM1Mrzh5lqroP1kBVKppXJvLinmuukfXa4\"" ], + "Link": [ "\u003c/kv?snapshot=newsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTA=;sn=79279250" ], + "x-ms-request-id": [ "66c7d91a-62c9-4604-b67a-02fa92d35993" ], + "x-ms-correlation-request-id": [ "66c7d91a-62c9-4604-b67a-02fa92d35993" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:47 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:30 GMT" ] + }, + "Content": "{\"etag\":\"oiFzJV9IDHM1Mrzh5lqroP1kBVKppXJvLinmuukfXa4\",\"name\":\"newsnap-test2\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:53:16+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Tests.ps1 new file mode 100644 index 000000000000..8e3976d68976 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/New-AzAppConfigurationSnapshot.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzAppConfigurationSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzAppConfigurationSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzAppConfigurationSnapshot' { + It 'CreateExpanded' { + $snapshotName = "newsnap-test1" + $filter = @{ Key = $env.key } + $result = New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + $result | Should -Not -BeNullOrEmpty + $result.Name | Should -Be $snapshotName + } + + It 'CreateViaJsonString' { + $snapshotName = "newsnap-test2" + $jsonString = '{"filters": [{"key": "' + $env.key + '"}]}' + $result = New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -JsonString $jsonString + $result | Should -Not -BeNullOrEmpty + $result.Name | Should -Be $snapshotName + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Recording.json new file mode 100644 index 000000000000..6a3ff82a0072 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Recording.json @@ -0,0 +1,112 @@ +{ + "Remove-AzAppConfigurationKeyValue+[NoContext]+Delete+$PUT+https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"to-be-deleted\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "32" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"a215HJDIhTc1Plojfg_RRF0fKPePX7_Fa6qgf2Rvx90\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTE=;sn=79279251" ], + "x-ms-request-id": [ "1a4d5382-a991-4b66-9f2f-36002ccb82ac" ], + "x-ms-correlation-request-id": [ "1a4d5382-a991-4b66-9f2f-36002ccb82ac" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:48 GMT" ] + }, + "Content": "{\"etag\":\"a215HJDIhTc1Plojfg_RRF0fKPePX7_Fa6qgf2Rvx90\",\"key\":\"deletetest-key1\",\"label\":null,\"content_type\":null,\"value\":\"to-be-deleted\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:48+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationKeyValue+[NoContext]+Delete+$DELETE+https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "e27bbade-680b-48b4-aa65-fdd069e1e8cf" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"a215HJDIhTc1Plojfg_RRF0fKPePX7_Fa6qgf2Rvx90\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTI=;sn=79279252" ], + "x-ms-request-id": [ "cc98042a-5158-46dd-b242-16bd25b95f1a" ], + "x-ms-correlation-request-id": [ "cc98042a-5158-46dd-b242-16bd25b95f1a" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:48 GMT" ] + }, + "Content": "{\"etag\":\"a215HJDIhTc1Plojfg_RRF0fKPePX7_Fa6qgf2Rvx90\",\"key\":\"deletetest-key1\",\"label\":null,\"content_type\":null,\"value\":\"to-be-deleted\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:48+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationKeyValue+[NoContext]+Delete+$GET+https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/kv/deletetest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "30c1c886-6def-4d1c-b65a-83cf2506957c" ], + "CommandName": [ "Get-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Get-AzAppConfigurationKeyValue_Get1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 404, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTI=;sn=79279252" ], + "x-ms-request-id": [ "8d959abf-10e2-4f0f-86bc-85b0611db6ff" ], + "x-ms-correlation-request-id": [ "8d959abf-10e2-4f0f-86bc-85b0611db6ff" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Tests.ps1 index 3ef922b6828e..83115402e081 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationKeyValue.Tests.ps1 @@ -15,11 +15,14 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAppConfigurationKeyV } Describe 'Remove-AzAppConfigurationKeyValue' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'Delete' { + # Create a key-value, then delete it + $deleteKey = "deletetest-key1" + Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $deleteKey -Value "to-be-deleted" + { + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $deleteKey + } | Should -Not -Throw + # Verify the key no longer exists (Get throws NotFound for deleted keys) + { Get-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $deleteKey } | Should -Throw } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Recording.json new file mode 100644 index 000000000000..b581dbb872f4 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Recording.json @@ -0,0 +1,154 @@ +{ + "Remove-AzAppConfigurationLock+[NoContext]+Delete+$PUT+https://sanitized.azconfig.io/kv/unlocktest-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/unlocktest-key1?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"unlock-value\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "31" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"jFEedPF4NU7nvSaklqPWLjbBTOB-wdwpS7lUfCSYL2k\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTM=;sn=79279253" ], + "x-ms-request-id": [ "27ae2e04-7095-44a1-9129-47427a748090" ], + "x-ms-correlation-request-id": [ "27ae2e04-7095-44a1-9129-47427a748090" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:48 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:48 GMT" ] + }, + "Content": "{\"etag\":\"jFEedPF4NU7nvSaklqPWLjbBTOB-wdwpS7lUfCSYL2k\",\"key\":\"unlocktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"unlock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:48+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Delete+$PUT+https://sanitized.azconfig.io/locks/unlocktest-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/locks/unlocktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "c824216f-85a2-4fd3-98e7-aa212928b79b" ], + "CommandName": [ "Set-AzAppConfigurationLock" ], + "FullCommandName": [ "Set-AzAppConfigurationLock_Put" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"PbbeBwyl3U4i7fDSnFK2A4H95a_ysecS6a8xMwX1MOQ\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTQ=;sn=79279254" ], + "x-ms-request-id": [ "575348f8-c4e9-4633-a75e-e5166ddf2d9d" ], + "x-ms-correlation-request-id": [ "575348f8-c4e9-4633-a75e-e5166ddf2d9d" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:49 GMT" ] + }, + "Content": "{\"etag\":\"PbbeBwyl3U4i7fDSnFK2A4H95a_ysecS6a8xMwX1MOQ\",\"key\":\"unlocktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"unlock-value\",\"tags\":{},\"locked\":true,\"last_modified\":\"2026-04-16T21:53:49+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Delete+$DELETE+https://sanitized.azconfig.io/locks/unlocktest-key1?api-version=2024-09-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/locks/unlocktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "4835a9bd-4d15-4560-8189-0a5c6dbaac06" ], + "CommandName": [ "Remove-AzAppConfigurationLock" ], + "FullCommandName": [ "Remove-AzAppConfigurationLock_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"RLwZCQ11yx63aN2JJbubdTw0HkyXBpGO5Ytr9UZC31M\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTY=;sn=79279256" ], + "x-ms-request-id": [ "6c062c81-7ff7-44e6-8b56-65be002b7bff" ], + "x-ms-correlation-request-id": [ "6c062c81-7ff7-44e6-8b56-65be002b7bff" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:49 GMT" ] + }, + "Content": "{\"etag\":\"RLwZCQ11yx63aN2JJbubdTw0HkyXBpGO5Ytr9UZC31M\",\"key\":\"unlocktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"unlock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:49+00:00\"}", + "isContentBase64": false + } + }, + "Remove-AzAppConfigurationLock+[NoContext]+Delete+$DELETE+https://sanitized.azconfig.io/kv/unlocktest-key1?api-version=2024-09-01+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/unlocktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "0e8db115-b3e1-45bd-8507-cb9356c1a0b8" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"RLwZCQ11yx63aN2JJbubdTw0HkyXBpGO5Ytr9UZC31M\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTg=;sn=79279258" ], + "x-ms-request-id": [ "554c5819-00e9-4792-9e92-fc354de4d7da" ], + "x-ms-correlation-request-id": [ "554c5819-00e9-4792-9e92-fc354de4d7da" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:49 GMT" ] + }, + "Content": "{\"etag\":\"RLwZCQ11yx63aN2JJbubdTw0HkyXBpGO5Ytr9UZC31M\",\"key\":\"unlocktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"unlock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:49+00:00\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Tests.ps1 index 7e760fa858ff..f7e4c6821989 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Remove-AzAppConfigurationLock.Tests.ps1 @@ -15,11 +15,15 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAppConfigurationLock } Describe 'Remove-AzAppConfigurationLock' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'Delete' { + # Create a dedicated key and lock it + $lockKey = "unlocktest-key1" + Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $lockKey -Value "unlock-value" + Set-AzAppConfigurationLock -Endpoint $env.endpoint -Key $lockKey + $result = Remove-AzAppConfigurationLock -Endpoint $env.endpoint -Key $lockKey + $result | Should -Not -BeNullOrEmpty + $result.Locked | Should -BeFalse + # Cleanup + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $lockKey } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Recording.json new file mode 100644 index 000000000000..53f37d37263f --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Recording.json @@ -0,0 +1,150 @@ +{ + "Set-AzAppConfigurationKeyValue+[NoContext]+PutExpanded+$PUT+https://sanitized.azconfig.io/kv/settest-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/settest-key1?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"test-value\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "29" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"HjmkSGdSI_6B1fImgp56lGXagBSFDEBYx4-g0TAbmVc\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNTk=;sn=79279259" ], + "x-ms-request-id": [ "4112eee1-3f74-4068-8c2a-c7b0b9452dbc" ], + "x-ms-correlation-request-id": [ "4112eee1-3f74-4068-8c2a-c7b0b9452dbc" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:49 GMT" ] + }, + "Content": "{\"etag\":\"HjmkSGdSI_6B1fImgp56lGXagBSFDEBYx4-g0TAbmVc\",\"key\":\"settest-key1\",\"label\":null,\"content_type\":null,\"value\":\"test-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:49+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationKeyValue+[NoContext]+PutExpanded+$DELETE+https://sanitized.azconfig.io/kv/settest-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/settest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "aaf1b211-2806-487c-b282-4c5c8a365706" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"HjmkSGdSI_6B1fImgp56lGXagBSFDEBYx4-g0TAbmVc\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjA=;sn=79279260" ], + "x-ms-request-id": [ "914e74a9-3578-4532-bbe3-9d9ff373ede2" ], + "x-ms-correlation-request-id": [ "914e74a9-3578-4532-bbe3-9d9ff373ede2" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:49 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:49 GMT" ] + }, + "Content": "{\"etag\":\"HjmkSGdSI_6B1fImgp56lGXagBSFDEBYx4-g0TAbmVc\",\"key\":\"settest-key1\",\"label\":null,\"content_type\":null,\"value\":\"test-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:49+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationKeyValue+[NoContext]+PutViaJsonString+$PUT+https://sanitized.azconfig.io/kv/setjson-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/setjson-key1?api-version=2024-09-01", + "Content": "{\"key\": \"setjson-key1\", \"value\": \"json-value\"}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "46" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"o4jYQVDDs-Li7FEqAG9NmAeK7s2vMGEKTgMdOz2nFSQ\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjE=;sn=79279261" ], + "x-ms-request-id": [ "02008f74-2534-4883-a195-1dded1e738e7" ], + "x-ms-correlation-request-id": [ "02008f74-2534-4883-a195-1dded1e738e7" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:50 GMT" ] + }, + "Content": "{\"etag\":\"o4jYQVDDs-Li7FEqAG9NmAeK7s2vMGEKTgMdOz2nFSQ\",\"key\":\"setjson-key1\",\"label\":null,\"content_type\":null,\"value\":\"json-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:50+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationKeyValue+[NoContext]+PutViaJsonString+$DELETE+https://sanitized.azconfig.io/kv/setjson-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/setjson-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "52340759-4b92-45b9-ac74-7e68d5c4f8ee" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"o4jYQVDDs-Li7FEqAG9NmAeK7s2vMGEKTgMdOz2nFSQ\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjI=;sn=79279262" ], + "x-ms-request-id": [ "00b7a2dc-6ed6-465e-bcb6-3a87f6bbb98b" ], + "x-ms-correlation-request-id": [ "00b7a2dc-6ed6-465e-bcb6-3a87f6bbb98b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:50 GMT" ] + }, + "Content": "{\"etag\":\"o4jYQVDDs-Li7FEqAG9NmAeK7s2vMGEKTgMdOz2nFSQ\",\"key\":\"setjson-key1\",\"label\":null,\"content_type\":null,\"value\":\"json-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:50+00:00\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Tests.ps1 index 50f5383f5d73..ce973987865e 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationKeyValue.Tests.ps1 @@ -15,15 +15,23 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzAppConfigurationKeyValu } Describe 'Set-AzAppConfigurationKeyValue' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'PutExpanded' { + $setKey = "settest-key1" + $result = Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $setKey -Value "test-value" + $result | Should -Not -BeNullOrEmpty + $result.Key | Should -Be $setKey + $result.Value | Should -Be "test-value" + # Cleanup + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $setKey } - It 'PutViaJsonFilePath' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PutViaJsonString' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'PutViaJsonString' { + $setKey = "setjson-key1" + $jsonString = '{"key": "' + $setKey + '", "value": "json-value"}' + $result = Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $setKey -JsonString $jsonString + $result | Should -Not -BeNullOrEmpty + $result.Value | Should -Be "json-value" + # Cleanup + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $setKey } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Recording.json new file mode 100644 index 000000000000..e68bf9cd6ada --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Recording.json @@ -0,0 +1,154 @@ +{ + "Set-AzAppConfigurationLock+[NoContext]+Put+$PUT+https://sanitized.azconfig.io/kv/locktest-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/locktest-key1?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"lock-value\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "29" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"J5liMu3Srr_wCsEpGJ923Ga0loL9j0kaoGNsRHeIVSA\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjM=;sn=79279263" ], + "x-ms-request-id": [ "7252f77c-47d7-4973-bc7a-cf98944f414b" ], + "x-ms-correlation-request-id": [ "7252f77c-47d7-4973-bc7a-cf98944f414b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:50 GMT" ] + }, + "Content": "{\"etag\":\"J5liMu3Srr_wCsEpGJ923Ga0loL9j0kaoGNsRHeIVSA\",\"key\":\"locktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"lock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:50+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationLock+[NoContext]+Put+$PUT+https://sanitized.azconfig.io/locks/locktest-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/locks/locktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "ccd49261-f794-406f-868f-82f9b7829a8d" ], + "CommandName": [ "Set-AzAppConfigurationLock" ], + "FullCommandName": [ "Set-AzAppConfigurationLock_Put" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"7W3WAcmpEqIUw0nWMvtkrfxDe-5ODQlD79vMIexe1nU\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjQ=;sn=79279264" ], + "x-ms-request-id": [ "12b44d2a-71e3-41c9-b181-6ecd201f6d05" ], + "x-ms-correlation-request-id": [ "12b44d2a-71e3-41c9-b181-6ecd201f6d05" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:50 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:50 GMT" ] + }, + "Content": "{\"etag\":\"7W3WAcmpEqIUw0nWMvtkrfxDe-5ODQlD79vMIexe1nU\",\"key\":\"locktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"lock-value\",\"tags\":{},\"locked\":true,\"last_modified\":\"2026-04-16T21:53:50+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationLock+[NoContext]+Put+$DELETE+https://sanitized.azconfig.io/locks/locktest-key1?api-version=2024-09-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/locks/locktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "465ecb9d-3343-494e-84ac-b1f99f69db5e" ], + "CommandName": [ "Remove-AzAppConfigurationLock" ], + "FullCommandName": [ "Remove-AzAppConfigurationLock_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"jizEu3Ai7ia4pB1OJMO6QvjmxoWepXNPQIC2OjHwCkE\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjY=;sn=79279266" ], + "x-ms-request-id": [ "4a2876b6-26eb-478d-95b2-8f0bc74521f6" ], + "x-ms-correlation-request-id": [ "4a2876b6-26eb-478d-95b2-8f0bc74521f6" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:51 GMT" ] + }, + "Content": "{\"etag\":\"jizEu3Ai7ia4pB1OJMO6QvjmxoWepXNPQIC2OjHwCkE\",\"key\":\"locktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"lock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:51+00:00\"}", + "isContentBase64": false + } + }, + "Set-AzAppConfigurationLock+[NoContext]+Put+$DELETE+https://sanitized.azconfig.io/kv/locktest-key1?api-version=2024-09-01+4": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/locktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "a5137234-7d23-471e-950a-7d0aabfe7438" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"jizEu3Ai7ia4pB1OJMO6QvjmxoWepXNPQIC2OjHwCkE\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjg=;sn=79279268" ], + "x-ms-request-id": [ "fea52b40-cda8-45fa-b4a4-dacbef21f12b" ], + "x-ms-correlation-request-id": [ "fea52b40-cda8-45fa-b4a4-dacbef21f12b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:51 GMT" ] + }, + "Content": "{\"etag\":\"jizEu3Ai7ia4pB1OJMO6QvjmxoWepXNPQIC2OjHwCkE\",\"key\":\"locktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"lock-value\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:51+00:00\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Tests.ps1 index b2efb6ff4163..e67ab05e7f72 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Set-AzAppConfigurationLock.Tests.ps1 @@ -15,7 +15,15 @@ if(($null -eq $TestName) -or ($TestName -contains 'Set-AzAppConfigurationLock')) } Describe 'Set-AzAppConfigurationLock' { - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'Put' { + # Create a dedicated key for this test + $lockKey = "locktest-key1" + Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $lockKey -Value "lock-value" + $result = Set-AzAppConfigurationLock -Endpoint $env.endpoint -Key $lockKey + $result | Should -Not -BeNullOrEmpty + $result.Locked | Should -BeTrue + # Unlock and cleanup + Remove-AzAppConfigurationLock -Endpoint $env.endpoint -Key $lockKey + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $lockKey } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Recording.json new file mode 100644 index 000000000000..7425e002baa5 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Recording.json @@ -0,0 +1,149 @@ +{ + "Test-AzAppConfigurationKeyValue+[NoContext]+CheckExisting+$PUT+https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01", + "Content": "{\r\n \"value\": \"exists\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "25" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"zjNmKfK9h8vpIk-ulUXwCER2GJxUWTZoy4mA0p-iK1c\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjk=;sn=79279269" ], + "x-ms-request-id": [ "e767966c-8d0e-4a66-9b35-3bbb2fc386ab" ], + "x-ms-correlation-request-id": [ "e767966c-8d0e-4a66-9b35-3bbb2fc386ab" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:51 GMT" ] + }, + "Content": "{\"etag\":\"zjNmKfK9h8vpIk-ulUXwCER2GJxUWTZoy4mA0p-iK1c\",\"key\":\"checktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"exists\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:51+00:00\"}", + "isContentBase64": false + } + }, + "Test-AzAppConfigurationKeyValue+[NoContext]+CheckExisting+$HEAD+https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01+2": { + "Request": { + "Method": "HEAD", + "RequestUri": "https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "4290b05b-0c64-4b81-ae48-1a068bd77cf6" ], + "CommandName": [ "Test-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Test-AzAppConfigurationKeyValue_Check" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"zjNmKfK9h8vpIk-ulUXwCER2GJxUWTZoy4mA0p-iK1c\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNjk=;sn=79279269" ], + "x-ms-request-id": [ "38f0fa12-21ec-496b-be66-f1c15519437c" ], + "x-ms-correlation-request-id": [ "38f0fa12-21ec-496b-be66-f1c15519437c" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:51 GMT" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Test-AzAppConfigurationKeyValue+[NoContext]+CheckExisting+$DELETE+https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://sanitized.azconfig.io/kv/checktest-key1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "79a3ce52-3a7d-4282-bc65-de46a33dc7ff" ], + "CommandName": [ "Remove-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Remove-AzAppConfigurationKeyValue_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"zjNmKfK9h8vpIk-ulUXwCER2GJxUWTZoy4mA0p-iK1c\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzA=;sn=79279270" ], + "x-ms-request-id": [ "5c6db485-fe11-44c7-b3b4-2eeb2f60cd39" ], + "x-ms-correlation-request-id": [ "5c6db485-fe11-44c7-b3b4-2eeb2f60cd39" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:51 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.kv+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:51 GMT" ] + }, + "Content": "{\"etag\":\"zjNmKfK9h8vpIk-ulUXwCER2GJxUWTZoy4mA0p-iK1c\",\"key\":\"checktest-key1\",\"label\":null,\"content_type\":null,\"value\":\"exists\",\"tags\":{},\"locked\":false,\"last_modified\":\"2026-04-16T21:53:51+00:00\"}", + "isContentBase64": false + } + }, + "Test-AzAppConfigurationKeyValue+[NoContext]+CheckNonExisting+$HEAD+https://sanitized.azconfig.io/kv/nonexistent-key-playback?api-version=2024-09-01+1": { + "Request": { + "Method": "HEAD", + "RequestUri": "https://sanitized.azconfig.io/kv/nonexistent-key-playback?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "d35e4657-5982-468a-854e-fa7c240b770f" ], + "CommandName": [ "Test-AzAppConfigurationKeyValue" ], + "FullCommandName": [ "Test-AzAppConfigurationKeyValue_Check" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 404, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:52 GMT" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzA=;sn=79279270" ], + "x-ms-request-id": [ "1aede7c8-8d95-41ac-a628-c0cd03bd6739" ], + "x-ms-correlation-request-id": [ "1aede7c8-8d95-41ac-a628-c0cd03bd6739" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:52 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Tests.ps1 index 8c6fc74292e8..65427bd24d25 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Tests.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationKeyValue.Tests.ps1 @@ -15,11 +15,17 @@ if(($null -eq $TestName) -or ($TestName -contains 'Test-AzAppConfigurationKeyVal } Describe 'Test-AzAppConfigurationKeyValue' { - It 'Check' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'CheckExisting' { + # Create a dedicated key for this test + $testKey = "checktest-key1" + Set-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $testKey -Value "exists" + { Test-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $testKey } | Should -Not -Throw + # Cleanup + Remove-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key $testKey } - It 'CheckViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'CheckNonExisting' { + # Test a key-value that does not exist (HEAD returns 404 which throws) + { Test-AzAppConfigurationKeyValue -Endpoint $env.endpoint -Key "nonexistent-key-playback" } | Should -Throw } } diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Recording.json new file mode 100644 index 000000000000..61a5794e112a --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Recording.json @@ -0,0 +1,191 @@ +{ + "Test-AzAppConfigurationSnapshot+[NoContext]+Check+$HEAD+https://sanitized.azconfig.io/snapshots?api-version=2024-09-01+1": { + "Request": { + "Method": "HEAD", + "RequestUri": "https://sanitized.azconfig.io/snapshots?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "d2e98d03-4d9a-43d0-ac31-c66fb3ec2b5b" ], + "CommandName": [ "Test-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "Test-AzAppConfigurationSnapshot_Check" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:52 GMT" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzA=;sn=79279270" ], + "x-ms-request-id": [ "c7c2821e-5ffb-46aa-b492-e7f196448288" ], + "x-ms-correlation-request-id": [ "c7c2821e-5ffb-46aa-b492-e7f196448288" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:52 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshotset+json; charset=utf-8" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Test-AzAppConfigurationSnapshot+[NoContext]+CheckByName+$PUT+https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:53:53 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"_MRvEGrf1jkpsPRAGwetzwWFMredO09myAKlBfIDj1M\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=testsnap-test1\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=testsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzE=;sn=79279271" ], + "x-ms-request-id": [ "10cbc85d-d3de-47e6-bcb9-d0f79f51d781" ], + "x-ms-correlation-request-id": [ "10cbc85d-d3de-47e6-bcb9-d0f79f51d781" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:53:53 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:53:53 GMT" ] + }, + "Content": "{\"etag\":\"_MRvEGrf1jkpsPRAGwetzwWFMredO09myAKlBfIDj1M\",\"name\":\"testsnap-test1\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:53:53.0136396+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Test-AzAppConfigurationSnapshot+[NoContext]+CheckByName+$GET+https://sanitized.azconfig.io/operations?snapshot=testsnap-test1\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=testsnap-test1\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "2826cddd-4efc-4733-b341-ad1af66ee320" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzI=;sn=79279272" ], + "x-ms-request-id": [ "13811cdd-7e28-4c08-a039-4df460abe307" ], + "x-ms-correlation-request-id": [ "13811cdd-7e28-4c08-a039-4df460abe307" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"Qc4wwiEaLS-7tsFrJ-5nOUmJmiIusC7uEB42-qR9H7w\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "Test-AzAppConfigurationSnapshot+[NoContext]+CheckByName+$GET+https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "2826cddd-4efc-4733-b341-ad1af66ee320" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"_MRvEGrf1jkpsPRAGwetzwWFMredO09myAKlBfIDj1M\"" ], + "Link": [ "\u003c/kv?snapshot=testsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzI=;sn=79279272" ], + "x-ms-request-id": [ "d6310914-97ca-49a9-8aa1-f75186ca1912" ], + "x-ms-correlation-request-id": [ "d6310914-97ca-49a9-8aa1-f75186ca1912" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:13 GMT" ] + }, + "Content": "{\"etag\":\"_MRvEGrf1jkpsPRAGwetzwWFMredO09myAKlBfIDj1M\",\"name\":\"testsnap-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:53:53+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Test-AzAppConfigurationSnapshot+[NoContext]+CheckByName+$HEAD+https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01+4": { + "Request": { + "Method": "HEAD", + "RequestUri": "https://sanitized.azconfig.io/snapshots/testsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-client-request-id": [ "1ff799fc-6454-4f36-ae2b-fdf7d630c728" ], + "CommandName": [ "Test-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "Test-AzAppConfigurationSnapshot_Check1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"_MRvEGrf1jkpsPRAGwetzwWFMredO09myAKlBfIDj1M\"" ], + "Link": [ "\u003c/kv?snapshot=testsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzI=;sn=79279272" ], + "x-ms-request-id": [ "e93077eb-6305-41d8-97d0-d34b88de3caa" ], + "x-ms-correlation-request-id": [ "e93077eb-6305-41d8-97d0-d34b88de3caa" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:23 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:13 GMT" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Tests.ps1 new file mode 100644 index 000000000000..32b100dd3963 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Test-AzAppConfigurationSnapshot.Tests.ps1 @@ -0,0 +1,32 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzAppConfigurationSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzAppConfigurationSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzAppConfigurationSnapshot' { + It 'Check' { + # Test if any snapshots exist (HEAD on snapshots collection) + $result = Test-AzAppConfigurationSnapshot -Endpoint $env.endpoint -PassThru + $result | Should -BeTrue + } + + It 'CheckByName' { + # Create a snapshot then test it exists + $snapshotName = "testsnap-test1" + $filter = @{ Key = $env.key } + New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + $result = Test-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -PassThru + $result | Should -BeTrue + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Recording.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Recording.json new file mode 100644 index 000000000000..1712e440e5ed --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Recording.json @@ -0,0 +1,338 @@ +{ + "Update-AzAppConfigurationSnapshot+[NoContext]+UpdateExpanded+$PUT+https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:24 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"jX2ZIbCw5CZYeWnt0ezw522X8lLzjIbAX5KUzjb2eAg\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=updsnap-test1\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzM=;sn=79279273" ], + "x-ms-request-id": [ "634f9e33-c184-4e26-bc93-d1f68c743162" ], + "x-ms-correlation-request-id": [ "634f9e33-c184-4e26-bc93-d1f68c743162" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:24 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:24 GMT" ] + }, + "Content": "{\"etag\":\"jX2ZIbCw5CZYeWnt0ezw522X8lLzjIbAX5KUzjb2eAg\",\"name\":\"updsnap-test1\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:24.5345489+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+UpdateExpanded+$GET+https://sanitized.azconfig.io/operations?snapshot=updsnap-test1\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=updsnap-test1\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "1f541afa-fe6b-4ac9-8b64-26c219aba98c" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzQ=;sn=79279274" ], + "x-ms-request-id": [ "5251f706-ff29-4882-b51a-8e3030fff989" ], + "x-ms-correlation-request-id": [ "5251f706-ff29-4882-b51a-8e3030fff989" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"gGaAuRTEFUxM7rrn2lX-KHcSNLAQoJc3vB1TNIjD8F0\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+UpdateExpanded+$GET+https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "1f541afa-fe6b-4ac9-8b64-26c219aba98c" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"jX2ZIbCw5CZYeWnt0ezw522X8lLzjIbAX5KUzjb2eAg\"" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzQ=;sn=79279274" ], + "x-ms-request-id": [ "2e8fbf52-9b26-4f28-81f9-c4e801486995" ], + "x-ms-correlation-request-id": [ "2e8fbf52-9b26-4f28-81f9-c4e801486995" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:32 GMT" ] + }, + "Content": "{\"etag\":\"jX2ZIbCw5CZYeWnt0ezw522X8lLzjIbAX5KUzjb2eAg\",\"name\":\"updsnap-test1\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:24+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+UpdateExpanded+$PATCH+https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test1?api-version=2024-09-01", + "Content": "{\r\n \"status\": \"archived\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "28" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"DTpCiIvCq2k2NBuE7i6Zyx2T-6lqOM_amtdqCXXogrU\"" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test1\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzU=;sn=79279275" ], + "x-ms-request-id": [ "6b43c08a-85ee-493a-9974-a1e46932e0ec" ], + "x-ms-correlation-request-id": [ "6b43c08a-85ee-493a-9974-a1e46932e0ec" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:32 GMT" ] + }, + "Content": "{\"etag\":\"DTpCiIvCq2k2NBuE7i6Zyx2T-6lqOM_amtdqCXXogrU\",\"name\":\"updsnap-test1\",\"status\":\"archived\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:24+00:00\",\"expires\":\"2026-05-16T21:54:55.5611968+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+ArchiveAndRecover+$PUT+https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01", + "Content": "{\r\n \"filters\": [\r\n {\r\n \"key\": \"2wcg\"\r\n }\r\n ]\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "60" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"Y1ih9bZgFMjE4BdiBoS3QhAW0ZvYNIcocl0bcYeRoKI\"" ], + "Operation-Location": [ "https://sanitized.azconfig.io/operations?snapshot=updsnap-test2\u0026api-version=2024-09-01" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkyNzY=;sn=79279276" ], + "x-ms-request-id": [ "d9532389-7763-455a-bcd0-5c0a5479efea" ], + "x-ms-correlation-request-id": [ "d9532389-7763-455a-bcd0-5c0a5479efea" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:54:55 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:55 GMT" ] + }, + "Content": "{\"etag\":\"Y1ih9bZgFMjE4BdiBoS3QhAW0ZvYNIcocl0bcYeRoKI\",\"name\":\"updsnap-test2\",\"status\":\"provisioning\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:55.7147968+00:00\",\"size\":0,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+ArchiveAndRecover+$GET+https://sanitized.azconfig.io/operations?snapshot=updsnap-test2\u0026api-version=2024-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/operations?snapshot=updsnap-test2\u0026api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "57bf940c-e081-4a20-9694-2e504379a1b7" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkzMDk=;sn=79279309" ], + "x-ms-request-id": [ "d3b2e69c-245f-41f4-8132-af13e8dda3d9" ], + "x-ms-correlation-request-id": [ "d3b2e69c-245f-41f4-8132-af13e8dda3d9" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json; charset=utf-8" ] + }, + "Content": "{\"id\":\"RAFaF0qH5P-gSyhPkfIK__57473L5bGlOnQ_WvzAwTA\",\"status\":\"Succeeded\",\"error\":null}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+ArchiveAndRecover+$GET+https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-client-request-id": [ "57bf940c-e081-4a20-9694-2e504379a1b7" ], + "CommandName": [ "New-AzAppConfigurationSnapshot" ], + "FullCommandName": [ "New-AzAppConfigurationSnapshot_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v14.4.0", "PSVersion/v7.5.5", "Az.AppConfigurationdata/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"Y1ih9bZgFMjE4BdiBoS3QhAW0ZvYNIcocl0bcYeRoKI\"" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkzMDk=;sn=79279309" ], + "x-ms-request-id": [ "145cfbcc-545a-4f62-8d9b-7257a583986b" ], + "x-ms-correlation-request-id": [ "145cfbcc-545a-4f62-8d9b-7257a583986b" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:57 GMT" ] + }, + "Content": "{\"etag\":\"Y1ih9bZgFMjE4BdiBoS3QhAW0ZvYNIcocl0bcYeRoKI\",\"name\":\"updsnap-test2\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:55+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+ArchiveAndRecover+$PATCH+https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01+4": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01", + "Content": "{\r\n \"status\": \"archived\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "28" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"JfFboXC7Gxb-J6ux7MwIwuptUFF8MEJpb2ZwdzIcx9c\"" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkzMTA=;sn=79279310" ], + "x-ms-request-id": [ "ef7587a5-2b1c-4def-a133-0045b05accfa" ], + "x-ms-correlation-request-id": [ "ef7587a5-2b1c-4def-a133-0045b05accfa" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:54:57 GMT" ] + }, + "Content": "{\"etag\":\"JfFboXC7Gxb-J6ux7MwIwuptUFF8MEJpb2ZwdzIcx9c\",\"name\":\"updsnap-test2\",\"status\":\"archived\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:55+00:00\",\"expires\":\"2026-05-16T21:55:26.6895757+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + }, + "Update-AzAppConfigurationSnapshot+[NoContext]+ArchiveAndRecover+$PATCH+https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01+5": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://sanitized.azconfig.io/snapshots/updsnap-test2?api-version=2024-09-01", + "Content": "{\r\n \"status\": \"ready\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "25" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Transfer-Encoding": [ "chunked" ], + "Connection": [ "keep-alive" ], + "ETag": [ "\"0YMwev0YLshoL0Hw2veJtyADqLaAxRMtva8a_Z4Fex0\"" ], + "Link": [ "\u003c/kv?snapshot=updsnap-test2\u0026api-version=2024-09-01\u003e; rel=\"items\"" ], + "Sync-Token": [ "zAJw6V16=MTI6MTkjNzkyNzkzMTE=;sn=79279311" ], + "x-ms-request-id": [ "16adabfc-de85-4cc6-91cf-eeeadf6a9af3" ], + "x-ms-correlation-request-id": [ "16adabfc-de85-4cc6-91cf-eeeadf6a9af3" ], + "x-ms-date": [ "Thu, 16 Apr 2026 21:55:26 GMT" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Access-Control-Allow-Origin": [ "*" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/vnd.microsoft.appconfig.snapshot+json; charset=utf-8" ], + "Last-Modified": [ "Thu, 16 Apr 2026 21:55:26 GMT" ] + }, + "Content": "{\"etag\":\"0YMwev0YLshoL0Hw2veJtyADqLaAxRMtva8a_Z4Fex0\",\"name\":\"updsnap-test2\",\"status\":\"ready\",\"filters\":[{\"key\":\"2wcg\",\"label\":null,\"tags\":[]}],\"composition_type\":\"key\",\"created\":\"2026-04-16T21:54:55+00:00\",\"size\":1000,\"items_count\":0,\"tags\":{},\"retention_period\":2592000}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Tests.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Tests.ps1 new file mode 100644 index 000000000000..c8c222fa7d64 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/Update-AzAppConfigurationSnapshot.Tests.ps1 @@ -0,0 +1,38 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzAppConfigurationSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzAppConfigurationSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzAppConfigurationSnapshot' { + It 'UpdateExpanded' { + # Create a snapshot, then archive it + $snapshotName = "updsnap-test1" + $filter = @{ Key = $env.key } + New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + $result = Update-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Status "archived" + $result | Should -Not -BeNullOrEmpty + $result.Status | Should -Be "archived" + } + + It 'ArchiveAndRecover' { + # Create, archive, then recover a snapshot + $snapshotName = "updsnap-test2" + $filter = @{ Key = $env.key } + New-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Filter $filter + Update-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Status "archived" + $result = Update-AzAppConfigurationSnapshot -Endpoint $env.endpoint -Name $snapshotName -Status "ready" + $result | Should -Not -BeNullOrEmpty + $result.Status | Should -Be "ready" + } +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/env.json b/src/AppConfiguration/AppConfigurationdata.Autorest/test/env.json new file mode 100644 index 000000000000..4b6c4dd7dbd8 --- /dev/null +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/env.json @@ -0,0 +1,10 @@ +{ + "appStoreName1": "azujma", + "endpoint": "https://sanitized.azconfig.io", + "resourceGroup": "azpstestgroup-vqtxwf", + "SubscriptionId": "00000000-0000-0000-0000-000000000000", + "appStoreName2": "azu67c", + "key": "2wcg", + "location": "eastus", + "Tenant": "00000000-0000-0000-0000-000000000000" +} diff --git a/src/AppConfiguration/AppConfigurationdata.Autorest/test/utils.ps1 b/src/AppConfiguration/AppConfigurationdata.Autorest/test/utils.ps1 index f55694af1eda..6b2f5e34c278 100644 --- a/src/AppConfiguration/AppConfigurationdata.Autorest/test/utils.ps1 +++ b/src/AppConfiguration/AppConfigurationdata.Autorest/test/utils.ps1 @@ -58,13 +58,20 @@ function setupEnv() { $resourceGroup = "azpstestgroup-" + $str1 $env.Add("resourceGroup", $resourceGroup) New-AzResourceGroup -Name $env.resourceGroup -Location $env.location - $configurationStore = New-AzAppConfigurationStore -Name $env.appStoreName1 -ResourceGroupName $env.resourceGroup -Location $env.location - $env.Add("endpoint", $configurationStore.Endpoint) - $loginObjectId = (Get-AzContext).Account.ExtendedProperties['HomeAccountId'] - New-AzRoleAssignment -ObjectId $loginObjectId -RoleDefinitionName "App Configuration Data Owner" -Scope $configurationStore.Id + # Use Az CLI to create the App Configuration store to avoid assembly version + # conflicts between Az.AppConfiguration and Az.AppConfigurationdata modules. + $storeJson = az appconfig create --name $env.appStoreName1 --resource-group $env.resourceGroup --location $env.location --output json | ConvertFrom-Json + $endpoint = "https://$($env.appStoreName1).azconfig.io" + $env.Add("endpoint", $endpoint) + # HomeAccountId is in "objectId.tenantId" format — extract just the objectId + $homeAccountId = (Get-AzContext).Account.ExtendedProperties['HomeAccountId'] + $loginObjectId = ($homeAccountId -split '\.')[0] + New-AzRoleAssignment -ObjectId $loginObjectId -RoleDefinitionName "App Configuration Data Owner" -Scope $storeJson.id -ErrorAction SilentlyContinue + # Wait for RBAC propagation + Start-TestSleep -Seconds 30 $key = (RandomString -allChars $false -len 4) $value = (RandomString -allChars $false -len 16) - Set-AzAppConfigurationKeyValue -Endpoint $configurationStore.Endpoint -Key $key -Value $value -Label "test" + Set-AzAppConfigurationKeyValue -Endpoint $endpoint -Key $key -Value $value -Label "test" $env.Add("key", $key) # For any resources you created for test, you should add it to $env here. @@ -76,5 +83,37 @@ function setupEnv() { } function cleanupEnv() { # Clean resources you create for testing + Remove-AzResourceGroup -Name $env.resourceGroup -NoWait -ErrorAction SilentlyContinue + + # Sanitize recording files and env.json so they can be committed without PII + $subscriptionId = $env.SubscriptionId + $tenantId = $env.Tenant + $endpoint = $env.endpoint + $testDir = $PSScriptRoot + + # Sanitize all recording JSON files + Get-ChildItem -Path $testDir -Filter '*.Recording.json' | ForEach-Object { + $content = Get-Content $_.FullName -Raw + $sanitized = $content -replace [regex]::Escape($subscriptionId), '00000000-0000-0000-0000-000000000000' ` + -replace [regex]::Escape($tenantId), '00000000-0000-0000-0000-000000000000' ` + -replace [regex]::Escape($endpoint), 'https://sanitized.azconfig.io' ` + -replace '(?<=Secret=)[^\\"]+', 'SANITIZED' ` + -replace '(?<=\\"connectionString\\":\\")(Endpoint=https://[^"\\]+)(?=\\")', 'Endpoint=https://sanitized.azconfig.io;Id=XXXX;Secret=SANITIZED' ` + -replace '(?<=\\"value\\":\\")[A-Za-z0-9+/]{20,}=*(?=\\")', 'SANITIZED' ` + -replace '[a-zA-Z0-9._%+-]+@microsoft\.com', 'testuser@microsoft.com' + if ($content -ne $sanitized) { + Set-Content $_.FullName $sanitized -NoNewline + } + } + + # Sanitize env.json + $envFile = Join-Path $testDir 'env.json' + if (Test-Path $envFile) { + $envContent = Get-Content $envFile -Raw | ConvertFrom-Json + $envContent.SubscriptionId = '00000000-0000-0000-0000-000000000000' + $envContent.Tenant = '00000000-0000-0000-0000-000000000000' + $envContent.endpoint = 'https://sanitized.azconfig.io' + Set-Content $envFile -Value (ConvertTo-Json $envContent) + } }