internal AddTagsToStreamResponse AddTagsToStream(AddTagsToStreamRequest request) { var marshaller = new AddTagsToStreamRequestMarshaller(); var unmarshaller = AddTagsToStreamResponseUnmarshaller.Instance; return(Invoke <AddTagsToStreamRequest, AddTagsToStreamResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the AddTagsToStream operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddTagsToStream 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 <AddTagsToStreamResponse> AddTagsToStreamAsync(AddTagsToStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddTagsToStreamRequestMarshaller(); var unmarshaller = AddTagsToStreamResponseUnmarshaller.Instance; return(InvokeAsync <AddTagsToStreamRequest, AddTagsToStreamResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Applies the set of tags to the named Kinesis stream. /// </summary> /// <param name="client">The initialized Kinesis client.</param> /// <param name="streamName">The name of the Kinesis stream to which /// the tags will be attached.</param> /// <param name="tags">A sictionary containing key/value pairs which /// will be used to create the Kinesis tags.</param> /// <returns>A Boolean value which represents the success or failure /// of AddTagsToStreamAsync.</returns> public static async Task <bool> ApplyTagsToStreamAsync(IAmazonKinesis client, string streamName, Dictionary <string, string> tags) { var request = new AddTagsToStreamRequest { StreamName = streamName, Tags = tags, }; var response = await client.AddTagsToStreamAsync(request); return(response.HttpStatusCode == System.Net.HttpStatusCode.OK); }
/// <summary> /// Initiates the asynchronous execution of the AddTagsToStream operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddTagsToStream operation on AmazonKinesisClient.</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 AddTagsToStreamAsync(AddTagsToStreamRequest request, AmazonServiceCallback <AddTagsToStreamRequest, AddTagsToStreamResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new AddTagsToStreamRequestMarshaller(); var unmarshaller = AddTagsToStreamResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <AddTagsToStreamRequest, AddTagsToStreamResponse> responseObject = new AmazonServiceResult <AddTagsToStreamRequest, AddTagsToStreamResponse>((AddTagsToStreamRequest)req, (AddTagsToStreamResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <AddTagsToStreamRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
public async Task <AddTagsToStreamResponse> AddTagsToStreamAsync(Dictionary <string, string> tags, string streamName = null) { if (string.IsNullOrEmpty(streamName) && string.IsNullOrEmpty(_streamName)) { throw new Exception("Please specify a stream name to add tags"); } if (tags == null || tags.Count == 0 || tags.Count > 10) { throw new Exception("Please create a tag dictionary that's between 0 and 10 in size"); } var addTagsRequest = new AddTagsToStreamRequest() { StreamName = streamName ?? _streamName, Tags = tags }; var response = await _client.AddTagsToStreamAsync(addTagsRequest, CancellationToken.None); return(response); }
public AddTagsToStreamResponse AddTagsToStream(Dictionary <string, string> tags, string streamName = null) { if (string.IsNullOrEmpty(streamName) && string.IsNullOrEmpty(_streamName)) { throw new Exception("Please specify a stream name to add tags"); } if (tags == null || tags.Count == 0 || tags.Count > 10) { throw new Exception("Please create a tag dictionary that's between 0 and 10 in size"); } var addTagsRequest = new AddTagsToStreamRequest() { StreamName = streamName ?? _streamName, Tags = tags }; var response = AsyncHelper.RunSync(() => _client.AddTagsToStreamAsync(addTagsRequest)); return(response); }
public void AddTagsToStreamAsync(AddTagsToStreamRequest request, AmazonServiceCallback <AddTagsToStreamRequest, AddTagsToStreamResponse> callback, AsyncOptions options = null) { throw new System.NotImplementedException(); }