Exemple #1
0
        internal DeleteStreamingDistributionResponse DeleteStreamingDistribution(DeleteStreamingDistributionRequest request)
        {
            var marshaller   = new DeleteStreamingDistributionRequestMarshaller();
            var unmarshaller = DeleteStreamingDistributionResponseUnmarshaller.Instance;

            return(Invoke <DeleteStreamingDistributionRequest, DeleteStreamingDistributionResponse>(request, marshaller, unmarshaller));
        }
Exemple #2
0
        internal DeleteStreamingDistributionResponse DeleteStreamingDistribution(DeleteStreamingDistributionRequest request)
        {
            var task = DeleteStreamingDistributionAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
Exemple #3
0
 public DeleteStreamingDistributionResponse DeleteStreamingDistribution(DeleteStreamingDistributionRequest request)
 {
     if (request == null)
     {
         throw new ArgumentNullException("request", "The DeleteStreamingDistributionRequest specified is null!");
     }
     if (!request.IsSetId())
     {
         throw new ArgumentNullException("request", "The StreamingDistribution Id specified is null or empty!");
     }
     if (!request.IsSetETag())
     {
         throw new ArgumentNullException("request", "The StreamingDistribution ETag specified is null or empty!");
     }
     return(this.Invoke <DeleteStreamingDistributionResponse>(this.ConvertDeleteStreamingDistribution(request), request.Headers));
 }
Exemple #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteStreamingDistribution operation.
        /// <seealso cref="Amazon.CloudFront.IAmazonCloudFront"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteStreamingDistribution operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <DeleteStreamingDistributionResponse> DeleteStreamingDistributionAsync(DeleteStreamingDistributionRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteStreamingDistributionRequestMarshaller();
            var unmarshaller = DeleteStreamingDistributionResponseUnmarshaller.Instance;

            return(Invoke <IRequest, DeleteStreamingDistributionRequest, DeleteStreamingDistributionResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Exemple #5
0
        private IDictionary <CloudFrontQueryParameter, string> ConvertDeleteStreamingDistribution(DeleteStreamingDistributionRequest request)
        {
            IDictionary <CloudFrontQueryParameter, string> parameters = new Dictionary <CloudFrontQueryParameter, string>(5);

            parameters.Add(CloudFrontQueryParameter.Verb, CloudFrontConstants.DeleteVerb);
            parameters.Add(CloudFrontQueryParameter.Action, "DeleteStreamingDistribution");
            parameters.Add(CloudFrontQueryParameter.Id, request.Id);
            request.Headers["If-Match"] = request.ETag;
            this.AddCloudFrontQueryParameters(parameters, request.Headers);
            return(parameters);
        }