Chilkat Online Tools

CreateDeliveryStream delphiDll Example

Amazon Kinesis Data Firehose

var
rest: HCkRest;
success: Boolean;
authAws: HCkAuthAws;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
sbResponseBody: HCkStringBuilder;
respStatusCode: Integer;
jResp: HCkJsonObject;
DeliveryStreamARN: PWideChar;

begin
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

rest := CkRest_Create();

authAws := CkAuthAws_Create();
CkAuthAws_putAccessKey(authAws,'AWS_ACCESS_KEY');
CkAuthAws_putSecretKey(authAws,'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.)
CkAuthAws_putRegion(authAws,'us-west-2');
CkAuthAws_putServiceName(authAws,'firehose');
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws(rest,authAws);

// URL: https://firehose.us-west-2.amazonaws.com/
// Use the same region as specified above.
success := CkRest_Connect(rest,'firehose.us-west-2.amazonaws.com',443,True,True);
if (success <> True) then
  begin
    Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(CkRest_getConnectFailReason(rest)));
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;

// 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

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

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

sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody := CkStringBuilder_Create();
success := CkRest_FullRequestSb(rest,'POST','/',sbRequestBody,sbResponseBody);
if (success <> True) then
  begin
    Memo1.Lines.Add(CkRest__lastErrorText(rest));
    Exit;
  end;
respStatusCode := CkRest_getResponseStatusCode(rest);
Memo1.Lines.Add('response status code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 200) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkRest__responseHeader(rest));
    Memo1.Lines.Add('Response Body:');
    Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
    Exit;
  end;

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,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

DeliveryStreamARN := CkJsonObject__stringOf(jResp,'DeliveryStreamARN');

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

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

CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);