Container for the parameters to the CreateDeliveryStream operation. Creates a delivery stream.

By default, you can create up to 20 delivery streams per region.

This is an asynchronous operation that immediately returns. The initial status of the delivery stream is CREATING. After the delivery stream is created, its status is ACTIVE and it now accepts data. Attempts to send data to a delivery stream that is not in the ACTIVE state cause an exception. To check the state of a delivery stream, use DescribeDeliveryStream.

A delivery stream is configured with a single destination: Amazon S3, Amazon Elasticsearch Service, or Amazon Redshift. You must specify only one of the following destination configuration parameters: ExtendedS3DestinationConfiguration, S3DestinationConfiguration, ElasticsearchDestinationConfiguration, or RedshiftDestinationConfiguration.

When you specify S3DestinationConfiguration, you can also provide the following optional values: BufferingHints, EncryptionConfiguration, and CompressionFormat. By default, if no BufferingHints value is provided, Firehose buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied first. Note that BufferingHints is a hint, so there are some cases where the service cannot adhere to these conditions strictly; for example, record boundaries are such that the size is a little over or under the configured buffering size. By default, no encryption is performed. We strongly recommend that you enable encryption to ensure secure data storage in Amazon S3.

A few notes about Amazon Redshift as a destination:

  • An Amazon Redshift destination requires an S3 bucket as intermediate location, as Firehose first delivers data to S3 and then uses COPY syntax to load data into an Amazon Redshift table. This is specified in the RedshiftDestinationConfiguration.S3Configuration parameter.

  • The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration because the Amazon Redshift COPY operation that reads from the S3 bucket doesn't support these compression formats.

  • We strongly recommend that you use the user name and password you provide exclusively with Firehose, and that the permissions for the account are restricted for Amazon Redshift INSERT permissions.

Firehose assumes the IAM role that is configured as part of the destination. The role should allow the Firehose principal to assume the role, and the role should have permissions that allows the service to deliver the data. For more information, see Amazon S3 Bucket Access in the Amazon Kinesis Firehose Developer Guide.

