internal CreateDataFlowDebugSessionRequest(string computeType, int?coreCount, int?timeToLive, IntegrationRuntimeDebugResource integrationRuntime) { ComputeType = computeType; CoreCount = coreCount; TimeToLive = timeToLive; IntegrationRuntime = integrationRuntime; }
private IntegrationRuntimeDebugResource ConvertRequestFromJson(string requestFile) { var parameters = new IntegrationRuntimeDebugResource(); string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(requestFile)); if (!string.IsNullOrWhiteSpace(rawJsonContent)) { parameters = SafeJsonConvert.DeserializeObject <IntegrationRuntimeDebugResource>(rawJsonContent, DataFactoryClient.DataFactoryManagementClient.DeserializationSettings); } return(parameters); }
public override void ExecuteCmdlet() { ByResourceId(); ByFactoryObject(); CreateDataFlowDebugSessionRequest request = new CreateDataFlowDebugSessionRequest { TimeToLive = 60 }; if (!string.IsNullOrWhiteSpace(IntegrationRuntimeFile)) { IntegrationRuntimeDebugResource integrationRuntimeResource = this.ConvertRequestFromJson(IntegrationRuntimeFile); request.IntegrationRuntime = integrationRuntimeResource; } if (ShouldProcess(DataFactoryName, string.Format(Constants.HelpStartDataFlowDebugSessionContext, this.ResourceGroupName, this.DataFactoryName))) { WriteObject(DataFactoryClient.StartDebugSession(ResourceGroupName, DataFactoryName, request)); } }
public override void ExecuteCmdlet() { if (this.IsParameterBound(c => c.WorkspaceObject)) { this.WorkspaceName = this.WorkspaceObject.Name; } CreateDataFlowDebugSessionRequest request = new CreateDataFlowDebugSessionRequest { TimeToLive = 60 }; if (!string.IsNullOrWhiteSpace(IntegrationRuntimeFile)) { string rawJsonContent = SynapseAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(IntegrationRuntimeFile)); IntegrationRuntimeDebugResource createdataflowsessionrequest = JsonSerializer.Deserialize<IntegrationRuntimeDebugResource>(rawJsonContent); request.IntegrationRuntime = createdataflowsessionrequest; } if (this.ShouldProcess(this.WorkspaceName, String.Format(Resources.StartDataFlowDebugSession, this.WorkspaceName))) { WriteObject(new PSCreateDataFlowDebugSessionResponse(SynapseAnalyticsClient.CreateDataFlowDebugSession(request))); } }