diff --git a/src/Automation/Automation.Test/ScenarioTests/VariableTests.cs b/src/Automation/Automation.Test/ScenarioTests/VariableTests.cs index 04610d921378..e8da933f1c29 100644 --- a/src/Automation/Automation.Test/ScenarioTests/VariableTests.cs +++ b/src/Automation/Automation.Test/ScenarioTests/VariableTests.cs @@ -26,12 +26,65 @@ public VariableTests(Xunit.Abstractions.ITestOutputHelper output) [Fact] [Trait(Category.Service, Category.Automation)] - [Trait(Category.RunType, Category.LiveOnly)] [Trait(Category.AcceptanceType, Category.CheckIn)] [Trait(Category.AcceptanceType, Category.BVT)] - public void TestE2EVariableAsset() + public void TestStringVariable() { - TestRunner.RunTestScript("Test-E2EVariableAsset"); + TestRunner.RunTestScript("Test-StringVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestIntVariable() + { + TestRunner.RunTestScript("Test-IntVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestFloatVariable() + { + TestRunner.RunTestScript("Test-FloatVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestArrayVariable() + { + TestRunner.RunTestScript("Test-ArrayVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestNormalHashTableVariable() + { + TestRunner.RunTestScript("Test-NormalHashTableVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestMultiLevelDictVariable() + { + TestRunner.RunTestScript("Test-MultiLevelDictVariable"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestJsonInDictValueVariable() + { + TestRunner.RunTestScript("Test-JsonInDictValueVariable"); } } } diff --git a/src/Automation/Automation.Test/ScenarioTests/VariableTests.ps1 b/src/Automation/Automation.Test/ScenarioTests/VariableTests.ps1 index 46c03149feac..9b9d64995328 100644 --- a/src/Automation/Automation.Test/ScenarioTests/VariableTests.ps1 +++ b/src/Automation/Automation.Test/ScenarioTests/VariableTests.ps1 @@ -16,12 +16,12 @@ .SYNOPSIS Tests create new automation variable with string value. #> -function Test-E2EVariableAsset +function Test-StringVariable { - $resourceGroupName = "to-delete-01" - $automationAccountName = "fbs-aa-01" + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue - $variableName = "CreateNewVariableWithValue" + $variableName = "StringValue" $variableValue = "StringValue" $variableValueUpdated = "StringValueChanged" @@ -50,6 +50,295 @@ function Test-E2EVariableAsset Assert-AreEqual $variableValueUpdated $getVariable.value + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with string value. +#> +function Test-IntVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "CreateNewVariableWithValue" + $variableValue = 1 + $variableValueUpdated = 2 + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "Hello" + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual "Hello" $getVariable.Description + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual $variableValueUpdated $getVariable.value + + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with string value. +#> +function Test-FloatVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "NewFloatVariable" + $variableValue = 1.1 + $variableValueUpdated = 2.2 + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "float" + Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString() + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString() + + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with array. +#> +function Test-ArrayVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "NewArrayVariable" + $variableValue = @(@{"key1" = "value1"}, @{"key2" = "value2"}, @{"key3" = "value3"}) + $variableValueUpdated = @(@{"key1" = "value1"}, @{"key2" = "value2"}) + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "array" + Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString() + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString() + + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with simple hashtable. +#> +function Test-NormalHashTableVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "NormalHashTable" + $variableValue = @{"key0" = "value0"} + $variableValueUpdated = @{"key1" = "value1"} + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "NormalHashTableVariable" + Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString() + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString() + + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with multi level dict. +#> +function Test-MultiLevelDictVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "MultiLevelDict" + $variableValue = @{"key0" = @{"subkey" = "subvalue"}} + $variableValueUpdated = @{"key0" = @{"subkey" = @{"3rdkey" = "3rd-value"}}} + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "MultiLevelDict" + Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString() + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString() + + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName + + $output = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName -ErrorAction SilentlyContinue + + Assert-True {$output -eq $null} + } + +<# +.SYNOPSIS +Tests create new automation variable with multi level dict. +#> +function Test-JsonInDictValueVariable +{ + $resourceGroupName = "wyunchi-automation" + $automationAccountName = "test-automation-0" + $output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue + $variableName = "JsonInDictValue" + $variableValue = @{"key0" = "{`"subkey`" = `"sub-value`"}"} + $variableValueUpdated = @{"key0" = "{`"subkey`" = `"0`"}"} + + $variableCreated = New-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName ` + -value $variableValue ` + -Encrypted:$false ` + -Description "JsonInDictValue" + Assert-AreEqual ($variableValue | ConvertTo-Json) $variableCreated.value.toString() + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Set-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -Name $variableName ` + -Encrypted:$false ` + -value $variableValueUpdated + + $getVariable = Get-AzAutomationVariable -ResourceGroupName $resourceGroupName ` + -AutomationAccountName $automationAccountName ` + -name $variableName + + Assert-AreEqual ($variableValueUpdated | ConvertTo-Json) $getVariable.value.toString() + Remove-AzAutomationVariable -ResourceGroupName $resourceGroupName ` -AutomationAccountName $automationAccountName ` -Name $variableName diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestArrayVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestArrayVariable.json new file mode 100644 index 000000000000..168e688df455 --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestArrayVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "74aa7ddc-977d-45a5-84da-dc2be19d0f54" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "74aa7ddc-977d-45a5-84da-dc2be19d0f54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "33777257-9f69-4abb-ad54-e09ac660983e" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095509Z:33777257-9f69-4abb-ad54-e09ac660983e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:08 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3c738031-5f43-4b5f-b2dd-469d8eaf8e68" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3c738031-5f43-4b5f-b2dd-469d8eaf8e68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "08d024b2-f32f-4ff7-bc86-526a1749ba14" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095510Z:08d024b2-f32f-4ff7-bc86-526a1749ba14" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:09 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9e208b55-9c26-448e-8a5e-072de84c1ef5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9e208b55-9c26-448e-8a5e-072de84c1ef5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "441d9c55-1dbe-4021-98d7-2ad0505ef3b0" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095511Z:441d9c55-1dbe-4021-98d7-2ad0505ef3b0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:10 GMT" + ], + "Content-Length": [ + "515" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"},{\\\"key3\\\":\\\"value3\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "c7f0590b-730d-41ad-9b1b-e444eb6c6d33" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095512Z:c7f0590b-730d-41ad-9b1b-e444eb6c6d33" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:12 GMT" + ], + "Content-Length": [ + "515" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"},{\\\"key3\\\":\\\"value3\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "0b38e095-4ca4-447a-a402-b19a58d1405b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095513Z:0b38e095-4ca4-447a-a402-b19a58d1405b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:13 GMT" + ], + "Content-Length": [ + "488" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:13.15+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "249d8260-61b9-4382-96d7-eb3593aac889" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "249d8260-61b9-4382-96d7-eb3593aac889" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "24fa4727-2d93-4b8e-aa8a-542221608206" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095514Z:24fa4727-2d93-4b8e-aa8a-542221608206" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:14 GMT" + ], + "Content-Length": [ + "488" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:13.15+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "10714f58-aeb4-49ca-90a2-fabe687f1d70" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "10714f58-aeb4-49ca-90a2-fabe687f1d70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11983" + ], + "x-ms-correlation-request-id": [ + "d9d3f2de-e76b-44a7-a122-0b403f16ef08" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095518Z:d9d3f2de-e76b-44a7-a122-0b403f16ef08" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:18 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"NewArrayVariable\",\r\n \"properties\": {\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"},{\\\"key3\\\":\\\"value3\\\"}]\",\r\n \"description\": \"array\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3c738031-5f43-4b5f-b2dd-469d8eaf8e68" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "199" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "3c738031-5f43-4b5f-b2dd-469d8eaf8e68" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "c0aa82b6-9b2d-4548-9e61-4ce3eb591289" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095511Z:c0aa82b6-9b2d-4548-9e61-4ce3eb591289" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:10 GMT" + ], + "Content-Length": [ + "515" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"},{\\\"key3\\\":\\\"value3\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"NewArrayVariable\",\r\n \"properties\": {\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"}]\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "121" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5a9032a2-2446-46b7-833b-2a40863e122d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "3d051d2b-5857-4ed5-8727-2a860ba5ebbb" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095513Z:3d051d2b-5857-4ed5-8727-2a860ba5ebbb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:13 GMT" + ], + "Content-Length": [ + "488" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable\",\r\n \"name\": \"NewArrayVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:55:11.0566667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:55:13.15+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"[{\\\"key1\\\":\\\"value1\\\"},{\\\"key2\\\":\\\"value2\\\"}]\",\r\n \"description\": \"array\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewArrayVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdBcnJheVZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0794f08f-040f-4e3d-9bba-c2b1ec14f91a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0794f08f-040f-4e3d-9bba-c2b1ec14f91a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "738b07f1-55ff-4496-a1ca-93b690dedb13" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T095517Z:738b07f1-55ff-4496-a1ca-93b690dedb13" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:55:17 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestE2EVariableAsset.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestE2EVariableAsset.json deleted file mode 100644 index 3130cd25499d..000000000000 --- a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestE2EVariableAsset.json +++ /dev/null @@ -1,719 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e8863d9f-8ac1-4081-b07c-f6c8b792b488" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "ocp-automation-accountid": [ - "70c03a7a-1ee5-4c33-972c-b84fe0b1b31f" - ], - "x-ms-request-id": [ - "e8863d9f-8ac1-4081-b07c-f6c8b792b488" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "911dc000-94dc-4e42-85c1-9e7855647aac" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021726Z:911dc000-94dc-4e42-85c1-9e7855647aac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:26 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "580" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"fbs-aa-01\",\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus2\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://eus2-agentservice-prod-1.azure-automation.net/accounts/70c03a7a-1ee5-4c33-972c-b84fe0b1b31f\",\r\n \"creationTime\": \"2018-10-18T16:39:00.267-07:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2018-11-01T10:07:37.523-07:00\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f1cf3c7b-3b7b-4643-a466-0c8e3bf081b2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "f1cf3c7b-3b7b-4643-a466-0c8e3bf081b2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "35596b60-300c-4f4a-b9ed-2355662d9aa8" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021726Z:35596b60-300c-4f4a-b9ed-2355662d9aa8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:26 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ca6c3491-84d5-4175-8143-6c849590736b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "ca6c3491-84d5-4175-8143-6c849590736b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "8d8e8ed9-89db-4a07-9731-5a594f56d7bd" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021728Z:8d8e8ed9-89db-4a07-9731-5a594f56d7bd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:28 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "457" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2f15d82f-1c1f-4e8e-8324-ac968489f424" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "2f15d82f-1c1f-4e8e-8324-ac968489f424" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "8479493b-b05d-46c0-8318-be393ba3c167" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021728Z:8479493b-b05d-46c0-8318-be393ba3c167" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:28 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "457" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "11eeaa15-8078-4a4d-a827-88b62345b937" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "11eeaa15-8078-4a4d-a827-88b62345b937" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "6f8ddcef-08bb-46ff-a4f6-b9c7105440b9" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021729Z:6f8ddcef-08bb-46ff-a4f6-b9c7105440b9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:28 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "464" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:29.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "835843d4-134e-4f97-a01a-bb964c0c98ae" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "835843d4-134e-4f97-a01a-bb964c0c98ae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "e0f9f697-19d3-458a-951e-f0b330618c23" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021729Z:e0f9f697-19d3-458a-951e-f0b330618c23" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:29 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "464" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:29.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c747855b-59df-4643-a81a-b70b8a221c0e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "c747855b-59df-4643-a81a-b70b8a221c0e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "7af0ce32-5fef-4592-a82c-3120c44b2eea" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021729Z:7af0ce32-5fef-4592-a82c-3120c44b2eea" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:29 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"properties\": {\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\",\r\n \"isEncrypted\": false\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "049492d8-e68d-4214-ae82-5427cc344164" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "157" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "049492d8-e68d-4214-ae82-5427cc344164" - ], - "x-ms-location": [ - "https://management.azure.com/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31" - ], - "ocp-location": [ - "https://management.azure.com/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1dc9b106-dbfc-4935-b92e-75d4ff26c6bd" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021728Z:1dc9b106-dbfc-4935-b92e-75d4ff26c6bd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:27 GMT" - ], - "Location": [ - "https://management.azure.com/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "457" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"properties\": {\r\n \"value\": \"\\\"StringValueChanged\\\"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cb339705-db5f-447e-804e-e72a937ca45b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "108" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "cb339705-db5f-447e-804e-e72a937ca45b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "735ce160-0152-44ca-a2bd-9643e9abc4a1" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021729Z:735ce160-0152-44ca-a2bd-9643e9abc4a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:28 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "464" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2018-11-08T18:17:28.2-08:00\",\r\n \"lastModifiedTime\": \"2018-11-08T18:17:29.2-08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/to-delete-01/providers/Microsoft.Automation/automationAccounts/fbs-aa-01/variables/CreateNewVariableWithValue?api-version=2015-10-31", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDIyYjZjNjEtOTViMC00MjEzLWIzYmUtNzI4MjMxNWRmNzFkL3Jlc291cmNlR3JvdXBzL3RvLWRlbGV0ZS0wMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL2Zicy1hYS0wMS92YXJpYWJsZXMvQ3JlYXRlTmV3VmFyaWFibGVXaXRoVmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "96865082-97e1-4162-b17a-894d9abe7e83" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.7.3190.0", - "OSName/Windows", - "OSVersion/6.3.9600.0", - "Microsoft.Azure.Management.Automation.AutomationClient/3.8.0.0" - ] - }, - "ResponseHeaders": { - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "96865082-97e1-4162-b17a-894d9abe7e83" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "4fcca54a-c662-4ddb-b511-8ec6153197c7" - ], - "x-ms-routing-request-id": [ - "WESTUS2:20181109T021729Z:4fcca54a-c662-4ddb-b511-8ec6153197c7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 09 Nov 2018 02:17:29 GMT" - ], - "Server": [ - "Microsoft-IIS/8.5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "422b6c61-95b0-4213-b3be-7282315df71d" - } -} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestFloatVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestFloatVariable.json new file mode 100644 index 000000000000..4b402444226f --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestFloatVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c0420784-4874-4036-9460-f1d3701f2eaf" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "c0420784-4874-4036-9460-f1d3701f2eaf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "8ae30a26-9e60-4a99-b43b-a8dc1a8fd798" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093624Z:8ae30a26-9e60-4a99-b43b-a8dc1a8fd798" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:24 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "095edf06-4a06-4e61-a858-a831ee377cf1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "095edf06-4a06-4e61-a858-a831ee377cf1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "1fcd15ed-ba76-4a53-ab40-0c1e0692d925" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093625Z:1fcd15ed-ba76-4a53-ab40-0c1e0692d925" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:25 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55c16927-f0d4-482a-83ec-b03a1e0cb746" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "55c16927-f0d4-482a-83ec-b03a1e0cb746" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "a40c565a-0938-450c-8238-683a34bba296" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093626Z:a40c565a-0938-450c-8238-683a34bba296" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:26 GMT" + ], + "Content-Length": [ + "451" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1.1\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "ffc649be-a18f-4838-8aa8-7935c9b887bc" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093627Z:ffc649be-a18f-4838-8aa8-7935c9b887bc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:26 GMT" + ], + "Content-Length": [ + "451" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1.1\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "fe30fc84-2b45-4a6b-8ae9-a93baeb40e43" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093628Z:fe30fc84-2b45-4a6b-8ae9-a93baeb40e43" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:27 GMT" + ], + "Content-Length": [ + "446" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:27.76+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2.2\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7cdc0682-3133-4ec5-96db-ba3f3fc6c217" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7cdc0682-3133-4ec5-96db-ba3f3fc6c217" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "13f0e216-6085-4932-8f86-9874a97424e6" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093628Z:13f0e216-6085-4932-8f86-9874a97424e6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:28 GMT" + ], + "Content-Length": [ + "446" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:27.76+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2.2\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "37fc0b99-50a3-46c2-a804-a21b99d34963" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "37fc0b99-50a3-46c2-a804-a21b99d34963" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "88e940a1-0601-4cca-a4a7-440f6179f3df" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093632Z:88e940a1-0601-4cca-a4a7-440f6179f3df" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:32 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"NewFloatVariable\",\r\n \"properties\": {\r\n \"value\": \"1.1\",\r\n \"description\": \"float\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "095edf06-4a06-4e61-a858-a831ee377cf1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "135" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "095edf06-4a06-4e61-a858-a831ee377cf1" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "29a2a3a5-ea19-4be4-aa27-5dad853c1bc7" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093626Z:29a2a3a5-ea19-4be4-aa27-5dad853c1bc7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:25 GMT" + ], + "Content-Length": [ + "451" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1.1\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"NewFloatVariable\",\r\n \"properties\": {\r\n \"value\": \"2.2\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "79" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1192c05d-e2d8-4449-9548-b8cab61f902b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "316a5134-68e0-4836-83c4-8bed5ddf60f0" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093627Z:316a5134-68e0-4836-83c4-8bed5ddf60f0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:27 GMT" + ], + "Content-Length": [ + "446" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable\",\r\n \"name\": \"NewFloatVariable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:25.8066667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:27.76+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2.2\",\r\n \"description\": \"float\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NewFloatVariable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9OZXdGbG9hdFZhcmlhYmxlP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6f85eecf-9937-423e-9713-42f6da6030ea" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6f85eecf-9937-423e-9713-42f6da6030ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "b5bd831a-96ee-4091-9ab1-fc28034a3e43" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093632Z:b5bd831a-96ee-4091-9ab1-fc28034a3e43" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:31 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestIntVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestIntVariable.json new file mode 100644 index 000000000000..127637cca5af --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestIntVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f1c18e5c-e87d-440e-8bf0-acba9618dd4e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "f1c18e5c-e87d-440e-8bf0-acba9618dd4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "154562d5-abaf-41ee-8fbd-00f306991030" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093635Z:154562d5-abaf-41ee-8fbd-00f306991030" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:34 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "15a08838-f326-4419-9495-f3da4f08dc0f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "15a08838-f326-4419-9495-f3da4f08dc0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "7c5012c0-b71e-4646-8a3a-18ef6a4259e7" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093637Z:7c5012c0-b71e-4646-8a3a-18ef6a4259e7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:37 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c869ba8f-ca0a-489d-b656-69929960fc8e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c869ba8f-ca0a-489d-b656-69929960fc8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "1f36a9b3-df1a-470b-82c6-2c44609c5b4c" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093638Z:1f36a9b3-df1a-470b-82c6-2c44609c5b4c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:37 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "b8a3bd2d-4314-4320-9ed2-4c36b56b9c72" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093639Z:b8a3bd2d-4314-4320-9ed2-4c36b56b9c72" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:38 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "49cb9526-3f0b-48c9-89af-ac20122394a5" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093640Z:49cb9526-3f0b-48c9-89af-ac20122394a5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:39 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:39.5866667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "57273989-945b-4af3-b058-5facce21224e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "57273989-945b-4af3-b058-5facce21224e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "fbaf20c4-117c-406c-bcde-8ac455b92dd4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093640Z:fbaf20c4-117c-406c-bcde-8ac455b92dd4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:40 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:39.5866667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e263b306-679c-4999-a85e-06c8b668f517" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e263b306-679c-4999-a85e-06c8b668f517" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-correlation-request-id": [ + "c17e5db3-9611-4ce6-968e-230f9c3c8f82" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093644Z:c17e5db3-9611-4ce6-968e-230f9c3c8f82" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:43 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"properties\": {\r\n \"value\": \"1\",\r\n \"description\": \"Hello\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "15a08838-f326-4419-9495-f3da4f08dc0f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "143" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "15a08838-f326-4419-9495-f3da4f08dc0f" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "92b151da-3e69-4916-be2d-316d6102cca9" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093637Z:92b151da-3e69-4916-be2d-316d6102cca9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:37 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"1\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"properties\": {\r\n \"value\": \"2\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "87" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2764dfef-a59a-4902-b201-38f7ba6f94aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "9ea732d3-e01d-4892-9c0f-ea239aa55989" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093639Z:9ea732d3-e01d-4892-9c0f-ea239aa55989" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:38 GMT" + ], + "Content-Length": [ + "469" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue\",\r\n \"name\": \"CreateNewVariableWithValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:37.6933333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:39.5866667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"2\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/CreateNewVariableWithValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9DcmVhdGVOZXdWYXJpYWJsZVdpdGhWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3d6fc853-eed5-44e9-aa6f-0cbda7680ea4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3d6fc853-eed5-44e9-aa6f-0cbda7680ea4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "55aa3236-c74a-4ea0-b46f-7baf683002fa" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093642Z:55aa3236-c74a-4ea0-b46f-7baf683002fa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:41 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestJsonInDictValueVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestJsonInDictValueVariable.json new file mode 100644 index 000000000000..10106a4f3f85 --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestJsonInDictValueVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "54a7da71-3657-4936-87d6-f68bda89bc32" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "54a7da71-3657-4936-87d6-f68bda89bc32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "3c1263f7-9f2c-4d7e-8e2e-83f00deec800" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093646Z:3c1263f7-9f2c-4d7e-8e2e-83f00deec800" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:46 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bb416e2e-f2f0-4e15-84f7-cd7f84c9bf01" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "bb416e2e-f2f0-4e15-84f7-cd7f84c9bf01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "effd3a02-c1d2-45d4-a865-d6df07398f25" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093648Z:effd3a02-c1d2-45d4-a865-d6df07398f25" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:47 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d15f60fb-4f07-47ec-9062-2e41b1499b49" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d15f60fb-4f07-47ec-9062-2e41b1499b49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "003f11e2-041b-4574-a7cd-faba9cbbf9e7" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093649Z:003f11e2-041b-4574-a7cd-faba9cbbf9e7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:48 GMT" + ], + "Content-Length": [ + "507" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"name\": \"JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"sub-value\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "6c6dfc87-bc93-4169-8cee-37d2b80fc982" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093650Z:6c6dfc87-bc93-4169-8cee-37d2b80fc982" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:49 GMT" + ], + "Content-Length": [ + "507" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"JsonInDictValue\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"sub-value\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "6577856e-cf29-45ce-a489-e6456e127602" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093651Z:6577856e-cf29-45ce-a489-e6456e127602" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:50 GMT" + ], + "Content-Length": [ + "499" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"JsonInDictValue\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:50.9533333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"0\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7b8528d9-efc2-4fff-b184-2c5fce48825a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7b8528d9-efc2-4fff-b184-2c5fce48825a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "cdc671e6-cbd7-47cd-9346-3577674192d8" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093652Z:cdc671e6-cbd7-47cd-9346-3577674192d8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:51 GMT" + ], + "Content-Length": [ + "499" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"name\": \"JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:50.9533333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"0\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68656931-39bf-4f08-877c-ad1e928966c2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "68656931-39bf-4f08-877c-ad1e928966c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "b356f4ee-d40f-44af-b5ad-c73d2002860a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093656Z:b356f4ee-d40f-44af-b5ad-c73d2002860a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:56 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"JsonInDictValue\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"sub-value\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bb416e2e-f2f0-4e15-84f7-cd7f84c9bf01" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "192" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "bb416e2e-f2f0-4e15-84f7-cd7f84c9bf01" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "f70ad7e4-c01a-4590-98c8-db623fe8884b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093649Z:f70ad7e4-c01a-4590-98c8-db623fe8884b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:48 GMT" + ], + "Content-Length": [ + "507" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"name\": \"JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"sub-value\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"JsonInDictValue\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"0\\\\\\\"}\\\"}\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "118" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa2e8882-b2ae-46a0-9597-d56855ee82eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "2a336a93-21e0-45e1-8087-d760891f1751" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093651Z:2a336a93-21e0-45e1-8087-d760891f1751" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:50 GMT" + ], + "Content-Length": [ + "499" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"JsonInDictValue\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:48.8166667+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:50.9533333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"{\\\\\\\"subkey\\\\\\\" = \\\\\\\"0\\\\\\\"}\\\"}\",\r\n \"description\": \"JsonInDictValue\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/JsonInDictValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Kc29uSW5EaWN0VmFsdWU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "88b0385d-cb2a-4623-aabe-4b57bac776e5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "88b0385d-cb2a-4623-aabe-4b57bac776e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "973cb1ba-dff6-4ae6-9b90-fd54b27b81f9" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093655Z:973cb1ba-dff6-4ae6-9b90-fd54b27b81f9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:55 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestMultiLevelDictVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestMultiLevelDictVariable.json new file mode 100644 index 000000000000..74af66e9a4f4 --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestMultiLevelDictVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8fb0a520-a8d8-47be-aaf7-206aeb6c0463" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "8fb0a520-a8d8-47be-aaf7-206aeb6c0463" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "5f014350-6f58-4d6d-a720-84dfe7787dc6" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093559Z:5f014350-6f58-4d6d-a720-84dfe7787dc6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:35:58 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa49c613-848a-47a6-a528-e187c42f5c16" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa49c613-848a-47a6-a528-e187c42f5c16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "1ed9309a-750f-46c4-b1ef-ad194edfb177" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093600Z:1ed9309a-750f-46c4-b1ef-ad194edfb177" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:35:59 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cde70944-0e9f-4205-a03a-2ee8b0fe8d21" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cde70944-0e9f-4205-a03a-2ee8b0fe8d21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "3a2dbcbb-fc01-46f0-abf9-e5fb5c8dd34e" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093601Z:3a2dbcbb-fc01-46f0-abf9-e5fb5c8dd34e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:01 GMT" + ], + "Content-Length": [ + "479" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":\\\"subvalue\\\"}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "fd959fe2-a67b-4a0f-bf2d-0c40e81bc8c6" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093601Z:fd959fe2-a67b-4a0f-bf2d-0c40e81bc8c6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:01 GMT" + ], + "Content-Length": [ + "479" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":\\\"subvalue\\\"}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "b4d2c047-7713-4b7d-9ee9-1475d7b79126" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093602Z:b4d2c047-7713-4b7d-9ee9-1475d7b79126" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:02 GMT" + ], + "Content-Length": [ + "498" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:02.4033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":{\\\"3rdkey\\\":\\\"3rd-value\\\"}}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "42a96ae5-ea0f-4410-bc86-263c9340f28c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "42a96ae5-ea0f-4410-bc86-263c9340f28c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11981" + ], + "x-ms-correlation-request-id": [ + "b9c5191b-40d4-4436-85ef-c49b245afd83" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093604Z:b9c5191b-40d4-4436-85ef-c49b245afd83" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:03 GMT" + ], + "Content-Length": [ + "498" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:02.4033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":{\\\"3rdkey\\\":\\\"3rd-value\\\"}}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b52cf3a2-d80d-4233-9c8e-f1b7f003b795" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b52cf3a2-d80d-4233-9c8e-f1b7f003b795" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "e05cd4b4-573c-48b9-9ac1-4b7be66820d6" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093608Z:e05cd4b4-573c-48b9-9ac1-4b7be66820d6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:08 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"MultiLevelDict\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":\\\"subvalue\\\"}}\",\r\n \"description\": \"MultiLevelDict\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aa49c613-848a-47a6-a528-e187c42f5c16" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "175" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "aa49c613-848a-47a6-a528-e187c42f5c16" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "06dc7515-5959-4b51-a6c1-7c91124c59c5" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093600Z:06dc7515-5959-4b51-a6c1-7c91124c59c5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:00 GMT" + ], + "Content-Length": [ + "479" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":\\\"subvalue\\\"}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"MultiLevelDict\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":{\\\"3rdkey\\\":\\\"3rd-value\\\"}}}\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "124" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b6dc17bc-8571-48ab-8222-2607ba18e910" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "2b6d1b0b-915b-43eb-9909-8f678b7b4916" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093602Z:2b6d1b0b-915b-43eb-9909-8f678b7b4916" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:02 GMT" + ], + "Content-Length": [ + "498" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict\",\r\n \"name\": \"MultiLevelDict\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:00.43+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:02.4033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":{\\\"subkey\\\":{\\\"3rdkey\\\":\\\"3rd-value\\\"}}}\",\r\n \"description\": \"MultiLevelDict\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/MultiLevelDict?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9NdWx0aUxldmVsRGljdD9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c66b94d8-56c0-461f-af1e-3b32487ee28c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c66b94d8-56c0-461f-af1e-3b32487ee28c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "84a116ec-4924-4aad-8f46-66aed52962c0" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093608Z:84a116ec-4924-4aad-8f46-66aed52962c0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:08 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestNormalHashTableVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestNormalHashTableVariable.json new file mode 100644 index 000000000000..8e1cfc56a190 --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestNormalHashTableVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f23523d-f970-4f77-935d-aed0287c3e68" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "9f23523d-f970-4f77-935d-aed0287c3e68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "2972f43e-1cc4-437c-a963-cca5df94ed48" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093611Z:2972f43e-1cc4-437c-a963-cca5df94ed48" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:11 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55070cc0-5a26-451d-aaa7-79e034608c79" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "55070cc0-5a26-451d-aaa7-79e034608c79" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "cb545d52-521c-4bc9-ab22-1ae27c43657a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093612Z:cb545d52-521c-4bc9-ab22-1ae27c43657a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:11 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "531e338c-fcfe-41ae-be18-f33adec3d109" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "531e338c-fcfe-41ae-be18-f33adec3d109" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "519f8bf2-854c-4ea6-8c4b-697c1088da4c" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093615Z:519f8bf2-854c-4ea6-8c4b-697c1088da4c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:15 GMT" + ], + "Content-Length": [ + "485" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"value0\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "dc7c4599-f97b-4e1e-b4ec-43aaa9c2fbad" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093615Z:dc7c4599-f97b-4e1e-b4ec-43aaa9c2fbad" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:15 GMT" + ], + "Content-Length": [ + "485" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"value0\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "fd404a56-8c1a-4d7d-91e9-6bd4a3bc22c3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093618Z:fd404a56-8c1a-4d7d-91e9-6bd4a3bc22c3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:17 GMT" + ], + "Content-Length": [ + "480" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:17.49+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key1\\\":\\\"value1\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2db70959-3b91-417d-952c-eca083c73336" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2db70959-3b91-417d-952c-eca083c73336" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "d9fcda85-359d-4070-8554-ed26646d44ef" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093618Z:d9fcda85-359d-4070-8554-ed26646d44ef" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:18 GMT" + ], + "Content-Length": [ + "480" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:17.49+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key1\\\":\\\"value1\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "da31f280-a18e-4d8e-a814-94c4574f8e0f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "da31f280-a18e-4d8e-a814-94c4574f8e0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "ef8af76a-4a64-4a7f-a2d5-bd93a382251c" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093622Z:ef8af76a-4a64-4a7f-a2d5-bd93a382251c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:22 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"NormalHashTable\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key0\\\":\\\"value0\\\"}\",\r\n \"description\": \"NormalHashTableVariable\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55070cc0-5a26-451d-aaa7-79e034608c79" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "170" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "55070cc0-5a26-451d-aaa7-79e034608c79" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "6b778d21-c78b-4f06-9c43-09dbca035169" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093613Z:6b778d21-c78b-4f06-9c43-09dbca035169" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:12 GMT" + ], + "Content-Length": [ + "485" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key0\\\":\\\"value0\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"NormalHashTable\",\r\n \"properties\": {\r\n \"value\": \"{\\\"key1\\\":\\\"value1\\\"}\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "96" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f1a5486d-51f6-4c31-be73-70554999a926" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "c1460746-5238-49f0-a9b2-5fa9e3a8bebb" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093617Z:c1460746-5238-49f0-a9b2-5fa9e3a8bebb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:17 GMT" + ], + "Content-Length": [ + "480" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable\",\r\n \"name\": \"NormalHashTable\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:36:13.2033333+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:36:17.49+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"{\\\"key1\\\":\\\"value1\\\"}\",\r\n \"description\": \"NormalHashTableVariable\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/NormalHashTable?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9Ob3JtYWxIYXNoVGFibGU/YXBpLXZlcnNpb249MjAxNS0xMC0zMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "40f3060d-bb1d-4511-9c16-d9320a8f3acd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "40f3060d-bb1d-4511-9c16-d9320a8f3acd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "fc3969ab-6e44-41bb-a4a5-462e42d7d7ac" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093621Z:fc3969ab-6e44-41bb-a4a5-462e42d7d7ac" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:36:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestStringVariable.json b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestStringVariable.json new file mode 100644 index 000000000000..e118409bf31d --- /dev/null +++ b/src/Automation/Automation.Test/SessionRecords/Commands.Automation.Test.VariableTests/TestStringVariable.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wP2FwaS12ZXJzaW9uPTIwMTUtMTAtMzE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7d3a20d9-c065-4d90-a2c4-85b723040e90" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ocp-automation-accountid": [ + "1f2cbd06-83a6-470d-b1bc-af146f663017" + ], + "x-ms-request-id": [ + "7d3a20d9-c065-4d90-a2c4-85b723040e90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "519ae12d-e661-48de-be5f-2401d303a1a0" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093710Z:519ae12d-e661-48de-be5f-2401d303a1a0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:09 GMT" + ], + "Content-Length": [ + "624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-automation-0\",\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts\",\r\n \"location\": \"eastus\",\r\n \"tags\": {},\r\n \"etag\": null,\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": null,\r\n \"capacity\": null\r\n },\r\n \"state\": \"Ok\",\r\n \"RegistrationUrl\": \"https://1f2cbd06-83a6-470d-b1bc-af146f663017.agentsvc.eus.azure-automation.net/accounts/1f2cbd06-83a6-470d-b1bc-af146f663017\",\r\n \"creationTime\": \"2021-02-26T15:25:27.07+08:00\",\r\n \"lastModifiedBy\": null,\r\n \"lastModifiedTime\": \"2021-02-26T15:25:27.07+08:00\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "70f4ba23-dbd3-492c-a718-33660ab440f2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "70f4ba23-dbd3-492c-a718-33660ab440f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "26de4d61-c903-44e9-ae28-85b3c9b30720" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093710Z:26de4d61-c903-44e9-ae28-85b3c9b30720" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:10 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5668e862-f27c-4266-bf9e-a6cc6c0f092a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5668e862-f27c-4266-bf9e-a6cc6c0f092a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "e1de610c-43fb-427e-8507-af1818cedbb3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093712Z:e1de610c-43fb-427e-8507-af1818cedbb3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:11 GMT" + ], + "Content-Length": [ + "441" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "d6c30386-401e-4777-81e8-6298e6d19b34" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093712Z:d6c30386-401e-4777-81e8-6298e6d19b34" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:11 GMT" + ], + "Content-Length": [ + "441" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "e55a787f-f00b-4862-b9a8-5be0b06f69b4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093713Z:e55a787f-f00b-4862-b9a8-5be0b06f69b4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:12 GMT" + ], + "Content-Length": [ + "454" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:13.1433333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ed9035d-89eb-4eef-9c52-1c26a8308469" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5ed9035d-89eb-4eef-9c52-1c26a8308469" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11980" + ], + "x-ms-correlation-request-id": [ + "abbd3b37-d086-45b9-93d0-05e229006689" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093715Z:abbd3b37-d086-45b9-93d0-05e229006689" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:15 GMT" + ], + "Content-Length": [ + "454" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:13.1433333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9b73330d-192e-413b-a4b0-1c69193d0260" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9b73330d-192e-413b-a4b0-1c69193d0260" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "e97e8beb-6d24-4774-b85d-6349c9c68592" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093718Z:e97e8beb-6d24-4774-b85d-6349c9c68592" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:18 GMT" + ], + "Content-Length": [ + "51" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"Variable not found.\"\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"StringValue\",\r\n \"properties\": {\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\",\r\n \"isEncrypted\": false\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "70f4ba23-dbd3-492c-a718-33660ab440f2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "142" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31" + ], + "x-ms-request-id": [ + "70f4ba23-dbd3-492c-a718-33660ab440f2" + ], + "x-ms-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31" + ], + "ocp-location": [ + "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "d239fa24-5234-4bea-9be0-737eb20874e4" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093711Z:d239fa24-5234-4bea-9be0-737eb20874e4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:10 GMT" + ], + "Content-Length": [ + "441" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValue\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"StringValue\",\r\n \"properties\": {\r\n \"value\": \"\\\"StringValueChanged\\\"\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "93" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2954ed12-fbbe-42f8-8f9e-1226d10d1ed6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "9d0fc5d5-28ce-4e35-bb58-f82eff421651" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093713Z:9d0fc5d5-28ce-4e35-bb58-f82eff421651" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:12 GMT" + ], + "Content-Length": [ + "454" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue\",\r\n \"name\": \"StringValue\",\r\n \"type\": \"Microsoft.Automation/AutomationAccounts/Variables\",\r\n \"properties\": {\r\n \"creationTime\": \"2021-02-26T17:37:11.2+08:00\",\r\n \"lastModifiedTime\": \"2021-02-26T17:37:13.1433333+08:00\",\r\n \"isEncrypted\": false,\r\n \"value\": \"\\\"StringValueChanged\\\"\",\r\n \"description\": \"Hello\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/wyunchi-automation/providers/Microsoft.Automation/automationAccounts/test-automation-0/variables/StringValue?api-version=2015-10-31", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOWUyMjNkYmUtMzM5OS00ZTE5LTg4ZWItMDk3NWYwMmFjODdmL3Jlc291cmNlR3JvdXBzL3d5dW5jaGktYXV0b21hdGlvbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dG9tYXRpb24vYXV0b21hdGlvbkFjY291bnRzL3Rlc3QtYXV0b21hdGlvbi0wL3ZhcmlhYmxlcy9TdHJpbmdWYWx1ZT9hcGktdmVyc2lvbj0yMDE1LTEwLTMx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "580e2cfa-82c0-48a6-9a3a-98033b396dd6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Automation.AutomationClient/3.8.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "580e2cfa-82c0-48a6-9a3a-98033b396dd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "a21f6f96-cf3b-4cdb-b648-7c998f3f2b76" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210226T093718Z:a21f6f96-cf3b-4cdb-b648-7c998f3f2b76" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 26 Feb 2021 09:37:18 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f" + } +} \ No newline at end of file diff --git a/src/Automation/Automation/Common/PowershellJsonConverter.cs b/src/Automation/Automation/Common/PowershellJsonConverter.cs index 8150c8e37027..99433418a0b9 100644 --- a/src/Automation/Automation/Common/PowershellJsonConverter.cs +++ b/src/Automation/Automation/Common/PowershellJsonConverter.cs @@ -30,40 +30,41 @@ public static class PowerShellJsonConverter { public static string Serialize(object inputObject) { - if (inputObject == null) - { - return null; - } + return JsonConvert.SerializeObject(ConvertObjectInternal(inputObject)); + } + + private static object ConvertObjectInternal(object inputObject) + { if (inputObject is string @str) { return JsonConvert.SerializeObject(str.Trim()); } else if (inputObject is object[] @objectArray) { - return SerializeArray(objectArray); + return ConvertArray(objectArray); } else if (inputObject is PSObject @psObject) { - return SerializePsObject(psObject); + return ConvertPsObject(psObject); } - return JsonConvert.SerializeObject(inputObject); + return inputObject; } - private static string SerializePsObject(PSObject @psObject) + private static Dictionary ConvertPsObject(PSObject @psObject) { - Dictionary hashTable = new Dictionary(); + Dictionary hashTable = new Dictionary(); foreach (var item in @psObject.Properties) { - hashTable.Add(item.Name, Serialize(item.Value)); + hashTable.Add(item.Name, ConvertObjectInternal(item.Value)); } - return JsonConvert.SerializeObject(hashTable); + return hashTable; } - private static string SerializeArray(object[] objectArray) + private static List ConvertArray(object[] objectArray) { List objectList = objectArray.ToList(); - return string.Format("[{0}]", string.Join(",", objectList.Select(Serialize).ToList())); + return objectList.Select(ConvertObjectInternal).ToList(); } public static PSObject Deserialize(string json)