aws-sdk-guardduty 1.68.0 → 1.69.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ff5bf924b3cd09c298b323fca839e37e4742e6b91ad78277b1f9fed741b81d4
4
- data.tar.gz: bdeffcea7e97f871baf2461bb95387bb351102146b3b93085f83ed865117413b
3
+ metadata.gz: d4cb3b0b40af8d3c0281d0ef709d2de4b79fdcbc40222392b77de735d0dc9be7
4
+ data.tar.gz: e150d644e72afeb5ddd569885094c01faf5013a9ada8c829709be759c87b6dd7
5
5
  SHA512:
6
- metadata.gz: 588ea396bddcb12c84c76a5d74f1245e455e0857c8fa17dffba026b8333ab6775ce12718b3496c01d58b00d8725bf0a64a539b2bb48660319b58aa99eece9714
7
- data.tar.gz: f381b33dd8c0e8564fc4cf2721dd90df57ef9c12ab25b7746612b29239a1fd6d06bbb23be5dbb235f56fc36559ae830778bd6066d40e925cfbf6703d9adb661c
6
+ metadata.gz: 01eaaeb32c936ecc847ce87d4e601d4f54b173d077c1599c5a658038f9e9e55a4583c09a622022569c897fd80c51544e14c0026816ff558119069b0c8be16d07
7
+ data.tar.gz: '018ee2c776fe65ed41a3eecf6e5e485e7709eb6d49e363883dc918d2bb48a8f24b56ebde0dbc91989812576507a08d21aef7c412a2ff7a800455668cc2741799'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.69.0 (2023-04-27)
5
+ ------------------
6
+
7
+ * Feature - Added API support to initiate on-demand malware scan on specific resources.
8
+
4
9
  1.68.0 (2023-04-20)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.68.0
1
+ 1.69.0
@@ -1342,7 +1342,7 @@ module Aws::GuardDuty
1342
1342
  # filter_criteria: {
1343
1343
  # filter_criterion: [
1344
1344
  # {
1345
- # criterion_key: "EC2_INSTANCE_ARN", # accepts EC2_INSTANCE_ARN, SCAN_ID, ACCOUNT_ID, GUARDDUTY_FINDING_ID, SCAN_START_TIME, SCAN_STATUS
1345
+ # criterion_key: "EC2_INSTANCE_ARN", # accepts EC2_INSTANCE_ARN, SCAN_ID, ACCOUNT_ID, GUARDDUTY_FINDING_ID, SCAN_START_TIME, SCAN_STATUS, SCAN_TYPE
1346
1346
  # filter_condition: {
1347
1347
  # equals_value: "NonEmptyString",
1348
1348
  # greater_than: 1,
@@ -1363,7 +1363,7 @@ module Aws::GuardDuty
1363
1363
  # resp.scans[0].detector_id #=> String
1364
1364
  # resp.scans[0].admin_detector_id #=> String
1365
1365
  # resp.scans[0].scan_id #=> String
1366
- # resp.scans[0].scan_status #=> String, one of "RUNNING", "COMPLETED", "FAILED"
1366
+ # resp.scans[0].scan_status #=> String, one of "RUNNING", "COMPLETED", "FAILED", "SKIPPED"
1367
1367
  # resp.scans[0].failure_reason #=> String
1368
1368
  # resp.scans[0].scan_start_time #=> Time
1369
1369
  # resp.scans[0].scan_end_time #=> Time
@@ -1382,6 +1382,7 @@ module Aws::GuardDuty
1382
1382
  # resp.scans[0].attached_volumes[0].encryption_type #=> String
1383
1383
  # resp.scans[0].attached_volumes[0].snapshot_arn #=> String
1384
1384
  # resp.scans[0].attached_volumes[0].kms_key_arn #=> String
1385
+ # resp.scans[0].scan_type #=> String, one of "GUARDDUTY_INITIATED", "ON_DEMAND"
1385
1386
  # resp.next_token #=> String
1386
1387
  #
1387
1388
  # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DescribeMalwareScans AWS API Documentation
@@ -2204,6 +2205,7 @@ module Aws::GuardDuty
2204
2205
  # resp.findings[0].service.ebs_volume_scan_details.scan_detections.threat_detected_by_name.threat_names[0].file_paths[0].volume_arn #=> String
