Class: AWSCDK::ECS::ExecuteCommandLogConfiguration

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/execute_command_log_configuration.rb

Overview

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs and/ or an Amazon S3 bucket. For more information, see [ExecuteCommandLogConfiguration] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cloud_watch_encryption_enabled: nil, cloud_watch_log_group: nil, s3_bucket: nil, s3_encryption_enabled: nil, s3_key_prefix: nil) ⇒ ExecuteCommandLogConfiguration

Returns a new instance of ExecuteCommandLogConfiguration.

Parameters:

  • cloud_watch_encryption_enabled (Boolean, nil) (defaults to: nil)

    Whether or not to enable encryption on the CloudWatch logs.

  • cloud_watch_log_group (AWSCDK::Interfaces::AWSLogs::ILogGroupRef, nil) (defaults to: nil)

    The name of the CloudWatch log group to send logs to.

  • s3_bucket (AWSCDK::S3::IBucket, nil) (defaults to: nil)

    The name of the S3 bucket to send logs to.

  • s3_encryption_enabled (Boolean, nil) (defaults to: nil)

    Whether or not to enable encryption on the S3 bucket.

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

    An optional folder in the S3 bucket to place logs in.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'ecs/execute_command_log_configuration.rb', line 15

def initialize(cloud_watch_encryption_enabled: nil, cloud_watch_log_group: nil, s3_bucket: nil, s3_encryption_enabled: nil, s3_key_prefix: nil)
  @cloud_watch_encryption_enabled = cloud_watch_encryption_enabled
  Jsii::Type.check_type(@cloud_watch_encryption_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cloudWatchEncryptionEnabled") unless @cloud_watch_encryption_enabled.nil?
  @cloud_watch_log_group = cloud_watch_log_group
  Jsii::Type.check_type(@cloud_watch_log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "cloudWatchLogGroup") unless @cloud_watch_log_group.nil?
  @s3_bucket = s3_bucket
  Jsii::Type.check_type(@s3_bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "s3Bucket") unless @s3_bucket.nil?
  @s3_encryption_enabled = s3_encryption_enabled
  Jsii::Type.check_type(@s3_encryption_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "s3EncryptionEnabled") unless @s3_encryption_enabled.nil?
  @s3_key_prefix = s3_key_prefix
  Jsii::Type.check_type(@s3_key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3KeyPrefix") unless @s3_key_prefix.nil?
end

Instance Attribute Details

#cloud_watch_encryption_enabledBoolean? (readonly)

Note:

Default: - encryption will be disabled.

Whether or not to enable encryption on the CloudWatch logs.

Returns:

  • (Boolean, nil)


32
33
34
# File 'ecs/execute_command_log_configuration.rb', line 32

def cloud_watch_encryption_enabled
  @cloud_watch_encryption_enabled
end

#cloud_watch_log_groupAWSCDK::Interfaces::AWSLogs::ILogGroupRef? (readonly)

Note:

Default: - none

The name of the CloudWatch log group to send logs to.

The CloudWatch log group must already be created.



39
40
41
# File 'ecs/execute_command_log_configuration.rb', line 39

def cloud_watch_log_group
  @cloud_watch_log_group
end

#s3_bucketAWSCDK::S3::IBucket? (readonly)

Note:

Default: - none

The name of the S3 bucket to send logs to.

The S3 bucket must already be created.

Returns:



46
47
48
# File 'ecs/execute_command_log_configuration.rb', line 46

def s3_bucket
  @s3_bucket
end

#s3_encryption_enabledBoolean? (readonly)

Note:

Default: - encryption will be disabled.

Whether or not to enable encryption on the S3 bucket.

Returns:

  • (Boolean, nil)


51
52
53
# File 'ecs/execute_command_log_configuration.rb', line 51

def s3_encryption_enabled
  @s3_encryption_enabled
end

#s3_key_prefixString? (readonly)

Note:

Default: - none

An optional folder in the S3 bucket to place logs in.

Returns:

  • (String, nil)


56
57
58
# File 'ecs/execute_command_log_configuration.rb', line 56

def s3_key_prefix
  @s3_key_prefix
end

Class Method Details

.jsii_propertiesObject



58
59
60
61
62
63
64
65
66
# File 'ecs/execute_command_log_configuration.rb', line 58

def self.jsii_properties
  {
    :cloud_watch_encryption_enabled => "cloudWatchEncryptionEnabled",
    :cloud_watch_log_group => "cloudWatchLogGroup",
    :s3_bucket => "s3Bucket",
    :s3_encryption_enabled => "s3EncryptionEnabled",
    :s3_key_prefix => "s3KeyPrefix",
  }
end

Instance Method Details

#to_jsiiObject



68
69
70
71
72
73
74
75
76
77
78
# File 'ecs/execute_command_log_configuration.rb', line 68

def to_jsii
  result = {}
  result.merge!({
    "cloudWatchEncryptionEnabled" => @cloud_watch_encryption_enabled,
    "cloudWatchLogGroup" => @cloud_watch_log_group,
    "s3Bucket" => @s3_bucket,
    "s3EncryptionEnabled" => @s3_encryption_enabled,
    "s3KeyPrefix" => @s3_key_prefix,
  })
  result.compact
end