Container for the parameters to the PutRecord operation. Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write multiple data records into a delivery stream, use PutRecordBatch. Applications using these operations are referred to as producers.

By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB per second. Note that if you use PutRecord and PutRecordBatch, the limits are an aggregate across these two operations for each delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Firehose Limits.

You must specify the name of the delivery stream and the data record when using PutRecord. The data record consists of a data blob that can be up to 1,000 KB in size, and any kind of data, for example, a segment from a log file, geographic location data, web site clickstream data, etc.

Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the destination, a common solution is to use delimiters in the data, such as a newline (\n) or some other character unique within the data. This allows the consumer application(s) to parse individual data items when reading the data from the destination.

The PutRecord operation returns a RecordId, which is a unique string assigned to each record. Producer applications can use this ID for purposes such as auditability and investigation.

If the PutRecord operation throws a ServiceUnavailableException, back off and retry. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery stream.

Data records sent to Firehose are stored for 24 hours from the time they are added to a delivery stream as it attempts to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no longer available.

Inheritance: AmazonKinesisFirehoseRequest
        /// <summary>
        /// Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write
        /// multiple data records into a delivery stream, use <a>PutRecordBatch</a>. Applications
        /// using these operations are referred to as producers.
        /// 
        ///  
        /// <para>
        /// By default, each delivery stream can take in up to 2,000 transactions per second,
        /// 5,000 records per second, or 5 MB per second. Note that if you use <a>PutRecord</a>
        /// and <a>PutRecordBatch</a>, the limits are an aggregate across these two operations
        /// for each delivery stream. For more information about limits and how to request an
        /// increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>. 
        /// </para>
        ///  
        /// <para>
        /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
        /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
        /// kind of data, for example, a segment from a log file, geographic location data, web
        /// site clickstream data, etc.
        /// </para>
        ///  
        /// <para>
        /// Amazon Kinesis Firehose buffers records before delivering them to the destination.
        /// To disambiguate the data blobs at the destination, a common solution is to use delimiters
        /// in the data, such as a newline (<code>\n</code>) or some other character unique within
        /// the data. This allows the consumer application(s) to parse individual data items when
        /// reading the data from the destination.
        /// </para>
        ///  
        /// <para>
        /// Amazon Kinesis Firehose does not maintain data record ordering. If the destination
        /// data needs to be re-ordered by the consumer application, the producer should include
        /// some form of sequence number in each data record. 
        /// </para>
        ///  
        /// <para>
        /// The <a>PutRecord</a> operation returns a <code>RecordId</code>, which is a unique
        /// string assigned to each record. Producer applications can use this ID for purposes
        /// such as auditability and investigation.
        /// </para>
        ///  
        /// <para>
        /// If the <a>PutRecord</a> operation throws a <code>ServiceUnavailableException</code>,
        /// back off and retry. If the exception persists, it is possible that the throughput
        /// limits have been exceeded for the delivery stream. 
        /// </para>
        ///  
        /// <para>
        /// Data records sent to Amazon Kinesis Firehose are stored for 24 hours from the time
        /// they are added to a delivery stream as it attempts to send the records to the destination.
        /// If the destination is unreachable for more than 24 hours, the data is no longer available.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutRecord service method.</param>
        /// 
        /// <returns>The response from the PutRecord service method, as returned by KinesisFirehose.</returns>
        /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
        /// The specified input parameter has an value that is not valid.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
        /// The specified resource could not be found.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
        /// The service is unavailable, back off and retry the operation. If you continue to see
        /// the exception, throughput limits for the delivery stream may have been exceeded. For
        /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
        /// Kinesis Firehose Limits</a>.
        /// </exception>
        public PutRecordResponse PutRecord(PutRecordRequest request)
        {
            var marshaller = new PutRecordRequestMarshaller();
            var unmarshaller = PutRecordResponseUnmarshaller.Instance;

            return Invoke<PutRecordRequest,PutRecordResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutRecord operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutRecord 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<PutRecordResponse> PutRecordAsync(PutRecordRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutRecordRequestMarshaller();
            var unmarshaller = PutRecordResponseUnmarshaller.Instance;

            return InvokeAsync<PutRecordRequest,PutRecordResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutRecord operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutRecord operation on AmazonKinesisFirehoseClient.</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 EndPutRecord
        ///         operation.</returns>
        public IAsyncResult BeginPutRecord(PutRecordRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new PutRecordRequestMarshaller();
            var unmarshaller = PutRecordResponseUnmarshaller.Instance;

            return BeginInvoke<PutRecordRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write
 /// multiple data records into a delivery stream, use <a>PutRecordBatch</a>. Applications
 /// using these operations are referred to as producers.
 /// 
 ///  
 /// <para>
 /// By default, each delivery stream can take in up to 2,000 transactions per second,
 /// 5,000 records per second, or 5 MB per second. Note that if you use <a>PutRecord</a>
 /// and <a>PutRecordBatch</a>, the limits are an aggregate across these two operations
 /// for each delivery stream. For more information about limits and how to request an
 /// increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>. 
 /// </para>
 ///  
 /// <para>
 /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
 /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
 /// kind of data, for example, a segment from a log file, geographic location data, web
 /// site clickstream data, etc.
 /// </para>
 ///  
 /// <para>
 /// Firehose buffers records before delivering them to the destination. To disambiguate
 /// the data blobs at the destination, a common solution is to use delimiters in the data,
 /// such as a newline (<code>\n</code>) or some other character unique within the data.
 /// This allows the consumer application(s) to parse individual data items when reading
 /// the data from the destination.
 /// </para>
 ///  
 /// <para>
 /// The <a>PutRecord</a> operation returns a <b>RecordId</b>, which is a unique string
 /// assigned to each record. Producer applications can use this ID for purposes such as
 /// auditability and investigation.
 /// </para>
 ///  
 /// <para>
 /// If the <a>PutRecord</a> operation throws a <b>ServiceUnavailableException</b>, back
 /// off and retry. If the exception persists, it is possible that the throughput limits
 /// have been exceeded for the delivery stream. 
 /// </para>
 ///  
 /// <para>
 /// Data records sent to Firehose are stored for 24 hours from the time they are added
 /// to a delivery stream as it attempts to send the records to the destination. If the
 /// destination is unreachable for more than 24 hours, the data is no longer available.
 /// </para>
 /// </summary>
 /// <param name="deliveryStreamName">The name of the delivery stream.</param>
 /// <param name="record">The record.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the PutRecord service method, as returned by KinesisFirehose.</returns>
 /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
 /// The specified input parameter has an value that is not valid.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
 /// The specified resource could not be found.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
 /// The service is unavailable, back off and retry the operation. If you continue to see
 /// the exception, throughput limits for the delivery stream may have been exceeded. For
 /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>.
 /// </exception>
 public Task<PutRecordResponse> PutRecordAsync(string deliveryStreamName, Record record, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new PutRecordRequest();
     request.DeliveryStreamName = deliveryStreamName;
     request.Record = record;
     return PutRecordAsync(request, cancellationToken);
 }
 /// <summary>
 /// Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write
 /// multiple data records into a delivery stream, use <a>PutRecordBatch</a>. Applications
 /// using these operations are referred to as producers.
 /// 
 ///  
 /// <para>
 /// By default, each delivery stream can take in up to 2,000 transactions per second,
 /// 5,000 records per second, or 5 MB per second. Note that if you use <a>PutRecord</a>
 /// and <a>PutRecordBatch</a>, the limits are an aggregate across these two operations
 /// for each delivery stream. For more information about limits and how to request an
 /// increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>. 
 /// </para>
 ///  
 /// <para>
 /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
 /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
 /// kind of data, for example, a segment from a log file, geographic location data, web
 /// site clickstream data, etc.
 /// </para>
 ///  
 /// <para>
 /// Firehose buffers records before delivering them to the destination. To disambiguate
 /// the data blobs at the destination, a common solution is to use delimiters in the data,
 /// such as a newline (<code>\n</code>) or some other character unique within the data.
 /// This allows the consumer application(s) to parse individual data items when reading
 /// the data from the destination.
 /// </para>
 ///  
 /// <para>
 /// The <a>PutRecord</a> operation returns a <b>RecordId</b>, which is a unique string
 /// assigned to each record. Producer applications can use this ID for purposes such as
 /// auditability and investigation.
 /// </para>
 ///  
 /// <para>
 /// If the <a>PutRecord</a> operation throws a <b>ServiceUnavailableException</b>, back
 /// off and retry. If the exception persists, it is possible that the throughput limits
 /// have been exceeded for the delivery stream. 
 /// </para>
 ///  
 /// <para>
 /// Data records sent to Firehose are stored for 24 hours from the time they are added
 /// to a delivery stream as it attempts to send the records to the destination. If the
 /// destination is unreachable for more than 24 hours, the data is no longer available.
 /// </para>
 /// </summary>
 /// <param name="deliveryStreamName">The name of the delivery stream.</param>
 /// <param name="record">The record.</param>
 /// 
 /// <returns>The response from the PutRecord service method, as returned by KinesisFirehose.</returns>
 /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
 /// The specified input parameter has an value that is not valid.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
 /// The specified resource could not be found.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
 /// The service is unavailable, back off and retry the operation. If you continue to see
 /// the exception, throughput limits for the delivery stream may have been exceeded. For
 /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>.
 /// </exception>
 public PutRecordResponse PutRecord(string deliveryStreamName, Record record)
 {
     var request = new PutRecordRequest();
     request.DeliveryStreamName = deliveryStreamName;
     request.Record = record;
     return PutRecord(request);
 }
示例#6
0
 private Amazon.KinesisFirehose.Model.PutRecordResponse CallAWSServiceOperation(IAmazonKinesisFirehose client, Amazon.KinesisFirehose.Model.PutRecordRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Kinesis Firehose", "PutRecord");
     try
     {
         #if DESKTOP
         return(client.PutRecord(request));
         #elif CORECLR
         return(client.PutRecordAsync(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;
     }
 }
示例#7
0
        public object Execute(ExecutorContext context)
        {
            System.IO.MemoryStream _Record_DataStream = null;

            try
            {
                var cmdletContext = context as CmdletContext;
                // create request
                var request = new Amazon.KinesisFirehose.Model.PutRecordRequest();

                if (cmdletContext.DeliveryStreamName != null)
                {
                    request.DeliveryStreamName = cmdletContext.DeliveryStreamName;
                }

                // populate Record
                var requestRecordIsNull = true;
                request.Record = new Amazon.KinesisFirehose.Model.Record();
                System.IO.MemoryStream requestRecord_record_Data = null;
                if (cmdletContext.Record_Data != null)
                {
                    _Record_DataStream        = new System.IO.MemoryStream(cmdletContext.Record_Data);
                    requestRecord_record_Data = _Record_DataStream;
                }
                if (requestRecord_record_Data != null)
                {
                    request.Record.Data = requestRecord_record_Data;
                    requestRecordIsNull = false;
                }
                // determine if request.Record should be set to null
                if (requestRecordIsNull)
                {
                    request.Record = null;
                }

                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);
            }
            finally
            {
                if (_Record_DataStream != null)
                {
                    _Record_DataStream.Dispose();
                }
            }
        }
 /// <summary>
 /// Initiates the asynchronous execution of the PutRecord operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the PutRecord operation on AmazonKinesisFirehoseClient.</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 PutRecordAsync(PutRecordRequest request, AmazonServiceCallback<PutRecordRequest, PutRecordResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new PutRecordRequestMarshaller();
     var unmarshaller = PutRecordResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<PutRecordRequest,PutRecordResponse> responseObject 
                     = new AmazonServiceResult<PutRecordRequest,PutRecordResponse>((PutRecordRequest)req, (PutRecordResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<PutRecordRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
 /// <summary>
 /// Writes a single data record into an Amazon Kinesis Firehose delivery stream. To write
 /// multiple data records into a delivery stream, use <a>PutRecordBatch</a>. Applications
 /// using these operations are referred to as producers.
 /// 
 ///  
 /// <para>
 /// By default, each delivery stream can take in up to 2,000 transactions per second,
 /// 5,000 records per second, or 5 MB per second. Note that if you use <a>PutRecord</a>
 /// and <a>PutRecordBatch</a>, the limits are an aggregate across these two operations
 /// for each delivery stream. For more information about limits and how to request an
 /// increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>. 
 /// </para>
 ///  
 /// <para>
 /// You must specify the name of the delivery stream and the data record when using <a>PutRecord</a>.
 /// The data record consists of a data blob that can be up to 1,000 KB in size, and any
 /// kind of data, for example, a segment from a log file, geographic location data, web
 /// site clickstream data, etc.
 /// </para>
 ///  
 /// <para>
 /// Firehose buffers records before delivering them to the destination. To disambiguate
 /// the data blobs at the destination, a common solution is to use delimiters in the data,
 /// such as a newline (<code>\n</code>) or some other character unique within the data.
 /// This allows the consumer application(s) to parse individual data items when reading
 /// the data from the destination.
 /// </para>
 ///  
 /// <para>
 /// The <a>PutRecord</a> operation returns a <b>RecordId</b>, which is a unique string
 /// assigned to each record. Producer applications can use this ID for purposes such as
 /// auditability and investigation.
 /// </para>
 ///  
 /// <para>
 /// If the <a>PutRecord</a> operation throws a <b>ServiceUnavailableException</b>, back
 /// off and retry. If the exception persists, it is possible that the throughput limits
 /// have been exceeded for the delivery stream. 
 /// </para>
 ///  
 /// <para>
 /// Data records sent to Firehose are stored for 24 hours from the time they are added
 /// to a delivery stream as it attempts to send the records to the destination. If the
 /// destination is unreachable for more than 24 hours, the data is no longer available.
 /// </para>
 /// </summary>
 /// <param name="deliveryStreamName">The name of the delivery stream.</param>
 /// <param name="record">The record.</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>
 /// 
 /// <returns>The response from the PutRecord service method, as returned by KinesisFirehose.</returns>
 /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException">
 /// The specified input parameter has an value that is not valid.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException">
 /// The specified resource could not be found.
 /// </exception>
 /// <exception cref="Amazon.KinesisFirehose.Model.ServiceUnavailableException">
 /// The service is unavailable, back off and retry the operation. If you continue to see
 /// the exception, throughput limits for the delivery stream may have been exceeded. For
 /// more information about limits and how to request an increase, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon
 /// Kinesis Firehose Limits</a>.
 /// </exception>
 public void PutRecordAsync(string deliveryStreamName, Record record,  AmazonServiceCallback<PutRecordRequest, PutRecordResponse> callback, AsyncOptions options = null)
 {
     var request = new PutRecordRequest();
     request.DeliveryStreamName = deliveryStreamName;
     request.Record = record;
     PutRecordAsync(request, callback, options);
 }