public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AWSSupport.Model.AddCommunicationToCaseRequest(); if (cmdletContext.AttachmentSetId != null) { request.AttachmentSetId = cmdletContext.AttachmentSetId; } if (cmdletContext.CaseId != null) { request.CaseId = cmdletContext.CaseId; } if (cmdletContext.CcEmailAddress != null) { request.CcEmailAddresses = cmdletContext.CcEmailAddress; } if (cmdletContext.CommunicationBody != null) { request.CommunicationBody = cmdletContext.CommunicationBody; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
IAsyncResult invokeAddCommunicationToCase(AddCommunicationToCaseRequest addCommunicationToCaseRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new AddCommunicationToCaseRequestMarshaller().Marshall(addCommunicationToCaseRequest); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the AddCommunicationToCase operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.AddCommunicationToCase"/> /// </summary> /// /// <param name="addCommunicationToCaseRequest">Container for the necessary parameters to execute the AddCommunicationToCase operation on /// AmazonAWSSupport.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking /// EndAddCommunicationToCase operation.</returns> public IAsyncResult BeginAddCommunicationToCase(AddCommunicationToCaseRequest addCommunicationToCaseRequest, AsyncCallback callback, object state) { return invokeAddCommunicationToCase(addCommunicationToCaseRequest, callback, state, false); }
/// <summary> /// <para>Adds additional customer communication to an AWS Support case. You use the <c>CaseId</c> value to identify the case to add /// communication to. You can list a set of email addresses to copy on the communication using the <c>CcEmailAddresses</c> value. The /// <c>CommunicationBody</c> value contains the text of the communication.</para> <para>The response indicates the success or failure of the /// request.</para> <para>This operation implements a subset of the behavior on the AWS Support <a href="https://aws.amazon.com/support" >Your /// Support Cases</a> web form.</para> /// </summary> /// /// <param name="addCommunicationToCaseRequest">Container for the necessary parameters to execute the AddCommunicationToCase service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the AddCommunicationToCase service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="InternalServerErrorException"/> /// <exception cref="CaseIdNotFoundException"/> public AddCommunicationToCaseResponse AddCommunicationToCase(AddCommunicationToCaseRequest addCommunicationToCaseRequest) { IAsyncResult asyncResult = invokeAddCommunicationToCase(addCommunicationToCaseRequest, null, null, true); return EndAddCommunicationToCase(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the AddCommunicationToCase operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddCommunicationToCase operation on AmazonAWSSupportClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddCommunicationToCase /// operation.</returns> public IAsyncResult BeginAddCommunicationToCase(AddCommunicationToCaseRequest request, AsyncCallback callback, object state) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.Instance; return BeginInvoke<AddCommunicationToCaseRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Adds additional customer communication to an AWS Support case. You use the <code>CaseId</code> /// value to identify the case to add communication to. You can list a set of email addresses /// to copy on the communication using the <code>CcEmailAddresses</code> value. The <code>CommunicationBody</code> /// value contains the text of the communication. /// /// /// <para> /// The response indicates the success or failure of the request. /// </para> /// /// <para> /// This operation implements a subset of the features of the AWS Support Center. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddCommunicationToCase service method.</param> /// /// <returns>The response from the AddCommunicationToCase service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.AttachmentSetExpiredException"> /// The expiration time of the attachment set has passed. The set expires 1 hour after /// it is created. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.AttachmentSetIdNotFoundException"> /// An attachment set with the specified ID could not be found. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.CaseIdNotFoundException"> /// The requested <code>CaseId</code> could not be located. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public AddCommunicationToCaseResponse AddCommunicationToCase(AddCommunicationToCaseRequest request) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.Instance; return Invoke<AddCommunicationToCaseRequest,AddCommunicationToCaseResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para>This action adds additional customer communication to an AWS Support case. You use the <i>CaseId</i> value to identify the case to /// which you want to add communication. You can list a set of email addresses to copy on the communication using the <i>CcEmailAddresses</i> /// value. The <i>CommunicationBody</i> value contains the text of the communication.</para> <para>This action's response indicates the success /// or failure of the request.</para> <para>This action implements a subset of the behavior on the AWS Support <a href="https://aws.amazon.com/support">Your Support Cases</a> web form.</para> /// </summary> /// /// <param name="addCommunicationToCaseRequest">Container for the necessary parameters to execute the AddCommunicationToCase service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the AddCommunicationToCase service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> /// <exception cref="T:Amazon.AWSSupport.Model.CaseIdNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<AddCommunicationToCaseResponse> AddCommunicationToCaseAsync(AddCommunicationToCaseRequest addCommunicationToCaseRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, AddCommunicationToCaseRequest, AddCommunicationToCaseResponse>(addCommunicationToCaseRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal AddCommunicationToCaseResponse AddCommunicationToCase(AddCommunicationToCaseRequest request) { var task = AddCommunicationToCaseAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the AddCommunicationToCase operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddCommunicationToCase 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<AddCommunicationToCaseResponse> AddCommunicationToCaseAsync(AddCommunicationToCaseRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.Instance; return InvokeAsync<AddCommunicationToCaseRequest,AddCommunicationToCaseResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the AddCommunicationToCase operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.AddCommunicationToCase"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddCommunicationToCase 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<AddCommunicationToCaseResponse> AddCommunicationToCaseAsync(AddCommunicationToCaseRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.GetInstance(); return Invoke<IRequest, AddCommunicationToCaseRequest, AddCommunicationToCaseResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Adds additional customer communication to an AWS Support case. You use the <c>CaseId</c> value to identify the case to add /// communication to. You can list a set of email addresses to copy on the communication using the <c>CcEmailAddresses</c> value. The /// <c>CommunicationBody</c> value contains the text of the communication.</para> <para>The response indicates the success or failure of the /// request.</para> <para>This operation implements a subset of the behavior on the AWS Support <a href="https://aws.amazon.com/support">Your /// Support Cases</a> web form.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddCommunicationToCase service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the AddCommunicationToCase service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> /// <exception cref="T:Amazon.AWSSupport.Model.CaseIdNotFoundException" /> public AddCommunicationToCaseResponse AddCommunicationToCase(AddCommunicationToCaseRequest request) { var task = AddCommunicationToCaseAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
private Amazon.AWSSupport.Model.AddCommunicationToCaseResponse CallAWSServiceOperation(IAmazonAWSSupport client, Amazon.AWSSupport.Model.AddCommunicationToCaseRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Support", "AddCommunicationToCase"); try { #if DESKTOP return(client.AddCommunicationToCase(request)); #elif CORECLR return(client.AddCommunicationToCaseAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
IAsyncResult invokeAddCommunicationToCase(AddCommunicationToCaseRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new AddCommunicationToCaseRequestMarshaller(); var unmarshaller = AddCommunicationToCaseResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }