public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SimpleNotificationService.Model.DeletePlatformApplicationRequest(); if (cmdletContext.PlatformApplicationArn != null) { request.PlatformApplicationArn = cmdletContext.PlatformApplicationArn; } 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); }
/// <summary> /// Initiates the asynchronous execution of the DeletePlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.DeletePlatformApplication"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication 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<DeletePlatformApplicationResponse> DeletePlatformApplicationAsync(DeletePlatformApplicationRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeletePlatformApplicationRequest, DeletePlatformApplicationResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>The <c>DeletePlatformApplication</c> action deletes a platform application object for one of the supported push notification services, /// such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS /// Mobile Push Notifications</a> . /// </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication service /// method on AmazonSimpleNotificationService.</param> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> public DeletePlatformApplicationResponse DeletePlatformApplication(DeletePlatformApplicationRequest request) { var task = DeletePlatformApplicationAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.SimpleNotificationService.Model.DeletePlatformApplicationResponse CallAWSServiceOperation(IAmazonSimpleNotificationService client, Amazon.SimpleNotificationService.Model.DeletePlatformApplicationRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Notification Service (SNS)", "DeletePlatformApplication"); try { #if DESKTOP return(client.DeletePlatformApplication(request)); #elif CORECLR return(client.DeletePlatformApplicationAsync(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; } }
/// <summary> /// Deletes a platform application object for one of the supported push notification services, /// such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using /// Amazon SNS Mobile Push Notifications</a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication service method.</param> /// /// <returns>The response from the DeletePlatformApplication service method, as returned by SimpleNotificationService.</returns> /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException"> /// Indicates that the user has been denied access to the requested resource. /// </exception> /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException"> /// Indicates an internal service error. /// </exception> /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException"> /// Indicates that a request parameter does not comply with the associated constraints. /// </exception> public DeletePlatformApplicationResponse DeletePlatformApplication(DeletePlatformApplicationRequest request) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance; return Invoke<DeletePlatformApplicationRequest,DeletePlatformApplicationResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeletePlatformApplication operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication operation on AmazonSimpleNotificationServiceClient.</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 EndDeletePlatformApplication /// operation.</returns> public IAsyncResult BeginDeletePlatformApplication(DeletePlatformApplicationRequest request, AsyncCallback callback, object state) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance; return BeginInvoke<DeletePlatformApplicationRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the DeletePlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication 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<DeletePlatformApplicationResponse> DeletePlatformApplicationAsync(DeletePlatformApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance; return InvokeAsync<DeletePlatformApplicationRequest,DeletePlatformApplicationResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para>The <c>DeletePlatformApplication</c> action deletes a platform application object for one of the supported push notification services, /// such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS /// Mobile Push Notifications</a> . /// </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication service /// method on AmazonSimpleNotificationService.</param> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> public DeletePlatformApplicationResponse DeletePlatformApplication(DeletePlatformApplicationRequest request) { var task = DeletePlatformApplicationAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the DeletePlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.DeletePlatformApplication"/> /// </summary> /// /// <param name="deletePlatformApplicationRequest">Container for the necessary parameters to execute the DeletePlatformApplication operation on /// AmazonSimpleNotificationService.</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> public IAsyncResult BeginDeletePlatformApplication(DeletePlatformApplicationRequest deletePlatformApplicationRequest, AsyncCallback callback, object state) { return invokeDeletePlatformApplication(deletePlatformApplicationRequest, callback, state, false); }
IAsyncResult invokeDeletePlatformApplication(DeletePlatformApplicationRequest deletePlatformApplicationRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeletePlatformApplicationRequestMarshaller().Marshall(deletePlatformApplicationRequest); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>The <c>DeletePlatformApplication</c> action deletes a platform application object for one of the supported push notification services, /// such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html" >Using Amazon SNS /// Mobile Push Notifications</a> . /// </para> /// </summary> /// /// <param name="deletePlatformApplicationRequest">Container for the necessary parameters to execute the DeletePlatformApplication service /// method on AmazonSimpleNotificationService.</param> /// /// <exception cref="AuthorizationErrorException"/> /// <exception cref="InternalErrorException"/> /// <exception cref="InvalidParameterException"/> public DeletePlatformApplicationResponse DeletePlatformApplication(DeletePlatformApplicationRequest deletePlatformApplicationRequest) { IAsyncResult asyncResult = invokeDeletePlatformApplication(deletePlatformApplicationRequest, null, null, true); return EndDeletePlatformApplication(asyncResult); }
/// <summary> /// <para>The <c>DeletePlatformApplication</c> action deletes a platform application object for one of the supported push notification services, /// such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS /// Mobile Push Notifications</a> . /// </para> /// </summary> /// /// <param name="deletePlatformApplicationRequest">Container for the necessary parameters to execute the DeletePlatformApplication service /// method on AmazonSimpleNotificationService.</param> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<DeletePlatformApplicationResponse> DeletePlatformApplicationAsync(DeletePlatformApplicationRequest deletePlatformApplicationRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeletePlatformApplicationRequest, DeletePlatformApplicationResponse>(deletePlatformApplicationRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Initiates the asynchronous execution of the DeletePlatformApplication operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeletePlatformApplication operation on AmazonSimpleNotificationServiceClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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> public void DeletePlatformApplicationAsync(DeletePlatformApplicationRequest request, AmazonServiceCallback<DeletePlatformApplicationRequest, DeletePlatformApplicationResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeletePlatformApplicationRequest,DeletePlatformApplicationResponse> responseObject = new AmazonServiceResult<DeletePlatformApplicationRequest,DeletePlatformApplicationResponse>((DeletePlatformApplicationRequest)req, (DeletePlatformApplicationResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeletePlatformApplicationRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
public static void SNSMobilePushAPIsDeletePlatformApplication() { #region SNSMobilePushAPIsDeletePlatformApplication var snsClient = new AmazonSimpleNotificationServiceClient(); var request = new DeletePlatformApplicationRequest { PlatformApplicationArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" + "app/GCM/TimeCardProcessingApplication" }; snsClient.DeletePlatformApplication(request); #endregion }
IAsyncResult invokeDeletePlatformApplication(DeletePlatformApplicationRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeletePlatformApplicationRequestMarshaller(); var unmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }