SuspendPipeline() public method

public SuspendPipeline ( string resourceGroupName, string dataFactoryName, string pipelineName ) : void
resourceGroupName string
dataFactoryName string
pipelineName string
return void
        protected override void ProcessRecord()
        {
            if (ParameterSetName == ByFactoryObject)
            {
                if (DataFactory == null)
                {
                    throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid));
                }

                DataFactoryName   = DataFactory.DataFactoryName;
                ResourceGroupName = DataFactory.ResourceGroupName;
            }

            ConfirmAction(
                Force.IsPresent,
                string.Format(
                    CultureInfo.InvariantCulture,
                    "Are you sure you want to suspend pipeline '{0}' in data factory '{1}'?",
                    Name,
                    DataFactoryName),
                string.Format(
                    CultureInfo.InvariantCulture,
                    "Suspending pipeline '{0}' in data factory '{1}'.",
                    Name,
                    DataFactoryName),
                Name,
                () => DataFactoryClient.SuspendPipeline(ResourceGroupName, DataFactoryName, Name));

            WriteObject(true);
        }
Exemplo n.º 2
0
        public override void ExecuteCmdlet()
        {
            if (ParameterSetName == ByFactoryObject)
            {
                if (DataFactory == null)
                {
                    throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid));
                }

                DataFactoryName   = DataFactory.DataFactoryName;
                ResourceGroupName = DataFactory.ResourceGroupName;
            }

            ConfirmAction(
                string.Format(
                    CultureInfo.InvariantCulture,
                    "Suspending pipeline '{0}' in data factory '{1}'.",
                    Name,
                    DataFactoryName),
                Name,
                () => DataFactoryClient.SuspendPipeline(ResourceGroupName, DataFactoryName, Name));

            WriteObject(true);
        }