diff --git a/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.cs b/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.cs new file mode 100644 index 000000000000..9a19f6923825 --- /dev/null +++ b/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Synapse.Test.ScenarioTests +{ + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using ServiceManagement.Common.Models; + using Xunit; + + public class IntegrationRuntimeTests : SynapseTestBase + { + public XunitTracingInterceptor _logger; + + public IntegrationRuntimeTests(Xunit.Abstractions.ITestOutputHelper output) + { + _logger = new XunitTracingInterceptor(output); + XunitTracingInterceptor.AddToContext(_logger); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestSelfHostedIntegrationRuntime() + { + string testResourceGroupName = SynapseTestBase.TestResourceGroupName; + if (string.IsNullOrEmpty(testResourceGroupName)) + { + testResourceGroupName = nameof(TestResourceGroupName); + } + + string testWorkspaceName = SynapseTestBase.TestWorkspaceName; + if (string.IsNullOrEmpty(testWorkspaceName)) + { + testWorkspaceName = nameof(TestWorkspaceName); + } + + SynapseTestBase.NewInstance.RunPsTest( + _logger, + string.Format( + "Test-SelfHosted-IntegrationRuntime -resourceGroupName '{0}' -workspaceName '{1}'", + testResourceGroupName, + testWorkspaceName)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestAzureIntegrationRuntime() + { + string testResourceGroupName = SynapseTestBase.TestResourceGroupName; + if (string.IsNullOrEmpty(testResourceGroupName)) + { + testResourceGroupName = nameof(TestResourceGroupName); + } + + string testWorkspaceName = SynapseTestBase.TestWorkspaceName; + if (string.IsNullOrEmpty(testWorkspaceName)) + { + testWorkspaceName = nameof(TestWorkspaceName); + } + + SynapseTestBase.NewInstance.RunPsTest( + _logger, + string.Format( + "Test-Azure-IntegrationRuntime -resourceGroupName '{0}' -workspaceName '{1}'", + testResourceGroupName, + testWorkspaceName)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestIntegrationRuntimePiping() + { + string testResourceGroupName = SynapseTestBase.TestResourceGroupName; + if (string.IsNullOrEmpty(testResourceGroupName)) + { + testResourceGroupName = nameof(TestResourceGroupName); + } + + string testWorkspaceName = SynapseTestBase.TestWorkspaceName; + if (string.IsNullOrEmpty(testWorkspaceName)) + { + testWorkspaceName = nameof(TestWorkspaceName); + } + + SynapseTestBase.NewInstance.RunPsTest( + _logger, + string.Format( + "Test-IntegrationRuntime-Piping -resourceGroupName '{0}' -workspaceName '{1}'", + testResourceGroupName, + testWorkspaceName)); + } + } +} diff --git a/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.ps1 b/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.ps1 new file mode 100644 index 000000000000..6ed82b4ab737 --- /dev/null +++ b/src/Synapse/Synapse.Test/ScenarioTests/IntegrationRuntimeTests.ps1 @@ -0,0 +1,141 @@ +<# +.SYNOPSIS +Creates a self-hosted integration runtime and then does operations. +Deletes the created integration runtime at the end. +#> +function Test-SelfHosted-IntegrationRuntime +{ + param + ( + $resourceGroupName = (Get-ResourceGroupName), + $workspaceName = (Get-SynapseWorkspaceName), + $irname = "selfhosted-test-integrationruntime" + ) + + try + { + $resourceGroupName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("resourceGroupName", $resourceGroupName) + $workspaceName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("workspaceName", $workspaceName) + + $actual = Set-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname ` + -Type 'SelfHosted' ` + -Force + Assert-AreEqual $actual.Name $irname + + $expected = Get-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname + Assert-AreEqual $actual.Name $expected.Name + + $expected = Get-AzSynapseIntegrationRuntime -ResourceId $actual.Id + Assert-AreEqual $actual.Name $expected.Name + + $status = Get-AzSynapseIntegrationRuntime -ResourceId $actual.Id -Status + Assert-NotNull $status + + $metric = Get-AzSynapseIntegrationRuntimeMetric -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname + Assert-NotNull $metric + + $description = "description" + $result = Set-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname ` + -Description $description ` + -Force + Assert-AreEqual $result.Description $description + + $status = Get-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname ` + -Status + Assert-NotNull $status.LatestVersion + + Remove-AzSynapseIntegrationRuntime -ResourceId $actual.Id -Force + } + finally + { + Invoke-HandledCmdlet -Command {Remove-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $irname} -IgnoreFailures + } +} + +<# +.SYNOPSIS +Creates an azure integration runtime and then does operations. +Deletes the created integration runtime at the end. +#> +function Test-Azure-IntegrationRuntime +{ + param + ( + $resourceGroupName = (Get-ResourceGroupName), + $workspaceName = (Get-SynapseWorkspaceName), + $irname = "test-ManagedElastic-integrationruntime" + ) + + try + { + $resourceGroupName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("resourceGroupName", $resourceGroupName) + $workspaceName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("workspaceName", $workspaceName) + + $description = "ManagedElastic" + + $actual = Set-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname ` + -Type Managed ` + -Description $description ` + -Force + + $expected = Get-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname + Assert-AreEqual $actual.Name $expected.Name + Get-AzSynapseIntegrationRuntime -ResourceId $actual.Id -Status + + Remove-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $irname -Force + } + finally + { + Invoke-HandledCmdlet -Command {Remove-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $irname} -IgnoreFailures + } +} + +<# +.SYNOPSIS +Creates a self-hosted integration runtime and then does piping operations. +#> +function Test-IntegrationRuntime-Piping +{ + param + ( + $resourceGroupName = (Get-ResourceGroupName), + $workspaceName = (Get-SynapseWorkspaceName), + $irname = "test-integrationruntime-for-piping" + ) + + try + { + $resourceGroupName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("resourceGroupName", $resourceGroupName) + $workspaceName = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::GetVariable("workspaceName", $workspaceName) + + $result = Set-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName ` + -WorkspaceName $workspaceName ` + -Name $irname ` + -Type 'SelfHosted' ` + -Force + + $result | Get-AzSynapseIntegrationRuntime + $result | Get-AzSynapseIntegrationRuntimeKey + $result | New-AzSynapseIntegrationRuntimeKey -KeyName AuthKey1 -Force + $result | Get-AzSynapseIntegrationRuntimeMetric + $result | Remove-AzSynapseIntegrationRuntime -Force + } + finally + { + Invoke-HandledCmdlet -Command {Remove-AzSynapseIntegrationRuntime -ResourceGroupName $resourceGroupName -WorkspaceName $workspaceName -Name $irname} -IgnoreFailures + } +} \ No newline at end of file diff --git a/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestAzureIntegrationRuntime.json b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestAzureIntegrationRuntime.json new file mode 100644 index 000000000000..d5210b5de619 --- /dev/null +++ b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestAzureIntegrationRuntime.json @@ -0,0 +1,602 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a8aef471-bf2f-4ecf-833f-00e67f11967b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "4ea681f0-f183-4d80-be20-d821617535e4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "518c8e75-d5db-4141-a3c1-33fe5d5e9128" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024138Z:f2d5d055-676f-4ee5-8fe9-9cdfb5b8dbc9" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:37 GMT" + ], + "Content-Length": [ + "322" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"The document could not be retrieved because it does not exist.\",\r\n \"target\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.DataFactory/factories/roletestspace/integrationruntimes/test-ManagedElastic-integrationruntime\",\r\n \"details\": null,\r\n \"error\": null\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c9caa7df-6b12-4515-9a69-f48c3a62a723" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "a6f24e2e-0a9a-43c4-b0dc-0fe80eff821c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e56611a7-9f45-4612-9b4e-cca5d71b2a85" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024150Z:3173088c-79c1-468f-a840-b5695e432c50" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:49 GMT" + ], + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/test-ManagedElastic-integrationruntime\",\r\n \"name\": \"test-ManagedElastic-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"Managed\",\r\n \"description\": \"ManagedElastic\"\r\n },\r\n \"etag\": \"12005975-0000-0200-0000-5f35f9e70000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "614ff7d9-d4d9-4c11-842b-f5fe6d53063b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "4819122a-1b80-4181-9936-c4c4e5fb04c2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e7f322db-b053-4d9e-a6eb-c8af120e9242" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024151Z:c86e333d-813c-4674-a817-290c3015464e" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:50 GMT" + ], + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/test-ManagedElastic-integrationruntime\",\r\n \"name\": \"test-ManagedElastic-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"Managed\",\r\n \"description\": \"ManagedElastic\"\r\n },\r\n \"etag\": \"12005975-0000-0200-0000-5f35f9e70000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"Managed\",\r\n \"description\": \"ManagedElastic\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f0df8a2-27d2-44ce-aec6-b8c575d77001" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "89" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/71487036-9277-4133-a8ea-bd9795252eac?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location", + "Retry-After" + ], + "Access-Control-Expose-Headers": [ + "Location", + "Retry-After" + ], + "x-ms-request-id": [ + "57f977d7-4318-4377-a788-924e7096dc50" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "dbae655e-5dc0-4b73-94d3-44ed7824e634" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024139Z:dbae655e-5dc0-4b73-94d3-44ed7824e634" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:38 GMT" + ], + "Content-Length": [ + "431" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime\",\r\n \"recordId\": 59767,\r\n \"state\": \"Creating\",\r\n \"created\": \"2020-08-14T02:41:39.19Z\",\r\n \"changed\": \"2020-08-14T02:41:39.19Z\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"test-ManagedElastic-integrationruntime\",\r\n \"operationId\": \"71487036-9277-4133-a8ea-bd9795252eac\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/71487036-9277-4133-a8ea-bd9795252eac?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvNzE0ODcwMzYtOTI3Ny00MTMzLWE4ZWEtYmQ5Nzk1MjUyZWFjP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "99158e3f-48c4-4c72-be85-03a5b377fa61" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "16ca13eb-a96f-427b-9c7a-50bea55e5749" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024150Z:b33ded6a-5212-4300-8b45-40805dc2dd88" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:49 GMT" + ], + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/test-ManagedElastic-integrationruntime\",\r\n \"name\": \"test-ManagedElastic-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"Managed\",\r\n \"description\": \"ManagedElastic\"\r\n },\r\n \"etag\": \"12005975-0000-0200-0000-5f35f9e70000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime/getStatus?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWUvZ2V0U3RhdHVzP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fea0c755-ada1-4bf4-8317-a8bc469a4f52" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "76ea469c-41fe-4628-bd6d-1d7987de9215" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5a82f25b-797b-43e0-90ea-413bfacb2c33" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024151Z:01447b7a-85e5-4419-91d5-9aa3c8b608a4" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:51 GMT" + ], + "Content-Length": [ + "50" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"state\": \"Online\",\r\n \"type\": \"Managed\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1NYW5hZ2VkRWxhc3RpYy1pbnRlZ3JhdGlvbnJ1bnRpbWU/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2350437f-c822-41a7-9dcc-f422be5f180f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/23d90f11-5ad1-45b1-b30e-d1d02730640a?api-version=2019-06-01-preview" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location" + ], + "Access-Control-Expose-Headers": [ + "Location" + ], + "x-ms-request-id": [ + "ddd55daa-7153-4f96-b3ea-af5d7407e67d" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "f035cbea-cd18-4e51-9114-7bab9abe2342" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024153Z:f035cbea-cd18-4e51-9114-7bab9abe2342" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:41:52 GMT" + ], + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-ManagedElastic-integrationruntime\",\r\n \"recordId\": 0,\r\n \"state\": \"Deleting\",\r\n \"created\": \"0001-01-01T00:00:00\",\r\n \"changed\": \"0001-01-01T00:00:00\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"test-ManagedElastic-integrationruntime\",\r\n \"operationId\": \"23d90f11-5ad1-45b1-b30e-d1d02730640a\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/23d90f11-5ad1-45b1-b30e-d1d02730640a?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvMjNkOTBmMTEtNWFkMS00NWIxLWIzMGUtZDFkMDI3MzA2NDBhP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dfdfea24-c654-41be-a92e-3d22394eafcb" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "33285ee9-e7cb-435a-b2d8-4be2aa20f455" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024223Z:33285ee9-e7cb-435a-b2d8-4be2aa20f455" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:23 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/23d90f11-5ad1-45b1-b30e-d1d02730640a?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvMjNkOTBmMTEtNWFkMS00NWIxLWIzMGUtZDFkMDI3MzA2NDBhP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "10e661b8-4c29-4138-b256-9fd2853ce64d" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "bcfd8e4d-cf0e-450a-b957-f02fba0c091c" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024224Z:bcfd8e4d-cf0e-450a-b957-f02fba0c091c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:24 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3", + "resourceGroupName": "ywtest", + "workspaceName": "roletestspace" + } +} \ No newline at end of file diff --git a/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestIntegrationRuntimePiping.json b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestIntegrationRuntimePiping.json new file mode 100644 index 000000000000..7f302788b60d --- /dev/null +++ b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestIntegrationRuntimePiping.json @@ -0,0 +1,675 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZz9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d0eb999e-0a24-41d0-adef-e2d5b59fa1b6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "6ccfae9d-5ef0-4c39-9a15-624f1fe3d259" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "6b99a852-66b4-4c14-875b-82c57ad9ec62" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11985" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024243Z:5f004baf-4ad1-4e43-a74e-6a83dd0a8d62" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:43 GMT" + ], + "Content-Length": [ + "318" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"The document could not be retrieved because it does not exist.\",\r\n \"target\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.DataFactory/factories/roletestspace/integrationruntimes/test-integrationruntime-for-piping\",\r\n \"details\": null,\r\n \"error\": null\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZz9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c8a51e15-0185-462a-b3e8-5274f746640f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "b5b44101-80de-44b5-b7aa-51ba6714ab2e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5e304f99-e498-4a99-bc46-e49727a4f8d1" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11983" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024255Z:adcb058a-a70a-4eea-8a5d-7d064066ad3b" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:55 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/test-integrationruntime-for-piping\",\r\n \"name\": \"test-integrationruntime-for-piping\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"12006d78-0000-0200-0000-5f35fa250000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZz9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fd13e727-9280-46aa-8691-8f180b54fb06" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "54" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/6111c2c4-5772-40e6-a202-f85bb57422cb?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location", + "Retry-After" + ], + "Access-Control-Expose-Headers": [ + "Location", + "Retry-After" + ], + "x-ms-request-id": [ + "610f8925-c1c5-43a1-a7a1-4112097c845a" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "8850a34f-4e9c-4915-b26a-489a2c587deb" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024244Z:8850a34f-4e9c-4915-b26a-489a2c587deb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:44 GMT" + ], + "Content-Length": [ + "423" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping\",\r\n \"recordId\": 59768,\r\n \"state\": \"Creating\",\r\n \"created\": \"2020-08-14T02:42:44.25Z\",\r\n \"changed\": \"2020-08-14T02:42:44.25Z\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"test-integrationruntime-for-piping\",\r\n \"operationId\": \"6111c2c4-5772-40e6-a202-f85bb57422cb\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/6111c2c4-5772-40e6-a202-f85bb57422cb?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvNjExMWMyYzQtNTc3Mi00MGU2LWEyMDItZjg1YmI1NzQyMmNiP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "fd5bf336-f8fe-4bc1-9fdf-7c745ccdda02" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "176f8d17-20dc-4155-8de1-0e5e1afd4e4c" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11984" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024255Z:62ceb27d-355d-4ab6-a640-4774e374b2d7" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:54 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/test-integrationruntime-for-piping\",\r\n \"name\": \"test-integrationruntime-for-piping\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"12006d78-0000-0200-0000-5f35fa250000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping/listAuthKeys?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZy9saXN0QXV0aEtleXM/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6a6e82b7-5281-4ab6-ad74-ebf4ed9fb6fa" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "1c992946-f5c8-417a-aab8-0272bb7422c0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "dd9d7ecd-a67e-4a49-aade-f87705644cf2" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024256Z:95114f0f-51b5-42b7-bcb4-97704d09753f" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:56 GMT" + ], + "Content-Length": [ + "233" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"authKey1\": \"IR@af2d3b80-3bc0-45a9-aed0-b275e6d7d30d@roletestspace@eu2@y2eJxfzCBGzroOCcmsqSVKvsq1LKmN1OZFaSXraaEOY=\",\r\n \"authKey2\": \"IR@af2d3b80-3bc0-45a9-aed0-b275e6d7d30d@roletestspace@eu2@QexH44sB8yCqYNXS5BQnXm4wW6xawfjSyhwwIjukcyg=\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping/regenerateAuthKey?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZy9yZWdlbmVyYXRlQXV0aEtleT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyName\": \"AuthKey1\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "58756ae4-0d9f-4a78-b9c6-e2e4ff7dffb0" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "3483bf54-b60f-45f6-8f67-de7cf7cd47cf" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "aeda6b0b-9f54-488e-8c4e-788ce5a401c9" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024257Z:efd7e67a-ad62-4135-b09e-72559377326c" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:56 GMT" + ], + "Content-Length": [ + "117" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"authKey1\": \"IR@af2d3b80-3bc0-45a9-aed0-b275e6d7d30d@roletestspace@eu2@uERRjtwX5DZ8gjUwOIFiJDcxebDDthpchW8wUUnJpas=\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping/monitoringData?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZy9tb25pdG9yaW5nRGF0YT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "52dcf04d-0afa-4df8-859b-bbad34b3803d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "5cffae97-59c0-4c71-b1f7-2e45f1eb7ad6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2815ddf1-f346-4e97-8757-52bb9cfd9935" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024257Z:0f658ddb-fc41-4074-a264-2f34527fdad2" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:57 GMT" + ], + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"test-integrationruntime-for-piping\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvdGVzdC1pbnRlZ3JhdGlvbnJ1bnRpbWUtZm9yLXBpcGluZz9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1e47727e-42a0-43c0-9216-24fb89a69f1a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/607b57a7-1c6f-40c9-90ea-2147b0475331?api-version=2019-06-01-preview" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location" + ], + "Access-Control-Expose-Headers": [ + "Location" + ], + "x-ms-request-id": [ + "9cac251b-b4b2-44e6-9408-0fed0c19930b" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "43b76b0e-c846-4b0a-94c9-3d4365474a6e" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024258Z:43b76b0e-c846-4b0a-94c9-3d4365474a6e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:42:58 GMT" + ], + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/test-integrationruntime-for-piping\",\r\n \"recordId\": 0,\r\n \"state\": \"Deleting\",\r\n \"created\": \"0001-01-01T00:00:00\",\r\n \"changed\": \"0001-01-01T00:00:00\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"test-integrationruntime-for-piping\",\r\n \"operationId\": \"607b57a7-1c6f-40c9-90ea-2147b0475331\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/607b57a7-1c6f-40c9-90ea-2147b0475331?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvNjA3YjU3YTctMWM2Zi00MGM5LTkwZWEtMjE0N2IwNDc1MzMxP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a3a264d5-44e7-4490-9a4f-f8ad6a442a12" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11982" + ], + "x-ms-correlation-request-id": [ + "640dc409-ffc2-43c8-a627-0ed8c37deb56" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024329Z:640dc409-ffc2-43c8-a627-0ed8c37deb56" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:29 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/607b57a7-1c6f-40c9-90ea-2147b0475331?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvNjA3YjU3YTctMWM2Zi00MGM5LTkwZWEtMjE0N2IwNDc1MzMxP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e0de84ea-835f-4e4f-b149-34c574ff1619" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11981" + ], + "x-ms-correlation-request-id": [ + "75ff2e8b-eba7-41de-99c0-5c868a8dc3f4" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024329Z:75ff2e8b-eba7-41de-99c0-5c868a8dc3f4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:29 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3", + "resourceGroupName": "ywtest", + "workspaceName": "roletestspace" + } +} \ No newline at end of file diff --git a/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestSelfHostedIntegrationRuntime.json b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestSelfHostedIntegrationRuntime.json new file mode 100644 index 000000000000..a88f8f02ae49 --- /dev/null +++ b/src/Synapse/Synapse.Test/SessionRecords/Microsoft.Azure.Commands.Synapse.Test.ScenarioTests.IntegrationRuntimeTests/TestSelfHostedIntegrationRuntime.json @@ -0,0 +1,1081 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b8c274a6-dd26-41df-acec-ede06947015a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "a85cf0f6-de56-4989-a776-d919be6c4311" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "1e7e8c30-d636-4614-9aca-e1ec05566058" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024347Z:b82edaa3-13fb-427b-8635-a7b66f40d9c9" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:47 GMT" + ], + "Content-Length": [ + "318" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"code\": \"NotFound\",\r\n \"message\": \"The document could not be retrieved because it does not exist.\",\r\n \"target\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.DataFactory/factories/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"details\": null,\r\n \"error\": null\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9397cf9b-e453-41f6-8941-243c0d49eb71" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "268cb8d1-7f93-466f-9b8f-35f96c8552e5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5f05bbb0-fdbb-4b77-aad8-2562fe74519b" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024400Z:24e8516a-4d60-4c49-b03f-3a3e16c447b0" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:59 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"1200cc78-0000-0200-0000-5f35fa650000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2669c4c9-bc0f-41c9-abce-2379de0805b7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "a506bf2d-c0fe-49f8-8e12-c9d25f877f66" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "015936b9-6fb3-4638-8c95-9bb0561d182b" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11985" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024401Z:99d0d693-0fc0-45d6-8b71-1030099050d4" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:00 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"1200cc78-0000-0200-0000-5f35fa650000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4869da4b-1d0d-4d3d-8c10-7a1647084a1c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "1ba01dc7-207f-474e-972e-81bc60a2b6a2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f881845f-b48e-4ea3-842f-d24fce693564" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11984" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024401Z:e96ea0e3-4c35-4e4c-9822-8d2c2f73b0df" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:01 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"1200cc78-0000-0200-0000-5f35fa650000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5597563c-0aa3-4249-ac3d-9a85258b2ad9" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "2e191794-7f6f-4fe1-ba44-95761ff0b4d0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "6764750d-058f-47c5-a0b9-73174396bf19" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11980" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024404Z:e2e9e101-a289-4b3f-b356-eab9a3ddd321" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:03 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"1200cc78-0000-0200-0000-5f35fa650000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "da68d482-3f94-4cb4-86c3-a0cb2783e665" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "491795b0-4199-4147-af3f-e0efb1c0b94b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "866057c1-2fc8-4e61-a1d0-3ef21df86fe7" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11983" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024416Z:e8c897b5-9e96-4d10-beb5-b3b5e65932e3" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:15 GMT" + ], + "Content-Length": [ + "401" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\",\r\n \"description\": \"description\"\r\n },\r\n \"etag\": \"1200b379-0000-0200-0000-5f35fa750000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "acb43d1a-b000-490e-89c2-866994edb784" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "54" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/84aabf22-ccdc-4111-a027-38431812bd42?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location", + "Retry-After" + ], + "Access-Control-Expose-Headers": [ + "Location", + "Retry-After" + ], + "x-ms-request-id": [ + "b40a2b13-73c0-4b7e-a468-2063deb8f082" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "5153850f-5842-4dc6-b584-a42eb912598b" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024348Z:5153850f-5842-4dc6-b584-a42eb912598b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:47 GMT" + ], + "Content-Length": [ + "423" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime\",\r\n \"recordId\": 59769,\r\n \"state\": \"Creating\",\r\n \"created\": \"2020-08-14T02:43:48.49Z\",\r\n \"changed\": \"2020-08-14T02:43:48.49Z\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"operationId\": \"84aabf22-ccdc-4111-a027-38431812bd42\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"SelfHosted\",\r\n \"description\": \"description\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dd8cf461-9ae2-4a0a-b2a0-960bfdd0f93e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "89" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/21974c29-5ee2-4e49-b085-ad8c4ecebef0?api-version=2019-06-01-preview" + ], + "Retry-After": [ + "10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location", + "Retry-After" + ], + "Access-Control-Expose-Headers": [ + "Location", + "Retry-After" + ], + "x-ms-request-id": [ + "ca0c4fb3-5c84-4ad7-ace6-4b6663fb2d60" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "565e4f8e-bb39-43fd-993b-6f6c8427d8ab" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024405Z:565e4f8e-bb39-43fd-993b-6f6c8427d8ab" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:04 GMT" + ], + "Content-Length": [ + "422" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime\",\r\n \"recordId\": 59769,\r\n \"state\": \"Updating\",\r\n \"created\": \"2020-08-14T02:43:48.49Z\",\r\n \"changed\": \"2020-08-14T02:43:49.5Z\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"operationId\": \"21974c29-5ee2-4e49-b085-ad8c4ecebef0\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/84aabf22-ccdc-4111-a027-38431812bd42?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvODRhYWJmMjItY2NkYy00MTExLWEwMjctMzg0MzE4MTJiZDQyP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "c8588d04-4aed-453e-9a71-5331c0b68e60" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "abb1d137-b17c-4a94-aab6-ac8f8c212ac0" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024359Z:164e1f2a-5714-4b40-a0b8-0d0595a4e9bc" + ], + "Date": [ + "Fri, 14 Aug 2020 02:43:58 GMT" + ], + "Content-Length": [ + "373" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\"\r\n },\r\n \"etag\": \"1200cc78-0000-0200-0000-5f35fa650000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime/getStatus?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZS9nZXRTdGF0dXM/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9a267dbe-4888-4b6b-9301-949860d9994c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "e39fe250-d909-4d6a-89da-08bf871395cd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5d248240-3e3c-4925-8b36-ddd2c6b4f42b" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024402Z:0482376c-7432-4249-8587-424851b53735" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:02 GMT" + ], + "Content-Length": [ + "504" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"properties\": {\r\n \"dataFactoryName\": \"roletestspace\",\r\n \"state\": \"NeedRegistration\",\r\n \"type\": \"SelfHosted\",\r\n \"typeProperties\": {\r\n \"autoUpdate\": \"On\",\r\n \"taskQueueId\": \"56910224-3189-4736-8e28-3e19adf218ca\",\r\n \"nodes\": [],\r\n \"serviceUrls\": [\r\n \"eu2.frontend.clouddatahub.net\"\r\n ],\r\n \"links\": [],\r\n \"versionStatus\": \"None\",\r\n \"capabilities\": {},\r\n \"latestVersion\": \"4.11.7521.1\",\r\n \"newerVersions\": [\r\n \"4.11.7521.1\",\r\n \"4.11.7515.1\",\r\n \"4.11.7491.1\",\r\n \"4.11.7512.1\",\r\n \"4.10.7465.1\"\r\n ],\r\n \"createTime\": \"2020-08-14T02:43:49.2435491Z\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime/getStatus?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZS9nZXRTdGF0dXM/YXBpLXZlcnNpb249MjAxOS0wNi0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f3b9bd0b-7f27-4b50-962a-2b79779002f9" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "51ca5939-37ad-4c34-8ad0-18196875e210" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "25d48a3c-712e-4f12-b94c-2f91574d2497" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024416Z:fe9d3cd3-f053-474a-bc76-608695229dde" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:16 GMT" + ], + "Content-Length": [ + "504" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"properties\": {\r\n \"dataFactoryName\": \"roletestspace\",\r\n \"state\": \"NeedRegistration\",\r\n \"type\": \"SelfHosted\",\r\n \"typeProperties\": {\r\n \"autoUpdate\": \"On\",\r\n \"taskQueueId\": \"56910224-3189-4736-8e28-3e19adf218ca\",\r\n \"nodes\": [],\r\n \"serviceUrls\": [\r\n \"eu2.frontend.clouddatahub.net\"\r\n ],\r\n \"links\": [],\r\n \"versionStatus\": \"None\",\r\n \"capabilities\": {},\r\n \"latestVersion\": \"4.11.7521.1\",\r\n \"newerVersions\": [\r\n \"4.11.7521.1\",\r\n \"4.11.7515.1\",\r\n \"4.11.7491.1\",\r\n \"4.11.7512.1\",\r\n \"4.10.7465.1\"\r\n ],\r\n \"createTime\": \"2020-08-14T02:43:49.2435491Z\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime/monitoringData?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZS9tb25pdG9yaW5nRGF0YT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fe9e90d-3235-4583-b631-48bb792297ca" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "29454427-436e-40d9-a399-b9b2f5c81e90" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0fd154b0-0f39-49b7-97b3-452ab9cea367" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024403Z:e9cc5522-173b-4e69-bf49-e264bce4630a" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:03 GMT" + ], + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"selfhosted-test-integrationruntime\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/21974c29-5ee2-4e49-b085-ad8c4ecebef0?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvMjE5NzRjMjktNWVlMi00ZTQ5LWIwODUtYWQ4YzRlY2ViZWYwP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-correlation-request-id": [ + "15114893-7b3b-4a86-b035-faad41a9b427" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3e9d8f62-b3b9-48af-a551-3331a2f07c30" + ], + "Server": [ + "Microsoft-IIS/10.0", + "Microsoft-HTTPAPI/2.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11979" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024415Z:f18fa713-2942-4a4a-97dd-c9bf221c53ec" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:15 GMT" + ], + "Content-Length": [ + "401" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationruntimes/selfhosted-test-integrationruntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"type\": \"Microsoft.Synapse/workspaces/integrationruntimes\",\r\n \"properties\": {\r\n \"type\": \"SelfHosted\",\r\n \"description\": \"description\"\r\n },\r\n \"etag\": \"1200b379-0000-0200-0000-5f35fa750000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL2ludGVncmF0aW9uUnVudGltZXMvc2VsZmhvc3RlZC10ZXN0LWludGVncmF0aW9ucnVudGltZT9hcGktdmVyc2lvbj0yMDE5LTA2LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "95590dd4-d8be-4ac0-8a40-690df9cffdec" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/f700aa6b-dc0c-40ac-b162-8ee4a1db9d5e?api-version=2019-06-01-preview" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Access-Control-Allow-Headers": [ + "Location" + ], + "Access-Control-Expose-Headers": [ + "Location" + ], + "x-ms-request-id": [ + "4fbe4504-28eb-4e7a-9792-042a01d52ad6" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "4ebde2e2-1930-4bd1-815a-f16ce516c193" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024417Z:4ebde2e2-1930-4bd1-815a-f16ce516c193" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:17 GMT" + ], + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/integrationRuntimes/selfhosted-test-integrationruntime\",\r\n \"recordId\": 0,\r\n \"state\": \"Deleting\",\r\n \"created\": \"0001-01-01T00:00:00\",\r\n \"changed\": \"0001-01-01T00:00:00\",\r\n \"type\": \"IntegrationRuntime\",\r\n \"name\": \"selfhosted-test-integrationruntime\",\r\n \"operationId\": \"f700aa6b-dc0c-40ac-b162-8ee4a1db9d5e\"\r\n}", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/f700aa6b-dc0c-40ac-b162-8ee4a1db9d5e?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvZjcwMGFhNmItZGMwYy00MGFjLWIxNjItOGVlNGExZGI5ZDVlP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9ff1458e-0db0-45d1-8e65-e59ebf0fc6cb" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11978" + ], + "x-ms-correlation-request-id": [ + "bcd53fb3-dc1f-4e50-8078-e869589c5210" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024448Z:bcd53fb3-dc1f-4e50-8078-e869589c5210" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:47 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3/resourceGroups/ywtest/providers/Microsoft.Synapse/workspaces/roletestspace/operationResults/f700aa6b-dc0c-40ac-b162-8ee4a1db9d5e?api-version=2019-06-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDUxZGRlY2EtMWVkNi00ZDhiLWJhNmYtMWZmNTYxZTVmM2IzL3Jlc291cmNlR3JvdXBzL3l3dGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LlN5bmFwc2Uvd29ya3NwYWNlcy9yb2xldGVzdHNwYWNlL29wZXJhdGlvblJlc3VsdHMvZjcwMGFhNmItZGMwYy00MGFjLWIxNjItOGVlNGExZGI5ZDVlP2FwaS12ZXJzaW9uPTIwMTktMDYtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29017.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19041.", + "Microsoft.Azure.Management.Synapse.SynapseManagementClient/1.0.0.preview.2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "78f85910-6a02-473b-aeac-7efc629fdc7b" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11977" + ], + "x-ms-correlation-request-id": [ + "fd4a3209-b020-44d3-9a6d-d865da0b7d46" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200814T024448Z:fd4a3209-b020-44d3-9a6d-d865da0b7d46" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 14 Aug 2020 02:44:48 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3", + "resourceGroupName": "ywtest", + "workspaceName": "roletestspace" + } +} \ No newline at end of file diff --git a/src/Synapse/Synapse/Az.Synapse.psd1 b/src/Synapse/Synapse/Az.Synapse.psd1 index 931845e7e888..6e05de4c0ee7 100644 --- a/src/Synapse/Synapse/Az.Synapse.psd1 +++ b/src/Synapse/Synapse/Az.Synapse.psd1 @@ -95,7 +95,14 @@ CmdletsToExport = 'Get-AzSynapseSparkJob', 'Stop-AzSynapseSparkJob', 'Remove-AzSynapseRoleAssignment', 'Get-AzSynapseRoleDefinition', 'Get-AzSynapseSqlDatabase', 'New-AzSynapseSqlDatabase', 'Remove-AzSynapseSqlDatabase', 'Update-AzSynapseSqlDatabase', - 'Test-AzSynapseSqlDatabase' + 'Test-AzSynapseSqlDatabase', + 'Get-AzSynapseIntegrationRuntime', 'Get-AzSynapseIntegrationRuntimeKey', + 'Get-AzSynapseIntegrationRuntimeMetric', 'Get-AzSynapseIntegrationRuntimeNode', + 'Invoke-AzSynapseIntegrationRuntimeUpgrade', 'New-AzSynapseIntegrationRuntimeKey', + 'Remove-AzSynapseIntegrationRuntime', 'Remove-AzSynapseIntegrationRuntimeNode', + 'Set-AzSynapseIntegrationRuntime', 'Sync-AzSynapseIntegrationRuntimeCredential', + 'Update-AzSynapseIntegrationRuntime', 'Update-AzSynapseIntegrationRuntimeNode' + # Variables to export from this module # VariablesToExport = @() diff --git a/src/Synapse/Synapse/ChangeLog.md b/src/Synapse/Synapse/ChangeLog.md index 75c08f844397..0f4f6e5033ac 100644 --- a/src/Synapse/Synapse/ChangeLog.md +++ b/src/Synapse/Synapse/ChangeLog.md @@ -29,6 +29,19 @@ - Add `Remove-AzSynapseSqlDatabase` cmdlet - Add `Update-AzSynapseSqlDatabase` cmdlet - Add `Test-AzSynapseSqlDatabase` cmdlet +* Added support for operation of Synapse IntegrationRuntime + - Add `Get-AzSynapseIntegrationRuntime` cmdlet + - Add `Get-AzSynapseIntegrationRuntimeKey` cmdlet + - Add `Get-AzSynapseIntegrationRuntimeMetric` cmdlet + - Add `Get-AzSynapseIntegrationRuntimeNode` cmdlet + - Add `Invoke-AzSynapseIntegrationRuntimeUpgrade` cmdlet + - Add `New-AzSynapseIntegrationRuntimeKey` cmdlet + - Add `Remove-AzSynapseIntegrationRuntime` cmdlet + - Add `Remove-AzSynapseIntegrationRuntimeNode` cmdlet + - Add `Set-AzSynapseIntegrationRuntime` cmdlet + - Add `Sync-AzSynapseIntegrationRuntimeCredential` cmdlet + - Add `Update-AzSynapseIntegrationRuntime` cmdlet + - Add `Update-AzSynapseIntegrationRuntimeNode` cmdlet ## Version 0.1.2 diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntime.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntime.cs new file mode 100644 index 000000000000..0dfb4082f67a --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntime.cs @@ -0,0 +1,124 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.Azure.Management.Synapse.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime, + DefaultParameterSetName = GetByNameParameterSet)] + [OutputType(typeof(PSIntegrationRuntime))] + public class GetAzureSynapseIntegrationRuntime : SynapseManagementCmdletBase + { + private const string GetByNameParameterSet = "GetByNameParameterSet"; + private const string GetByParentObjectParameterSet = "GetByParentObjectParameterSet"; + private const string GetByResourceIdParameterSet = "GetByResourceIdParameterSet"; + private const string GetByInputObjectParameterSet = "GetByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeStatus)] + public SwitchParameter Status { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + if (Name == null) + { + var integrationRuntimes = SynapseAnalyticsClient.ListIntegrationRuntimesAsync( + new SynapseEntityFilterOptions + { + ResourceGroupName = ResourceGroupName, + WorkspaceName = WorkspaceName + }).ConfigureAwait(true).GetAwaiter().GetResult(); + + WriteObject(integrationRuntimes, true); + } + else + { + if (Status.IsPresent) + { + var integrationRuntime = SynapseAnalyticsClient.GetIntegrationRuntimeStatusAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + + WriteObject(integrationRuntime); + } + else + { + var integrationRuntime = SynapseAnalyticsClient.GetIntegrationRuntimeAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + + WriteObject(integrationRuntime); + } + } + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeKey.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeKey.cs new file mode 100644 index 000000000000..7f73cb2b8d41 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeKey.cs @@ -0,0 +1,94 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Key, + DefaultParameterSetName = GetByNameParameterSet)] + [OutputType(typeof(PSIntegrationRuntimeKeys))] + public class GetAzureSynapseIntegrationRuntimeKey : SynapseManagementCmdletBase + { + private const string GetByNameParameterSet = "GetByNameParameterSet"; + private const string GetByParentObjectParameterSet = "GetByParentObjectParameterSet"; + private const string GetByResourceIdParameterSet = "GetByResourceIdParameterSet"; + private const string GetByInputObjectParameterSet = "GetByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + var keys = SynapseAnalyticsClient.GetIntegrationRuntimeKeyAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + + WriteObject(keys); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeMetric.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeMetric.cs new file mode 100644 index 000000000000..37bfb630c35b --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeMetric.cs @@ -0,0 +1,94 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Metric, + DefaultParameterSetName = GetByNameParameterSet)] + [OutputType(typeof(PSIntegrationRuntimeMetrics))] + public class GetAzureSynapseIntegrationRuntimeMetric : SynapseManagementCmdletBase + { + private const string GetByNameParameterSet = "GetByNameParameterSet"; + private const string GetByParentObjectParameterSet = "GetByParentObjectParameterSet"; + private const string GetByResourceIdParameterSet = "GetByResourceIdParameterSet"; + private const string GetByInputObjectParameterSet = "GetByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + var metric = SynapseAnalyticsClient.GetIntegrationRuntimeMetricAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + + WriteObject(metric); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeNode.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..af0cbe5a6ade --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/GetAzureSynapseIntegrationRuntimeNode.cs @@ -0,0 +1,156 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Node, + DefaultParameterSetName = GetByNameParameterSet)] + [OutputType(typeof(PSManagedIntegrationRuntimeNode), typeof(PSSelfHostedIntegrationRuntimeNode))] + public class GetAzureSynapseIntegrationRuntimeNode : SynapseManagementCmdletBase + { + private const string GetByNameParameterSet = "GetByNameParameterSet"; + private const string GetByParentObjectParameterSet = "GetByParentObjectParameterSet"; + private const string GetByResourceIdParameterSet = "GetByResourceIdParameterSet"; + private const string GetByInputObjectParameterSet = "GetByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [ValidateNotNullOrEmpty] + public string IntegrationRuntimeName { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = GetByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = GetByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeNodeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeIpAddress)] + public SwitchParameter IpAddress { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + var status = SynapseAnalyticsClient.GetIntegrationRuntimeStatusAsync(ResourceGroupName, WorkspaceName, + IntegrationRuntimeName).ConfigureAwait(false).GetAwaiter().GetResult(); + + var managedStatus = status as PSManagedIntegrationRuntimeStatus; + if (managedStatus != null) + { + if (IpAddress.IsPresent) + { + ThrowTerminatingError + (new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, + "The SSIS-Azure integration runtime does not support getting IP address of node.")), + string.Empty, + ErrorCategory.ObjectNotFound, + null)); + } + + var node = managedStatus.Nodes.FirstOrDefault(n => n.NodeId == Name); + if (node == null) + { + ThrowTerminatingError + (new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, + "The node with node ID {0} in integration runtime {1} was not found.", Name, IntegrationRuntimeName)), + string.Empty, + ErrorCategory.ObjectNotFound, + null)); + } + + WriteObject(new PSManagedIntegrationRuntimeNode(ResourceGroupName, WorkspaceName, IntegrationRuntimeName, Name, node)); + } + + var selfHostedStatus = status as PSSelfHostedIntegrationRuntimeStatus; + if (selfHostedStatus != null) + { + var node = selfHostedStatus.Nodes.FirstOrDefault(n => n.NodeName == Name); + if (node == null) + { + ThrowTerminatingError + (new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, + "The node with node name {0} in integration runtime {1} was not found.", Name, IntegrationRuntimeName)), + string.Empty, + ErrorCategory.ObjectNotFound, + null)); + } + + string ipAddress = null; + if (IpAddress.IsPresent) + { + var ip = SynapseAnalyticsClient.GetIntegrationRuntimeNodeIpAsync( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName, + Name).ConfigureAwait(false).GetAwaiter().GetResult(); + ipAddress = ip.Body.IpAddress; + } + + WriteObject(new PSSelfHostedIntegrationRuntimeNode(ResourceGroupName, WorkspaceName, IntegrationRuntimeName, Name, node, ipAddress)); + } + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/InvokeAzureSynapseIntegrationRuntimeUpgrade.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/InvokeAzureSynapseIntegrationRuntimeUpgrade.cs new file mode 100644 index 000000000000..bb30de30070b --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/InvokeAzureSynapseIntegrationRuntimeUpgrade.cs @@ -0,0 +1,105 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsLifecycle.Invoke, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Upgrade, + DefaultParameterSetName = InvokeByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(void))] + public class InvokeAzureSynapseIntegrationRuntimeUpgrade : SynapseManagementCmdletBase + { + private const string InvokeByNameParameterSet = "InvokeByNameParameterSet"; + private const string InvokeByParentObjectParameterSet = "InvokeByParentObjectParameterSet"; + private const string InvokeByResourceIdParameterSet = "InvokeByResourceIdParameterSet"; + private const string InvokeByInputObjectParameterSet = "InvokeByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = InvokeByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = InvokeByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = InvokeByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = InvokeByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = InvokeByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = InvokeByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = InvokeByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + Action upgradeIntegrationRuntime = () => + { + this.SynapseAnalyticsClient.UpgradeIntegrationRuntimeAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + }; + + ConfirmAction( + string.Format( + CultureInfo.InvariantCulture, + Resources.UpgradingIntegrationRuntime, + Name), + Name, + upgradeIntegrationRuntime); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/NewAzureSynapseIntegrationRuntimeKey.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/NewAzureSynapseIntegrationRuntimeKey.cs new file mode 100644 index 000000000000..cb43cf9a8d8f --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/NewAzureSynapseIntegrationRuntimeKey.cs @@ -0,0 +1,136 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Key, + DefaultParameterSetName = NewByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(PSIntegrationRuntimeKeys))] + public class NewAzureSynapseIntegrationRuntimeKey : SynapseManagementCmdletBase + { + private const string NewByNameParameterSet = "NewByNameParameterSet"; + private const string NewByParentObjectParameterSet = "NewByParentObjectParameterSet"; + private const string NewByResourceIdParameterSet = "NewByResourceIdParameterSet"; + private const string NewByInputObjectParameterSet = "NewByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = NewByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = NewByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = NewByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = NewByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = NewByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = NewByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = NewByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeKeyName)] + [ValidateNotNullOrEmpty] + [ValidateSet("AuthKey1", "AuthKey2", IgnoreCase = true)] + public string KeyName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.DontAskConfirmation)] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + if (string.IsNullOrWhiteSpace(KeyName)) + { + throw new PSArgumentNullException("KeyName"); + } + + PSIntegrationRuntimeKeys authKey = null; + Action regenerateIntegrationRuntimeAuthKey = () => + { + authKey = SynapseAnalyticsClient.RegenerateIntegrationRuntimeAuthKeyAsync( + ResourceGroupName, + WorkspaceName, + Name, + KeyName).ConfigureAwait(true).GetAwaiter().GetResult(); + }; + + ConfirmAction( + Force.IsPresent, + // prompt only if the integration runtime exists + string.Format( + CultureInfo.InvariantCulture, + Resources.ContinueRegenerateAuthKey, + KeyName, + Name), + // Process message, + string.Format( + CultureInfo.InvariantCulture, + Resources.RegenerateAuthKey, + KeyName, + Name), + // Target + Name, + regenerateIntegrationRuntimeAuthKey, + () => SynapseAnalyticsClient.CheckIntegrationRuntimeExistsAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult()); + + WriteObject(authKey); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntime.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntime.cs new file mode 100644 index 000000000000..4e6ff02e71f0 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntime.cs @@ -0,0 +1,122 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime, + DefaultParameterSetName = RemoveByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(void))] + public class RemoveAzureSynapseIntegrationRuntime : SynapseManagementCmdletBase + { + private const string RemoveByNameParameterSet = "RemoveByNameParameterSet"; + private const string RemoveByParentObjectParameterSet = "RemoveByParentObjectParameterSet"; + private const string RemoveByResourceIdParameterSet = "RemoveByResourceIdParameterSet"; + private const string RemoveByInputObjectParameterSet = "RemoveByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.DontAskConfirmation)] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeConfirmationMessage, + Name, + WorkspaceName), + string.Format( + CultureInfo.InvariantCulture, + Resources.RemovingIntegrationRuntime, + Name, + WorkspaceName), + Name, + ExecuteDelete); + } + + private void ExecuteDelete() + { + var response = SynapseAnalyticsClient.DeleteIntegrationRuntimeAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult(); + + if (response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format( + CultureInfo.InvariantCulture, Resources.IntegrationRuntimeNotFound, Name, WorkspaceName)); + } + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntimeNode.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..a394c1ac21a2 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/RemoveAzureSynapseIntegrationRuntimeNode.cs @@ -0,0 +1,134 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Node, + DefaultParameterSetName = RemoveByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(void))] + public class RemoveAzureSynapseIntegrationRuntimeNode : SynapseManagementCmdletBase + { + private const string RemoveByNameParameterSet = "RemoveByNameParameterSet"; + private const string RemoveByParentObjectParameterSet = "RemoveByParentObjectParameterSet"; + private const string RemoveByResourceIdParameterSet = "RemoveByResourceIdParameterSet"; + private const string RemoveByInputObjectParameterSet = "RemoveByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [ValidateNotNullOrEmpty] + public string IntegrationRuntimeName { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = RemoveByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = RemoveByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(ValueFromPipeline = true, Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeNodeName)] + [ValidateNotNullOrEmpty] + public string NodeName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.DontAskConfirmation)] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.IntegrationRuntimeName = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.IntegrationRuntimeName = InputObject.Name; + } + + if (string.IsNullOrWhiteSpace(NodeName)) + { + throw new PSArgumentNullException("NodeName"); + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeNodeConfirmationMessage, + NodeName, + IntegrationRuntimeName), + string.Format( + CultureInfo.InvariantCulture, + Resources.RemovingIntegrationRuntimeNode, + NodeName, + IntegrationRuntimeName), + IntegrationRuntimeName, + ExecuteRemoveNode); + } + + private void ExecuteRemoveNode() + { + var response = SynapseAnalyticsClient.RemoveIntegrationRuntimeNodeAsync( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName, + NodeName).ConfigureAwait(true).GetAwaiter().GetResult(); + + if (response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeNodeNotFound, + NodeName, + IntegrationRuntimeName)); + } + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SetAzureSynapseIntegrationRuntime.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SetAzureSynapseIntegrationRuntime.cs new file mode 100644 index 000000000000..64d8832c93d2 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SetAzureSynapseIntegrationRuntime.cs @@ -0,0 +1,777 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.Azure.Management.Synapse.Models; +using Microsoft.Rest.Azure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsCommon.Set, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime, + DefaultParameterSetName = SetByIntegrationRuntimeName, SupportsShouldProcess = true)] + [OutputType(typeof(PSIntegrationRuntime))] + public class SetAzureSynapseIntegrationRuntime : SynapseManagementCmdletBase + { + private const string SetByResourceId = "SetByResourceId"; + private const string SetByLinkedIntegrationRuntimeResourceId = "SetByLinkedIntegrationRuntimeResourceId"; + private const string SetByIntegrationRuntimeName = "SetByIntegrationRuntimeName"; + private const string SetByLinkedIntegrationRuntimeName = "SetByLinkedIntegrationRuntimeName"; + private const string SetByIntegrationRuntimeObject = "SetByIntegrationRuntimeObject"; + private const string SetByLinkedIntegrationRuntimeObject = "SetByLinkedIntegrationRuntimeObject"; + private const string SetByParentObject = "SetByParentObject"; + private const string SetByLinkedIntegrationRuntimeParentObject = "SetByLinkedIntegrationRuntimeParentObject"; + + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByLinkedIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByLinkedIntegrationRuntimeName, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByLinkedIntegrationRuntimeName, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByParentObject, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByLinkedIntegrationRuntimeParentObject, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [Alias(SynapseConstants.IntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = SetByParentObject, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [Parameter(ValueFromPipeline = true, ParameterSetName = SetByLinkedIntegrationRuntimeParentObject, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByResourceId, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = SetByLinkedIntegrationRuntimeResourceId, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [Parameter(ValueFromPipeline = true, ParameterSetName = SetByLinkedIntegrationRuntimeObject, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimetype)] + [ValidateNotNullOrEmpty] + [ValidateSet(SynapseConstants.IntegrationRuntimeTypeManaged, SynapseConstants.IntegrationRuntimeSelfhosted, IgnoreCase = true)] + public string Type { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDescription)] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLocation)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLocation)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLocation)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLocation)] + [LocationCompleter("Microsoft.DataFactory/factories")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeSize)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeSize)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeSize)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeSize)] + [ValidateNotNullOrEmpty] + public string NodeSize { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeCount)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeCount)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeCount)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeNodeCount)] + public int? NodeCount { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogServerEndpoint)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogServerEndpoint)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogServerEndpoint)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogServerEndpoint)] + [ValidateNotNullOrEmpty] + public string CatalogServerEndpoint { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogAdminCredential)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogAdminCredential)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogAdminCredential)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogAdminCredential)] + [ValidateNotNull] + public PSCredential CatalogAdminCredential { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogPricingTier)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogPricingTier)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogPricingTier)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeCatalogPricingTier)] + [ValidateNotNullOrEmpty] + public string CatalogPricingTier { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeVNetId)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeVNetId)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeVNetId)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeVNetId)] + [ValidateNotNull] + public string VNetId { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSubnet)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSubnet)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSubnet)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSubnet)] + [Alias(SynapseConstants.SubnetName)] + [ValidateNotNull] + public string Subnet { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimePublicIP)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimePublicIP)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false,HelpMessage = HelpMessages.IntegrationRuntimePublicIP)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimePublicIP)] + [ValidateNotNull] + [Alias("PublicIPs")] + public string[] PublicIP { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowComputeType)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowComputeType)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowComputeType)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowComputeType)] + [PSArgumentCompleter(Management.Synapse.Models.DataFlowComputeType.General, + Management.Synapse.Models.DataFlowComputeType.MemoryOptimized, + Management.Synapse.Models.DataFlowComputeType.ComputeOptimized)] + [ValidateNotNullOrEmpty] + public string DataFlowComputeType { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowCoreCount)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowCoreCount)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowCoreCount)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowCoreCount)] + public int? DataFlowCoreCount { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowTimeToLive)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowTimeToLive)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowTimeToLive)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataFlowTimeToLive)] + public int? DataFlowTimeToLive { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSetupScriptContainerSasUri)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false,HelpMessage = HelpMessages.IntegrationRuntimeSetupScriptContainerSasUri)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSetupScriptContainerSasUri)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeSetupScriptContainerSasUri)] + [ValidateNotNullOrEmpty] + public string SetupScriptContainerSasUri { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeEdition)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeEdition)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeEdition)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeEdition)] + [ValidateNotNullOrEmpty] + [ValidateSet(IntegrationRuntimeEdition.Standard, IntegrationRuntimeEdition.Enterprise, IgnoreCase = true)] + public string Edition { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeExpressCustomSetup)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false,HelpMessage = HelpMessages.IntegrationRuntimeExpressCustomSetup)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeExpressCustomSetup)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeExpressCustomSetup)] + [ValidateNotNullOrEmpty] + public System.Collections.ArrayList ExpressCustomSetup { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyIntegrationRuntimeName)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyIntegrationRuntimeName)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyIntegrationRuntimeName)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyIntegrationRuntimeName)] + [ValidateNotNullOrEmpty] + public string DataProxyIntegrationRuntimeName { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingLinkedServiceName)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingLinkedServiceName)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingLinkedServiceName)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingLinkedServiceName)] + [ValidateNotNullOrEmpty] + public string DataProxyStagingLinkedServiceName { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingPath)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingPath)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingPath)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeDataProxyStagingPath)] + [ValidateNotNullOrEmpty] + public string DataProxyStagingPath { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeMaxParallelExecutionsPerNode)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeMaxParallelExecutionsPerNode)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeMaxParallelExecutionsPerNode)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeMaxParallelExecutionsPerNode)] + public int? MaxParallelExecutionsPerNode { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLicenseType)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLicenseType)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLicenseType)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeLicenseType)] + [ValidateNotNullOrEmpty] + [ValidateSet( + SynapseConstants.IntegrationRuntimeLicenseIncluded, + SynapseConstants.IntegrationRuntimeBasePrice, + IgnoreCase = true)] + public string LicenseType { get; set; } + + [Parameter(ParameterSetName = SetByIntegrationRuntimeName, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAuthKey)] + [Parameter(ParameterSetName = SetByResourceId, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAuthKey)] + [Parameter(ParameterSetName = SetByIntegrationRuntimeObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAuthKey)] + [Parameter(ParameterSetName = SetByParentObject, + Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAuthKey)] + [ValidateNotNull] + public System.Security.SecureString AuthKey { get; set; } + + [Parameter(ParameterSetName = SetByLinkedIntegrationRuntimeName, + Mandatory = true, HelpMessage = HelpMessages.SharedIntegrationRuntimeResourceId)] + [Parameter(ParameterSetName = SetByLinkedIntegrationRuntimeResourceId, + Mandatory = true, HelpMessage = HelpMessages.SharedIntegrationRuntimeResourceId)] + [Parameter(ParameterSetName = SetByLinkedIntegrationRuntimeObject, + Mandatory = true, HelpMessage = HelpMessages.SharedIntegrationRuntimeResourceId)] + [Parameter(ParameterSetName = SetByLinkedIntegrationRuntimeParentObject, + Mandatory = true, HelpMessage = HelpMessages.SharedIntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string SharedIntegrationRuntimeResourceId { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.DontAskConfirmation)] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.Name = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.Name = InputObject.Name; + } + + if (string.Equals(Type, SynapseConstants.IntegrationRuntimeTypeManaged, StringComparison.OrdinalIgnoreCase)) + { + if (AuthKey != null || !string.IsNullOrWhiteSpace(SharedIntegrationRuntimeResourceId)) + { + throw new PSArgumentException( + string.Format( + CultureInfo.InvariantCulture, + Resources.InvalidIntegrationRuntimeSharing), + "AuthKey"); + } + } + + IntegrationRuntimeResource resource = null; + var isUpdate = false; + try + { + resource = SynapseAnalyticsClient.GetIntegrationRuntimeAsync( + ResourceGroupName, + WorkspaceName, + Name).ConfigureAwait(true).GetAwaiter().GetResult().IntegrationRuntime; + + isUpdate = true; + if (Type != null && (resource.Properties is ManagedIntegrationRuntime ^ + Type.Equals(SynapseConstants.IntegrationRuntimeTypeManaged, StringComparison.OrdinalIgnoreCase))) + { + throw new PSArgumentException( + string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeWrongType, + Name), + "Type"); + } + + if (AuthKey != null) + { + throw new PSArgumentException( + string.Format( + CultureInfo.InvariantCulture, + Resources.UpdateAuthKeyNotAllowed, + Name), + "AuthKey"); + } + } + catch (CloudException e) + { + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + if (Type == null) + { + throw new PSArgumentException( + string.Format( + CultureInfo.InvariantCulture, + Resources.NeedIntegrationRuntimeType), + "Type"); + } + + resource = new IntegrationRuntimeResource(); + if (Type.Equals(SynapseConstants.IntegrationRuntimeTypeManaged, StringComparison.OrdinalIgnoreCase)) + { + resource.Properties = new ManagedIntegrationRuntime(); + } + else + { + var selfHosted = new SelfHostedIntegrationRuntime(); + if (AuthKey != null) + { + var authKey = ConvertToUnsecureString(AuthKey); + selfHosted.LinkedInfo = new LinkedIntegrationRuntimeKeyAuthorization(new SecureString(authKey)); + } + + resource.Properties = selfHosted; + } + } + else + { + throw; + } + } + + if (!string.IsNullOrWhiteSpace(SharedIntegrationRuntimeResourceId)) + { + var selfHostedIr = resource.Properties as SelfHostedIntegrationRuntime; + if (selfHostedIr != null) + { + selfHostedIr.LinkedInfo = new LinkedIntegrationRuntimeRbacAuthorization(SharedIntegrationRuntimeResourceId); + } + else + { + throw new PSArgumentException( + string.Format( + CultureInfo.InvariantCulture, + Resources.InvalidIntegrationRuntimeSharing), + "SharedIntegrationRuntimeResourceId"); + } + } + + if (!string.IsNullOrWhiteSpace(Description)) + { + resource.Properties.Description = Description; + } + + var managedIr = resource.Properties as ManagedIntegrationRuntime; + if (managedIr != null) + { + HandleManagedIntegrationRuntime(managedIr); + } + + var parameters = new CreatePSIntegrationRuntimeParameters() + { + ResourceGroupName = ResourceGroupName, + WorkspaceName = WorkspaceName, + Name = Name, + IsUpdate = isUpdate, + IntegrationRuntimeResource = resource, + Force = Force.IsPresent, + ConfirmAction = base.ConfirmAction + }; + + WriteObject(SynapseAnalyticsClient.CreateOrUpdateIntegrationRuntime(parameters)); + } + + private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrationRuntime) + { + if (!string.IsNullOrWhiteSpace(Location)) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + + integrationRuntime.ComputeProperties.Location = Location; + } + + if (!string.IsNullOrWhiteSpace(NodeSize)) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + + integrationRuntime.ComputeProperties.NodeSize = NodeSize; + } + + if (NodeCount.HasValue) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + + integrationRuntime.ComputeProperties.NumberOfNodes = NodeCount; + + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + } + + if (MaxParallelExecutionsPerNode.HasValue) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + + integrationRuntime.ComputeProperties.MaxParallelExecutionsPerNode = MaxParallelExecutionsPerNode; + } + + if (!string.IsNullOrWhiteSpace(CatalogServerEndpoint)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties() + { + CatalogInfo = new IntegrationRuntimeSsisCatalogInfo() + }; + } + else if (integrationRuntime.SsisProperties.CatalogInfo == null) + { + integrationRuntime.SsisProperties.CatalogInfo = new IntegrationRuntimeSsisCatalogInfo(); + } + + integrationRuntime.SsisProperties.CatalogInfo.CatalogServerEndpoint = CatalogServerEndpoint; + } + + if (CatalogAdminCredential != null) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties() + { + CatalogInfo = new IntegrationRuntimeSsisCatalogInfo() + }; + } + else if (integrationRuntime.SsisProperties.CatalogInfo == null) + { + integrationRuntime.SsisProperties.CatalogInfo = new IntegrationRuntimeSsisCatalogInfo(); + } + + integrationRuntime.SsisProperties.CatalogInfo.CatalogAdminUserName = CatalogAdminCredential.UserName; + var passWord = ConvertToUnsecureString(CatalogAdminCredential.Password); + if (passWord != null && passWord.Length > 128) + { + throw new PSArgumentException("The password exceeds maximum length of '128'", "CatalogAdminCredential"); + } + integrationRuntime.SsisProperties.CatalogInfo.CatalogAdminPassword = new SecureString(passWord); + } + + if (!string.IsNullOrWhiteSpace(CatalogPricingTier)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties() + { + CatalogInfo = new IntegrationRuntimeSsisCatalogInfo() + }; + } + else if (integrationRuntime.SsisProperties.CatalogInfo == null) + { + integrationRuntime.SsisProperties.CatalogInfo = new IntegrationRuntimeSsisCatalogInfo(); + } + + integrationRuntime.SsisProperties.CatalogInfo.CatalogPricingTier = CatalogPricingTier; + } + + if (integrationRuntime.ComputeProperties?.VNetProperties == null + || (string.IsNullOrWhiteSpace(integrationRuntime.ComputeProperties.VNetProperties.VNetId) + && string.IsNullOrWhiteSpace(integrationRuntime.ComputeProperties.VNetProperties.Subnet))) + { + // When no previous VNet set, both VNetId and Subnet must be present + if (!string.IsNullOrWhiteSpace(VNetId) && !string.IsNullOrWhiteSpace(Subnet)) + { + // Both VNetId and Subnet are set + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + + integrationRuntime.ComputeProperties.VNetProperties = new IntegrationRuntimeVNetProperties() + { + VNetId = VNetId, + Subnet = Subnet + }; + } + else if (string.IsNullOrWhiteSpace(VNetId) ^ string.IsNullOrWhiteSpace(Subnet)) + { + // Only one of the two pramaters is set + throw new PSArgumentException(string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeInvalidVnet), + "Type"); + } + } + else + { + // We have VNet properties set, then we are able to change VNetId or Subnet individually now. + // Could be empty. If user input empty, then convert it to null. If user want to remove VNet settings, input both with empty string. + if (VNetId != null) + { + integrationRuntime.ComputeProperties.VNetProperties.VNetId = VNetId.IsEmptyOrWhiteSpace() ? null : VNetId; + } + if (Subnet != null) + { + integrationRuntime.ComputeProperties.VNetProperties.Subnet = Subnet.IsEmptyOrWhiteSpace() ? null : Subnet; + } + + // Make sure both VNetId and Subnet are present, or both null + if (string.IsNullOrWhiteSpace(integrationRuntime.ComputeProperties.VNetProperties.VNetId) + ^ string.IsNullOrWhiteSpace(integrationRuntime.ComputeProperties.VNetProperties.Subnet)) + { + throw new PSArgumentException(string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeInvalidVnet), + "Type"); + } + } + + if (!string.IsNullOrWhiteSpace(DataFlowComputeType) || DataFlowCoreCount != null || DataFlowTimeToLive != null) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + if (integrationRuntime.ComputeProperties.DataFlowProperties == null) + { + integrationRuntime.ComputeProperties.DataFlowProperties = new IntegrationRuntimeDataFlowProperties(); + } + + integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType = DataFlowComputeType ?? integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType; + integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount = DataFlowCoreCount ?? integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount; + integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive = DataFlowTimeToLive ?? integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive; + } + + if (PublicIP != null) + { + if (string.IsNullOrWhiteSpace(VNetId)) + { + throw new PSArgumentException(string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeVNetNotProvided), + "VNetId"); + } + + if (PublicIP.Length != 2) + { + throw new PSArgumentException(string.Format( + CultureInfo.InvariantCulture, + Resources.InvalidPublicIPCount), + "PublicIPs"); + } + + integrationRuntime.ComputeProperties.VNetProperties.PublicIPs = PublicIP; + } + + if (!string.IsNullOrWhiteSpace(LicenseType)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + + integrationRuntime.SsisProperties.LicenseType = LicenseType; + } + + if (!string.IsNullOrEmpty(SetupScriptContainerSasUri)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + + int index = SetupScriptContainerSasUri.IndexOf('?'); + + integrationRuntime.SsisProperties.CustomSetupScriptProperties = new IntegrationRuntimeCustomSetupScriptProperties() + { + BlobContainerUri = index >= 0 ? SetupScriptContainerSasUri.Substring(0, index) : SetupScriptContainerSasUri, + SasToken = index >= 0 ? new SecureString(SetupScriptContainerSasUri.Substring(index)) : null + }; + } + + if (ExpressCustomSetup != null && ExpressCustomSetup.ToArray().Length > 0) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + System.Collections.Generic.IList setups = new System.Collections.Generic.List(); + foreach (CustomSetupBase setup in ExpressCustomSetup) + { + setups.Add(setup); + } + integrationRuntime.SsisProperties.ExpressCustomSetupProperties = setups; + } + + if (!string.IsNullOrEmpty(DataProxyIntegrationRuntimeName)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + if (integrationRuntime.SsisProperties.DataProxyProperties == null) + { + integrationRuntime.SsisProperties.DataProxyProperties = new IntegrationRuntimeDataProxyProperties(); + } + integrationRuntime.SsisProperties.DataProxyProperties.ConnectVia = new EntityReference("IntegrationRuntimeReference", DataProxyIntegrationRuntimeName); + } + + if (!string.IsNullOrEmpty(DataProxyStagingLinkedServiceName)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + if (integrationRuntime.SsisProperties.DataProxyProperties == null) + { + integrationRuntime.SsisProperties.DataProxyProperties = new IntegrationRuntimeDataProxyProperties(); + } + integrationRuntime.SsisProperties.DataProxyProperties.StagingLinkedService = new EntityReference("LinkedServiceReference", DataProxyStagingLinkedServiceName); + } + + if (!string.IsNullOrEmpty(DataProxyStagingPath)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + if (integrationRuntime.SsisProperties.DataProxyProperties == null) + { + integrationRuntime.SsisProperties.DataProxyProperties = new IntegrationRuntimeDataProxyProperties(); + } + integrationRuntime.SsisProperties.DataProxyProperties.Path = DataProxyStagingPath; + } + + if (!string.IsNullOrEmpty(Edition)) + { + if (integrationRuntime.SsisProperties == null) + { + integrationRuntime.SsisProperties = new IntegrationRuntimeSsisProperties(); + } + + integrationRuntime.SsisProperties.Edition = Edition; + } + + integrationRuntime.Validate(); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SyncAzureSynapseIntegrationRuntimeCredential.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SyncAzureSynapseIntegrationRuntimeCredential.cs new file mode 100644 index 000000000000..795c618db0cb --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/SyncAzureSynapseIntegrationRuntimeCredential.cs @@ -0,0 +1,107 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsData.Sync, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Credential, + DefaultParameterSetName = StopByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(void))] + public class SyncAzureSynapseIntegrationRuntimeCredential : SynapseManagementCmdletBase + { + private const string StopByNameParameterSet = "StopByNameParameterSet"; + private const string StopByParentObjectParameterSet = "StopByParentObjectParameterSet"; + private const string StopByResourceIdParameterSet = "StopByResourceIdParameterSet"; + private const string StopByInputObjectParameterSet = "StopByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = StopByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = StopByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = StopByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = StopByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [ValidateNotNullOrEmpty] + public string IntegrationRuntimeName { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = StopByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = StopByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = StopByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.DontAskConfirmation)] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.IntegrationRuntimeName = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.IntegrationRuntimeName = InputObject.Name; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeSyncNodeCredential, + IntegrationRuntimeName), + string.Format( + CultureInfo.InvariantCulture, + Resources.SyncingIntegrationRuntimeNodeCredential, + IntegrationRuntimeName), + IntegrationRuntimeName, + () => SynapseAnalyticsClient.SyncIntegrationRuntimeCredentialInNodesAsync( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName).ConfigureAwait(true).GetAwaiter().GetResult()); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntime.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntime.cs new file mode 100644 index 000000000000..8b9a4b6f0fe8 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntime.cs @@ -0,0 +1,147 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.Azure.Management.Synapse.Models; +using Microsoft.Rest.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsData.Update, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime, + DefaultParameterSetName = UpdateByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(PSSelfHostedIntegrationRuntimeStatus))] + public class UpdateAzureSynapseIntegrationRuntime : SynapseManagementCmdletBase + { + private const string UpdateByNameParameterSet = "UpdateByNameParameterSet"; + private const string UpdateByParentObjectParameterSet = "UpdateByParentObjectParameterSet"; + private const string UpdateByResourceIdParameterSet = "UpdateByResourceIdParameterSet"; + private const string UpdateByInputObjectParameterSet = "UpdateByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [ValidateNotNullOrEmpty] + public string IntegrationRuntimeName { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = UpdateByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = UpdateByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAutoUpdate)] + [ValidateNotNullOrEmpty] + [ValidateSet(SynapseConstants.IntegrationRuntimeAutoUpdateEnabled, + SynapseConstants.IntegrationRuntimeAutoUpdateDisabled, + IgnoreCase = true)] + public string AutoUpdate { get; set; } + + [Parameter(Mandatory = false, HelpMessage = HelpMessages.IntegrationRuntimeAutoUpdateTime)] + [ValidateNotNull] + public TimeSpan? AutoUpdateDelayOffset { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.IntegrationRuntimeName = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.IntegrationRuntimeName = InputObject.Name; + } + + if (AutoUpdate == null && !AutoUpdateDelayOffset.HasValue) + { + throw new PSArgumentException("No valid parameters."); + } + + IntegrationRuntimeResource resource = SynapseAnalyticsClient.GetIntegrationRuntimeAsync( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName).ConfigureAwait(true).GetAwaiter().GetResult().IntegrationRuntime; + WriteVerbose("Got integration runtime"); + + Action updateIntegrationRuntime = () => + { + var request = new UpdateIntegrationRuntimeRequest(); + if (!string.IsNullOrEmpty(AutoUpdate)) + { + request.AutoUpdate = AutoUpdate; + } + WriteVerbose("Handled AutoUpdate"); + + if (AutoUpdateDelayOffset.HasValue) + { + request.UpdateDelayOffset = SafeJsonConvert.SerializeObject( + AutoUpdateDelayOffset.Value, + SynapseAnalyticsClient.GetSerializationSettings()); + + WriteVerbose(request.UpdateDelayOffset); + } + + WriteVerbose("Handled AutoUpdateDelayOffset"); + WriteObject(SynapseAnalyticsClient.UpdateIntegrationRuntimeAsync(ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName, + resource, + request).ConfigureAwait(false).GetAwaiter().GetResult()); + }; + + ConfirmAction( + string.Format( + CultureInfo.InvariantCulture, + Resources.UpdatingIntegrationRuntime, + IntegrationRuntimeName, + WorkspaceName), + IntegrationRuntimeName, + updateIntegrationRuntime); + } + } +} diff --git a/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntimeNode.cs b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..bb1cbf926586 --- /dev/null +++ b/src/Synapse/Synapse/Commands/ManagementCommands/IntegrationRuntimes/UpdateAzureSynapseIntegrationRuntimeNode.cs @@ -0,0 +1,125 @@ +using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; +using Microsoft.Azure.Commands.Synapse.Common; +using Microsoft.Azure.Commands.Synapse.Models; +using Microsoft.Azure.Commands.Synapse.Properties; +using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; +using Microsoft.Azure.Management.Synapse.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse +{ + [Cmdlet(VerbsData.Update, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + SynapseConstants.SynapsePrefix + SynapseConstants.IntegrationRuntime + SynapseConstants.Node, + DefaultParameterSetName = UpdateByNameParameterSet, SupportsShouldProcess = true)] + [OutputType(typeof(PSSelfHostedIntegrationRuntimeStatus))] + public class UpdateAzureSynapseIntegrationRuntimeNode : SynapseManagementCmdletBase + { + private const string UpdateByNameParameterSet = "UpdateByNameParameterSet"; + private const string UpdateByParentObjectParameterSet = "UpdateByParentObjectParameterSet"; + private const string UpdateByResourceIdParameterSet = "UpdateByResourceIdParameterSet"; + private const string UpdateByInputObjectParameterSet = "UpdateByInputObjectParameterSet"; + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = false, HelpMessage = HelpMessages.ResourceGroupName)] + [ResourceGroupCompleter] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceName)] + [ResourceNameCompleter(ResourceTypes.Workspace, nameof(ResourceGroupName))] + [ValidateNotNullOrEmpty] + public string WorkspaceName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByNameParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeName)] + [ResourceNameCompleter( + ResourceTypes.IntegrationRuntime, + nameof(ResourceGroupName), + nameof(WorkspaceName))] + [ValidateNotNullOrEmpty] + public string IntegrationRuntimeName { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = UpdateByParentObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.WorkspaceObject)] + [ValidateNotNull] + public PSSynapseWorkspace WorkspaceObject { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = false, ParameterSetName = UpdateByResourceIdParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeResourceId)] + [ValidateNotNullOrEmpty] + public string ResourceId { get; set; } + + [Parameter(ValueFromPipeline = true, ParameterSetName = UpdateByInputObjectParameterSet, + Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeObject)] + [ValidateNotNull] + public PSIntegrationRuntime InputObject { get; set; } + + [Parameter(Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeNodeName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, HelpMessage = HelpMessages.IntegrationRuntimeJobsLimit)] + public int ConcurrentJobsLimit { get; set; } + + public override void ExecuteCmdlet() + { + if (this.IsParameterBound(c => c.ResourceId)) + { + var resourceIdentifier = new ResourceIdentifier(this.ResourceId); + this.ResourceGroupName = resourceIdentifier.ResourceGroupName; + this.WorkspaceName = resourceIdentifier.ParentResource; + this.WorkspaceName = this.WorkspaceName.Substring(this.WorkspaceName.LastIndexOf('/') + 1); + this.IntegrationRuntimeName = resourceIdentifier.ResourceName; + } + + if (this.IsParameterBound(c => c.WorkspaceObject)) + { + this.ResourceGroupName = new ResourceIdentifier(this.WorkspaceObject.Id).ResourceGroupName; + this.WorkspaceName = this.WorkspaceObject.Name; + } + + if (this.IsParameterBound(c => c.InputObject)) + { + this.ResourceGroupName = InputObject.ResourceGroupName; + this.WorkspaceName = InputObject.WorkspaceName; + this.IntegrationRuntimeName = InputObject.Name; + } + + Action updateIntegrationRuntimeNode = () => + { + var node = SynapseAnalyticsClient.UpdateIntegrationRuntimeNodesAsync( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName, + Name, + new UpdateIntegrationRuntimeNodeRequest() + { + ConcurrentJobsLimit = ConcurrentJobsLimit + }).ConfigureAwait(false).GetAwaiter().GetResult(); + + WriteObject(new PSSelfHostedIntegrationRuntimeNode( + ResourceGroupName, + WorkspaceName, + IntegrationRuntimeName, + Name, + node, + null)); + }; + + ConfirmAction( + string.Format( + CultureInfo.InvariantCulture, + Resources.UpdatingIntegrationRuntimeNode, + Name), + Name, + updateIntegrationRuntimeNode); + } + } +} diff --git a/src/Synapse/Synapse/Common/HelpMessages.cs b/src/Synapse/Synapse/Common/HelpMessages.cs index 85a63bc0ebf9..bb693f7fe3f4 100644 --- a/src/Synapse/Synapse/Common/HelpMessages.cs +++ b/src/Synapse/Synapse/Common/HelpMessages.cs @@ -187,5 +187,75 @@ public static class HelpMessages public const string SignInName = "The email address or the user principal name of the user."; public const string ServicePrincipalName = "The ServicePrincipalName of the service principal."; + + public const string IntegrationRuntimeName = "The integration runtime name."; + + public const string IntegrationRuntimeObject = "The integration runtime object."; + + public const string IntegrationRuntimeResourceId = "Resource identifier of Synapse integration runtime."; + + public const string IntegrationRuntimeStatus = "The integration runtime detail status."; + + public const string IntegrationRuntimeNodeName = "The integration runtime node name."; + + public const string IntegrationRuntimeNodeIpAddress = "The IP Address of integration runtime node."; + + public const string IntegrationRuntimeKeyName = "The authentication key name of the self-hosted integration runtime."; + + public const string DontAskConfirmation = "Don't ask for confirmation."; + + public const string IntegrationRuntimetype = "The integration runtime type."; + + public const string IntegrationRuntimeDescription = "The integration runtime description."; + + public const string IntegrationRuntimeLocation = "The integration runtime description."; + + public const string IntegrationRuntimeNodeSize = "The integration runtime node size."; + + public const string IntegrationRuntimeNodeCount = "Target nodes count of the integration runtime."; + + public const string IntegrationRuntimeCatalogServerEndpoint = "The catalog database server endpoint of the integration runtime."; + + public const string IntegrationRuntimeCatalogAdminCredential = "The catalog database administrator credential of the integration runtime."; + + public const string IntegrationRuntimeCatalogPricingTier = "The catalog database pricing tier of the integration runtime."; + + public const string IntegrationRuntimeVNetId = "The ID of the VNet which the integration runtime will join."; + + public const string IntegrationRuntimeSubnet = "The name of the subnet in the VNet."; + + public const string IntegrationRuntimePublicIP = "The static public IP addresses which the integration runtime will use."; + + public const string IntegrationRuntimeDataFlowComputeType = "Compute type of the data flow cluster which will execute data flow job."; + + public const string IntegrationRuntimeDataFlowCoreCount = "Core count of the data flow cluster which will execute data flow job."; + + public const string IntegrationRuntimeDataFlowTimeToLive = "Time to live (in minutes) setting of the data flow cluster which will execute data flow job."; + + public const string IntegrationRuntimeSetupScriptContainerSasUri = "The SAS URI of the Azure blob container that contains the custom setup script."; + + public const string IntegrationRuntimeEdition = "The edition for SSIS integration runtime which could be Standard or Enterprise, default is Standard if it is not specified."; + + public const string IntegrationRuntimeExpressCustomSetup = "The express custom setup for SSIS integration runtime which could be used to setup configurations and 3rd party components without custom setup script."; + + public const string IntegrationRuntimeDataProxyIntegrationRuntimeName = "The Self-Hosted Integration Runtime name which is used as a proxy."; + + public const string IntegrationRuntimeDataProxyStagingLinkedServiceName = "The Azure Blob Storage Linked Service name that references the staging data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtime."; + + public const string IntegrationRuntimeDataProxyStagingPath = "The path in staging data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtimes, a default container will be used if unspecified."; + + public const string IntegrationRuntimeMaxParallelExecutionsPerNode = "Maximum parallel execution count per node for a managed dedicated integration runtime."; + + public const string IntegrationRuntimeLicenseType = "The license type that you want to select for the SSIS IR. There are two types: LicenseIncluded or BasePrice. If you are qualified for the Azure Hybrid Use Benefit (AHUB) pricing, please select BasePrice. If not, please select LicenseIncluded."; + + public const string IntegrationRuntimeAuthKey = "The authentication key of the self-hosted integration runtime."; + + public const string SharedIntegrationRuntimeResourceId = "The resource id of the shared self-hosted integration runtime."; + + public const string IntegrationRuntimeAutoUpdate = "Enable or disable the self-hosted integration runtime auto-update."; + + public const string IntegrationRuntimeAutoUpdateTime = "The time of the day for the self-hosted integration runtime auto-update."; + + public const string IntegrationRuntimeJobsLimit = "The number of concurrent jobs permitted to run on the integration runtime node. Values between 1 and maxConcurrentJobs are allowed."; } } diff --git a/src/Synapse/Synapse/Common/ResourceTypes.cs b/src/Synapse/Synapse/Common/ResourceTypes.cs index e4597cef4d7a..237e1c601f94 100644 --- a/src/Synapse/Synapse/Common/ResourceTypes.cs +++ b/src/Synapse/Synapse/Common/ResourceTypes.cs @@ -9,5 +9,6 @@ public static class ResourceTypes public const string StorageAccount = "Microsoft.Storage/storageAccounts"; public const string SqlDatabase = "Microsoft.Sql/servers/databases"; public const string RecoverablSqlDatabase = "Microsoft.Sql/servers/recoverableDatabases"; + public const string IntegrationRuntime = "Microsoft.Synapse/workspaces/integrationruntimes"; } } diff --git a/src/Synapse/Synapse/Common/Utils.cs b/src/Synapse/Synapse/Common/Utils.cs index a5b9dcce3412..962fb61063b0 100644 --- a/src/Synapse/Synapse/Common/Utils.cs +++ b/src/Synapse/Synapse/Common/Utils.cs @@ -123,5 +123,15 @@ private static string GetAggregatedErrorMessage(string message, string innerMess return errorContent; } + + public static bool IsNextPageLink(this string nextLink) + { + return !string.IsNullOrEmpty(nextLink); + } + + public static bool IsEmptyOrWhiteSpace(this string value) + { + return value.All(char.IsWhiteSpace); + } } } diff --git a/src/Synapse/Synapse/Models/CreatePSIntegrationRuntimeParameters.cs b/src/Synapse/Synapse/Models/CreatePSIntegrationRuntimeParameters.cs new file mode 100644 index 000000000000..363afbd77802 --- /dev/null +++ b/src/Synapse/Synapse/Models/CreatePSIntegrationRuntimeParameters.cs @@ -0,0 +1,24 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class CreatePSIntegrationRuntimeParameters + { + public string ResourceGroupName { get; set; } + + public string WorkspaceName { get; set; } + + public bool Force { get; set; } + + public Action> ConfirmAction { get; set; } + + public string Name { get; set; } + + public bool IsUpdate { get; set; } + + public IntegrationRuntimeResource IntegrationRuntimeResource { get; set; } + } +} diff --git a/src/Synapse/Synapse/Models/PSIntegrationRuntime.cs b/src/Synapse/Synapse/Models/PSIntegrationRuntime.cs new file mode 100644 index 000000000000..a4fc2a96780f --- /dev/null +++ b/src/Synapse/Synapse/Models/PSIntegrationRuntime.cs @@ -0,0 +1,55 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSIntegrationRuntime + { + internal readonly IntegrationRuntimeResource IntegrationRuntime; + + public PSIntegrationRuntime(IntegrationRuntimeResource integrationRuntime, string resourceGroupName, string workspaceName) + { + if (integrationRuntime == null) + { + throw new ArgumentNullException(nameof(integrationRuntime)); + } + + IntegrationRuntime = integrationRuntime; + ResourceGroupName = resourceGroupName; + this.WorkspaceName = workspaceName; + } + + public string Name => IntegrationRuntime.Name; + + public string Type + { + get + { + if (IntegrationRuntime.Properties is ManagedIntegrationRuntime) + { + return SynapseConstants.IntegrationRuntimeTypeManaged; + } + else if (IntegrationRuntime.Properties is SelfHostedIntegrationRuntime) + { + return SynapseConstants.IntegrationRuntimeSelfhosted; + } + + return string.Empty; + } + } + + public string ResourceGroupName { get; private set; } + + public string WorkspaceName { get; private set; } + + public string Description + { + get { return IntegrationRuntime.Properties.Description; } + set { IntegrationRuntime.Properties.Description = value; } + } + + public string Id => IntegrationRuntime.Id; + } +} diff --git a/src/Synapse/Synapse/Models/PSIntegrationRuntimeKeys.cs b/src/Synapse/Synapse/Models/PSIntegrationRuntimeKeys.cs new file mode 100644 index 000000000000..072b9b63028a --- /dev/null +++ b/src/Synapse/Synapse/Models/PSIntegrationRuntimeKeys.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSIntegrationRuntimeKeys + { + public PSIntegrationRuntimeKeys(string key1, string key2) + { + AuthKey1 = key1; + AuthKey2 = key2; + } + + public string AuthKey1 { get; private set; } + + public string AuthKey2 { get; private set; } + } +} diff --git a/src/Synapse/Synapse/Models/PSIntegrationRuntimeMetrics.cs b/src/Synapse/Synapse/Models/PSIntegrationRuntimeMetrics.cs new file mode 100644 index 000000000000..18ab863aaa3d --- /dev/null +++ b/src/Synapse/Synapse/Models/PSIntegrationRuntimeMetrics.cs @@ -0,0 +1,37 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSIntegrationRuntimeMetrics + { + private readonly IntegrationRuntimeMonitoringData _monitoringData; + + public PSIntegrationRuntimeMetrics() + { + _monitoringData = new IntegrationRuntimeMonitoringData(); + } + + public PSIntegrationRuntimeMetrics(IntegrationRuntimeMonitoringData data, string resourceGroupName, string factoryName) + { + if (data == null) + { + throw new ArgumentNullException(nameof(data)); + } + + this._monitoringData = data; + this.ResourceGroupName = resourceGroupName; + this.DataFactoryName = factoryName; + } + + public string IntegrationRuntimeName => _monitoringData.Name; + + public string ResourceGroupName { get; private set; } + + public string DataFactoryName { get; private set; } + + public IList Nodes => _monitoringData.Nodes; + } +} diff --git a/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntime.cs b/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntime.cs new file mode 100644 index 000000000000..9262585c7376 --- /dev/null +++ b/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntime.cs @@ -0,0 +1,20 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSLinkedIntegrationRuntime : PSSelfHostedIntegrationRuntime + { + public PSLinkedIntegrationRuntime( + IntegrationRuntimeResource integrationRuntime, + string resourceGroupName, + string workspaceName) + : base(integrationRuntime, resourceGroupName, workspaceName) + { + } + + public string AuthorizationType { get; set; } + } +} diff --git a/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntimeStatus.cs b/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..2d176fb35bd5 --- /dev/null +++ b/src/Synapse/Synapse/Models/PSLinkedIntegrationRuntimeStatus.cs @@ -0,0 +1,45 @@ +using Microsoft.Azure.Management.Synapse.Models; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSLinkedIntegrationRuntimeStatus : PSSelfHostedIntegrationRuntimeStatus + { + public PSLinkedIntegrationRuntimeStatus( + IntegrationRuntimeResource integrationRuntime, + SelfHostedIntegrationRuntimeStatus status, + string resourceGroupName, + string workspaceName, + JsonSerializerSettings deserializerSettings, + string authType, + string origIntegrationRuntimeName, + string origDataFactoryName) + : base(integrationRuntime, status, resourceGroupName, workspaceName, deserializerSettings) + { + WorkspaceName = workspaceName; + ResourceGroupName = resourceGroupName; + OriginalIntegrationRuntimeName = origIntegrationRuntimeName; + OriginalDataFactoryName = origDataFactoryName; + AuthorizationType = authType; + } + + public new string Name => IntegrationRuntime.Name; + + public new string Type => SynapseConstants.IntegrationRuntimeSelfhostedLinked; + + public new string WorkspaceName { get; private set; } + + public new string ResourceGroupName { get; private set; } + + public string OriginalIntegrationRuntimeName { get; private set; } + + public string OriginalDataFactoryName { get; private set; } + + public string AuthorizationType { get; private set; } + + private new IList Links { get; set; } + } +} diff --git a/src/Synapse/Synapse/Models/PSManagedIntegrationRuntime.cs b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntime.cs new file mode 100644 index 000000000000..054e14384db9 --- /dev/null +++ b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntime.cs @@ -0,0 +1,74 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSManagedIntegrationRuntime : PSIntegrationRuntime + { + public PSManagedIntegrationRuntime( + IntegrationRuntimeResource integrationRuntime, + string resourceGroupName, + string workspaceName) + : base(integrationRuntime, resourceGroupName, workspaceName) + { + if (IntegrationRuntime.Properties == null) + { + IntegrationRuntime.Properties = new ManagedIntegrationRuntime(); + } + + if (ManagedIntegrationRuntime == null) + { + throw new PSArgumentException("The resource is not a valid managed integration runtime."); + } + } + + private ManagedIntegrationRuntime ManagedIntegrationRuntime => IntegrationRuntime.Properties as ManagedIntegrationRuntime; + + public string Location => ManagedIntegrationRuntime.ComputeProperties?.Location; + + public string NodeSize => ManagedIntegrationRuntime.ComputeProperties?.NodeSize; + + public int? NodeCount => ManagedIntegrationRuntime.ComputeProperties?.NumberOfNodes; + + public int? MaxParallelExecutionsPerNode => ManagedIntegrationRuntime.ComputeProperties?.MaxParallelExecutionsPerNode; + + public string CatalogServerEndpoint => ManagedIntegrationRuntime.SsisProperties?.CatalogInfo?.CatalogServerEndpoint; + + public string CatalogAdminUserName => ManagedIntegrationRuntime.SsisProperties?.CatalogInfo?.CatalogAdminUserName; + + public string CatalogAdminPassword => ManagedIntegrationRuntime.SsisProperties?.CatalogInfo?.CatalogAdminPassword?.Value; + + public string CatalogPricingTier => ManagedIntegrationRuntime.SsisProperties?.CatalogInfo?.CatalogPricingTier; + + public string VNetId => ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.VNetId; + + public string Subnet => ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.Subnet; + + public string[] PublicIPs => ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.PublicIPs == null ? null : new List(ManagedIntegrationRuntime.ComputeProperties?.VNetProperties?.PublicIPs).ToArray(); + + public int? DataFlowCoreCount => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.CoreCount; + + public string DataFlowComputeType => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.ComputeType; + + public int? DataFlowTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.TimeToLive; + + public string State => ManagedIntegrationRuntime.State; + + public string LicenseType => ManagedIntegrationRuntime.SsisProperties?.LicenseType; + + public string SetupScriptContainerSasUri => ManagedIntegrationRuntime.SsisProperties?.CustomSetupScriptProperties?.BlobContainerUri + ManagedIntegrationRuntime.SsisProperties?.CustomSetupScriptProperties?.SasToken?.Value; + + public string DataProxyIntegrationRuntimeName => ManagedIntegrationRuntime.SsisProperties?.DataProxyProperties?.ConnectVia?.ReferenceName; + + public string DataProxyStagingLinkedServiceName => ManagedIntegrationRuntime.SsisProperties?.DataProxyProperties?.StagingLinkedService?.ReferenceName; + + public string DataProxyStagingPath => ManagedIntegrationRuntime.SsisProperties?.DataProxyProperties?.Path; + + public string Edition => ManagedIntegrationRuntime.SsisProperties?.Edition; + + public System.Collections.Generic.IList ExpressCustomSetup => ManagedIntegrationRuntime.SsisProperties?.ExpressCustomSetupProperties; + } +} diff --git a/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeNode.cs b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..59cf37d519de --- /dev/null +++ b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeNode.cs @@ -0,0 +1,46 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSManagedIntegrationRuntimeNode + { + public PSManagedIntegrationRuntimeNode( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string name, + ManagedIntegrationRuntimeNode node) + { + if (node == null) + { + throw new PSArgumentNullException("node"); + } + + ResourceGroupName = resourceGroupName; + DataFactoryName = workspaceName; + IntegrationRuntimeName = integrationRuntimeName; + Name = name; + _node = node; + } + + private readonly ManagedIntegrationRuntimeNode _node; + + public string ResourceGroupName { get; private set; } + + public string DataFactoryName { get; private set; } + + public string IntegrationRuntimeName { get; private set; } + + public string Name { get; private set; } + + public string NodeId => _node.NodeId; + + public string Status => _node.Status; + + public IList Errors => _node.Errors; + } +} diff --git a/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeStatus.cs b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..86ed32dc72b3 --- /dev/null +++ b/src/Synapse/Synapse/Models/PSManagedIntegrationRuntimeStatus.cs @@ -0,0 +1,32 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSManagedIntegrationRuntimeStatus : PSManagedIntegrationRuntime + { + private readonly ManagedIntegrationRuntimeStatus _status; + + public PSManagedIntegrationRuntimeStatus( + IntegrationRuntimeResource integrationRuntime, + ManagedIntegrationRuntimeStatus status, + string resourceGroupName, + string workspaceName) + : base(integrationRuntime, resourceGroupName, workspaceName) + { + _status = status; + } + + public DateTime? CreateTime => _status.CreateTime; + + public IList Nodes => _status.Nodes; + + public IList OtherErrors => _status.OtherErrors; + + public ManagedIntegrationRuntimeOperationResult LastOperation => _status.LastOperation; + + public new string State => _status.State; + } +} diff --git a/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntime.cs b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntime.cs new file mode 100644 index 000000000000..6f0d5cff9c2f --- /dev/null +++ b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntime.cs @@ -0,0 +1,30 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSSelfHostedIntegrationRuntime : PSIntegrationRuntime + { + public PSSelfHostedIntegrationRuntime( + IntegrationRuntimeResource integrationRuntime, + string resourceGroupName, + string workspaceName) + : base(integrationRuntime, resourceGroupName, workspaceName) + { + if (IntegrationRuntime.Properties == null) + { + IntegrationRuntime.Properties = new SelfHostedIntegrationRuntime(); + } + + if (SelfHostedIntegrationRuntime == null) + { + throw new PSArgumentException("The resource is not a valid self-hosted integration runtime."); + } + } + + protected SelfHostedIntegrationRuntime SelfHostedIntegrationRuntime => IntegrationRuntime.Properties as SelfHostedIntegrationRuntime; + } +} diff --git a/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeNode.cs b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..98472febb96a --- /dev/null +++ b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeNode.cs @@ -0,0 +1,78 @@ +using Microsoft.Azure.Management.Synapse.Models; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSSelfHostedIntegrationRuntimeNode + { + public PSSelfHostedIntegrationRuntimeNode( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string name, + SelfHostedIntegrationRuntimeNode node, + string ipAddress) + { + if (node == null) + { + throw new PSArgumentNullException("node"); + } + + ResourceGroupName = resourceGroupName; + DataFactoryName = workspaceName; + IntegrationRuntimeName = integrationRuntimeName; + Name = name; + _node = node; + IpAddress = ipAddress; + } + + private readonly SelfHostedIntegrationRuntimeNode _node; + + public string ResourceGroupName { get; private set; } + + public string DataFactoryName { get; private set; } + + public string IntegrationRuntimeName { get; private set; } + + public string Name { get; private set; } + + public string MachineName => _node.MachineName; + + public string HostServiceUri => _node.HostServiceUri; + + public string Status => _node.Status; + + public IDictionary Capabilities => _node.Capabilities; + + public string VersionStatus => _node.VersionStatus; + + public string Version => _node.Version; + + public DateTime? RegisterTime => _node.RegisterTime; + + public DateTime? LastConnectTime => _node.LastConnectTime; + + public DateTime? ExpiryTime => _node.ExpiryTime; + + public DateTime? LastStartTime => _node.LastStartTime; + + public DateTime? LastStopTime => _node.LastStopTime; + + public string LastUpdateResult => _node.LastUpdateResult; + + public DateTime? LastStartUpdateTime => _node.LastStartUpdateTime; + + public DateTime? LastEndUpdateTime => _node.LastEndUpdateTime; + + public bool? IsActiveDispatcher => _node.IsActiveDispatcher; + + public int? ConcurrentJobsLimit => _node.ConcurrentJobsLimit; + + public int? MaxConcurrentJobs => _node.MaxConcurrentJobs; + + public string IpAddress { get; private set; } + } +} diff --git a/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeStatus.cs b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..6922400136db --- /dev/null +++ b/src/Synapse/Synapse/Models/PSSelfHostedIntegrationRuntimeStatus.cs @@ -0,0 +1,79 @@ +using Microsoft.Azure.Management.Synapse.Models; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class PSSelfHostedIntegrationRuntimeStatus : PSSelfHostedIntegrationRuntime + { + private readonly SelfHostedIntegrationRuntimeStatus _status; + private readonly JsonSerializerSettings _deserializerSettings; + + public PSSelfHostedIntegrationRuntimeStatus( + IntegrationRuntimeResource integrationRuntime, + SelfHostedIntegrationRuntimeStatus status, + string resourceGroupName, + string workspaceName, + JsonSerializerSettings deserializerSettings) + : base(integrationRuntime, resourceGroupName, workspaceName) + { + _status = status; + _deserializerSettings = deserializerSettings; + } + + public string State => _status.State; + + public string Version => _status.Version; + + public DateTime? CreateTime => _status.CreateTime; + + public string AutoUpdate => _status.AutoUpdate; + + public DateTime? ScheduledUpdateDate => _status.ScheduledUpdateDate; + + public TimeSpan? UpdateDelayOffset => ConvertStringTimeSpan(_status.UpdateDelayOffset); + + public TimeSpan? LocalTimeZoneOffset => ConvertStringTimeSpan(_status.LocalTimeZoneOffset); + + public string InternalChannelEncryption => _status.InternalChannelEncryption; + + public IDictionary Capabilities => _status.Capabilities; + + public IList ServiceUrls => _status.ServiceUrls; + + public IList Nodes => _status.Nodes; + + public IList Links => _status.Links; + + public DateTime? AutoUpdateETA => _status.AutoUpdateETA; + + public string LatestVersion => _status.LatestVersion; + + public string PushedVersion => _status.PushedVersion; + + public string TaskQueueId => _status.TaskQueueId; + + public string VersionStatus => _status.VersionStatus; + + private TimeSpan? ConvertStringTimeSpan(string ts) + { + if (string.IsNullOrWhiteSpace(ts)) + { + return null; + } + + try + { + var definition = new { timeSpan = TimeSpan.FromHours(1) }; + var value = JsonConvert.DeserializeAnonymousType($"{{'timeSpan': '{ts}'}}", definition, _deserializerSettings); + return value.timeSpan; + } + catch (Exception) + { + return null; + } + } + } +} diff --git a/src/Synapse/Synapse/Models/SynapseAnalyticsManagementClient.cs b/src/Synapse/Synapse/Models/SynapseAnalyticsManagementClient.cs index fb23745568b7..2b388ea0125c 100644 --- a/src/Synapse/Synapse/Models/SynapseAnalyticsManagementClient.cs +++ b/src/Synapse/Synapse/Models/SynapseAnalyticsManagementClient.cs @@ -5,12 +5,19 @@ using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.Azure.Management.Synapse; using Microsoft.Azure.Management.Synapse.Models; +using Microsoft.Rest; using Microsoft.Rest.Azure; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; +using System.Management.Automation; using System.Net; +using System.Net.Http; using System.Text; +using System.Threading; +using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Synapse.Models { @@ -773,6 +780,606 @@ public bool TestSparkPool(string resourceGroupName, string workspaceName, string #endregion + #region integration runtime operations + + public virtual async Task> ListIntegrationRuntimesAsync(SynapseEntityFilterOptions filterOptions) + { + try + { + if (string.IsNullOrEmpty(filterOptions.ResourceGroupName)) + { + filterOptions.ResourceGroupName = GetResourceGroupByWorkspaceName(filterOptions.WorkspaceName); + } + + var integrationRuntimes = new List(); + + IPage response; + if (filterOptions.NextLink.IsNextPageLink()) + { + response = await _synapseManagementClient.IntegrationRuntimes.ListByWorkspaceNextAsync(filterOptions.NextLink); + } + else + { + response = await _synapseManagementClient.IntegrationRuntimes.ListByWorkspaceAsync( + filterOptions.ResourceGroupName, + filterOptions.WorkspaceName); + } + + filterOptions.NextLink = response?.NextPageLink; + if (response == null) + { + return integrationRuntimes; + } + + foreach (var integrationRuntime in response.ToList()) + { + var managed = integrationRuntime.Properties as ManagedIntegrationRuntime; + if (managed != null) + { + integrationRuntimes.Add(new PSManagedIntegrationRuntime( + integrationRuntime, + filterOptions.ResourceGroupName, + filterOptions.WorkspaceName)); + } + else + { + var selfHosted = integrationRuntime.Properties as SelfHostedIntegrationRuntime; + if (selfHosted != null) + { + integrationRuntimes.Add(CreateSelfHostedIntegrationRuntime( + integrationRuntime, + filterOptions.ResourceGroupName, + filterOptions.WorkspaceName)); + } + else + { + integrationRuntimes.Add(new PSIntegrationRuntime( + integrationRuntime, + filterOptions.ResourceGroupName, + filterOptions.WorkspaceName)); + } + } + } + + return integrationRuntimes; + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + + } + + private PSIntegrationRuntime CreateSelfHostedIntegrationRuntime( + IntegrationRuntimeResource integrationRuntime, + string resourceGroupName, + string workspaceName) + { + PSIntegrationRuntime psIntegrationRuntime = null; + var selfHosted = integrationRuntime.Properties as SelfHostedIntegrationRuntime; + if (selfHosted != null) + { + if (selfHosted.LinkedInfo != null) + { + psIntegrationRuntime = new PSLinkedIntegrationRuntime(integrationRuntime, + resourceGroupName, + workspaceName) + { + AuthorizationType = selfHosted.LinkedInfo is LinkedIntegrationRuntimeKeyAuthorization + ? SynapseConstants.LinkedIntegrationRuntimeKeyAuth + : SynapseConstants.LinkedIntegrationRuntimeRbacAuth + }; + } + else + { + psIntegrationRuntime = new PSSelfHostedIntegrationRuntime(integrationRuntime, + resourceGroupName, + workspaceName); + } + } + + return psIntegrationRuntime; + } + + public virtual async Task GetIntegrationRuntimeStatusAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var taskGetIntegrationRuntime = Task.Run( + async () => await _synapseManagementClient.IntegrationRuntimes.GetAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName)); + var taskGetStatus = Task.Run( + async () => await _synapseManagementClient.IntegrationRuntimeStatus.GetWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName)); + await Task.WhenAll(taskGetIntegrationRuntime, taskGetStatus); + + return GenerateIntegraionRuntimeObject( + taskGetIntegrationRuntime.Result, + taskGetStatus.Result.Body, + resourceGroupName, + workspaceName); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + + } + + public virtual async Task GetIntegrationRuntimeAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var response = await _synapseManagementClient.IntegrationRuntimes.GetAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + + return GenerateIntegraionRuntimeObject(response, null, resourceGroupName, workspaceName); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + catch (NullReferenceException) + { + throw new CloudException() + { + Response = new HttpResponseMessageWrapper(new HttpResponseMessage(HttpStatusCode.NotFound), "") + }; + } + } + + private PSIntegrationRuntime GenerateIntegraionRuntimeObject( + IntegrationRuntimeResource integrationRuntime, + IntegrationRuntimeStatusResponse status, + string resourceGroupName, + string workspaceName) + { + var managed = integrationRuntime.Properties as ManagedIntegrationRuntime; + if (status == null) + { + PSIntegrationRuntime ir = (managed != null + ? new PSManagedIntegrationRuntime(integrationRuntime, resourceGroupName, workspaceName) + : CreateSelfHostedIntegrationRuntime(integrationRuntime, resourceGroupName, workspaceName)) + ?? new PSIntegrationRuntime(integrationRuntime, resourceGroupName, workspaceName); + + return ir; + } + + if (managed != null) + { + return new PSManagedIntegrationRuntimeStatus( + integrationRuntime, + (ManagedIntegrationRuntimeStatus)status.Properties, + resourceGroupName, + workspaceName); + } + else + { + var selfHosted = integrationRuntime.Properties as SelfHostedIntegrationRuntime; + if (selfHosted != null) + { + if (selfHosted.LinkedInfo != null) + { + return new PSLinkedIntegrationRuntimeStatus( + integrationRuntime, + (SelfHostedIntegrationRuntimeStatus)status.Properties, + resourceGroupName, + workspaceName, + _synapseManagementClient.DeserializationSettings, + selfHosted.LinkedInfo is LinkedIntegrationRuntimeKeyAuthorization + ? SynapseConstants.LinkedIntegrationRuntimeKeyAuth + : SynapseConstants.LinkedIntegrationRuntimeRbacAuth, + status.Name, + status.Properties.DataFactoryName); + } + + return new PSSelfHostedIntegrationRuntimeStatus( + integrationRuntime, + (SelfHostedIntegrationRuntimeStatus)status.Properties, + resourceGroupName, + workspaceName, + _synapseManagementClient.DeserializationSettings); + } + } + + // Don't support get status for legacy integraiton runtime. + throw new PSInvalidOperationException("This type of integration runtime is not supported by this version powershell cmdlets."); + } + + public virtual async Task GetIntegrationRuntimeKeyAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var response = await _synapseManagementClient.IntegrationRuntimeAuthKeys.ListWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + + return new PSIntegrationRuntimeKeys(response.Body.AuthKey1, response.Body.AuthKey2); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task GetIntegrationRuntimeMetricAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var data = await _synapseManagementClient.IntegrationRuntimeMonitoringData.GetWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + + return new PSIntegrationRuntimeMetrics(data.Body, resourceGroupName, workspaceName); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task> GetIntegrationRuntimeNodeIpAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string nodeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + return await _synapseManagementClient.IntegrationRuntimeNodeIpAddress.GetWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName, + nodeName); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task UpgradeIntegrationRuntimeAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + await _synapseManagementClient.IntegrationRuntimes.UpgradeAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task RegenerateIntegrationRuntimeAuthKeyAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string keyName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var response = + await _synapseManagementClient.IntegrationRuntimeAuthKeys.RegenerateWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName, + new IntegrationRuntimeRegenerateKeyParameters(keyName)); + + return new PSIntegrationRuntimeKeys(response.Body.AuthKey1, response.Body.AuthKey2); + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + internal async Task CheckIntegrationRuntimeExistsAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + PSIntegrationRuntime integrationRuntime = await this.GetIntegrationRuntimeAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + + return integrationRuntime != null; + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + catch (CloudException e) + { + // Get throws Exception message with NotFound Status + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + + throw; + } + } + + public virtual async Task DeleteIntegrationRuntimeAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var response = await _synapseManagementClient.IntegrationRuntimes.DeleteWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + + return response.Response.StatusCode; + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task RemoveIntegrationRuntimeNodeAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string nodeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + + var response = await _synapseManagementClient.IntegrationRuntimeNodes.DeleteWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName, + nodeName); + + return response.Response.StatusCode; + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual PSIntegrationRuntime CreateOrUpdateIntegrationRuntime(CreatePSIntegrationRuntimeParameters parameters) + { + try + { + if (string.IsNullOrEmpty(parameters.ResourceGroupName)) + { + parameters.ResourceGroupName = GetResourceGroupByWorkspaceName(parameters.WorkspaceName); + } + + PSIntegrationRuntime psIntegrationRuntime = null; + + Action createOrUpdateIntegrationRuntime = () => + { + var integrationRuntime = this.CreateOrUpdateIntegrationRuntimeAsync( + parameters.ResourceGroupName, + parameters.WorkspaceName, + parameters.Name, + parameters.IntegrationRuntimeResource).ConfigureAwait(true).GetAwaiter().GetResult(); + + var managed = integrationRuntime.Body.Properties as ManagedIntegrationRuntime; + if (managed != null) + { + psIntegrationRuntime = new PSManagedIntegrationRuntime(integrationRuntime.Body, + parameters.ResourceGroupName, + parameters.WorkspaceName); + } + else + { + psIntegrationRuntime = CreateSelfHostedIntegrationRuntime(integrationRuntime.Body, + parameters.ResourceGroupName, + parameters.WorkspaceName); + } + }; + + parameters.ConfirmAction( + parameters.Force, // prompt only if the integration runtime exists + string.Format( + CultureInfo.InvariantCulture, + Resources.IntegrationRuntimeExists, + parameters.Name, + parameters.WorkspaceName), + string.Format( + CultureInfo.InvariantCulture, + Resources.UpdatingIntegrationRuntime, + parameters.Name, + parameters.WorkspaceName), + parameters.Name, + createOrUpdateIntegrationRuntime, + () => parameters.IsUpdate); + + return psIntegrationRuntime; + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + } + + public virtual async Task> CreateOrUpdateIntegrationRuntimeAsync( + string resourceGroupName, + string dataFactoryName, + string integrationRuntimeName, + IntegrationRuntimeResource resource) + { + return await _synapseManagementClient.IntegrationRuntimes.CreateWithHttpMessagesAsync( + resourceGroupName, + dataFactoryName, + integrationRuntimeName, + resource); + } + + public virtual async Task SyncIntegrationRuntimeCredentialInNodesAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + + await _synapseManagementClient.IntegrationRuntimeCredentials.SyncWithHttpMessagesAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName); + } + + public JsonSerializerSettings GetSerializationSettings() + { + return _synapseManagementClient.SerializationSettings; + } + + public virtual async Task UpdateIntegrationRuntimeAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + IntegrationRuntimeResource resource, + UpdateIntegrationRuntimeRequest request) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + + var response = await _synapseManagementClient.IntegrationRuntimes.UpdateAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName, + request); + + return new PSSelfHostedIntegrationRuntime( + response, + resourceGroupName, + workspaceName); + } + + public virtual async Task UpdateIntegrationRuntimeNodesAsync( + string resourceGroupName, + string workspaceName, + string integrationRuntimeName, + string nodeName, + UpdateIntegrationRuntimeNodeRequest request) + { + try + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetResourceGroupByWorkspaceName(workspaceName); + } + } + catch (ErrorContractException ex) + { + throw GetSynapseException(ex); + } + + return await _synapseManagementClient.IntegrationRuntimeNodes.UpdateAsync( + resourceGroupName, + workspaceName, + integrationRuntimeName, + nodeName, + request); + } + + #endregion + #region helpers private static List ListResources( @@ -802,6 +1409,28 @@ private static SynapseException GetSynapseException(CloudException ex) return ex.CreateSynapseException(); } + private Exception RethrowLongingRunningException(Exception e) + { + var ce = e as CloudException; + if (ce?.Body != null) + { + return new CloudException() + { + Body = new CloudError() + { + Code = ce.Body.Code, + Message = Resources.LongRunningStatusError + "\n" + ce.Body.Message, + Target = ce.Body.Target + }, + Request = ce.Request, + Response = ce.Response, + RequestId = ce.RequestId + }; + } + + return new Exception(Resources.LongRunningStatusError, e); + } + #endregion } } diff --git a/src/Synapse/Synapse/Models/SynapseConstants.cs b/src/Synapse/Synapse/Models/SynapseConstants.cs index 6675aac0bab4..ffde2474acd1 100644 --- a/src/Synapse/Synapse/Models/SynapseConstants.cs +++ b/src/Synapse/Synapse/Models/SynapseConstants.cs @@ -54,6 +54,40 @@ public static class SynapseConstants public const string MainExecutableFile = nameof(MainExecutableFile); + public const string IntegrationRuntime = nameof(IntegrationRuntime); + + public const string IntegrationRuntimeName = nameof(IntegrationRuntimeName); + + public const string IntegrationRuntimeTypeManaged = "Managed"; + + public const string IntegrationRuntimeSelfhosted = "SelfHosted"; + + public const string LinkedIntegrationRuntimeKeyAuth = "Key"; + + public const string LinkedIntegrationRuntimeRbacAuth = "RBAC"; + + public const string IntegrationRuntimeSelfhostedLinked = "SelfHosted(Linked)"; + + public const string Key = nameof(Key); + + public const string Metric = nameof(Metric); + + public const string Node = nameof(Node); + + public const string Upgrade = nameof(Upgrade); + + public const string SubnetName = nameof(SubnetName); + + public const string IntegrationRuntimeLicenseIncluded = "LicenseIncluded"; + + public const string IntegrationRuntimeBasePrice = "BasePrice"; + + public const string Credential = nameof(Credential); + + public const string IntegrationRuntimeAutoUpdateEnabled = "On"; + + public const string IntegrationRuntimeAutoUpdateDisabled = "Off"; + public static Dictionary ComputeNodeSizes = new Dictionary { { diff --git a/src/Synapse/Synapse/Models/SynapseEntityFilterOptions.cs b/src/Synapse/Synapse/Models/SynapseEntityFilterOptions.cs new file mode 100644 index 000000000000..02c9685477fe --- /dev/null +++ b/src/Synapse/Synapse/Models/SynapseEntityFilterOptions.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Synapse.Models +{ + public class SynapseEntityFilterOptions + { + public string WorkspaceName { get; set; } + + public string ResourceGroupName { get; set; } + + public string NextLink { get; set; } + + public string Name { get; set; } + } +} diff --git a/src/Synapse/Synapse/Models/SynapseManagementCmdletBase.cs b/src/Synapse/Synapse/Models/SynapseManagementCmdletBase.cs index f9f41a8d28fe..cde9a1eb6352 100644 --- a/src/Synapse/Synapse/Models/SynapseManagementCmdletBase.cs +++ b/src/Synapse/Synapse/Models/SynapseManagementCmdletBase.cs @@ -1,6 +1,9 @@ using System; using System.Collections.Generic; +using System.Management.Automation; +using System.Runtime.InteropServices; using System.Text; +using System.Threading.Tasks; namespace Microsoft.Azure.Commands.Synapse.Models { @@ -22,5 +25,19 @@ public SynapseAnalyticsManagementClient SynapseAnalyticsClient set { _synapseAnalyticsManagementClient = value; } } + + protected string ConvertToUnsecureString(System.Security.SecureString securePassword) + { + var unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } } } diff --git a/src/Synapse/Synapse/Properties/Resources.Designer.cs b/src/Synapse/Synapse/Properties/Resources.Designer.cs index 0051358e26e2..91cc488c90ab 100644 --- a/src/Synapse/Synapse/Properties/Resources.Designer.cs +++ b/src/Synapse/Synapse/Properties/Resources.Designer.cs @@ -96,6 +96,16 @@ internal static string ConflictFirewallRuleName { } } + /// + /// Looks up a localized string similar to Continuing execution will renegerate the authentication key '{0}' of integration runtime {1}. This operation will invalidate the existing authentication key. + ///Are you sure you want to continue?. + /// + internal static string ContinueRegenerateAuthKey { + get { + return ResourceManager.GetString("ContinueRegenerateAuthKey", resourceCulture); + } + } + /// /// Looks up a localized string similar to Creating a new firewall rule in workspace '{0}' with name '{1}'.. /// @@ -339,6 +349,107 @@ internal static string FirewallRuleDoesNotExist { } } + /// + /// Looks up a localized string similar to Are you sure you want to remove integration runtime '{0}' in workspace '{1}'?. + /// + internal static string IntegrationRuntimeConfirmationMessage { + get { + return ResourceManager.GetString("IntegrationRuntimeConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An integration runtime with the name {0} in the workspace {1} exists. + ///Continuing execution may overwrite the existing one. + ///Are you sure you want to continue?. + /// + internal static string IntegrationRuntimeExists { + get { + return ResourceManager.GetString("IntegrationRuntimeExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Both VNetId and Subnet must be set.. + /// + internal static string IntegrationRuntimeInvalidVnet { + get { + return ResourceManager.GetString("IntegrationRuntimeInvalidVnet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove node {0} in integration runtime '{1}''?. + /// + internal static string IntegrationRuntimeNodeConfirmationMessage { + get { + return ResourceManager.GetString("IntegrationRuntimeNodeConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The node '{0}' does not exist in integration runtime '{1}'.. + /// + internal static string IntegrationRuntimeNodeNotFound { + get { + return ResourceManager.GetString("IntegrationRuntimeNodeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Integration runtime '{0}' does not exist in the workspace '{1}'.. + /// + internal static string IntegrationRuntimeNotFound { + get { + return ResourceManager.GetString("IntegrationRuntimeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to sync node credentials in integration runtime '{0}'.. + /// + internal static string IntegrationRuntimeSyncNodeCredential { + get { + return ResourceManager.GetString("IntegrationRuntimeSyncNodeCredential", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a VNet resource ID and subnet name to bring static public IP addresses for your Azure-SSIS Integration Runtime.. + /// + internal static string IntegrationRuntimeVNetNotProvided { + get { + return ResourceManager.GetString("IntegrationRuntimeVNetNotProvided", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value for pramater 'Type' is different with existing integration runtime with name {0}.. + /// + internal static string IntegrationRuntimeWrongType { + get { + return ResourceManager.GetString("IntegrationRuntimeWrongType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InteractiveSparkSessionTips. + /// + internal static string InteractiveSparkSessionTips { + get { + return ResourceManager.GetString("InteractiveSparkSessionTips", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All keys in the parameters hashtable must be of type string since they represent pipeline parameter names.. + /// + internal static string InvalidCastParameterKeyExceptionMessage { + get { + return ResourceManager.GetString("InvalidCastParameterKeyExceptionMessage", resourceCulture); + } + } + /// /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzSubscription -Default <subscriptionName> to set the default subscription.. /// @@ -348,6 +459,15 @@ internal static string InvalidDefaultSubscription { } } + /// + /// Looks up a localized string similar to Only self-hosted integration runtime can be shared.. + /// + internal static string InvalidIntegrationRuntimeSharing { + get { + return ResourceManager.GetString("InvalidIntegrationRuntimeSharing", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invalid job type selected.. /// @@ -366,6 +486,15 @@ internal static string InvalidParameterSet { } } + /// + /// Looks up a localized string similar to Please provide two static public IP addresses for your Azure-SSIS Integration Runtime.. + /// + internal static string InvalidPublicIPCount { + get { + return ResourceManager.GetString("InvalidPublicIPCount", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invalid storage URI: {0}. Allowed URI example: abfss://fileSystem@storageAccountName.dfs.core.windows.net/samples/java/wordcount/wordcount.jar. /// @@ -375,6 +504,15 @@ internal static string InvalidStorageUri { } } + /// + /// Looks up a localized string similar to An error occurred while requesting the status of Integration Runtime, but you can manually execute the following command: Get-AzSynapseIntegrationRuntime -WorkspaceName MyWorkspace -ResourceGroupName MyResourceGroup -Name MyIR -Status. + /// + internal static string LongRunningStatusError { + get { + return ResourceManager.GetString("LongRunningStatusError", resourceCulture); + } + } + /// /// Looks up a localized string similar to Invoking Spark statement in Spark pool '{0}' under workspace '{1}' .... /// @@ -393,6 +531,15 @@ internal static string MissingMainClassName { } } + /// + /// Looks up a localized string similar to Pramater 'Type' must be provided when creating new integration runtime.. + /// + internal static string NeedIntegrationRuntimeType { + get { + return ResourceManager.GetString("NeedIntegrationRuntimeType", resourceCulture); + } + } + /// /// Looks up a localized string similar to No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Connect-AzAccount to login.. /// @@ -411,6 +558,15 @@ internal static string PrincipalNotFound { } } + /// + /// Looks up a localized string similar to Renegerate the authentication key '{0}' of integration runtime {1}.. + /// + internal static string RegenerateAuthKey { + get { + return ResourceManager.GetString("RegenerateAuthKey", resourceCulture); + } + } + /// /// Looks up a localized string similar to Deleting firewall rule '{0}' in workspace '{1}'. /// @@ -420,6 +576,24 @@ internal static string RemovingFirewallRule { } } + /// + /// Looks up a localized string similar to Removing the integration runtime '{0}' in the workspace '{1}'.. + /// + internal static string RemovingIntegrationRuntime { + get { + return ResourceManager.GetString("RemovingIntegrationRuntime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the node {0} in integration runtime '{1}'.. + /// + internal static string RemovingIntegrationRuntimeNode { + get { + return ResourceManager.GetString("RemovingIntegrationRuntimeNode", resourceCulture); + } + } + /// /// Looks up a localized string similar to Deleting role assignment with RoleDefinitionId '{0}' and ObjectId '{1}' in workspace '{2}'.. /// @@ -627,6 +801,42 @@ internal static string SynapseWorkspaceExists { } } + /// + /// Looks up a localized string similar to Syncing node credentials in integration runtime '{0}'.. + /// + internal static string SyncingIntegrationRuntimeNodeCredential { + get { + return ResourceManager.GetString("SyncingIntegrationRuntimeNodeCredential", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating the authentication key of linked integration runtime '{0}' is not allowed.. + /// + internal static string UpdateAuthKeyNotAllowed { + get { + return ResourceManager.GetString("UpdateAuthKeyNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating integration runtime '{0}' in workspace '{1}'.. + /// + internal static string UpdatingIntegrationRuntime { + get { + return ResourceManager.GetString("UpdatingIntegrationRuntime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating integration runtime node {0}.. + /// + internal static string UpdatingIntegrationRuntimeNode { + get { + return ResourceManager.GetString("UpdatingIntegrationRuntimeNode", resourceCulture); + } + } + /// /// Looks up a localized string similar to Updating Spark pool '{0}' in resource group '{1}' under workspace '{2}'.. /// @@ -663,6 +873,15 @@ internal static string UpdatingSynapseWorkspace { } } + /// + /// Looks up a localized string similar to Upgrading integration runtime '{0}'.. + /// + internal static string UpgradingIntegrationRuntime { + get { + return ResourceManager.GetString("UpgradingIntegrationRuntime", resourceCulture); + } + } + /// /// Looks up a localized string similar to User with Name '{0}' does not exist.. /// diff --git a/src/Synapse/Synapse/Properties/Resources.resx b/src/Synapse/Synapse/Properties/Resources.resx index e89730abbe68..5712d27a3d3e 100644 --- a/src/Synapse/Synapse/Properties/Resources.resx +++ b/src/Synapse/Synapse/Properties/Resources.resx @@ -321,6 +321,78 @@ Updating SQL Database '{0}' in resource group '{1}' under Workspace '{2}'. + + All keys in the parameters hashtable must be of type string since they represent pipeline parameter names. + + + Upgrading integration runtime '{0}'. + + + Continuing execution will renegerate the authentication key '{0}' of integration runtime {1}. This operation will invalidate the existing authentication key. +Are you sure you want to continue? + + + Renegerate the authentication key '{0}' of integration runtime {1}. + + + Are you sure you want to remove integration runtime '{0}' in workspace '{1}'? + + + Integration runtime '{0}' does not exist in the workspace '{1}'. + + + Removing the integration runtime '{0}' in the workspace '{1}'. + + + Are you sure you want to remove node {0} in integration runtime '{1}''? + + + Removing the node {0} in integration runtime '{1}'. + + + The node '{0}' does not exist in integration runtime '{1}'. + + + Both VNetId and Subnet must be set. + + + Please provide a VNet resource ID and subnet name to bring static public IP addresses for your Azure-SSIS Integration Runtime. + + + The value for pramater 'Type' is different with existing integration runtime with name {0}. + + + Only self-hosted integration runtime can be shared. + + + Please provide two static public IP addresses for your Azure-SSIS Integration Runtime. + + + Pramater 'Type' must be provided when creating new integration runtime. + + + Updating the authentication key of linked integration runtime '{0}' is not allowed. + + + An integration runtime with the name {0} in the workspace {1} exists. +Continuing execution may overwrite the existing one. +Are you sure you want to continue? + + + Updating integration runtime '{0}' in workspace '{1}'. + + + An error occurred while requesting the status of Integration Runtime, but you can manually execute the following command: Get-AzSynapseIntegrationRuntime -WorkspaceName MyWorkspace -ResourceGroupName MyResourceGroup -Name MyIR -Status + + + Are you sure you want to sync node credentials in integration runtime '{0}'. + + + Syncing node credentials in integration runtime '{0}'. + + + Updating integration runtime node {0}. + Invoking Spark statement in Spark pool '{0}' under workspace '{1}' ... diff --git a/src/Synapse/Synapse/help/Az.Synapse.md b/src/Synapse/Synapse/help/Az.Synapse.md index ebded11766a2..ddf7302ac618 100644 --- a/src/Synapse/Synapse/help/Az.Synapse.md +++ b/src/Synapse/Synapse/help/Az.Synapse.md @@ -14,6 +14,18 @@ The topics in this section document the Azure PowerShell cmdlets for Azure Synap ### [Get-AzSynapseFirewallRule](Get-AzSynapseFirewallRule.md) Gets a Synapse Analytics Firewall Rule. +### [Get-AzSynapseIntegrationRuntime](Get-AzSynapseIntegrationRuntime.md) +Gets information about integration runtime resources. + +### [Get-AzSynapseIntegrationRuntimeKey](Get-AzSynapseIntegrationRuntimeKey.md) +Gets keys for a self-hosted integration runtime. + +### [Get-AzSynapseIntegrationRuntimeMetric](Get-AzSynapseIntegrationRuntimeMetric.md) +Gets metric data for an integration runtime. + +### [Get-AzSynapseIntegrationRuntimeNode](Get-AzSynapseIntegrationRuntimeNode.md) +Gets an integration runtime node information. + ### [Get-AzSynapseRoleAssignment](Get-AzSynapseRoleAssignment.md) Gets a Synapse Analytics role assignment. @@ -41,12 +53,18 @@ Gets a Synapse Analytics SQL pool. ### [Get-AzSynapseWorkspace](Get-AzSynapseWorkspace.md) Gets a Synapse Analytics workspace. +### [Invoke-AzSynapseIntegrationRuntimeUpgrade](Invoke-AzSynapseIntegrationRuntimeUpgrade.md) +Upgrades self-hosted integration runtime. + ### [Invoke-AzSynapseSparkStatement](Invoke-AzSynapseSparkStatement.md) Invokes a Synapse Analytics Spark statement. ### [New-AzSynapseFirewallRule](New-AzSynapseFirewallRule.md) Creates a Synapse Analytics Firewall Rule. +### [New-AzSynapseIntegrationRuntimeKey](New-AzSynapseIntegrationRuntimeKey.md) +Regenerate self-hosted integration runtime key. + ### [New-AzSynapseRoleAssignment](New-AzSynapseRoleAssignment.md) Creates a Synapse Analytics role assignment. @@ -65,6 +83,12 @@ Creates a Synapse Analytics workspace. ### [Remove-AzSynapseFirewallRule](Remove-AzSynapseFirewallRule.md) Deletes a Synapse Analytics Firewall Rule. +### [Remove-AzSynapseIntegrationRuntime](Remove-AzSynapseIntegrationRuntime.md) +Removes an integration runtime. + +### [Remove-AzSynapseIntegrationRuntimeNode](Remove-AzSynapseIntegrationRuntimeNode.md) +Remove a node with the given name on an integration runtime. + ### [Remove-AzSynapseRoleAssignment](Remove-AzSynapseRoleAssignment.md) Deletes a Synapse Analytics role assignment. @@ -83,6 +107,9 @@ Deletes a Synapse Analytics workspace. ### [Reset-AzSynapseSparkSessionTimeout](Reset-AzSynapseSparkSessionTimeout.md) Resets timeout of a Synapse Analytics Spark session. +### [Set-AzSynapseIntegrationRuntime](Set-AzSynapseIntegrationRuntime.md) +Updates an integration runtime. + ### [Start-AzSynapseSparkSession](Start-AzSynapseSparkSession.md) Starts a Synapse Analytics Spark session. @@ -98,6 +125,9 @@ Cancels a Synapse Analytics Spark statement. ### [Submit-AzSynapseSparkJob](Submit-AzSynapseSparkJob.md) Submits a Synapse Analytics Spark job. +### [Sync-AzSynapseIntegrationRuntimeCredential](Sync-AzSynapseIntegrationRuntimeCredential.md) +Synchronizes credentials among integration runtime nodes. + ### [Test-AzSynapseSparkPool](Test-AzSynapseSparkPool.md) Checks for the existence of a Synapse Analytics Spark pool. @@ -113,6 +143,12 @@ Checks for the existence of a Synapse Analytics workspace. ### [Update-AzSynapseFirewallRule](Update-AzSynapseFirewallRule.md) Updates a Synapse Analytics Firewall Rule. +### [Update-AzSynapseIntegrationRuntime](Update-AzSynapseIntegrationRuntime.md) +Updates an integration runtime. + +### [Update-AzSynapseIntegrationRuntimeNode](Update-AzSynapseIntegrationRuntimeNode.md) +Updates self-hosted integration runtime node. + ### [Update-AzSynapseSparkPool](Update-AzSynapseSparkPool.md) Updates a Synapse Analytics Spark pool. diff --git a/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntime.md b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntime.md new file mode 100644 index 000000000000..4a6135a1ba21 --- /dev/null +++ b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntime.md @@ -0,0 +1,204 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/get-azsynapseintegrationruntime +schema: 2.0.0 +--- + +# Get-AzSynapseIntegrationRuntime + +## SYNOPSIS +Gets information about integration runtime resources. + +## SYNTAX + +### GetByNameParameterSet (Default) +``` +Get-AzSynapseIntegrationRuntime [-ResourceGroupName ] -WorkspaceName [-Name ] + [-Status] [-DefaultProfile ] [] +``` + +### GetByParentObjectParameterSet +``` +Get-AzSynapseIntegrationRuntime [-Name ] -WorkspaceObject [-Status] + [-DefaultProfile ] [] +``` + +### GetByResourceIdParameterSet +``` +Get-AzSynapseIntegrationRuntime -ResourceId [-Status] [-DefaultProfile ] + [] +``` + +### GetByInputObjectParameterSet +``` +Get-AzSynapseIntegrationRuntime -InputObject [-Status] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **Get-AzSynapseIntegrationRuntime** cmdlet gets information about integration runtimes in a workspace. +If you specify the name of an integration runtime, this cmdlet gets information about that integration runtime. +If you do not specify a name, this cmdlet gets information about all of the integration runtimes in a workspace. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace +``` + +List all integration runtimes in the workspace named ContosoWorkspace. + +### Example 2 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' +``` + +This command displays information about the integration runtime named 'test-selfhost-ir' in the workspace named ContosoWorkspace. + +### Example 3 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' -Status +``` + +This command displays detail status about the integration runtime named 'test-selfhost-ir' in the workspace named ContosoWorkspace. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: GetByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet, GetByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: GetByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status +The integration runtime detail status. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: GetByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeKey.md b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeKey.md new file mode 100644 index 000000000000..9920df7da5e1 --- /dev/null +++ b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeKey.md @@ -0,0 +1,173 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/get-azsynapseintegrationruntimekey +schema: 2.0.0 +--- + +# Get-AzSynapseIntegrationRuntimeKey + +## SYNOPSIS +Gets keys for a self-hosted integration runtime. + +## SYNTAX + +### GetByNameParameterSet (Default) +``` +Get-AzSynapseIntegrationRuntimeKey [-ResourceGroupName ] -WorkspaceName -Name + [-DefaultProfile ] [] +``` + +### GetByParentObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeKey -Name -WorkspaceObject + [-DefaultProfile ] [] +``` + +### GetByResourceIdParameterSet +``` +Get-AzSynapseIntegrationRuntimeKey -ResourceId [-DefaultProfile ] + [] +``` + +### GetByInputObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeKey -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **Get-AzSynapseIntegrationRuntimeKey** cmdlet gets keys for an integration runtime. The keys are used to register an integration runtime node. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntimeKey -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' +``` + +The cmdlet retrieves keys for an integration runtime named 'test-selfhost-ir'. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: GetByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet, GetByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: GetByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: GetByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntimeKeys + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeMetric.md b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeMetric.md new file mode 100644 index 000000000000..14aa53f403c9 --- /dev/null +++ b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeMetric.md @@ -0,0 +1,173 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/get-azsynapseintegrationruntimemetric +schema: 2.0.0 +--- + +# Get-AzSynapseIntegrationRuntimeMetric + +## SYNOPSIS +Gets metric data for an integration runtime. + +## SYNTAX + +### GetByNameParameterSet (Default) +``` +Get-AzSynapseIntegrationRuntimeMetric [-ResourceGroupName ] -WorkspaceName -Name + [-DefaultProfile ] [] +``` + +### GetByParentObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeMetric -Name -WorkspaceObject + [-DefaultProfile ] [] +``` + +### GetByResourceIdParameterSet +``` +Get-AzSynapseIntegrationRuntimeMetric -ResourceId [-DefaultProfile ] + [] +``` + +### GetByInputObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeMetric -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **Get-AzSynapseIntegrationRuntimeMetric** cmdlet gets metric data about integration runtime in a workspace. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntimeMetric -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' +``` + +This command displays metric data about the integration runtime named 'test-selfhost-ir' in the workspace named ContosoWorkspace. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: GetByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet, GetByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: GetByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: GetByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntimeMetrics + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeNode.md b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeNode.md new file mode 100644 index 000000000000..c00c8e6367f4 --- /dev/null +++ b/src/Synapse/Synapse/help/Get-AzSynapseIntegrationRuntimeNode.md @@ -0,0 +1,213 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/get-azsynapseintegrationruntimenode +schema: 2.0.0 +--- + +# Get-AzSynapseIntegrationRuntimeNode + +## SYNOPSIS +Gets an integration runtime node information. + +## SYNTAX + +### GetByNameParameterSet (Default) +``` +Get-AzSynapseIntegrationRuntimeNode [-ResourceGroupName ] -WorkspaceName + -IntegrationRuntimeName -Name [-IpAddress] [-DefaultProfile ] + [] +``` + +### GetByParentObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeNode -IntegrationRuntimeName -WorkspaceObject + -Name [-IpAddress] [-DefaultProfile ] [] +``` + +### GetByResourceIdParameterSet +``` +Get-AzSynapseIntegrationRuntimeNode -ResourceId -Name [-IpAddress] + [-DefaultProfile ] [] +``` + +### GetByInputObjectParameterSet +``` +Get-AzSynapseIntegrationRuntimeNode -InputObject -Name [-IpAddress] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **Get-AzSynapseIntegrationRuntimeNode** cmdlet gets the detail information of an integration runtime node. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntimeNode -WorkspaceName ContosoWorkspace -IntegrationRuntimeName 'test-selfhost-ir' -Name 'Node_1' +``` + +The cmdlet gets information of node named 'Node_1' in self-hosted integration runtime 'test-selfhost-ir' in workspace ContosoWorkspace. + +### Example 2 +```powershell +PS C:\> Get-AzSynapseIntegrationRuntimeNode -WorkspaceName ContosoWorkspace -IntegrationRuntimeName 'test-selfhost-ir' -Name 'Node_1' -IpAddress +``` + +The cmdlet gets information of node named 'Node_1' in self-hosted integration runtime 'test-selfhost-ir' in workspace 'test-df-eu2', including the IP address. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: GetByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IntegrationRuntimeName +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet, GetByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpAddress +The IP Address of integration runtime node. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The integration runtime node name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: GetByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: GetByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: GetByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSManagedIntegrationRuntimeNode + +### Microsoft.Azure.Commands.Synapse.Models.PSSelfHostedIntegrationRuntimeNode + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Invoke-AzSynapseIntegrationRuntimeUpgrade.md b/src/Synapse/Synapse/help/Invoke-AzSynapseIntegrationRuntimeUpgrade.md new file mode 100644 index 000000000000..bf5ea9b73347 --- /dev/null +++ b/src/Synapse/Synapse/help/Invoke-AzSynapseIntegrationRuntimeUpgrade.md @@ -0,0 +1,204 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/invoke-azsynapseintegrationruntimeupgrade +schema: 2.0.0 +--- + +# Invoke-AzSynapseIntegrationRuntimeUpgrade + +## SYNOPSIS +Upgrades self-hosted integration runtime. + +## SYNTAX + +### InvokeByNameParameterSet (Default) +``` +Invoke-AzSynapseIntegrationRuntimeUpgrade [-ResourceGroupName ] -WorkspaceName -Name + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### InvokeByParentObjectParameterSet +``` +Invoke-AzSynapseIntegrationRuntimeUpgrade -Name -WorkspaceObject + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### InvokeByResourceIdParameterSet +``` +Invoke-AzSynapseIntegrationRuntimeUpgrade -ResourceId [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### InvokeByInputObjectParameterSet +``` +Invoke-AzSynapseIntegrationRuntimeUpgrade -InputObject + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The **Invoke-AzSynapseIntegrationRuntimeUpgrade** cmdlet upgrades self-hosted integration runtime if the new version is available. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Invoke-AzSynapseIntegrationRuntimeUpgrade -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' +``` + +The cmdlet upgrades self-hosted integration runtime named 'test-selfhost-ir' in workspace ContosoWorkspace. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: InvokeByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: InvokeByNameParameterSet, InvokeByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: InvokeByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: InvokeByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: InvokeByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: InvokeByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### System.Void + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/New-AzSynapseIntegrationRuntimeKey.md b/src/Synapse/Synapse/help/New-AzSynapseIntegrationRuntimeKey.md new file mode 100644 index 000000000000..aade46d3dba8 --- /dev/null +++ b/src/Synapse/Synapse/help/New-AzSynapseIntegrationRuntimeKey.md @@ -0,0 +1,236 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/new-azsynapseintegrationruntimekey +schema: 2.0.0 +--- + +# New-AzSynapseIntegrationRuntimeKey + +## SYNOPSIS +Regenerate self-hosted integration runtime key. + +## SYNTAX + +### NewByNameParameterSet (Default) +``` +New-AzSynapseIntegrationRuntimeKey [-ResourceGroupName ] -WorkspaceName -Name + -KeyName [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### NewByParentObjectParameterSet +``` +New-AzSynapseIntegrationRuntimeKey -Name -WorkspaceObject -KeyName + [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### NewByResourceIdParameterSet +``` +New-AzSynapseIntegrationRuntimeKey -ResourceId -KeyName [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### NewByInputObjectParameterSet +``` +New-AzSynapseIntegrationRuntimeKey -InputObject -KeyName [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The cmdlet **New-AzSynapseIntegrationRuntimeKey** regenerates the integration runtime key with the key name specified by 'KeyName' parameter. The previous key will is invalid. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> New-AzSynapseIntegrationRuntimeKey -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' -KeyName authKey2 +``` + +The cmdlet regenerates key 'authKey2' for integration runtime named 'test-selfhost-ir'. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force +Don't ask for confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: NewByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -KeyName +The authentication key name of the self-hosted integration runtime. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Accepted values: AuthKey1, AuthKey2 + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: NewByNameParameterSet, NewByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: NewByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: NewByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: NewByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: NewByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntimeKeys + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntime.md b/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntime.md new file mode 100644 index 000000000000..36048e6f1f18 --- /dev/null +++ b/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntime.md @@ -0,0 +1,219 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/remove-azsynapseintegrationruntime +schema: 2.0.0 +--- + +# Remove-AzSynapseIntegrationRuntime + +## SYNOPSIS +Removes an integration runtime. + +## SYNTAX + +### RemoveByNameParameterSet (Default) +``` +Remove-AzSynapseIntegrationRuntime [-ResourceGroupName ] -WorkspaceName -Name + [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### RemoveByParentObjectParameterSet +``` +Remove-AzSynapseIntegrationRuntime -Name -WorkspaceObject [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### RemoveByResourceIdParameterSet +``` +Remove-AzSynapseIntegrationRuntime -ResourceId [-Force] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### RemoveByInputObjectParameterSet +``` +Remove-AzSynapseIntegrationRuntime -InputObject [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The **Remove-AzSynapseIntegrationRuntime** cmdlet removes a integration runtime. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Remove-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-reserved-ir' -Confirm +``` + +This command removes the integration runtime named 'test-reserved-ir' from the workspace named ContosoWorkspace. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force +Don't ask for confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: RemoveByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet, RemoveByParentObjectParameterSet +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: RemoveByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: RemoveByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### System.Void + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntimeNode.md b/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntimeNode.md new file mode 100644 index 000000000000..4092c4bebebf --- /dev/null +++ b/src/Synapse/Synapse/help/Remove-AzSynapseIntegrationRuntimeNode.md @@ -0,0 +1,238 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/remove-azsynapseintegrationruntimenode +schema: 2.0.0 +--- + +# Remove-AzSynapseIntegrationRuntimeNode + +## SYNOPSIS +Remove a node with the given name on an integration runtime. + +## SYNTAX + +### RemoveByNameParameterSet (Default) +``` +Remove-AzSynapseIntegrationRuntimeNode [-ResourceGroupName ] -WorkspaceName + -IntegrationRuntimeName -NodeName [-Force] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### RemoveByParentObjectParameterSet +``` +Remove-AzSynapseIntegrationRuntimeNode -IntegrationRuntimeName -WorkspaceObject + -NodeName [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### RemoveByResourceIdParameterSet +``` +Remove-AzSynapseIntegrationRuntimeNode -ResourceId -NodeName [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### RemoveByInputObjectParameterSet +``` +Remove-AzSynapseIntegrationRuntimeNode -InputObject -NodeName [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The **Remove-AzSynapseIntegrationRuntimeNode** cmdlet removes a node in an integration runtime. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Remove-AzSynapseIntegrationRuntimeNode -WorkspaceName ContosoWorkspace -IntegrationRuntimeName 'test-selfhost-ir' -NodeName 'Node_1' +``` + +Remove a node with the given name on an integration runtime. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force +Don't ask for confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: RemoveByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IntegrationRuntimeName +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet, RemoveByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NodeName +The integration runtime node name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: RemoveByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: RemoveByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: RemoveByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +### System.String + +## OUTPUTS + +### System.Void + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Set-AzSynapseIntegrationRuntime.md b/src/Synapse/Synapse/help/Set-AzSynapseIntegrationRuntime.md new file mode 100644 index 000000000000..b2e8de2aacb5 --- /dev/null +++ b/src/Synapse/Synapse/help/Set-AzSynapseIntegrationRuntime.md @@ -0,0 +1,649 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/set-azsynapseintegrationruntime +schema: 2.0.0 +--- + +# Set-AzSynapseIntegrationRuntime + +## SYNOPSIS +Updates an integration runtime. + +## SYNTAX + +### SetByIntegrationRuntimeName (Default) +``` +Set-AzSynapseIntegrationRuntime [-ResourceGroupName ] -WorkspaceName -Name + [-Type ] [-Description ] [-Location ] [-NodeSize ] [-NodeCount ] + [-CatalogServerEndpoint ] [-CatalogAdminCredential ] [-CatalogPricingTier ] + [-VNetId ] [-Subnet ] [-PublicIP ] [-DataFlowComputeType ] + [-DataFlowCoreCount ] [-DataFlowTimeToLive ] [-SetupScriptContainerSasUri ] + [-Edition ] [-ExpressCustomSetup ] [-DataProxyIntegrationRuntimeName ] + [-DataProxyStagingLinkedServiceName ] [-DataProxyStagingPath ] + [-MaxParallelExecutionsPerNode ] [-LicenseType ] [-AuthKey ] [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByLinkedIntegrationRuntimeName +``` +Set-AzSynapseIntegrationRuntime [-ResourceGroupName ] -WorkspaceName -Name + [-Type ] [-Description ] -SharedIntegrationRuntimeResourceId [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByParentObject +``` +Set-AzSynapseIntegrationRuntime -Name -WorkspaceObject [-Type ] + [-Description ] [-Location ] [-NodeSize ] [-NodeCount ] + [-CatalogServerEndpoint ] [-CatalogAdminCredential ] [-CatalogPricingTier ] + [-VNetId ] [-Subnet ] [-PublicIP ] [-DataFlowComputeType ] + [-DataFlowCoreCount ] [-DataFlowTimeToLive ] [-SetupScriptContainerSasUri ] + [-Edition ] [-ExpressCustomSetup ] [-DataProxyIntegrationRuntimeName ] + [-DataProxyStagingLinkedServiceName ] [-DataProxyStagingPath ] + [-MaxParallelExecutionsPerNode ] [-LicenseType ] [-AuthKey ] [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByLinkedIntegrationRuntimeParentObject +``` +Set-AzSynapseIntegrationRuntime -Name -WorkspaceObject [-Type ] + [-Description ] -SharedIntegrationRuntimeResourceId [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByResourceId +``` +Set-AzSynapseIntegrationRuntime -ResourceId [-Type ] [-Description ] + [-Location ] [-NodeSize ] [-NodeCount ] [-CatalogServerEndpoint ] + [-CatalogAdminCredential ] [-CatalogPricingTier ] [-VNetId ] [-Subnet ] + [-PublicIP ] [-DataFlowComputeType ] [-DataFlowCoreCount ] + [-DataFlowTimeToLive ] [-SetupScriptContainerSasUri ] [-Edition ] + [-ExpressCustomSetup ] [-DataProxyIntegrationRuntimeName ] + [-DataProxyStagingLinkedServiceName ] [-DataProxyStagingPath ] + [-MaxParallelExecutionsPerNode ] [-LicenseType ] [-AuthKey ] [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByLinkedIntegrationRuntimeResourceId +``` +Set-AzSynapseIntegrationRuntime -ResourceId [-Type ] [-Description ] + -SharedIntegrationRuntimeResourceId [-Force] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] +``` + +### SetByIntegrationRuntimeObject +``` +Set-AzSynapseIntegrationRuntime -InputObject [-Type ] [-Description ] + [-Location ] [-NodeSize ] [-NodeCount ] [-CatalogServerEndpoint ] + [-CatalogAdminCredential ] [-CatalogPricingTier ] [-VNetId ] [-Subnet ] + [-PublicIP ] [-DataFlowComputeType ] [-DataFlowCoreCount ] + [-DataFlowTimeToLive ] [-SetupScriptContainerSasUri ] [-Edition ] + [-ExpressCustomSetup ] [-DataProxyIntegrationRuntimeName ] + [-DataProxyStagingLinkedServiceName ] [-DataProxyStagingPath ] + [-MaxParallelExecutionsPerNode ] [-LicenseType ] [-AuthKey ] [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### SetByLinkedIntegrationRuntimeObject +``` +Set-AzSynapseIntegrationRuntime -InputObject [-Type ] [-Description ] + -SharedIntegrationRuntimeResourceId [-Force] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] +``` + +## DESCRIPTION +The **Set-AzSynapseIntegrationRuntime** cmdlet updates an integration runtime with specific parameters. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Set-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' -Description 'New description' +``` + +The cmdlet updates the description of integration runtime named 'test-selfhost-ir'. + +### Example 2 +```powershell +PS C:\> Set-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' ` + -SharedIntegrationRuntimeResourceId '/subscriptions/b3ee3a7f-7614-4644-ad07-afa832620b4b/resourceGroups/rg-test-dfv2/providers/Microsoft.DataFactory/factories/test-df-eu2/integrationruntimes/test-selfhost-ir' -Type "SelfHosted" +``` + +The cmdlet adds the workspace to use the shared integration runtime. When using `-SharedIntegrationRuntimeResourceId` parameter the `-Type` must also be included. Note that the workspace need to be granted permission to use the integration runtime before running cmdlet. + +## PARAMETERS + +### -AuthKey +The authentication key of the self-hosted integration runtime. + +```yaml +Type: System.Security.SecureString +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogAdminCredential +The catalog database administrator credential of the integration runtime. + +```yaml +Type: System.Management.Automation.PSCredential +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogPricingTier +The catalog database pricing tier of the integration runtime. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CatalogServerEndpoint +The catalog database server endpoint of the integration runtime. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataFlowComputeType +Compute type of the data flow cluster which will execute data flow job. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataFlowCoreCount +Core count of the data flow cluster which will execute data flow job. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataFlowTimeToLive +Time to live (in minutes) setting of the data flow cluster which will execute data flow job. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataProxyIntegrationRuntimeName +The Self-Hosted Integration Runtime name which is used as a proxy. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataProxyStagingLinkedServiceName +The Azure Blob Storage Linked Service name that references the staging data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtime. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataProxyStagingPath +The path in staging data store to be used when moving data between Self-Hosted and Azure-SSIS Integration Runtimes, a default container will be used if unspecified. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +The integration runtime description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Edition +The edition for SSIS integration runtime which could be Standard or Enterprise, default is Standard if it is not specified. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: +Accepted values: Standard, Enterprise + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExpressCustomSetup +The express custom setup for SSIS integration runtime which could be used to setup configurations and 3rd party components without custom setup script. + +```yaml +Type: System.Collections.ArrayList +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force +Don't ask for confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: SetByIntegrationRuntimeObject, SetByLinkedIntegrationRuntimeObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LicenseType +The license type that you want to select for the SSIS IR. +There are two types: LicenseIncluded or BasePrice. +If you are qualified for the Azure Hybrid Use Benefit (AHUB) pricing, please select BasePrice. +If not, please select LicenseIncluded. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: +Accepted values: LicenseIncluded, BasePrice + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The integration runtime description. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxParallelExecutionsPerNode +Maximum parallel execution count per node for a managed dedicated integration runtime. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByLinkedIntegrationRuntimeName, SetByParentObject, SetByLinkedIntegrationRuntimeParentObject +Aliases: IntegrationRuntimeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NodeCount +Target nodes count of the integration runtime. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NodeSize +The integration runtime node size. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicIP +The static public IP addresses which the integration runtime will use. + +```yaml +Type: System.String[] +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: PublicIPs + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByLinkedIntegrationRuntimeName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: SetByResourceId, SetByLinkedIntegrationRuntimeResourceId +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetupScriptContainerSasUri +The SAS URI of the Azure blob container that contains the custom setup script. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedIntegrationRuntimeResourceId +The resource id of the shared self-hosted integration runtime. + +```yaml +Type: System.String +Parameter Sets: SetByLinkedIntegrationRuntimeName, SetByLinkedIntegrationRuntimeParentObject, SetByLinkedIntegrationRuntimeResourceId, SetByLinkedIntegrationRuntimeObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Subnet +The name of the subnet in the VNet. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: SubnetName + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The integration runtime type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Accepted values: Managed, SelfHosted + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VNetId +The ID of the VNet which the integration runtime will join. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByParentObject, SetByResourceId, SetByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: SetByIntegrationRuntimeName, SetByLinkedIntegrationRuntimeName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: SetByParentObject, SetByLinkedIntegrationRuntimeParentObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Sync-AzSynapseIntegrationRuntimeCredential.md b/src/Synapse/Synapse/help/Sync-AzSynapseIntegrationRuntimeCredential.md new file mode 100644 index 000000000000..4b96a0998a44 --- /dev/null +++ b/src/Synapse/Synapse/help/Sync-AzSynapseIntegrationRuntimeCredential.md @@ -0,0 +1,221 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/sync-azsynapseintegrationruntimecredential +schema: 2.0.0 +--- + +# Sync-AzSynapseIntegrationRuntimeCredential + +## SYNOPSIS +Synchronizes credentials among integration runtime nodes. + +## SYNTAX + +### StopByNameParameterSet (Default) +``` +Sync-AzSynapseIntegrationRuntimeCredential [-ResourceGroupName ] -WorkspaceName + -IntegrationRuntimeName [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### StopByParentObjectParameterSet +``` +Sync-AzSynapseIntegrationRuntimeCredential -IntegrationRuntimeName + -WorkspaceObject [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### StopByResourceIdParameterSet +``` +Sync-AzSynapseIntegrationRuntimeCredential -ResourceId [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### StopByInputObjectParameterSet +``` +Sync-AzSynapseIntegrationRuntimeCredential -InputObject [-Force] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The **Sync-AzSynapseIntegrationRuntimeCredential** cmdlet synchronizes on-premises credentials among integration runtime nodes, which forces the credentials to be identical in all nodes. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Sync-AzSynapseIntegrationRuntimeCredential -WorkspaceName ContosoWorkspace -IntegrationRuntimeName 'test-selfhost-ir' +``` + +Synchronizes credentials among integration runtime nodes. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Force +Don't ask for confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: StopByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IntegrationRuntimeName +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: StopByNameParameterSet, StopByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: StopByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: StopByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: StopByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: StopByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### System.Void + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntime.md b/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntime.md new file mode 100644 index 000000000000..d4d3520c49b8 --- /dev/null +++ b/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntime.md @@ -0,0 +1,240 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/update-azsynapseintegrationruntime +schema: 2.0.0 +--- + +# Update-AzSynapseIntegrationRuntime + +## SYNOPSIS +Updates an integration runtime. + +## SYNTAX + +### UpdateByNameParameterSet (Default) +``` +Update-AzSynapseIntegrationRuntime [-ResourceGroupName ] -WorkspaceName + -IntegrationRuntimeName [-AutoUpdate ] [-AutoUpdateDelayOffset ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateByParentObjectParameterSet +``` +Update-AzSynapseIntegrationRuntime -IntegrationRuntimeName -WorkspaceObject + [-AutoUpdate ] [-AutoUpdateDelayOffset ] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateByResourceIdParameterSet +``` +Update-AzSynapseIntegrationRuntime -ResourceId [-AutoUpdate ] + [-AutoUpdateDelayOffset ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateByInputObjectParameterSet +``` +Update-AzSynapseIntegrationRuntime -InputObject [-AutoUpdate ] + [-AutoUpdateDelayOffset ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +The **Update-AzSynapseIntegrationRuntime** cmdlet updates integration runtime properties. Currently the cmdlet only supports updating 'AutoUpdate' and 'AutoUpdateDelayOffset' for self-hosted integration runtime. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> $ts = New-TimeSpan -Hours 3 +PS C:\> Update-AzSynapseIntegrationRuntime -WorkspaceName ContosoWorkspace -Name 'test-selfhost-ir' -AutoUpdate Off -AutoUpdateDelayOffset $ts +``` + +The cmdlet updates self-hosted integration runtime named 'test-selfhost-ir'. + +## PARAMETERS + +### -AutoUpdate +Enable or disable the self-hosted integration runtime auto-update. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Accepted values: On, Off + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutoUpdateDelayOffset +The time of the day for the self-hosted integration runtime auto-update. + +```yaml +Type: System.Nullable`1[System.TimeSpan] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: UpdateByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IntegrationRuntimeName +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet, UpdateByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: UpdateByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: UpdateByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSelfHostedIntegrationRuntimeStatus + +## NOTES + +## RELATED LINKS diff --git a/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntimeNode.md b/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntimeNode.md new file mode 100644 index 000000000000..db294d424fab --- /dev/null +++ b/src/Synapse/Synapse/help/Update-AzSynapseIntegrationRuntimeNode.md @@ -0,0 +1,238 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Synapse.dll-Help.xml +Module Name: Az.Synapse +online version: https://docs.microsoft.com/en-us/powershell/module/az.synapse/update-azsynapseintegrationruntimenode +schema: 2.0.0 +--- + +# Update-AzSynapseIntegrationRuntimeNode + +## SYNOPSIS +Updates self-hosted integration runtime node. + +## SYNTAX + +### UpdateByNameParameterSet (Default) +``` +Update-AzSynapseIntegrationRuntimeNode [-ResourceGroupName ] -WorkspaceName + -IntegrationRuntimeName -Name -ConcurrentJobsLimit + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateByParentObjectParameterSet +``` +Update-AzSynapseIntegrationRuntimeNode -IntegrationRuntimeName -WorkspaceObject + -Name -ConcurrentJobsLimit [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateByResourceIdParameterSet +``` +Update-AzSynapseIntegrationRuntimeNode -ResourceId -Name -ConcurrentJobsLimit + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### UpdateByInputObjectParameterSet +``` +Update-AzSynapseIntegrationRuntimeNode -InputObject -Name + -ConcurrentJobsLimit [-DefaultProfile ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +The **Update-AzSynapseIntegrationRuntimeNode** cmdlet updates properties of self-hosted integration runtime node in a workspace. Currently only supports updating 'ConcurrentJobsLimit'. + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> Update-AzSynapseIntegrationRuntimeNode -WorkspaceName ContosoWorkspace -IntegrationRuntimeName 'test-selfhost-ir' -Name 'Node_1' -ConcurrentJobsLimit 3 +``` + +The cmdlet updates 'ConcurrentJobsLimit' to 3 for node 'Node_1' in self-hosted integration runtime 'test-selfhost-ir'. + +## PARAMETERS + +### -ConcurrentJobsLimit +The number of concurrent jobs permitted to run on the integration runtime node. +Values between 1 and maxConcurrentJobs are allowed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +The integration runtime object. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime +Parameter Sets: UpdateByInputObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IntegrationRuntimeName +The integration runtime name. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet, UpdateByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The integration runtime node name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource group name. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Resource identifier of Synapse integration runtime. + +```yaml +Type: System.String +Parameter Sets: UpdateByResourceIdParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceName +Name of Synapse workspace. + +```yaml +Type: System.String +Parameter Sets: UpdateByNameParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WorkspaceObject +workspace input object, usually passed through the pipeline. + +```yaml +Type: Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace +Parameter Sets: UpdateByParentObjectParameterSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSynapseWorkspace + +### Microsoft.Azure.Commands.Synapse.Models.PSIntegrationRuntime + +## OUTPUTS + +### Microsoft.Azure.Commands.Synapse.Models.PSSelfHostedIntegrationRuntimeStatus + +## NOTES + +## RELATED LINKS