/// <summary> /// Initiates the asynchronous execution of the CreateTopic operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateTopic 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 <CreateTopicResponse> CreateTopicAsync(CreateTopicRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return(Invoke <IRequest, CreateTopicRequest, CreateTopicResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
internal CreateTopicResponse CreateTopic(CreateTopicRequest request) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return(Invoke <CreateTopicRequest, CreateTopicResponse>(request, marshaller, unmarshaller)); }
/// <inheritdoc/> public IAsyncResult BeginCreateTopic(CreateTopicRequest request, AsyncCallback callback, object state) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return(BeginInvoke <CreateTopicRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <inheritdoc/> public Topic CreateTopic(CreateTopicRequest request) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; var response = Invoke <CreateTopicRequest, CreateTopicResponse>(request, marshaller, unmarshaller); return(new Topic(response.TopicUrl.Substring(response.TopicUrl.LastIndexOf("/") + 1), this)); }
public async Task <Topic> CreateTopicAsync(CreateTopicRequest request) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; var response = await InvokeAsync <CreateTopicRequest, CreateTopicResponse>(request, marshaller, unmarshaller).ConfigureAwait(false); return(new Topic(response.TopicUrl.Substring(response.TopicUrl.LastIndexOf("/") + 1), this)); }
public void CreateTopicMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute <CreateTopicRequest>(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateTopicResponseUnmarshaller.Instance.Unmarshall(context) as CreateTopicResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateTopic operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.CreateTopic"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateTopic 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<CreateTopicResponse> CreateTopicAsync(CreateTopicRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateTopicRequest, CreateTopicResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateTopic operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateTopic 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 EndCreateTopic /// operation.</returns> public IAsyncResult BeginCreateTopic(CreateTopicRequest request, AsyncCallback callback, object state) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return BeginInvoke<CreateTopicRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Creates a topic to which notifications can be published. Users can create at most /// 3000 topics. For more information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. /// This action is idempotent, so if the requester already owns a topic with the /// specified name, that topic's ARN is returned without creating a new topic. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateTopic service method.</param> /// /// <returns>The response from the CreateTopic 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.TopicLimitExceededException"> /// Indicates that the customer already owns the maximum allowed number of topics. /// </exception> public CreateTopicResponse CreateTopic(CreateTopicRequest request) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return Invoke<CreateTopicRequest,CreateTopicResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateTopic operation. /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateTopic 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<CreateTopicResponse> CreateTopicAsync(CreateTopicRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return InvokeAsync<CreateTopicRequest,CreateTopicResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeCreateTopic(CreateTopicRequest createTopicRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateTopicRequestMarshaller().Marshall(createTopicRequest); var unmarshaller = CreateTopicResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>The <c>CreateTopic</c> action creates a topic to which notifications can be published. Users can create at most 100 topics. For more /// information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a> . /// This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without /// creating a new topic.</para> /// </summary> /// /// <param name="createTopicRequest">Container for the necessary parameters to execute the CreateTopic service method on /// AmazonSimpleNotificationService.</param> /// /// <returns>The response from the CreateTopic service method, as returned by AmazonSimpleNotificationService.</returns> /// /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" /> /// <exception cref="T:Amazon.SimpleNotificationService.Model.TopicLimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<CreateTopicResponse> CreateTopicAsync(CreateTopicRequest createTopicRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateTopicRequest, CreateTopicResponse>(createTopicRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
public void CreateTopicMarshallTest() { var operation = service_model.FindOperation("CreateTopic"); var request = InstantiateClassGenerator.Execute<CreateTopicRequest>(); var marshaller = new CreateTopicRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateTopicResponseUnmarshaller.Instance.Unmarshall(context) as CreateTopicResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateTopic operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateTopic 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 CreateTopicAsync(CreateTopicRequest request, AmazonServiceCallback<CreateTopicRequest, CreateTopicResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<CreateTopicRequest,CreateTopicResponse> responseObject = new AmazonServiceResult<CreateTopicRequest,CreateTopicResponse>((CreateTopicRequest)req, (CreateTopicResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<CreateTopicRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
IAsyncResult invokeCreateTopic(CreateTopicRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateTopicRequestMarshaller(); var unmarshaller = CreateTopicResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }