Class: AWSCDK::Logs::CfnDeliveryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/cfn_delivery_props.rb

Overview

Properties for defining a CfnDelivery.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delivery_destination_arn:, delivery_source_name:, field_delimiter: nil, record_fields: nil, s3_enable_hive_compatible_path: nil, s3_suffix_path: nil, tags: nil) ⇒ CfnDeliveryProps

Returns a new instance of CfnDeliveryProps.

Parameters:

  • delivery_destination_arn (String)

    The ARN of the delivery destination that is associated with this delivery.

  • delivery_source_name (String)

    The name of the delivery source that is associated with this delivery.

  • field_delimiter (String, nil) (defaults to: nil)

    The field delimiter that is used between record fields when the final output format of a delivery is in Plain , W3C , or Raw format.

  • record_fields (Array<String>, nil) (defaults to: nil)

    The list of record fields to be delivered to the destination, in order.

  • s3_enable_hive_compatible_path (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Use this parameter to cause the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.

  • s3_suffix_path (String, nil) (defaults to: nil)

    Use this to reconfigure the S3 object prefix to contain either static or variable sections.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to the delivery.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'logs/cfn_delivery_props.rb', line 16

def initialize(delivery_destination_arn:, delivery_source_name:, field_delimiter: nil, record_fields: nil, s3_enable_hive_compatible_path: nil, s3_suffix_path: nil, tags: nil)
  @delivery_destination_arn = delivery_destination_arn
  Jsii::Type.check_type(@delivery_destination_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryDestinationArn")
  @delivery_source_name = delivery_source_name
  Jsii::Type.check_type(@delivery_source_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliverySourceName")
  @field_delimiter = field_delimiter
  Jsii::Type.check_type(@field_delimiter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fieldDelimiter") unless @field_delimiter.nil?
  @record_fields = record_fields
  Jsii::Type.check_type(@record_fields, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "recordFields") unless @record_fields.nil?
  @s3_enable_hive_compatible_path = s3_enable_hive_compatible_path
  Jsii::Type.check_type(@s3_enable_hive_compatible_path, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "s3EnableHiveCompatiblePath") unless @s3_enable_hive_compatible_path.nil?
  @s3_suffix_path = s3_suffix_path
  Jsii::Type.check_type(@s3_suffix_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3SuffixPath") unless @s3_suffix_path.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#delivery_destination_arnString (readonly)

The ARN of the delivery destination that is associated with this delivery.



37
38
39
# File 'logs/cfn_delivery_props.rb', line 37

def delivery_destination_arn
  @delivery_destination_arn
end

#delivery_source_nameString (readonly)

The name of the delivery source that is associated with this delivery.



42
43
44
# File 'logs/cfn_delivery_props.rb', line 42

def delivery_source_name
  @delivery_source_name
end

#field_delimiterString? (readonly)

The field delimiter that is used between record fields when the final output format of a delivery is in Plain , W3C , or Raw format.



47
48
49
# File 'logs/cfn_delivery_props.rb', line 47

def field_delimiter
  @field_delimiter
end

#record_fieldsArray<String>? (readonly)

The list of record fields to be delivered to the destination, in order.

If the delivery's log source has mandatory fields, they must be included in this list.



54
55
56
# File 'logs/cfn_delivery_props.rb', line 54

def record_fields
  @record_fields
end

#s3_enable_hive_compatible_pathBoolean, ... (readonly)

Use this parameter to cause the S3 objects that contain delivered logs to use a prefix structure that allows for integration with Apache Hive.



59
60
61
# File 'logs/cfn_delivery_props.rb', line 59

def s3_enable_hive_compatible_path
  @s3_enable_hive_compatible_path
end

#s3_suffix_pathString? (readonly)

Use this to reconfigure the S3 object prefix to contain either static or variable sections.

The valid variables to use in the suffix path will vary by each log source. To find the values supported for the suffix path for each log source, use the DescribeConfigurationTemplates operation and check the allowed_suffix_path_fields field in the response.



66
67
68
# File 'logs/cfn_delivery_props.rb', line 66

def s3_suffix_path
  @s3_suffix_path
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to the delivery.

For more information, see Tag .



73
74
75
# File 'logs/cfn_delivery_props.rb', line 73

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'logs/cfn_delivery_props.rb', line 75

def self.jsii_properties
  {
    :delivery_destination_arn => "deliveryDestinationArn",
    :delivery_source_name => "deliverySourceName",
    :field_delimiter => "fieldDelimiter",
    :record_fields => "recordFields",
    :s3_enable_hive_compatible_path => "s3EnableHiveCompatiblePath",
    :s3_suffix_path => "s3SuffixPath",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'logs/cfn_delivery_props.rb', line 87

def to_jsii
  result = {}
  result.merge!({
    "deliveryDestinationArn" => @delivery_destination_arn,
    "deliverySourceName" => @delivery_source_name,
    "fieldDelimiter" => @field_delimiter,
    "recordFields" => @record_fields,
    "s3EnableHiveCompatiblePath" => @s3_enable_hive_compatible_path,
    "s3SuffixPath" => @s3_suffix_path,
    "tags" => @tags,
  })
  result.compact
end