Inheritance: AmazonKinesisFirehoseRequest
        /// <summary>
        /// Initiates the asynchronous execution of the CreateDeliveryStream operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateDeliveryStream 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<CreateDeliveryStreamResponse> CreateDeliveryStreamAsync(CreateDeliveryStreamRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateDeliveryStreamRequestMarshaller();
            var unmarshaller = CreateDeliveryStreamResponseUnmarshaller.Instance;

            return InvokeAsync<CreateDeliveryStreamRequest,CreateDeliveryStreamResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateDeliveryStream operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateDeliveryStream 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 EndCreateDeliveryStream
        ///         operation.</returns>
        public IAsyncResult BeginCreateDeliveryStream(CreateDeliveryStreamRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateDeliveryStreamRequestMarshaller();
            var unmarshaller = CreateDeliveryStreamResponseUnmarshaller.Instance;

            return BeginInvoke<CreateDeliveryStreamRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        /// <summary>
        /// Creates a delivery stream.
        /// 
        ///  
        /// <para>
        /// <a>CreateDeliveryStream</a> is an asynchronous operation that immediately returns.
        /// The initial status of the delivery stream is <code>CREATING</code>. After the delivery
        /// stream is created, its status is <code>ACTIVE</code> and it now accepts data. Attempts
        /// to send data to a delivery stream that is not in the <code>ACTIVE</code> state cause
        /// an exception. To check the state of a delivery stream, use <a>DescribeDeliveryStream</a>.
        /// </para>
        ///  
        /// <para>
        /// The name of a delivery stream identifies it. You can't have two delivery streams with
        /// the same name in the same region. Two delivery streams in different AWS accounts or
        /// different regions in the same AWS account can have the same name.
        /// </para>
        ///  
        /// <para>
        /// By default, you can create up to 5 delivery streams per region.
        /// </para>
        ///  
        /// <para>
        /// A delivery stream can only be configured with a single destination, Amazon S3 or Amazon
        /// Redshift. For correct <a>CreateDeliveryStream</a> request syntax, specify only one
        /// destination configuration parameter: either <code>RedshiftDestinationConfiguration</code>
        /// or <code>S3DestinationConfiguration</code>
        /// </para>
        ///  
        /// <para>
        /// As part of <code>S3DestinationConfiguration</code>, optional values <code>BufferingHints</code>,
        /// <code>EncryptionConfiguration</code>, and <code>CompressionFormat</code> can be provided.
        /// By default, if no <code>BufferingHints</code> value is provided, Amazon Kinesis Firehose
        /// buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied first.
        /// Note that <code>BufferingHints</code> is a hint, so there are some cases where the
        /// service cannot adhere to these conditions strictly; for example, record boundaries
        /// are such that the size is a little over or under the configured buffering size. By
        /// default, no encryption is performed. We strongly recommend that you enable encryption
        /// to ensure secure data storage in Amazon S3.
        /// </para>
        ///  
        /// <para>
        /// A few notes about <code>RedshiftDestinationConfiguration</code>:
        /// </para>
        ///  <ul> <li>An Amazon Redshift destination requires an S3 bucket as intermediate location,
        /// as Amazon Kinesis Firehose first delivers data to S3 and then uses <code>COPY</code>
        /// syntax to load data into an Amazon Redshift table. This is specified in the <code>RedshiftDestinationConfiguration.S3Configuration</code>
        /// parameter element.</li> <li>The compression formats <code>SNAPPY</code> or <code>ZIP</code>
        /// cannot be specified in <code>RedshiftDestinationConfiguration.S3Configuration</code>
        /// because the Amazon Redshift <code>COPY</code> operation that reads from the S3 bucket
        /// doesn't support these compression formats.</li> <li>We strongly recommend that the
        /// username and password provided is used exclusively for Amazon Kinesis Firehose purposes,
        /// and that the permissions for the account are restricted for Amazon Redshift <code>INSERT</code>
        /// permissions.</li> </ul> 
        /// <para>
        /// Amazon Kinesis Firehose assumes the IAM role that is configured as part of destinations.
        /// The IAM role should allow the Amazon Kinesis Firehose principal to assume the role,
        /// and the role should have permissions that allows the service to deliver the data.
        /// For more information, see <a href="http://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3">Amazon
        /// S3 Bucket Access</a> in the <i>Amazon Kinesis Firehose Developer Guide</i>.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CreateDeliveryStream service method.</param>
        /// 
        /// <returns>The response from the CreateDeliveryStream 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.LimitExceededException">
        /// You have already reached the limit for a requested resource.
        /// </exception>
        /// <exception cref="Amazon.KinesisFirehose.Model.ResourceInUseException">
        /// The resource is already in use and not available for this operation.
        /// </exception>
        public CreateDeliveryStreamResponse CreateDeliveryStream(CreateDeliveryStreamRequest request)
        {
            var marshaller = new CreateDeliveryStreamRequestMarshaller();
            var unmarshaller = CreateDeliveryStreamResponseUnmarshaller.Instance;

            return Invoke<CreateDeliveryStreamRequest,CreateDeliveryStreamResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the CreateDeliveryStream operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the CreateDeliveryStream 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 CreateDeliveryStreamAsync(CreateDeliveryStreamRequest request, AmazonServiceCallback<CreateDeliveryStreamRequest, CreateDeliveryStreamResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new CreateDeliveryStreamRequestMarshaller();
     var unmarshaller = CreateDeliveryStreamResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<CreateDeliveryStreamRequest,CreateDeliveryStreamResponse> responseObject 
                     = new AmazonServiceResult<CreateDeliveryStreamRequest,CreateDeliveryStreamResponse>((CreateDeliveryStreamRequest)req, (CreateDeliveryStreamResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<CreateDeliveryStreamRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }