Class: AWSCDK::ECS::CfnCluster::ExecuteCommandConfigurationProperty

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

Overview

The details of the execute command configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kms_key_id: nil, log_configuration: nil, logging: nil) ⇒ ExecuteCommandConfigurationProperty

Returns a new instance of ExecuteCommandConfigurationProperty.

Parameters:

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

    Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.

  • log_configuration (AWSCDK::IResolvable, AWSCDK::ECS::CfnCluster::ExecuteCommandLogConfigurationProperty, nil) (defaults to: nil)

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

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

    The log setting to use for redirecting logs for your execute command results. The following log settings are available.



814
815
816
817
818
819
820
821
# File 'ecs/cfn_cluster.rb', line 814

def initialize(kms_key_id: nil, log_configuration: nil, logging: nil)
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
  @log_configuration = log_configuration.is_a?(Hash) ? ::AWSCDK::ECS::CfnCluster::ExecuteCommandLogConfigurationProperty.new(**log_configuration.transform_keys(&:to_sym)) : log_configuration
  Jsii::Type.check_type(@log_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuQ2x1c3Rlci5FeGVjdXRlQ29tbWFuZExvZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "logConfiguration") unless @log_configuration.nil?
  @logging = logging
  Jsii::Type.check_type(@logging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logging") unless @logging.nil?
end

Instance Attribute Details

#kms_key_idString? (readonly)

Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.



827
828
829
# File 'ecs/cfn_cluster.rb', line 827

def kms_key_id
  @kms_key_id
end

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

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

The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When logging=OVERRIDE is specified, a log_configuration must be provided.



834
835
836
# File 'ecs/cfn_cluster.rb', line 834

def log_configuration
  @log_configuration
end

#loggingString? (readonly)

The log setting to use for redirecting logs for your execute command results. The following log settings are available.

  • NONE : The execute command session is not logged.
  • DEFAULT : The awslogs configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no awslogs log driver is configured in the task definition, the output won't be logged.
  • OVERRIDE : Specify the logging details as a part of log_configuration . If the OVERRIDE logging option is specified, the log_configuration is required.


843
844
845
# File 'ecs/cfn_cluster.rb', line 843

def logging
  @logging
end

Class Method Details

.jsii_propertiesObject



845
846
847
848
849
850
851
# File 'ecs/cfn_cluster.rb', line 845

def self.jsii_properties
  {
    :kms_key_id => "kmsKeyId",
    :log_configuration => "logConfiguration",
    :logging => "logging",
  }
end

Instance Method Details

#to_jsiiObject



853
854
855
856
857
858
859
860
861
# File 'ecs/cfn_cluster.rb', line 853

def to_jsii
  result = {}
  result.merge!({
    "kmsKeyId" => @kms_key_id,
    "logConfiguration" => @log_configuration,
    "logging" => @logging,
  })
  result.compact
end