Chilkat Online Tools

UpdateDestination Swift3 Example

Amazon Kinesis Data Firehose

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("AmazonopensearchserviceDestinationUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("AmazonopensearchserviceDestinationUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("AmazonopensearchserviceDestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("AmazonopensearchserviceDestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.ClusterEndpoint", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.DomainARN", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.IndexName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.IndexRotationPeriod", value: "string")
    json.updateInt("AmazonopensearchserviceDestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("AmazonopensearchserviceDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.updateInt("AmazonopensearchserviceDestinationUpdate.RetryOptions.DurationInSeconds", value: 123)
    json.update("AmazonopensearchserviceDestinationUpdate.RoleARN", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.BucketARN", value: "string")
    json.updateInt("AmazonopensearchserviceDestinationUpdate.S3Update.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("AmazonopensearchserviceDestinationUpdate.S3Update.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("AmazonopensearchserviceDestinationUpdate.S3Update.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.CompressionFormat", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.ErrorOutputPrefix", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.Prefix", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.S3Update.RoleARN", value: "string")
    json.update("AmazonopensearchserviceDestinationUpdate.TypeName", value: "string")
    json.update("CurrentDeliveryStreamVersionId", value: "string")
    json.update("DeliveryStreamName", value: "string")
    json.update("DestinationId", value: "string")
    json.updateInt("ElasticsearchDestinationUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("ElasticsearchDestinationUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("ElasticsearchDestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("ElasticsearchDestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("ElasticsearchDestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("ElasticsearchDestinationUpdate.ClusterEndpoint", value: "string")
    json.update("ElasticsearchDestinationUpdate.DomainARN", value: "string")
    json.update("ElasticsearchDestinationUpdate.IndexName", value: "string")
    json.update("ElasticsearchDestinationUpdate.IndexRotationPeriod", value: "string")
    json.updateInt("ElasticsearchDestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("ElasticsearchDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("ElasticsearchDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("ElasticsearchDestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.updateInt("ElasticsearchDestinationUpdate.RetryOptions.DurationInSeconds", value: 123)
    json.update("ElasticsearchDestinationUpdate.RoleARN", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.BucketARN", value: "string")
    json.updateInt("ElasticsearchDestinationUpdate.S3Update.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("ElasticsearchDestinationUpdate.S3Update.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("ElasticsearchDestinationUpdate.S3Update.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("ElasticsearchDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.CompressionFormat", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.ErrorOutputPrefix", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.Prefix", value: "string")
    json.update("ElasticsearchDestinationUpdate.S3Update.RoleARN", value: "string")
    json.update("ElasticsearchDestinationUpdate.TypeName", value: "string")
    json.update("ExtendedS3DestinationUpdate.BucketARN", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("ExtendedS3DestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("ExtendedS3DestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("ExtendedS3DestinationUpdate.CompressionFormat", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.Enabled", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.HiveJsonSerDe.TimestampFormats[0]", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.CaseInsensitive", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ColumnToJsonKeyMappings.string", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.InputFormatConfiguration.Deserializer.OpenXJsonSerDe.ConvertDotsInJsonKeysToUnderscores", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BlockSizeBytes", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterColumns[0]", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.BloomFilterFalsePositiveProbability", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.Compression", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.DictionaryKeyThreshold", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.EnablePadding", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.FormatVersion", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.PaddingTolerance", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.RowIndexStride", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.OrcSerDe.StripeSizeBytes", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.BlockSizeBytes", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.Compression", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.EnableDictionaryCompression", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.MaxPaddingBytes", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.PageSizeBytes", value: 123)
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.OutputFormatConfiguration.Serializer.ParquetSerDe.WriterVersion", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.CatalogId", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.DatabaseName", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.Region", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.RoleARN", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.TableName", value: "string")
    json.update("ExtendedS3DestinationUpdate.DataFormatConversionConfiguration.SchemaConfiguration.VersionId", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.DynamicPartitioningConfiguration.Enabled", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.DynamicPartitioningConfiguration.RetryOptions.DurationInSeconds", value: 123)
    json.update("ExtendedS3DestinationUpdate.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("ExtendedS3DestinationUpdate.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("ExtendedS3DestinationUpdate.ErrorOutputPrefix", value: "string")
    json.update("ExtendedS3DestinationUpdate.Prefix", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("ExtendedS3DestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("ExtendedS3DestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("ExtendedS3DestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.update("ExtendedS3DestinationUpdate.RoleARN", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupMode", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.BucketARN", value: "string")
    json.updateInt("ExtendedS3DestinationUpdate.S3BackupUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.S3BackupUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("ExtendedS3DestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.CompressionFormat", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.ErrorOutputPrefix", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.Prefix", value: "string")
    json.update("ExtendedS3DestinationUpdate.S3BackupUpdate.RoleARN", value: "string")
    json.updateInt("HttpEndpointDestinationUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("HttpEndpointDestinationUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("HttpEndpointDestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("HttpEndpointDestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("HttpEndpointDestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("HttpEndpointDestinationUpdate.EndpointConfiguration.AccessKey", value: "string")
    json.update("HttpEndpointDestinationUpdate.EndpointConfiguration.Name", value: "string")
    json.update("HttpEndpointDestinationUpdate.EndpointConfiguration.Url", value: "string")
    json.updateInt("HttpEndpointDestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("HttpEndpointDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("HttpEndpointDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("HttpEndpointDestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.update("HttpEndpointDestinationUpdate.RequestConfiguration.CommonAttributes[0].AttributeName", value: "string")
    json.update("HttpEndpointDestinationUpdate.RequestConfiguration.CommonAttributes[0].AttributeValue", value: "string")
    json.update("HttpEndpointDestinationUpdate.RequestConfiguration.ContentEncoding", value: "string")
    json.updateInt("HttpEndpointDestinationUpdate.RetryOptions.DurationInSeconds", value: 123)
    json.update("HttpEndpointDestinationUpdate.RoleARN", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3BackupMode", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.BucketARN", value: "string")
    json.updateInt("HttpEndpointDestinationUpdate.S3Update.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("HttpEndpointDestinationUpdate.S3Update.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("HttpEndpointDestinationUpdate.S3Update.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("HttpEndpointDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.CompressionFormat", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.ErrorOutputPrefix", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.Prefix", value: "string")
    json.update("HttpEndpointDestinationUpdate.S3Update.RoleARN", value: "string")
    json.updateInt("RedshiftDestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("RedshiftDestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("RedshiftDestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("RedshiftDestinationUpdate.ClusterJDBCURL", value: "string")
    json.update("RedshiftDestinationUpdate.CopyCommand.CopyOptions", value: "string")
    json.update("RedshiftDestinationUpdate.CopyCommand.DataTableColumns", value: "string")
    json.update("RedshiftDestinationUpdate.CopyCommand.DataTableName", value: "string")
    json.update("RedshiftDestinationUpdate.Password", value: "string")
    json.updateInt("RedshiftDestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("RedshiftDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("RedshiftDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("RedshiftDestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.updateInt("RedshiftDestinationUpdate.RetryOptions.DurationInSeconds", value: 123)
    json.update("RedshiftDestinationUpdate.RoleARN", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupMode", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.BucketARN", value: "string")
    json.updateInt("RedshiftDestinationUpdate.S3BackupUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("RedshiftDestinationUpdate.S3BackupUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("RedshiftDestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.CompressionFormat", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.ErrorOutputPrefix", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.Prefix", value: "string")
    json.update("RedshiftDestinationUpdate.S3BackupUpdate.RoleARN", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.BucketARN", value: "string")
    json.updateInt("RedshiftDestinationUpdate.S3Update.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("RedshiftDestinationUpdate.S3Update.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("RedshiftDestinationUpdate.S3Update.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("RedshiftDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.CompressionFormat", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.ErrorOutputPrefix", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.Prefix", value: "string")
    json.update("RedshiftDestinationUpdate.S3Update.RoleARN", value: "string")
    json.update("RedshiftDestinationUpdate.Username", value: "string")
    json.update("S3DestinationUpdate.BucketARN", value: "string")
    json.updateInt("S3DestinationUpdate.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("S3DestinationUpdate.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("S3DestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("S3DestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("S3DestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("S3DestinationUpdate.CompressionFormat", value: "string")
    json.update("S3DestinationUpdate.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("S3DestinationUpdate.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("S3DestinationUpdate.ErrorOutputPrefix", value: "string")
    json.update("S3DestinationUpdate.Prefix", value: "string")
    json.update("S3DestinationUpdate.RoleARN", value: "string")
    json.updateInt("SplunkDestinationUpdate.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("SplunkDestinationUpdate.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("SplunkDestinationUpdate.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.updateInt("SplunkDestinationUpdate.HECAcknowledgmentTimeoutInSeconds", value: 123)
    json.update("SplunkDestinationUpdate.HECEndpoint", value: "string")
    json.update("SplunkDestinationUpdate.HECEndpointType", value: "string")
    json.update("SplunkDestinationUpdate.HECToken", value: "string")
    json.updateInt("SplunkDestinationUpdate.ProcessingConfiguration.Enabled", value: 123)
    json.update("SplunkDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterName", value: "string")
    json.update("SplunkDestinationUpdate.ProcessingConfiguration.Processors[0].Parameters[0].ParameterValue", value: "string")
    json.update("SplunkDestinationUpdate.ProcessingConfiguration.Processors[0].Type", value: "string")
    json.updateInt("SplunkDestinationUpdate.RetryOptions.DurationInSeconds", value: 123)
    json.update("SplunkDestinationUpdate.S3BackupMode", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.BucketARN", value: "string")
    json.updateInt("SplunkDestinationUpdate.S3Update.BufferingHints.IntervalInSeconds", value: 123)
    json.updateInt("SplunkDestinationUpdate.S3Update.BufferingHints.SizeInMBs", value: 123)
    json.updateInt("SplunkDestinationUpdate.S3Update.CloudWatchLoggingOptions.Enabled", value: 123)
    json.update("SplunkDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogGroupName", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.CloudWatchLoggingOptions.LogStreamName", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.CompressionFormat", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.EncryptionConfiguration.KMSEncryptionConfig.AWSKMSKeyARN", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.EncryptionConfiguration.NoEncryptionConfig", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.ErrorOutputPrefix", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.Prefix", value: "string")
    json.update("SplunkDestinationUpdate.S3Update.RoleARN", value: "string")

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

    // {
    //   "AmazonopensearchserviceDestinationUpdate": {
    //     "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",
    //     "S3Update": {
    //       "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"
    //   },
    //   "CurrentDeliveryStreamVersionId": "string",
    //   "DeliveryStreamName": "string",
    //   "DestinationId": "string",
    //   "ElasticsearchDestinationUpdate": {
    //     "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",
    //     "S3Update": {
    //       "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"
    //   },
    //   "ExtendedS3DestinationUpdate": {
    //     "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",
    //     "S3BackupMode": "string",
    //     "S3BackupUpdate": {
    //       "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"
    //     }
    //   },
    //   "HttpEndpointDestinationUpdate": {
    //     "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",
    //     "S3Update": {
    //       "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"
    //     }
    //   },
    //   "RedshiftDestinationUpdate": {
    //     "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",
    //     "S3BackupMode": "string",
    //     "S3BackupUpdate": {
    //       "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"
    //     },
    //     "S3Update": {
    //       "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"
    //   },
    //   "S3DestinationUpdate": {
    //     "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"
    //   },
    //   "SplunkDestinationUpdate": {
    //     "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",
    //     "S3Update": {
    //       "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"
    //     }
    //   }
    // }

    rest.addHeader("Content-Type", value: "application/x-amz-json-1.1")
    rest.addHeader("X-Amz-Target", value: "Firehose_20150804.UpdateDestination")

    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
    }

    // If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

}