CreateDeliveryStream phpExt Example
<?php
// The version number (9_5_0) should match version of the Chilkat extension used, omitting the micro-version number.
// For example, if using Chilkat v9.5.0.48, then include as shown here:
include("chilkat_9_5_0.php");
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$rest = new CkRest();
$authAws = new CkAuthAws();
$authAws->put_AccessKey('AWS_ACCESS_KEY');
$authAws->put_SecretKey('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('us-west-2');
$authAws->put_ServiceName('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('firehose.us-west-2.amazonaws.com',443,true,true);
if ($success != true) {
print 'ConnectFailReason: ' . $rest->get_ConnectFailReason() . "\n";
print $rest->lastErrorText() . "\n";
exit;
}
// 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 = new CkJsonObject();
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.ClusterEndpoint','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.DomainARN','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.IndexName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.IndexRotationPeriod','string');
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.RoleARN','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3BackupMode','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.BucketARN','string');
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.CompressionFormat','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.ErrorOutputPrefix','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.Prefix','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.S3Configuration.RoleARN','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.TypeName','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.RoleARN','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]','string');
$json->UpdateString('AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SubnetIds[0]','string');
$json->UpdateString('DeliveryStreamEncryptionConfigurationInput.KeyARN','string');
$json->UpdateString('DeliveryStreamEncryptionConfigurationInput.KeyType','string');
$json->UpdateString('DeliveryStreamName','string');
$json->UpdateString('DeliveryStreamType','string');
$json->UpdateInt('ElasticsearchDestinationConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('ElasticsearchDestinationConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.ClusterEndpoint','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.DomainARN','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.IndexName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.IndexRotationPeriod','string');
$json->UpdateInt('ElasticsearchDestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateInt('ElasticsearchDestinationConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('ElasticsearchDestinationConfiguration.RoleARN','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3BackupMode','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.BucketARN','string');
$json->UpdateInt('ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.CompressionFormat','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.ErrorOutputPrefix','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.Prefix','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.S3Configuration.RoleARN','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.TypeName','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.VpcConfiguration.RoleARN','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]','string');
$json->UpdateString('ElasticsearchDestinationConfiguration.VpcConfiguration.SubnetIds[0]','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.BucketARN','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.CompressionFormat','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.Enabled',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.HiveJsonSerDe.TimestampFormats[0]','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.CaseInsensitive',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ColumnToJsonKeyMappings.string','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ConvertDotsInJsonKeysToUnderscores',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BlockSizeBytes',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterColumns[0]','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterFalsePositiveProbability',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.Compression','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.DictionaryKeyThreshold',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.EnablePadding',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.FormatVersion','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.PaddingTolerance',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.RowIndexStride',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.StripeSizeBytes',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.BlockSizeBytes',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.Compression','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.EnableDictionaryCompression',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.MaxPaddingBytes',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.PageSizeBytes',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.WriterVersion','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.CatalogId','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.DatabaseName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.Region','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.RoleARN','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.TableName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.VersionId','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.Enabled',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.ErrorOutputPrefix','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.Prefix','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.RoleARN','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.BucketARN','string');
$json->UpdateInt('ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.CompressionFormat','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.Prefix','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupConfiguration.RoleARN','string');
$json->UpdateString('ExtendedS3DestinationConfiguration.S3BackupMode','string');
$json->UpdateInt('HttpEndpointDestinationConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('HttpEndpointDestinationConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.EndpointConfiguration.AccessKey','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.EndpointConfiguration.Name','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.EndpointConfiguration.Url','string');
$json->UpdateInt('HttpEndpointDestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeValue','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.RequestConfiguration.ContentEncoding','string');
$json->UpdateInt('HttpEndpointDestinationConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('HttpEndpointDestinationConfiguration.RoleARN','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3BackupMode','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.BucketARN','string');
$json->UpdateInt('HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.CompressionFormat','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.ErrorOutputPrefix','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.Prefix','string');
$json->UpdateString('HttpEndpointDestinationConfiguration.S3Configuration.RoleARN','string');
$json->UpdateString('KinesisStreamSourceConfiguration.KinesisStreamARN','string');
$json->UpdateString('KinesisStreamSourceConfiguration.RoleARN','string');
$json->UpdateInt('RedshiftDestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('RedshiftDestinationConfiguration.ClusterJDBCURL','string');
$json->UpdateString('RedshiftDestinationConfiguration.CopyCommand.CopyOptions','string');
$json->UpdateString('RedshiftDestinationConfiguration.CopyCommand.DataTableColumns','string');
$json->UpdateString('RedshiftDestinationConfiguration.CopyCommand.DataTableName','string');
$json->UpdateString('RedshiftDestinationConfiguration.Password','string');
$json->UpdateInt('RedshiftDestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateInt('RedshiftDestinationConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('RedshiftDestinationConfiguration.RoleARN','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.BucketARN','string');
$json->UpdateInt('RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.CompressionFormat','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.Prefix','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupConfiguration.RoleARN','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3BackupMode','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.BucketARN','string');
$json->UpdateInt('RedshiftDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('RedshiftDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.CompressionFormat','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.ErrorOutputPrefix','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.Prefix','string');
$json->UpdateString('RedshiftDestinationConfiguration.S3Configuration.RoleARN','string');
$json->UpdateString('RedshiftDestinationConfiguration.Username','string');
$json->UpdateString('S3DestinationConfiguration.BucketARN','string');
$json->UpdateInt('S3DestinationConfiguration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('S3DestinationConfiguration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('S3DestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('S3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('S3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('S3DestinationConfiguration.CompressionFormat','string');
$json->UpdateString('S3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('S3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('S3DestinationConfiguration.ErrorOutputPrefix','string');
$json->UpdateString('S3DestinationConfiguration.Prefix','string');
$json->UpdateString('S3DestinationConfiguration.RoleARN','string');
$json->UpdateInt('SplunkDestinationConfiguration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateInt('SplunkDestinationConfiguration.HECAcknowledgmentTimeoutInSeconds',123);
$json->UpdateString('SplunkDestinationConfiguration.HECEndpoint','string');
$json->UpdateString('SplunkDestinationConfiguration.HECEndpointType','string');
$json->UpdateString('SplunkDestinationConfiguration.HECToken','string');
$json->UpdateInt('SplunkDestinationConfiguration.ProcessingConfiguration.Enabled',123);
$json->UpdateString('SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName','string');
$json->UpdateString('SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue','string');
$json->UpdateString('SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Type','string');
$json->UpdateInt('SplunkDestinationConfiguration.RetryOptions.DurationInSeconds',123);
$json->UpdateString('SplunkDestinationConfiguration.S3BackupMode','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.BucketARN','string');
$json->UpdateInt('SplunkDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds',123);
$json->UpdateInt('SplunkDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs',123);
$json->UpdateInt('SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled',123);
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.CompressionFormat','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.ErrorOutputPrefix','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.Prefix','string');
$json->UpdateString('SplunkDestinationConfiguration.S3Configuration.RoleARN','string');
$json->UpdateString('Tags[0].Key','string');
$json->UpdateString('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"
// }
// ]
// }
$rest->AddHeader('Content-Type','application/x-amz-json-1.1');
$rest->AddHeader('X-Amz-Target','Firehose_20150804.CreateDeliveryStream');
$sbRequestBody = new CkStringBuilder();
$json->EmitSb($sbRequestBody);
$sbResponseBody = new CkStringBuilder();
$success = $rest->FullRequestSb('POST','/',$sbRequestBody,$sbResponseBody);
if ($success != true) {
print $rest->lastErrorText() . "\n";
exit;
}
$respStatusCode = $rest->get_ResponseStatusCode();
print 'response status code = ' . $respStatusCode . "\n";
if ($respStatusCode != 200) {
print 'Response Header:' . "\n";
print $rest->responseHeader() . "\n";
print 'Response Body:' . "\n";
print $sbResponseBody->getAsString() . "\n";
exit;
}
$jResp = new CkJsonObject();
$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
$DeliveryStreamARN = $jResp->stringOf('DeliveryStreamARN');
// A sample JSON response body parsed by the above code:
// {
// "DeliveryStreamARN": "string"
// }
?>