Class: AWSCDK::SES::CfnMailManagerTrafficPolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses/cfn_mail_manager_traffic_policy_props.rb

Overview

Properties for defining a CfnMailManagerTrafficPolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(default_action:, policy_statements:, max_message_size_bytes: nil, tags: nil, traffic_policy_name: nil) ⇒ CfnMailManagerTrafficPolicyProps

Returns a new instance of CfnMailManagerTrafficPolicyProps.

Parameters:

  • default_action (String)

    Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements.

  • policy_statements (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SES::CfnMailManagerTrafficPolicy::PolicyStatementProperty>)

    Conditional statements for filtering email traffic.

  • max_message_size_bytes (Numeric, nil) (defaults to: nil)

    The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.

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

    The tags used to organize, track, or control access for the resource.

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

    The name of the policy.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 14

def initialize(default_action:, policy_statements:, max_message_size_bytes: nil, tags: nil, traffic_policy_name: nil)
  @default_action = default_action
  Jsii::Type.check_type(@default_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultAction")
  @policy_statements = policy_statements
  Jsii::Type.check_type(@policy_statements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VzLkNmbk1haWxNYW5hZ2VyVHJhZmZpY1BvbGljeS5Qb2xpY3lTdGF0ZW1lbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "policyStatements")
  @max_message_size_bytes = max_message_size_bytes
  Jsii::Type.check_type(@max_message_size_bytes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxMessageSizeBytes") unless @max_message_size_bytes.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?
  @traffic_policy_name = traffic_policy_name
  Jsii::Type.check_type(@traffic_policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "trafficPolicyName") unless @traffic_policy_name.nil?
end

Instance Attribute Details

#default_actionString (readonly)

Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements.



31
32
33
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 31

def default_action
  @default_action
end

#max_message_size_bytesNumeric? (readonly)

The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.



41
42
43
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 41

def max_message_size_bytes
  @max_message_size_bytes
end

#policy_statementsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::SES::CfnMailManagerTrafficPolicy::PolicyStatementProperty> (readonly)

Conditional statements for filtering email traffic.



36
37
38
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 36

def policy_statements
  @policy_statements
end

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

The tags used to organize, track, or control access for the resource.

For example, { "tags": "key2":"value2" }.



48
49
50
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 48

def tags
  @tags
end

#traffic_policy_nameString? (readonly)

The name of the policy.

The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.



55
56
57
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 55

def traffic_policy_name
  @traffic_policy_name
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 57

def self.jsii_properties
  {
    :default_action => "defaultAction",
    :policy_statements => "policyStatements",
    :max_message_size_bytes => "maxMessageSizeBytes",
    :tags => "tags",
    :traffic_policy_name => "trafficPolicyName",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
# File 'ses/cfn_mail_manager_traffic_policy_props.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "defaultAction" => @default_action,
    "policyStatements" => @policy_statements,
    "maxMessageSizeBytes" => @max_message_size_bytes,
    "tags" => @tags,
    "trafficPolicyName" => @traffic_policy_name,
  })
  result.compact
end