2205
2206
  # resp.findings[0].service.ebs_volume_scan_details.scan_detections.threat_detected_by_name.threat_names[0].file_paths[0].hash #=> String
2206
2207
  # resp.findings[0].service.ebs_volume_scan_details.scan_detections.threat_detected_by_name.threat_names[0].file_paths[0].file_name #=> String
2208
+ # resp.findings[0].service.ebs_volume_scan_details.scan_type #=> String, one of "GUARDDUTY_INITIATED", "ON_DEMAND"
2207
2209
  # resp.findings[0].service.runtime_details.process.name #=> String
2208
2210
  # resp.findings[0].service.runtime_details.process.executable_path #=> String
2209
2211
  # resp.findings[0].service.runtime_details.process.executable_sha_256 #=> String
@@ -3533,6 +3535,40 @@ module Aws::GuardDuty
3533
3535
  req.send_request(options)
3534
3536
  end
3535
3537
 
3538
+ # Initiates the malware scan. Invoking this API will automatically
3539
+ # create the [Service-linked role ][1] in the corresponding account.
3540
+ #
3541
+ #
3542
+ #
3543
+ # [1]: https://docs.aws.amazon.com/guardduty/latest/ug/slr-permissions-malware-protection.html
3544
+ #
3545
+ # @option params [required, String] :resource_arn
3546
+ # Amazon Resource Name (ARN) of the resource for which you invoked the
3547
+ # API.
3548
+ #
3549
+ # @return [Types::StartMalwareScanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3550
+ #
3551
+ # * {Types::StartMalwareScanResponse#scan_id #scan_id} => String
3552
+ #
3553
+ # @example Request syntax with placeholder values
3554
+ #
3555
+ # resp = client.start_malware_scan({
3556
+ # resource_arn: "ResourceArn", # required
3557
+ # })
3558
+ #
3559
+ # @example Response structure
3560
+ #
3561
+ # resp.scan_id #=> String
3562
+ #
3563
+ # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMalwareScan AWS API Documentation
3564
+ #
3565
+ # @overload start_malware_scan(params = {})
3566
+ # @param [Hash] params ({})
3567
+ def start_malware_scan(params = {}, options = {})
3568
+ req = build_request(:start_malware_scan, params)
3569
+ req.send_request(options)
3570
+ end
3571
+
3536
3572
  # Turns on GuardDuty monitoring of the specified member accounts. Use
3537
3573
  # this operation to restart monitoring of accounts that you stopped
3538
3574
  # monitoring with the [StopMonitoringMembers][1] operation.
@@ -4251,7 +4287,7 @@ module Aws::GuardDuty
4251
4287
  params: params,
4252
4288
  config: config)
4253
4289
  context[:gem_name] = 'aws-sdk-guardduty'
4254
- context[:gem_version] = '1.68.0'
4290
+ context[:gem_version] = '1.69.0'
4255
4291
  Seahorse::Client::Request.new(handlers, context)
4256
4292
  end
4257
4293
 
@@ -46,6 +46,7 @@ module Aws::GuardDuty
46
46
  ClientToken = Shapes::StringShape.new(name: 'ClientToken')
47
47
  CloudTrailConfigurationResult = Shapes::StructureShape.new(name: 'CloudTrailConfigurationResult')
48
48
  Condition = Shapes::StructureShape.new(name: 'Condition')
49
+ ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
49
50
  Container = Shapes::StructureShape.new(name: 'Container')
50
51
  Containers = Shapes::ListShape.new(name: 'Containers')
51
52
  CountByCoverageStatus = Shapes::MapShape.new(name: 'CountByCoverageStatus')
@@ -347,6 +348,7 @@ module Aws::GuardDuty
347
348
  RemoteIpDetails = Shapes::StructureShape.new(name: 'RemoteIpDetails')
348
349
  RemotePortDetails = Shapes::StructureShape.new(name: 'RemotePortDetails')
349
350
  Resource = Shapes::StructureShape.new(name: 'Resource')
351
+ ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
350
352
  ResourceDetails = Shapes::StructureShape.new(name: 'ResourceDetails')
351
353
  ResourceList = Shapes::ListShape.new(name: 'ResourceList')
352
354
  ResourceType = Shapes::StringShape.new(name: 'ResourceType')
@@ -371,6 +373,7 @@ module Aws::GuardDuty
371
373
  ScanStatus = Shapes::StringShape.new(name: 'ScanStatus')
