Class: AWSCDK::IoTAnalytics::CfnDataset::S3DestinationConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_analytics/cfn_dataset.rb

Overview

Configuration information for delivery of dataset contents to Amazon Simple Storage Service (Amazon S3).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, key:, role_arn:, glue_configuration: nil) ⇒ S3DestinationConfigurationProperty

Returns a new instance of S3DestinationConfigurationProperty.

Parameters:

  • bucket (String)

    The name of the S3 bucket to which dataset contents are delivered.

  • key (String)

    The key of the dataset contents object in an S3 bucket.

  • role_arn (String)

    The ARN of the role that grants ITA permission to interact with your Amazon S3 and AWS Glue resources.

  • glue_configuration (AWSCDK::IResolvable, AWSCDK::IoTAnalytics::CfnDataset::GlueConfigurationProperty, nil) (defaults to: nil)

    Configuration information for coordination with AWS Glue , a fully managed extract, transform and load (ETL) service.



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'io_t_analytics/cfn_dataset.rb', line 1320

def initialize(bucket:, key:, role_arn:, glue_configuration: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket")
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @glue_configuration = glue_configuration.is_a?(Hash) ? ::AWSCDK::IoTAnalytics::CfnDataset::GlueConfigurationProperty.new(**glue_configuration.transform_keys(&:to_sym)) : glue_configuration
  Jsii::Type.check_type(@glue_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RhbmFseXRpY3MuQ2ZuRGF0YXNldC5HbHVlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "glueConfiguration") unless @glue_configuration.nil?
end

Instance Attribute Details

#bucketString (readonly)

The name of the S3 bucket to which dataset contents are delivered.



1335
1336
1337
# File 'io_t_analytics/cfn_dataset.rb', line 1335

def bucket
  @bucket
end

#glue_configurationAWSCDK::IResolvable, ... (readonly)

Configuration information for coordination with AWS Glue , a fully managed extract, transform and load (ETL) service.



1362
1363
1364
# File 'io_t_analytics/cfn_dataset.rb', line 1362

def glue_configuration
  @glue_configuration
end

#keyString (readonly)

The key of the dataset contents object in an S3 bucket.

Each object has a key that is a unique identifier. Each object has exactly one key.

You can create a unique key with the following options:

  • Use !{iotanalytics:scheduleTime} to insert the time of a scheduled SQL query run.
  • Use !{iotanalytics:versionId} to insert a unique hash that identifies a dataset content.
  • Use !{iotanalytics:creationTime} to insert the creation time of a dataset content.

The following example creates a unique key for a CSV file: dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv

If you don't use !{iotanalytics:versionId} to specify the key, you might get duplicate keys. For example, you might have two dataset contents with the same schedule_time but different version_id s. This means that one dataset content overwrites the other.



1352
1353
1354
# File 'io_t_analytics/cfn_dataset.rb', line 1352

def key
  @key
end

#role_arnString (readonly)

The ARN of the role that grants ITA permission to interact with your Amazon S3 and AWS Glue resources.



1357
1358
1359
# File 'io_t_analytics/cfn_dataset.rb', line 1357

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



1364
1365
1366
1367
1368
1369
1370
1371
# File 'io_t_analytics/cfn_dataset.rb', line 1364

def self.jsii_properties
  {
    :bucket => "bucket",
    :key => "key",
    :role_arn => "roleArn",
    :glue_configuration => "glueConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
# File 'io_t_analytics/cfn_dataset.rb', line 1373

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "key" => @key,
    "roleArn" => @role_arn,
    "glueConfiguration" => @glue_configuration,
  })
  result.compact
end