public override void ExecuteCmdlet() { string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File)); Name = ResolveResourceName(rawJsonContent, Name, "Job"); if (Name != null && string.IsNullOrWhiteSpace(Name)) { throw new ArgumentException(Resources.JobNameCannotBeEmpty); } CreatePSJobParameter parameter = new CreatePSJobParameter { ResourceGroupName = ResourceGroupName, JobName = Name, RawJsonContent = rawJsonContent, Force = Force.IsPresent, ConfirmAction = ConfirmAction }; var result = StreamAnalyticsClient.CreatePSJob(parameter); if (result != null) { WriteObject(result); } }
public override void ExecuteCmdlet() { string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File)); Name = ResolveResourceName(rawJsonContent, Name, "Job"); CreatePSJobParameter parameter = new CreatePSJobParameter { ResourceGroupName = ResourceGroupName, JobName = Name, RawJsonContent = rawJsonContent, Force = Force.IsPresent, ConfirmAction = ConfirmAction }; WriteObject(StreamAnalyticsClient.CreatePSJob(parameter)); }