372
374
  ScanThreatName = Shapes::StructureShape.new(name: 'ScanThreatName')
373
375
  ScanThreatNames = Shapes::ListShape.new(name: 'ScanThreatNames')
376
+ ScanType = Shapes::StringShape.new(name: 'ScanType')
374
377
  ScannedItemCount = Shapes::StructureShape.new(name: 'ScannedItemCount')
375
378
  Scans = Shapes::ListShape.new(name: 'Scans')
376
379
  SecurityContext = Shapes::StructureShape.new(name: 'SecurityContext')
@@ -381,6 +384,8 @@ module Aws::GuardDuty
381
384
  SortCriteria = Shapes::StructureShape.new(name: 'SortCriteria')
382
385
  SourceIps = Shapes::ListShape.new(name: 'SourceIps')
383
386
  Sources = Shapes::ListShape.new(name: 'Sources')
387
+ StartMalwareScanRequest = Shapes::StructureShape.new(name: 'StartMalwareScanRequest')
388
+ StartMalwareScanResponse = Shapes::StructureShape.new(name: 'StartMalwareScanResponse')
384
389
  StartMonitoringMembersRequest = Shapes::StructureShape.new(name: 'StartMonitoringMembersRequest')
385
390
  StartMonitoringMembersResponse = Shapes::StructureShape.new(name: 'StartMonitoringMembersResponse')
386
391
  StopMonitoringMembersRequest = Shapes::StructureShape.new(name: 'StopMonitoringMembersRequest')
@@ -578,6 +583,10 @@ module Aws::GuardDuty
578
583
  Condition.add_member(:less_than_or_equal, Shapes::ShapeRef.new(shape: Long, location_name: "lessThanOrEqual"))
579
584
  Condition.struct_class = Types::Condition
580
585
 
586
+ ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
587
+ ConflictException.add_member(:type, Shapes::ShapeRef.new(shape: String, location_name: "__type"))
588
+ ConflictException.struct_class = Types::ConflictException
589
+
581
590
  Container.add_member(:container_runtime, Shapes::ShapeRef.new(shape: String, location_name: "containerRuntime"))
582
591
  Container.add_member(:id, Shapes::ShapeRef.new(shape: String, location_name: "id"))
583
592
  Container.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
@@ -917,6 +926,7 @@ module Aws::GuardDuty
917
926
  EbsVolumeScanDetails.add_member(:trigger_finding_id, Shapes::ShapeRef.new(shape: String, location_name: "triggerFindingId"))
918
927
  EbsVolumeScanDetails.add_member(:sources, Shapes::ShapeRef.new(shape: Sources, location_name: "sources"))
919
928
  EbsVolumeScanDetails.add_member(:scan_detections, Shapes::ShapeRef.new(shape: ScanDetections, location_name: "scanDetections"))
929
+ EbsVolumeScanDetails.add_member(:scan_type, Shapes::ShapeRef.new(shape: ScanType, location_name: "scanType"))
920
930
  EbsVolumeScanDetails.struct_class = Types::EbsVolumeScanDetails
921
931
 
922
932
  EbsVolumesResult.add_member(:status, Shapes::ShapeRef.new(shape: DataSourceStatus, location_name: "status"))
@@ -1725,6 +1735,7 @@ module Aws::GuardDuty
1725
1735
  Scan.add_member(:total_bytes, Shapes::ShapeRef.new(shape: PositiveLong, location_name: "totalBytes"))
1726
1736
  Scan.add_member(:file_count, Shapes::ShapeRef.new(shape: PositiveLong, location_name: "fileCount"))
1727
1737
  Scan.add_member(:attached_volumes, Shapes::ShapeRef.new(shape: VolumeDetails, location_name: "attachedVolumes"))
1738
+ Scan.add_member(:scan_type, Shapes::ShapeRef.new(shape: ScanType, location_name: "scanType"))
1728
1739
  Scan.struct_class = Types::Scan
1729
1740
 
1730
1741
  ScanCondition.add_member(:map_equals, Shapes::ShapeRef.new(shape: MapEquals, required: true, location_name: "mapEquals"))
@@ -1814,6 +1825,12 @@ module Aws::GuardDuty
1814
1825
 
1815
1826
  Sources.member = Shapes::ShapeRef.new(shape: String)
1816
1827
 
1828
+ StartMalwareScanRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, required: true, location_name: "resourceArn"))
1829
+ StartMalwareScanRequest.struct_class = Types::StartMalwareScanRequest
1830
+
1831
+ StartMalwareScanResponse.add_member(:scan_id, Shapes::ShapeRef.new(shape: NonEmptyString, location_name: "scanId"))
1832
+ StartMalwareScanResponse.struct_class = Types::StartMalwareScanResponse
1833
+
1817
1834
  StartMonitoringMembersRequest.add_member(:detector_id, Shapes::ShapeRef.new(shape: DetectorId, required: true, location: "uri", location_name: "detectorId"))
1818
1835
  StartMonitoringMembersRequest.add_member(:account_ids, Shapes::ShapeRef.new(shape: AccountIds, required: true, location_name: "accountIds"))
1819
1836
  StartMonitoringMembersRequest.struct_class = Types::StartMonitoringMembersRequest
@@ -2669,6 +2686,17 @@ module Aws::GuardDuty
2669
2686
  )
2670
2687
  end)
2671
2688
 
2689
+ api.add_operation(:start_malware_scan, Seahorse::Model::Operation.new.tap do |o|
2690
+ o.name = "StartMalwareScan"
2691
+ o.http_method = "POST"
2692
+ o.http_request_uri = "/malware-scan/start"
2693
+ o.input = Shapes::ShapeRef.new(shape: StartMalwareScanRequest)
2694
+ o.output = Shapes::ShapeRef.new(shape: StartMalwareScanResponse)
2695
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
2696
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
2697
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerErrorException)
2698
+ end)
2699
+
2672
2700
  api.add_operation(:start_monitoring_members, Seahorse::Model::Operation.new.tap do |o|
2673
2701
  o.name = "StartMonitoringMembers"
2674
2702
  o.http_method = "POST"
@@ -753,6 +753,20 @@ module Aws::GuardDuty
753
753
  end
754
754
  end
755
755
 
756
+ class StartMalwareScan
757
+ def self.build(context)
758
+ unless context.config.regional_endpoint
759
+ endpoint = context.config.endpoint.to_s
760
+ end
761
+ Aws::GuardDuty::EndpointParameters.new(
762
+ region: context.config.region,
763
+ use_dual_stack: context.config.use_dualstack_endpoint,
764
+ use_fips: context.config.use_fips_endpoint,
765
+ endpoint: endpoint,
766
+ )
767
+ end
768
+ end
769
+
756
770
  class StartMonitoringMembers
757
771
  def self.build(context)
758
772
  unless context.config.regional_endpoint
@@ -28,6 +28,7 @@ module Aws::GuardDuty
28
28
  #
29
29
  # ## Error Classes
30
30
  # * {BadRequestException}
31
+ # * {ConflictException}
31
32
  # * {InternalServerErrorException}
32
33
  #
33
34
  # Additionally, error classes are dynamically generated for service errors based on the error code
@@ -56,6 +57,26 @@ module Aws::GuardDuty
56
57
  end
57
58
  end
58
59
 
60
+ class ConflictException < ServiceError
61
+
62
+ # @param [Seahorse::Client::RequestContext] context
63
+ # @param [String] message
64
+ # @param [Aws::GuardDuty::Types::ConflictException] data
65
+ def initialize(context, message, data = Aws::EmptyStructure.new)
66
+ super(context, message, data)
67
+ end
68
+
69
+ # @return [String]
70
+ def message
71
+ @message || @data[:message]
72
+ end
73
+
74
+ # @return [String]
75
+ def type
76
+ @data[:type]
77
+ end
78
+ end
79
+
59
80
  class InternalServerErrorException < ServiceError
60
81
 
61
82
  # @param [Seahorse::Client::RequestContext] context
@@ -162,6 +162,8 @@ module Aws::GuardDuty
162
162
  Aws::GuardDuty::Endpoints::ListTagsForResource.build(context)
163
163
  when :list_threat_intel_sets
164
164
  Aws::GuardDuty::Endpoints::ListThreatIntelSets.build(context)
165
+ when :start_malware_scan
166
+ Aws::GuardDuty::Endpoints::StartMalwareScan.build(context)
165
167
  when :start_monitoring_members
166
168
  Aws::GuardDuty::Endpoints::StartMonitoringMembers.build(context)
167
169
  when :stop_monitoring_members
@@ -591,6 +591,25 @@ module Aws::GuardDuty
591
591
  include Aws::Structure
592
592
  end
593
593
 
594
+ # A request conflict exception object.
595
+ #
596
+ # @!attribute [rw] message
597
+ # The error message.
598
+ # @return [String]
599
+ #
600
+ # @!attribute [rw] type
601
+ # The error type.
602
+ # @return [String]
603
+ #
604
+ # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/ConflictException AWS API Documentation
605
+ #
606
+ class ConflictException < Struct.new(
607
+ :message,
608
+ :type)
609
+ SENSITIVE = []
610
+ include Aws::Structure
611
+ end
612
+
594
613
  # Details of a container.
595
614
  #
596
615
  # @!attribute [rw] container_runtime
@@ -2201,6 +2220,10 @@ module Aws::GuardDuty
2201
2220
  # Contains a complete view providing malware scan result details.
2202
2221
  # @return [Types::ScanDetections]
2203
2222
  #
2223
+ # @!attribute [rw] scan_type
2224
+ # Specifies the scan type that invoked the malware scan.
2225
+ # @return [String]
2226
+ #
2204
2227
  # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/EbsVolumeScanDetails AWS API Documentation
2205
2228
  #
2206
2229
  class EbsVolumeScanDetails < Struct.new(
@@ -2209,7 +2232,8 @@ module Aws::GuardDuty
2209
2232
  :scan_completed_at,
2210
2233
  :trigger_finding_id,
2211
2234
  :sources,
2212
- :scan_detections)
2235
+ :scan_detections,
2236
+ :scan_type)
2213
2237
  SENSITIVE = []
2214
2238
  include Aws::Structure
2215
2239
  end
@@ -5984,6 +6008,10 @@ module Aws::GuardDuty
5984
6008
  # scanned.
5985
6009
  # @return [Array<Types::VolumeDetail>]
5986
6010
  #
6011
+ # @!attribute [rw] scan_type
6012
+ # Specifies the scan type that invoked the malware scan.
6013
+ # @return [String]
6014
+ #
5987
6015
  # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/Scan AWS API Documentation
5988
6016
  #
5989
6017
  class Scan < Struct.new(
@@ -6000,7 +6028,8 @@ module Aws::GuardDuty
6000
6028
  :account_id,
6001
6029
  :total_bytes,
6002
6030
  :file_count,
6003
- :attached_volumes)
6031
+ :attached_volumes,
6032
+ :scan_type)
6004
6033
  SENSITIVE = []
6005
6034
  include Aws::Structure
6006
6035
  end
@@ -6378,6 +6407,33 @@ module Aws::GuardDuty
6378
6407
  include Aws::Structure
6379
6408
  end
6380
6409
 
6410
+ # @!attribute [rw] resource_arn
6411
+ # Amazon Resource Name (ARN) of the resource for which you invoked the
6412
+ # API.
6413
+ # @return [String]
6414
+ #
6415
+ # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMalwareScanRequest AWS API Documentation
6416
+ #
6417
+ class StartMalwareScanRequest < Struct.new(
6418
+ :resource_arn)
6419
+ SENSITIVE = []
6420
+ include Aws::Structure
6421
+ end
6422
+
6423
+ # @!attribute [rw] scan_id
6424
+ # A unique identifier that gets generated when you invoke the API
6425
+ # without any error. Each malware scan has a corresponding scan ID.
6426
+ # Using this scan ID, you can monitor the status of your malware scan.
6427
+ # @return [String]
6428
+ #
6429
+ # @see http://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/StartMalwareScanResponse AWS API Documentation
6430
+ #
6431
+ class StartMalwareScanResponse < Struct.new(
6432
+ :scan_id)
6433
+ SENSITIVE = []
6434
+ include Aws::Structure
6435
+ end
6436
+
6381
6437
  # @!attribute [rw] detector_id
6382
6438
  # The unique ID of the detector of the GuardDuty administrator account
6383
6439
  # associated with the member accounts to monitor.
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-guardduty/customizations'
52
52
  # @!group service
53
53
  module Aws::GuardDuty
54
54
 
55
- GEM_VERSION = '1.68.0'
55
+ GEM_VERSION = '1.69.0'
56
56
 
57
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-guardduty
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.68.0
4
+ version: 1.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core