Chilkat Online Tools

CreateDeliveryStream unicodeCpp Example

Amazon Kinesis Data Firehose

#include <CkRestW.h>
#include <CkAuthAwsW.h>
#include <CkJsonObjectW.h>
#include <CkStringBuilderW.h>

void ChilkatSample(void)
    {
    // This example requires the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkRestW rest;
    bool success;

    CkAuthAwsW authAws;
    authAws.put_AccessKey(L"AWS_ACCESS_KEY");
    authAws.put_SecretKey(L"AWS_SECRET_KEY");

    // Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
    authAws.put_Region(L"us-west-2");
    authAws.put_ServiceName(L"firehose");
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.SetAuthAws(authAws);

    // URL: https://firehose.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.Connect(L"firehose.us-west-2.amazonaws.com",443,true,true);
    if (success != true) {
        wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

    // The following code creates the JSON request body.
    // The JSON created by this code is shown below.

    // Use this online tool to generate code from sample JSON:
    // Generate Code to Create JSON

    CkJsonObjectW json;
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.ClusterEndpoint",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.DomainARN",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.IndexName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.IndexRotationPeriod",L"string");
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.RoleARN",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3BackupMode",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.BucketARN",L"string");
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.CompressionFormat",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.Prefix",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.S3Configuration.RoleARN",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.TypeName",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.RoleARN",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]",L"string");
    json.UpdateString(L"AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SubnetIds[0]",L"string");
    json.UpdateString(L"DeliveryStreamEncryptionConfigurationInput.KeyARN",L"string");
    json.UpdateString(L"DeliveryStreamEncryptionConfigurationInput.KeyType",L"string");
    json.UpdateString(L"DeliveryStreamName",L"string");
    json.UpdateString(L"DeliveryStreamType",L"string");
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.ClusterEndpoint",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.DomainARN",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.IndexName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.IndexRotationPeriod",L"string");
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"ElasticsearchDestinationConfiguration.RoleARN",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3BackupMode",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.BucketARN",L"string");
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.CompressionFormat",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.Prefix",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.S3Configuration.RoleARN",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.TypeName",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.VpcConfiguration.RoleARN",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]",L"string");
    json.UpdateString(L"ElasticsearchDestinationConfiguration.VpcConfiguration.SubnetIds[0]",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.BucketARN",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.CompressionFormat",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.Enabled",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.HiveJsonSerDe.TimestampFormats[0]",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.CaseInsensitive",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ColumnToJsonKeyMappings.string",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ConvertDotsInJsonKeysToUnderscores",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BlockSizeBytes",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterColumns[0]",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterFalsePositiveProbability",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.Compression",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.DictionaryKeyThreshold",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.EnablePadding",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.FormatVersion",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.PaddingTolerance",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.RowIndexStride",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.StripeSizeBytes",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.BlockSizeBytes",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.Compression",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.EnableDictionaryCompression",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.MaxPaddingBytes",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.PageSizeBytes",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.WriterVersion",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.CatalogId",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.DatabaseName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.Region",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.RoleARN",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.TableName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.VersionId",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.Enabled",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.Prefix",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.RoleARN",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.BucketARN",L"string");
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.CompressionFormat",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.Prefix",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupConfiguration.RoleARN",L"string");
    json.UpdateString(L"ExtendedS3DestinationConfiguration.S3BackupMode",L"string");
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.EndpointConfiguration.AccessKey",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.EndpointConfiguration.Name",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.EndpointConfiguration.Url",L"string");
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeValue",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.RequestConfiguration.ContentEncoding",L"string");
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"HttpEndpointDestinationConfiguration.RoleARN",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3BackupMode",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.BucketARN",L"string");
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.CompressionFormat",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.Prefix",L"string");
    json.UpdateString(L"HttpEndpointDestinationConfiguration.S3Configuration.RoleARN",L"string");
    json.UpdateString(L"KinesisStreamSourceConfiguration.KinesisStreamARN",L"string");
    json.UpdateString(L"KinesisStreamSourceConfiguration.RoleARN",L"string");
    json.UpdateInt(L"RedshiftDestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.ClusterJDBCURL",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.CopyCommand.CopyOptions",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.CopyCommand.DataTableColumns",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.CopyCommand.DataTableName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.Password",L"string");
    json.UpdateInt(L"RedshiftDestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateInt(L"RedshiftDestinationConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"RedshiftDestinationConfiguration.RoleARN",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.BucketARN",L"string");
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.CompressionFormat",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.Prefix",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupConfiguration.RoleARN",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3BackupMode",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.BucketARN",L"string");
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.CompressionFormat",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.Prefix",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.S3Configuration.RoleARN",L"string");
    json.UpdateString(L"RedshiftDestinationConfiguration.Username",L"string");
    json.UpdateString(L"S3DestinationConfiguration.BucketARN",L"string");
    json.UpdateInt(L"S3DestinationConfiguration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"S3DestinationConfiguration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"S3DestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"S3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"S3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"S3DestinationConfiguration.CompressionFormat",L"string");
    json.UpdateString(L"S3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"S3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"S3DestinationConfiguration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"S3DestinationConfiguration.Prefix",L"string");
    json.UpdateString(L"S3DestinationConfiguration.RoleARN",L"string");
    json.UpdateInt(L"SplunkDestinationConfiguration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateInt(L"SplunkDestinationConfiguration.HECAcknowledgmentTimeoutInSeconds",123);
    json.UpdateString(L"SplunkDestinationConfiguration.HECEndpoint",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.HECEndpointType",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.HECToken",L"string");
    json.UpdateInt(L"SplunkDestinationConfiguration.ProcessingConfiguration.Enabled",123);
    json.UpdateString(L"SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Type",L"string");
    json.UpdateInt(L"SplunkDestinationConfiguration.RetryOptions.DurationInSeconds",123);
    json.UpdateString(L"SplunkDestinationConfiguration.S3BackupMode",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.BucketARN",L"string");
    json.UpdateInt(L"SplunkDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds",123);
    json.UpdateInt(L"SplunkDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs",123);
    json.UpdateInt(L"SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled",123);
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.CompressionFormat",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.ErrorOutputPrefix",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.Prefix",L"string");
    json.UpdateString(L"SplunkDestinationConfiguration.S3Configuration.RoleARN",L"string");
    json.UpdateString(L"Tags[0].Key",L"string");
    json.UpdateString(L"Tags[0].Value",L"string");

    // The JSON request body created by the above code:

    // {
    //   "AmazonopensearchserviceDestinationConfiguration": {
    //     "BufferingHints": {
    //       "IntervalInSeconds": number,
    //       "SizeInMBs": number
    //     },
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "ClusterEndpoint": "string",
    //     "DomainARN": "string",
    //     "IndexName": "string",
    //     "IndexRotationPeriod": "string",
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RetryOptions": {
    //       "DurationInSeconds": number
    //     },
    //     "RoleARN": "string",
    //     "S3BackupMode": "string",
    //     "S3Configuration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     },
    //     "TypeName": "string",
    //     "VpcConfiguration": {
    //       "RoleARN": "string",
    //       "SecurityGroupIds": [
    //         "string"
    //       ],
    //       "SubnetIds": [
    //         "string"
    //       ]
    //     }
    //   },
    //   "DeliveryStreamEncryptionConfigurationInput": {
    //     "KeyARN": "string",
    //     "KeyType": "string"
    //   },
    //   "DeliveryStreamName": "string",
    //   "DeliveryStreamType": "string",
    //   "ElasticsearchDestinationConfiguration": {
    //     "BufferingHints": {
    //       "IntervalInSeconds": number,
    //       "SizeInMBs": number
    //     },
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "ClusterEndpoint": "string",
    //     "DomainARN": "string",
    //     "IndexName": "string",
    //     "IndexRotationPeriod": "string",
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RetryOptions": {
    //       "DurationInSeconds": number
    //     },
    //     "RoleARN": "string",
    //     "S3BackupMode": "string",
    //     "S3Configuration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     },
    //     "TypeName": "string",
    //     "VpcConfiguration": {
    //       "RoleARN": "string",
    //       "SecurityGroupIds": [
    //         "string"
    //       ],
    //       "SubnetIds": [
    //         "string"
    //       ]
    //     }
    //   },
    //   "ExtendedS3DestinationConfiguration": {
    //     "BucketARN": "string",
    //     "BufferingHints": {
    //       "IntervalInSeconds": number,
    //       "SizeInMBs": number
    //     },
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "CompressionFormat": "string",
    //     "DataFormatConversionConfiguration": {
    //       "Enabled": boolean,
    //       "InputFormatConfiguration": {
    //         "Deserializer": {
    //           "HiveJsonSerDe": {
    //             "TimestampFormats": [
    //               "string"
    //             ]
    //           },
    //           "OpenXJsonSerDe": {
    //             "CaseInsensitive": boolean,
    //             "ColumnToJsonKeyMappings": {
    //               "string": "string"
    //             },
    //             "ConvertDotsInJsonKeysToUnderscores": boolean
    //           }
    //         }
    //       },
    //       "OutputFormatConfiguration": {
    //         "Serializer": {
    //           "OrcSerDe": {
    //             "BlockSizeBytes": number,
    //             "BloomFilterColumns": [
    //               "string"
    //             ],
    //             "BloomFilterFalsePositiveProbability": number,
    //             "Compression": "string",
    //             "DictionaryKeyThreshold": number,
    //             "EnablePadding": boolean,
    //             "FormatVersion": "string",
    //             "PaddingTolerance": number,
    //             "RowIndexStride": number,
    //             "StripeSizeBytes": number
    //           },
    //           "ParquetSerDe": {
    //             "BlockSizeBytes": number,
    //             "Compression": "string",
    //             "EnableDictionaryCompression": boolean,
    //             "MaxPaddingBytes": number,
    //             "PageSizeBytes": number,
    //             "WriterVersion": "string"
    //           }
    //         }
    //       },
    //       "SchemaConfiguration": {
    //         "CatalogId": "string",
    //         "DatabaseName": "string",
    //         "Region": "string",
    //         "RoleARN": "string",
    //         "TableName": "string",
    //         "VersionId": "string"
    //       }
    //     },
    //     "DynamicPartitioningConfiguration": {
    //       "Enabled": boolean,
    //       "RetryOptions": {
    //         "DurationInSeconds": number
    //       }
    //     },
    //     "EncryptionConfiguration": {
    //       "KMSEncryptionConfig": {
    //         "AWSKMSKeyARN": "string"
    //       },
    //       "NoEncryptionConfig": "string"
    //     },
    //     "ErrorOutputPrefix": "string",
    //     "Prefix": "string",
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RoleARN": "string",
    //     "S3BackupConfiguration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     },
    //     "S3BackupMode": "string"
    //   },
    //   "HttpEndpointDestinationConfiguration": {
    //     "BufferingHints": {
    //       "IntervalInSeconds": number,
    //       "SizeInMBs": number
    //     },
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "EndpointConfiguration": {
    //       "AccessKey": "string",
    //       "Name": "string",
    //       "Url": "string"
    //     },
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RequestConfiguration": {
    //       "CommonAttributes": [
    //         {
    //           "AttributeName": "string",
    //           "AttributeValue": "string"
    //         }
    //       ],
    //       "ContentEncoding": "string"
    //     },
    //     "RetryOptions": {
    //       "DurationInSeconds": number
    //     },
    //     "RoleARN": "string",
    //     "S3BackupMode": "string",
    //     "S3Configuration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     }
    //   },
    //   "KinesisStreamSourceConfiguration": {
    //     "KinesisStreamARN": "string",
    //     "RoleARN": "string"
    //   },
    //   "RedshiftDestinationConfiguration": {
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "ClusterJDBCURL": "string",
    //     "CopyCommand": {
    //       "CopyOptions": "string",
    //       "DataTableColumns": "string",
    //       "DataTableName": "string"
    //     },
    //     "Password": "string",
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RetryOptions": {
    //       "DurationInSeconds": number
    //     },
    //     "RoleARN": "string",
    //     "S3BackupConfiguration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     },
    //     "S3BackupMode": "string",
    //     "S3Configuration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     },
    //     "Username": "string"
    //   },
    //   "S3DestinationConfiguration": {
    //     "BucketARN": "string",
    //     "BufferingHints": {
    //       "IntervalInSeconds": number,
    //       "SizeInMBs": number
    //     },
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "CompressionFormat": "string",
    //     "EncryptionConfiguration": {
    //       "KMSEncryptionConfig": {
    //         "AWSKMSKeyARN": "string"
    //       },
    //       "NoEncryptionConfig": "string"
    //     },
    //     "ErrorOutputPrefix": "string",
    //     "Prefix": "string",
    //     "RoleARN": "string"
    //   },
    //   "SplunkDestinationConfiguration": {
    //     "CloudWatchLoggingOptions": {
    //       "Enabled": boolean,
    //       "LogGroupName": "string",
    //       "LogStreamName": "string"
    //     },
    //     "HECAcknowledgmentTimeoutInSeconds": number,
    //     "HECEndpoint": "string",
    //     "HECEndpointType": "string",
    //     "HECToken": "string",
    //     "ProcessingConfiguration": {
    //       "Enabled": boolean,
    //       "Processors": [
    //         {
    //           "Parameters": [
    //             {
    //               "ParameterName": "string",
    //               "ParameterValue": "string"
    //             }
    //           ],
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "RetryOptions": {
    //       "DurationInSeconds": number
    //     },
    //     "S3BackupMode": "string",
    //     "S3Configuration": {
    //       "BucketARN": "string",
    //       "BufferingHints": {
    //         "IntervalInSeconds": number,
    //         "SizeInMBs": number
    //       },
    //       "CloudWatchLoggingOptions": {
    //         "Enabled": boolean,
    //         "LogGroupName": "string",
    //         "LogStreamName": "string"
    //       },
    //       "CompressionFormat": "string",
    //       "EncryptionConfiguration": {
    //         "KMSEncryptionConfig": {
    //           "AWSKMSKeyARN": "string"
    //         },
    //         "NoEncryptionConfig": "string"
    //       },
    //       "ErrorOutputPrefix": "string",
    //       "Prefix": "string",
    //       "RoleARN": "string"
    //     }
    //   },
    //   "Tags": [
    //     {
    //       "Key": "string",
    //       "Value": "string"
    //     }
    //   ]
    // }

    rest.AddHeader(L"Content-Type",L"application/x-amz-json-1.1");
    rest.AddHeader(L"X-Amz-Target",L"Firehose_20150804.CreateDeliveryStream");

    CkStringBuilderW sbRequestBody;
    json.EmitSb(sbRequestBody);
    CkStringBuilderW sbResponseBody;
    success = rest.FullRequestSb(L"POST",L"/",sbRequestBody,sbResponseBody);
    if (success != true) {
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

    int respStatusCode = rest.get_ResponseStatusCode();
    wprintf(L"response status code = %d\n",respStatusCode);
    if (respStatusCode != 200) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",rest.responseHeader());
        wprintf(L"Response Body:\n");
        wprintf(L"%s\n",sbResponseBody.getAsString());
        return;
    }

    CkJsonObjectW jResp;
    jResp.LoadSb(sbResponseBody);

    // The following code parses the JSON response.
    // A sample JSON response is shown below the sample code.

    // Use this online tool to generate parsing code from sample JSON:
    // Generate Parsing Code from JSON

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
    // See this example explaining how this memory should be used: const char * functions.

    const wchar_t *DeliveryStreamARN = jResp.stringOf(L"DeliveryStreamARN");

    // A sample JSON response body parsed by the above code:

    // {
    //   "DeliveryStreamARN": "string"
    // }
    }