/// <summary> /// Lists the endpoints and endpoint attributes for devices in a supported push notification /// service, such as GCM and APNS. The results for <code>ListEndpointsByPlatformApplication</code> /// are paginated and return a limited list of endpoints, up to 100. If additional /// records are available after the first page results, then a NextToken string will be /// returned. To receive the next page, you call <code>ListEndpointsByPlatformApplication</code> /// again using the NextToken string received from the previous call. When there /// are no more records to return, NextToken will be null. 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 ListEndpointsByPlatformApplication service method.</param> /// /// <returns>The response from the ListEndpointsByPlatformApplication 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> /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException"> /// Indicates that the requested resource does not exist. /// </exception> public ListEndpointsByPlatformApplicationResponse ListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance; return Invoke<ListEndpointsByPlatformApplicationRequest,ListEndpointsByPlatformApplicationResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEndpointsByPlatformApplication 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 EndListEndpointsByPlatformApplication /// operation.</returns> public IAsyncResult BeginListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request, AsyncCallback callback, object state) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance; return BeginInvoke<ListEndpointsByPlatformApplicationRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEndpointsByPlatformApplication 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<ListEndpointsByPlatformApplicationResponse> ListEndpointsByPlatformApplicationAsync(ListEndpointsByPlatformApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance; return InvokeAsync<ListEndpointsByPlatformApplicationRequest,ListEndpointsByPlatformApplicationResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para>The <c>ListEndpointsByPlatformApplication</c> action lists the endpoints and endpoint attributes for devices in a supported push /// notification service, such as GCM and APNS. The results for <c>ListEndpointsByPlatformApplication</c> are paginated and return a limited /// list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To /// receive the next page, you call <c>ListEndpointsByPlatformApplication</c> again using the NextToken string received from the previous call. /// When there are no more records to return, NextToken will be null. 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 /// ListEndpointsByPlatformApplication service method on AmazonSimpleNotificationService.</param> /// /// <returns>The response from the ListEndpointsByPlatformApplication service method, as returned by AmazonSimpleNotificationService.</returns> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> public ListEndpointsByPlatformApplicationResponse ListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request) { var task = ListEndpointsByPlatformApplicationAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.ListEndpointsByPlatformApplication"/> /// </summary> /// /// <param name="listEndpointsByPlatformApplicationRequest">Container for the necessary parameters to execute the /// ListEndpointsByPlatformApplication 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> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking /// EndListEndpointsByPlatformApplication operation.</returns> public IAsyncResult BeginListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest, AsyncCallback callback, object state) { return invokeListEndpointsByPlatformApplication(listEndpointsByPlatformApplicationRequest, callback, state, false); }
IAsyncResult invokeListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new ListEndpointsByPlatformApplicationRequestMarshaller().Marshall(listEndpointsByPlatformApplicationRequest); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>The <c>ListEndpointsByPlatformApplication</c> action lists the endpoints and endpoint attributes for devices in a supported push /// notification service, such as GCM and APNS. The results for <c>ListEndpointsByPlatformApplication</c> are paginated and return a limited /// list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To /// receive the next page, you call <c>ListEndpointsByPlatformApplication</c> again using the NextToken string received from the previous call. /// When there are no more records to return, NextToken will be null. 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="listEndpointsByPlatformApplicationRequest">Container for the necessary parameters to execute the /// ListEndpointsByPlatformApplication service method on AmazonSimpleNotificationService.</param> /// /// <returns>The response from the ListEndpointsByPlatformApplication service method, as returned by AmazonSimpleNotificationService.</returns> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" /> /// <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<ListEndpointsByPlatformApplicationResponse> ListEndpointsByPlatformApplicationAsync(ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, ListEndpointsByPlatformApplicationRequest, ListEndpointsByPlatformApplicationResponse>(listEndpointsByPlatformApplicationRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
public static void SNSMobilePushAPIsListApplicationsEndpoints() { #region SNSMobilePushAPIsListApplicationsEndpoints var snsClient = new AmazonSimpleNotificationServiceClient(); var appsResponse = snsClient.ListPlatformApplications(); foreach (var app in appsResponse.PlatformApplications) { Console.WriteLine(); var appAttrsRequest = new GetPlatformApplicationAttributesRequest { PlatformApplicationArn = app.PlatformApplicationArn }; var appAttrsResponse = snsClient.GetPlatformApplicationAttributes(appAttrsRequest); var endpointsByAppRequest = new ListEndpointsByPlatformApplicationRequest { PlatformApplicationArn = app.PlatformApplicationArn }; var endpointsByAppResponse = snsClient.ListEndpointsByPlatformApplication( endpointsByAppRequest); Console.WriteLine("Application: " + app.PlatformApplicationArn); Console.WriteLine(" Properties: "); foreach (var attr in appAttrsResponse.Attributes) { Console.WriteLine(" " + attr.Key + ": " + attr.Value); } Console.WriteLine(" Endpoints: "); foreach (var endpoint in endpointsByAppResponse.Endpoints) { Console.WriteLine(" ARN: " + endpoint.EndpointArn); Console.WriteLine(" Attributes: "); foreach (var attr in endpoint.Attributes) { Console.WriteLine(" " + attr.Key + ": " + attr.Value); } } } #endregion Console.ReadLine(); }
/// <summary> /// Paginator for ListEndpointsByPlatformApplication operation ///</summary> public IListEndpointsByPlatformApplicationPaginator ListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request) { return(new ListEndpointsByPlatformApplicationPaginator(this.client, request)); }
internal ListEndpointsByPlatformApplicationPaginator(IAmazonSimpleNotificationService client, ListEndpointsByPlatformApplicationRequest request) { this._client = client; this._request = request; }
private Amazon.SimpleNotificationService.Model.ListEndpointsByPlatformApplicationResponse CallAWSServiceOperation(IAmazonSimpleNotificationService client, Amazon.SimpleNotificationService.Model.ListEndpointsByPlatformApplicationRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Notification Service (SNS)", "ListEndpointsByPlatformApplication"); try { #if DESKTOP return(client.ListEndpointsByPlatformApplication(request)); #elif CORECLR return(client.ListEndpointsByPlatformApplicationAsync(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; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute // create request and set iteration invariants var request = new Amazon.SimpleNotificationService.Model.ListEndpointsByPlatformApplicationRequest(); if (cmdletContext.PlatformApplicationArn != null) { request.PlatformApplicationArn = cmdletContext.PlatformApplicationArn; } // Initialize loop variant and commence piping var _nextToken = cmdletContext.NextToken; var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); do { request.NextToken = _nextToken; CmdletOutput output; try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; if (!useParameterSelect) { pipelineOutput = cmdletContext.Select(response, this); } output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; _nextToken = response.NextToken; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } ProcessOutput(output); } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken)); if (useParameterSelect) { WriteObject(cmdletContext.Select(null, this)); } return(null); }
/// <summary> /// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEndpointsByPlatformApplication 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 ListEndpointsByPlatformApplicationAsync(ListEndpointsByPlatformApplicationRequest request, AmazonServiceCallback<ListEndpointsByPlatformApplicationRequest, ListEndpointsByPlatformApplicationResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<ListEndpointsByPlatformApplicationRequest,ListEndpointsByPlatformApplicationResponse> responseObject = new AmazonServiceResult<ListEndpointsByPlatformApplicationRequest,ListEndpointsByPlatformApplicationResponse>((ListEndpointsByPlatformApplicationRequest)req, (ListEndpointsByPlatformApplicationResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<ListEndpointsByPlatformApplicationRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// <para>The <c>ListEndpointsByPlatformApplication</c> action lists the endpoints and endpoint attributes for devices in a supported push /// notification service, such as GCM and APNS. The results for <c>ListEndpointsByPlatformApplication</c> are paginated and return a limited /// list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To /// receive the next page, you call <c>ListEndpointsByPlatformApplication</c> again using the NextToken string received from the previous call. /// When there are no more records to return, NextToken will be null. 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 /// ListEndpointsByPlatformApplication service method on AmazonSimpleNotificationService.</param> /// /// <returns>The response from the ListEndpointsByPlatformApplication service method, as returned by AmazonSimpleNotificationService.</returns> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> public ListEndpointsByPlatformApplicationResponse ListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request) { var task = ListEndpointsByPlatformApplicationAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>The <c>ListEndpointsByPlatformApplication</c> action lists the endpoints and endpoint attributes for devices in a supported push /// notification service, such as GCM and APNS. The results for <c>ListEndpointsByPlatformApplication</c> are paginated and return a limited /// list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To /// receive the next page, you call <c>ListEndpointsByPlatformApplication</c> again using the NextToken string received from the previous call. /// When there are no more records to return, NextToken will be null. 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="listEndpointsByPlatformApplicationRequest">Container for the necessary parameters to execute the /// ListEndpointsByPlatformApplication service method on AmazonSimpleNotificationService.</param> /// /// <returns>The response from the ListEndpointsByPlatformApplication service method, as returned by AmazonSimpleNotificationService.</returns> /// /// <exception cref="NotFoundException"/> /// <exception cref="AuthorizationErrorException"/> /// <exception cref="InternalErrorException"/> /// <exception cref="InvalidParameterException"/> public ListEndpointsByPlatformApplicationResponse ListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest) { IAsyncResult asyncResult = invokeListEndpointsByPlatformApplication(listEndpointsByPlatformApplicationRequest, null, null, true); return EndListEndpointsByPlatformApplication(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.ListEndpointsByPlatformApplication"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListEndpointsByPlatformApplication 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<ListEndpointsByPlatformApplicationResponse> ListEndpointsByPlatformApplicationAsync(ListEndpointsByPlatformApplicationRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.GetInstance(); return Invoke<IRequest, ListEndpointsByPlatformApplicationRequest, ListEndpointsByPlatformApplicationResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeListEndpointsByPlatformApplication(ListEndpointsByPlatformApplicationRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new ListEndpointsByPlatformApplicationRequestMarshaller(); var unmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }