Class: AWSCDK::GuardDuty::CfnIPSetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
guard_duty/cfn_ip_set_props.rb

Overview

Properties for defining a CfnIPSet.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format:, location:, activate: nil, detector_id: nil, expected_bucket_owner: nil, name: nil, tags: nil) ⇒ CfnIPSetProps

Returns a new instance of CfnIPSetProps.

Parameters:

  • format (String)

    The format of the file that contains the IPSet.

  • location (String)

    The URI of the file that contains the IPSet.

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

    A boolean value that determines if GuardDuty can start using this list for custom threat detection.

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

    The unique ID of the detector of the GuardDuty account for which you want to create an IPSet.

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

    The AWS account ID that owns the Amazon S3 bucket specified in the Location field.

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

    The user-friendly name to identify the IPSet.

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

    The tags to be added to a new threat entity set resource.



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

def initialize(format:, location:, activate: nil, detector_id: nil, expected_bucket_owner: nil, name: nil, tags: nil)
  @format = format
  Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "format")
  @location = location
  Jsii::Type.check_type(@location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "location")
  @activate = activate
  Jsii::Type.check_type(@activate, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "activate") unless @activate.nil?
  @detector_id = detector_id
  Jsii::Type.check_type(@detector_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorId") unless @detector_id.nil?
  @expected_bucket_owner = expected_bucket_owner
  Jsii::Type.check_type(@expected_bucket_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expectedBucketOwner") unless @expected_bucket_owner.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.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

#activateBoolean, ... (readonly)

A boolean value that determines if GuardDuty can start using this list for custom threat detection.

For GuardDuty to prevent generating findings based on an activity associated with these entries, this list must be active.



51
52
53
# File 'guard_duty/cfn_ip_set_props.rb', line 51

def activate
  @activate
end

#detector_idString? (readonly)

The unique ID of the detector of the GuardDuty account for which you want to create an IPSet.

To find the detector_id in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.



59
60
61
# File 'guard_duty/cfn_ip_set_props.rb', line 59

def detector_id
  @detector_id
end

#expected_bucket_ownerString? (readonly)

The AWS account ID that owns the Amazon S3 bucket specified in the Location field.

When you provide this account ID, GuardDuty will validate that the S3 bucket belongs to this account. If you don't specify an account ID owner, GuardDuty doesn't perform any validation.



66
67
68
# File 'guard_duty/cfn_ip_set_props.rb', line 66

def expected_bucket_owner
  @expected_bucket_owner
end

#formatString (readonly)

The format of the file that contains the IPSet.

For information about supported formats, see List formats in the Amazon GuardDuty User Guide .



39
40
41
# File 'guard_duty/cfn_ip_set_props.rb', line 39

def format
  @format
end

#locationString (readonly)

The URI of the file that contains the IPSet.



44
45
46
# File 'guard_duty/cfn_ip_set_props.rb', line 44

def location
  @location
end

#nameString? (readonly)

The user-friendly name to identify the IPSet.

The name of your list must be unique within an AWS account and Region. Valid characters are alphanumeric, whitespace, dash (-), and underscores (_).



73
74
75
# File 'guard_duty/cfn_ip_set_props.rb', line 73

def name
  @name
end

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

The tags to be added to a new threat entity set resource.

Each tag consists of a key and an optional value, both of which you define.

For more information, see Tag .



82
83
84
# File 'guard_duty/cfn_ip_set_props.rb', line 82

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



84
85
86
87
88
89
90
91
92
93
94
# File 'guard_duty/cfn_ip_set_props.rb', line 84

def self.jsii_properties
  {
    :format => "format",
    :location => "location",
    :activate => "activate",
    :detector_id => "detectorId",
    :expected_bucket_owner => "expectedBucketOwner",
    :name => "name",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'guard_duty/cfn_ip_set_props.rb', line 96

def to_jsii
  result = {}
  result.merge!({
    "format" => @format,
    "location" => @location,
    "activate" => @activate,
    "detectorId" => @detector_id,
    "expectedBucketOwner" => @expected_bucket_owner,
    "name" => @name,
    "tags" => @tags,
  })
  result.compact
end