Amazon.ElasticTranscoder.AmazonElasticTranscoderClient.DeletePipeline C# (CSharp) Method

DeletePipeline() public method

The DeletePipeline operation removes a pipeline.

You can only delete a pipeline that has never been used or that is not currently in use (doesn't contain any active jobs). If the pipeline is currently in use, DeletePipeline returns an error.

/// General authentication failure. The request was not signed correctly. /// /// /// /// Elastic Transcoder encountered an unexpected exception while trying to fulfill the /// request. /// /// The resource you are attempting to change is in use. For example, you are attempting /// to delete a pipeline that is currently in use. /// /// The requested resource does not exist or is not available. For example, the pipeline /// to which you're trying to add a job doesn't exist or is still being created. /// /// One or more required parameter values were not provided in the request. ///
public DeletePipeline ( DeletePipelineRequest request ) : DeletePipelineResponse
request Amazon.ElasticTranscoder.Model.DeletePipelineRequest Container for the necessary parameters to execute the DeletePipeline service method.
return Amazon.ElasticTranscoder.Model.DeletePipelineResponse
        public DeletePipelineResponse DeletePipeline(DeletePipelineRequest request)
        {
            var marshaller = new DeletePipelineRequestMarshaller();
            var unmarshaller = DeletePipelineResponseUnmarshaller.Instance;

            return Invoke<DeletePipelineRequest,DeletePipelineResponse>(request, marshaller, unmarshaller);
        }

Usage Example

Example #1
0
        // Test exception parsing with selected services
        public void TestExceptions()
        {
            var fakeData = "obviously-super-duper-fake-data";

            using (var client = new Amazon.Lightsail.AmazonLightsailClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.Lightsail.Model.NotFoundException>(() =>
                {
                    client.GetInstance(new Amazon.Lightsail.Model.GetInstanceRequest
                    {
                        InstanceName = fakeData
                    });
                });
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var client = new Amazon.ElasticTranscoder.AmazonElasticTranscoderClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.ElasticTranscoder.Model.ValidationException>(() =>
                {
                    client.DeletePipeline(new Amazon.ElasticTranscoder.Model.DeletePipelineRequest
                    {
                        Id = fakeData
                    });
                });
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var ddb = new Amazon.DynamoDBv2.AmazonDynamoDBClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.DynamoDBv2.Model.ResourceNotFoundException>(() => ddb.DescribeTable("fakey-mcfake-table"));
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var client = new Amazon.Pinpoint.AmazonPinpointClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.Pinpoint.Model.NotFoundException>(() =>
                {
                    client.DeleteCampaign(new Amazon.Pinpoint.Model.DeleteCampaignRequest
                    {
                        ApplicationId = fakeData,
                        CampaignId    = fakeData
                    });
                });
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var client = new Amazon.Batch.AmazonBatchClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.Batch.Model.ClientException>(() =>
                {
                    client.UpdateComputeEnvironment(new Amazon.Batch.Model.UpdateComputeEnvironmentRequest
                    {
                        ComputeEnvironment = fakeData
                    });
                });
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var client = new Amazon.Glacier.AmazonGlacierClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.Glacier.Model.ResourceNotFoundException>(() =>
                {
                    client.InitiateMultipartUpload(new Amazon.Glacier.Model.InitiateMultipartUploadRequest
                    {
                        AccountId          = "-",
                        ArchiveDescription = fakeData,
                        VaultName          = fakeData,
                        PartSize           = 123
                    });
                });
                Assert.AreEqual(ErrorType.Unknown, ex.ErrorType);
            }

            using (var client = new Amazon.IdentityManagement.AmazonIdentityManagementServiceClient())
            {
                var ex = AssertExtensions.ExpectException <Amazon.IdentityManagement.Model.NoSuchEntityException>(() =>
                {
                    client.AttachGroupPolicy(new Amazon.IdentityManagement.Model.AttachGroupPolicyRequest
                    {
                        PolicyArn = fakeData,
                        GroupName = fakeData
                    });
                });
                Assert.AreEqual(ErrorType.Sender, ex.ErrorType);
            }
        }