Microsoft.Azure.Commands.DataFactories.DataFactoryClient.DeleteLinkedService C# (CSharp) Method

DeleteLinkedService() public method

public DeleteLinkedService ( string resourceGroupName, string dataFactoryName, string linkedServiceName ) : HttpStatusCode
resourceGroupName string
dataFactoryName string
linkedServiceName string
return HttpStatusCode
        public virtual HttpStatusCode DeleteLinkedService(string resourceGroupName, string dataFactoryName, string linkedServiceName)
        {
            AzureOperationResponse response = DataPipelineManagementClient.LinkedServices.Delete(resourceGroupName,
                dataFactoryName, linkedServiceName);

            return response.StatusCode;
        }

Usage Example

        private void ExecuteDelete()
        {
            HttpStatusCode response = DataFactoryClient.DeleteLinkedService(ResourceGroupName, DataFactoryName, Name);

            if (response == HttpStatusCode.NoContent)
            {
                WriteWarning(string.Format(
                                 CultureInfo.InvariantCulture, Resources.LinkedServiceNotFound, Name, DataFactoryName));
            }
        }