Example #1
0
        public override void ExecuteCmdlet()
        {
            string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

            Name = ResolveResourceName(rawJsonContent, Name, "Output");

            if (Name != null && string.IsNullOrWhiteSpace(Name))
            {
                throw new ArgumentException(Resources.OutputNameCannotBeEmpty);
            }

            CreatePSOutputParameter parameter = new CreatePSOutputParameter
            {
                ResourceGroupName = ResourceGroupName,
                JobName           = JobName,
                OutputName        = Name,
                RawJsonContent    = rawJsonContent,
                Force             = Force.IsPresent,
                ConfirmAction     = ConfirmAction
            };

            var result = StreamAnalyticsClient.CreatePSOutput(parameter);

            if (result != null)
            {
                WriteObject(result);
            }
        }
        public override void ExecuteCmdlet()
        {
            string rawJsonContent = StreamAnalyticsClient.ReadJsonFileContent(this.TryResolvePath(File));

            Name = ResolveResourceName(rawJsonContent, Name, "Output");

            CreatePSOutputParameter parameter = new CreatePSOutputParameter
            {
                ResourceGroupName = ResourceGroupName,
                JobName           = JobName,
                OutputName        = Name,
                RawJsonContent    = rawJsonContent,
                Force             = Force.IsPresent,
                ConfirmAction     = ConfirmAction
            };

            WriteObject(StreamAnalyticsClient.CreatePSOutput(parameter));
        }