CreateDeliveryStream Swift3 Example
func chilkatTest() {
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let rest = CkoRest()!
var success: Bool
let authAws = CkoAuthAws()!
authAws.accessKey = "AWS_ACCESS_KEY"
authAws.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.region = "us-west-2"
authAws.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", port: 443, tls: true, autoReconnect: true)
if success != true {
print("ConnectFailReason: \(rest.connectFailReason.intValue)")
print("\(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
let json = CkoJsonObject()!
json.updateInt("AmazonopensearchserviceDestinationConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("AmazonopensearchserviceDestinationConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.ClusterEndpoint", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.DomainARN", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.IndexName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.IndexRotationPeriod", value: "string")
json.updateInt("AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.updateInt("AmazonopensearchserviceDestinationConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("AmazonopensearchserviceDestinationConfiguration.RoleARN", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3BackupMode", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.BucketARN", value: "string")
json.updateInt("AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("AmazonopensearchserviceDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.CompressionFormat", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.ErrorOutputPrefix", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.Prefix", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.S3Configuration.RoleARN", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.TypeName", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.RoleARN", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]", value: "string")
json.update("AmazonopensearchserviceDestinationConfiguration.VpcConfiguration.SubnetIds[0]", value: "string")
json.update("DeliveryStreamEncryptionConfigurationInput.KeyARN", value: "string")
json.update("DeliveryStreamEncryptionConfigurationInput.KeyType", value: "string")
json.update("DeliveryStreamName", value: "string")
json.update("DeliveryStreamType", value: "string")
json.updateInt("ElasticsearchDestinationConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("ElasticsearchDestinationConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("ElasticsearchDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("ElasticsearchDestinationConfiguration.ClusterEndpoint", value: "string")
json.update("ElasticsearchDestinationConfiguration.DomainARN", value: "string")
json.update("ElasticsearchDestinationConfiguration.IndexName", value: "string")
json.update("ElasticsearchDestinationConfiguration.IndexRotationPeriod", value: "string")
json.updateInt("ElasticsearchDestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("ElasticsearchDestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.updateInt("ElasticsearchDestinationConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("ElasticsearchDestinationConfiguration.RoleARN", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3BackupMode", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.BucketARN", value: "string")
json.updateInt("ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("ElasticsearchDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.CompressionFormat", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.ErrorOutputPrefix", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.Prefix", value: "string")
json.update("ElasticsearchDestinationConfiguration.S3Configuration.RoleARN", value: "string")
json.update("ElasticsearchDestinationConfiguration.TypeName", value: "string")
json.update("ElasticsearchDestinationConfiguration.VpcConfiguration.RoleARN", value: "string")
json.update("ElasticsearchDestinationConfiguration.VpcConfiguration.SecurityGroupIds[0]", value: "string")
json.update("ElasticsearchDestinationConfiguration.VpcConfiguration.SubnetIds[0]", value: "string")
json.update("ExtendedS3DestinationConfiguration.BucketARN", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("ExtendedS3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("ExtendedS3DestinationConfiguration.CompressionFormat", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.Enabled", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.HiveJsonSerDe.TimestampFormats[0]", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.CaseInsensitive", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ColumnToJsonKeyMappings.string", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ConvertDotsInJsonKeysToUnderscores", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BlockSizeBytes", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterColumns[0]", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterFalsePositiveProbability", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.Compression", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.DictionaryKeyThreshold", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.EnablePadding", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.FormatVersion", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.PaddingTolerance", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.RowIndexStride", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.StripeSizeBytes", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.BlockSizeBytes", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.Compression", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.EnableDictionaryCompression", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.MaxPaddingBytes", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.PageSizeBytes", value: 123)
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.WriterVersion", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.CatalogId", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.DatabaseName", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.Region", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.RoleARN", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.TableName", value: "string")
json.update("ExtendedS3DestinationConfiguration.DataFormatConversionConfiguration.SchemaConfiguration.VersionId", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.Enabled", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.DynamicPartitioningConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("ExtendedS3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("ExtendedS3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("ExtendedS3DestinationConfiguration.ErrorOutputPrefix", value: "string")
json.update("ExtendedS3DestinationConfiguration.Prefix", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("ExtendedS3DestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.update("ExtendedS3DestinationConfiguration.RoleARN", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.BucketARN", value: "string")
json.updateInt("ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.CompressionFormat", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.Prefix", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupConfiguration.RoleARN", value: "string")
json.update("ExtendedS3DestinationConfiguration.S3BackupMode", value: "string")
json.updateInt("HttpEndpointDestinationConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("HttpEndpointDestinationConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("HttpEndpointDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("HttpEndpointDestinationConfiguration.EndpointConfiguration.AccessKey", value: "string")
json.update("HttpEndpointDestinationConfiguration.EndpointConfiguration.Name", value: "string")
json.update("HttpEndpointDestinationConfiguration.EndpointConfiguration.Url", value: "string")
json.updateInt("HttpEndpointDestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("HttpEndpointDestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.update("HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeName", value: "string")
json.update("HttpEndpointDestinationConfiguration.RequestConfiguration.CommonAttributes[0].AttributeValue", value: "string")
json.update("HttpEndpointDestinationConfiguration.RequestConfiguration.ContentEncoding", value: "string")
json.updateInt("HttpEndpointDestinationConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("HttpEndpointDestinationConfiguration.RoleARN", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3BackupMode", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.BucketARN", value: "string")
json.updateInt("HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("HttpEndpointDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.CompressionFormat", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.ErrorOutputPrefix", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.Prefix", value: "string")
json.update("HttpEndpointDestinationConfiguration.S3Configuration.RoleARN", value: "string")
json.update("KinesisStreamSourceConfiguration.KinesisStreamARN", value: "string")
json.update("KinesisStreamSourceConfiguration.RoleARN", value: "string")
json.updateInt("RedshiftDestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("RedshiftDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("RedshiftDestinationConfiguration.ClusterJDBCURL", value: "string")
json.update("RedshiftDestinationConfiguration.CopyCommand.CopyOptions", value: "string")
json.update("RedshiftDestinationConfiguration.CopyCommand.DataTableColumns", value: "string")
json.update("RedshiftDestinationConfiguration.CopyCommand.DataTableName", value: "string")
json.update("RedshiftDestinationConfiguration.Password", value: "string")
json.updateInt("RedshiftDestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("RedshiftDestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.updateInt("RedshiftDestinationConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("RedshiftDestinationConfiguration.RoleARN", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.BucketARN", value: "string")
json.updateInt("RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("RedshiftDestinationConfiguration.S3BackupConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.CompressionFormat", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.ErrorOutputPrefix", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.Prefix", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupConfiguration.RoleARN", value: "string")
json.update("RedshiftDestinationConfiguration.S3BackupMode", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.BucketARN", value: "string")
json.updateInt("RedshiftDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("RedshiftDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.CompressionFormat", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.ErrorOutputPrefix", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.Prefix", value: "string")
json.update("RedshiftDestinationConfiguration.S3Configuration.RoleARN", value: "string")
json.update("RedshiftDestinationConfiguration.Username", value: "string")
json.update("S3DestinationConfiguration.BucketARN", value: "string")
json.updateInt("S3DestinationConfiguration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("S3DestinationConfiguration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("S3DestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("S3DestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("S3DestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("S3DestinationConfiguration.CompressionFormat", value: "string")
json.update("S3DestinationConfiguration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("S3DestinationConfiguration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("S3DestinationConfiguration.ErrorOutputPrefix", value: "string")
json.update("S3DestinationConfiguration.Prefix", value: "string")
json.update("S3DestinationConfiguration.RoleARN", value: "string")
json.updateInt("SplunkDestinationConfiguration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("SplunkDestinationConfiguration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.updateInt("SplunkDestinationConfiguration.HECAcknowledgmentTimeoutInSeconds", value: 123)
json.update("SplunkDestinationConfiguration.HECEndpoint", value: "string")
json.update("SplunkDestinationConfiguration.HECEndpointType", value: "string")
json.update("SplunkDestinationConfiguration.HECToken", value: "string")
json.updateInt("SplunkDestinationConfiguration.ProcessingConfiguration.Enabled", value: 123)
json.update("SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
json.update("SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
json.update("SplunkDestinationConfiguration.ProcessingConfiguration.Processors[0].Type", value: "string")
json.updateInt("SplunkDestinationConfiguration.RetryOptions.DurationInSeconds", value: 123)
json.update("SplunkDestinationConfiguration.S3BackupMode", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.BucketARN", value: "string")
json.updateInt("SplunkDestinationConfiguration.S3Configuration.BufferingHints.IntervalInSeconds", value: 123)
json.updateInt("SplunkDestinationConfiguration.S3Configuration.BufferingHints.SizeInMBs", value: 123)
json.updateInt("SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.Enabled", value: 123)
json.update("SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogGroupName", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.CloudWatchLoggingOptions.LogStreamName", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.CompressionFormat", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.EncryptionConfiguration.NoEncryptionConfig", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.ErrorOutputPrefix", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.Prefix", value: "string")
json.update("SplunkDestinationConfiguration.S3Configuration.RoleARN", value: "string")
json.update("Tags[0].Key", value: "string")
json.update("Tags[0].Value", 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", value: "application/x-amz-json-1.1")
rest.addHeader("X-Amz-Target", value: "Firehose_20150804.CreateDeliveryStream")
let sbRequestBody = CkoStringBuilder()!
json.emitSb(sbRequestBody)
let sbResponseBody = CkoStringBuilder()!
success = rest.fullRequestSb("POST", uriPath: "/", requestBody: sbRequestBody, responseBody: sbResponseBody)
if success != true {
print("\(rest.lastErrorText!)")
return
}
var respStatusCode: Int = rest.responseStatusCode.intValue
print("response status code = \(respStatusCode)")
if respStatusCode != 200 {
print("Response Header:")
print("\(rest.responseHeader!)")
print("Response Body:")
print("\(sbResponseBody.getAsString()!)")
return
}
let jResp = CkoJsonObject()!
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
var DeliveryStreamARN: String? = jResp.string(of: "DeliveryStreamARN")
// A sample JSON response body parsed by the above code:
// {
// "DeliveryStreamARN": "string"
// }
}