aws-sdk-guardduty 1.51.0 → 1.82.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,9 @@ module Aws::GuardDuty
27
27
  # See {Seahorse::Client::RequestContext} for more information.
28
28
  #
29
29
  # ## Error Classes
30
+ # * {AccessDeniedException}
30
31
  # * {BadRequestException}
32
+ # * {ConflictException}
31
33
  # * {InternalServerErrorException}
32
34
  #
33
35
  # Additionally, error classes are dynamically generated for service errors based on the error code
@@ -36,6 +38,26 @@ module Aws::GuardDuty
36
38
 
37
39
  extend Aws::Errors::DynamicErrors
38
40
 
41
+ class AccessDeniedException < ServiceError
42
+
43
+ # @param [Seahorse::Client::RequestContext] context
44
+ # @param [String] message
45
+ # @param [Aws::GuardDuty::Types::AccessDeniedException] data
46
+ def initialize(context, message, data = Aws::EmptyStructure.new)
47
+ super(context, message, data)
48
+ end
49
+
50
+ # @return [String]
51
+ def message
52
+ @message || @data[:message]
53
+ end
54
+
55
+ # @return [String]
56
+ def type
57
+ @data[:type]
58
+ end
59
+ end
60
+
39
61
  class BadRequestException < ServiceError
40
62
 
41
63
  # @param [Seahorse::Client::RequestContext] context
@@ -56,6 +78,26 @@ module Aws::GuardDuty
56
78
  end
57
79
  end
58
80
 
81
+ class ConflictException < ServiceError
82
+
83
+ # @param [Seahorse::Client::RequestContext] context
84
+ # @param [String] message
85
+ # @param [Aws::GuardDuty::Types::ConflictException] data
86
+ def initialize(context, message, data = Aws::EmptyStructure.new)
87
+ super(context, message, data)
88
+ end
89
+
90
+ # @return [String]
91
+ def message
92
+ @message || @data[:message]
93
+ end
94
+
95
+ # @return [String]
96
+ def type
97
+ @data[:type]
98
+ end
99
+ end
100
+
59
101
  class InternalServerErrorException < ServiceError
60
102
 
61
103
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,204 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::GuardDuty
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::GuardDuty::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::GuardDuty::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::GuardDuty::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :accept_administrator_invitation
60
+ Aws::GuardDuty::Endpoints::AcceptAdministratorInvitation.build(context)
61
+ when :accept_invitation
62
+ Aws::GuardDuty::Endpoints::AcceptInvitation.build(context)
63
+ when :archive_findings
64
+ Aws::GuardDuty::Endpoints::ArchiveFindings.build(context)
65
+ when :create_detector
66
+ Aws::GuardDuty::Endpoints::CreateDetector.build(context)
67
+ when :create_filter
68
+ Aws::GuardDuty::Endpoints::CreateFilter.build(context)
69
+ when :create_ip_set
70
+ Aws::GuardDuty::Endpoints::CreateIPSet.build(context)
71
+ when :create_members
72
+ Aws::GuardDuty::Endpoints::CreateMembers.build(context)
73
+ when :create_publishing_destination
74
+ Aws::GuardDuty::Endpoints::CreatePublishingDestination.build(context)
75
+ when :create_sample_findings
76
+ Aws::GuardDuty::Endpoints::CreateSampleFindings.build(context)
77
+ when :create_threat_intel_set
78
+ Aws::GuardDuty::Endpoints::CreateThreatIntelSet.build(context)
79
+ when :decline_invitations
80
+ Aws::GuardDuty::Endpoints::DeclineInvitations.build(context)
81
+ when :delete_detector
82
+ Aws::GuardDuty::Endpoints::DeleteDetector.build(context)
83
+ when :delete_filter
84
+ Aws::GuardDuty::Endpoints::DeleteFilter.build(context)
85
+ when :delete_ip_set
86
+ Aws::GuardDuty::Endpoints::DeleteIPSet.build(context)
87
+ when :delete_invitations
88
+ Aws::GuardDuty::Endpoints::DeleteInvitations.build(context)
89
+ when :delete_members
90
+ Aws::GuardDuty::Endpoints::DeleteMembers.build(context)
91
+ when :delete_publishing_destination
92
+ Aws::GuardDuty::Endpoints::DeletePublishingDestination.build(context)
93
+ when :delete_threat_intel_set
94
+ Aws::GuardDuty::Endpoints::DeleteThreatIntelSet.build(context)
95
+ when :describe_malware_scans
96
+ Aws::GuardDuty::Endpoints::DescribeMalwareScans.build(context)
97
+ when :describe_organization_configuration
98
+ Aws::GuardDuty::Endpoints::DescribeOrganizationConfiguration.build(context)
99
+ when :describe_publishing_destination
100
+ Aws::GuardDuty::Endpoints::DescribePublishingDestination.build(context)
101
+ when :disable_organization_admin_account
102
+ Aws::GuardDuty::Endpoints::DisableOrganizationAdminAccount.build(context)
103
+ when :disassociate_from_administrator_account
104
+ Aws::GuardDuty::Endpoints::DisassociateFromAdministratorAccount.build(context)
105
+ when :disassociate_from_master_account
106
+ Aws::GuardDuty::Endpoints::DisassociateFromMasterAccount.build(context)
107
+ when :disassociate_members
108
+ Aws::GuardDuty::Endpoints::DisassociateMembers.build(context)
109
+ when :enable_organization_admin_account
110
+ Aws::GuardDuty::Endpoints::EnableOrganizationAdminAccount.build(context)
111
+ when :get_administrator_account
112
+ Aws::GuardDuty::Endpoints::GetAdministratorAccount.build(context)
113
+ when :get_coverage_statistics
114
+ Aws::GuardDuty::Endpoints::GetCoverageStatistics.build(context)
115
+ when :get_detector
116
+ Aws::GuardDuty::Endpoints::GetDetector.build(context)
117
+ when :get_filter
118
+ Aws::GuardDuty::Endpoints::GetFilter.build(context)
119
+ when :get_findings
120
+ Aws::GuardDuty::Endpoints::GetFindings.build(context)
121
+ when :get_findings_statistics
122
+ Aws::GuardDuty::Endpoints::GetFindingsStatistics.build(context)
123
+ when :get_ip_set
124
+ Aws::GuardDuty::Endpoints::GetIPSet.build(context)
125
+ when :get_invitations_count
126
+ Aws::GuardDuty::Endpoints::GetInvitationsCount.build(context)
127
+ when :get_malware_scan_settings
128
+ Aws::GuardDuty::Endpoints::GetMalwareScanSettings.build(context)
129
+ when :get_master_account
130
+ Aws::GuardDuty::Endpoints::GetMasterAccount.build(context)
131
+ when :get_member_detectors
132
+ Aws::GuardDuty::Endpoints::GetMemberDetectors.build(context)
133
+ when :get_members
134
+ Aws::GuardDuty::Endpoints::GetMembers.build(context)
135
+ when :get_remaining_free_trial_days
136
+ Aws::GuardDuty::Endpoints::GetRemainingFreeTrialDays.build(context)
137
+ when :get_threat_intel_set
138
+ Aws::GuardDuty::Endpoints::GetThreatIntelSet.build(context)
139
+ when :get_usage_statistics
140
+ Aws::GuardDuty::Endpoints::GetUsageStatistics.build(context)
141
+ when :invite_members
142
+ Aws::GuardDuty::Endpoints::InviteMembers.build(context)
143
+ when :list_coverage
144
+ Aws::GuardDuty::Endpoints::ListCoverage.build(context)
145
+ when :list_detectors
146
+ Aws::GuardDuty::Endpoints::ListDetectors.build(context)
147
+ when :list_filters
148
+ Aws::GuardDuty::Endpoints::ListFilters.build(context)
149
+ when :list_findings
150
+ Aws::GuardDuty::Endpoints::ListFindings.build(context)
151
+ when :list_ip_sets
152
+ Aws::GuardDuty::Endpoints::ListIPSets.build(context)
153
+ when :list_invitations
154
+ Aws::GuardDuty::Endpoints::ListInvitations.build(context)
155
+ when :list_members
156
+ Aws::GuardDuty::Endpoints::ListMembers.build(context)
157
+ when :list_organization_admin_accounts
158
+ Aws::GuardDuty::Endpoints::ListOrganizationAdminAccounts.build(context)
159
+ when :list_publishing_destinations
160
+ Aws::GuardDuty::Endpoints::ListPublishingDestinations.build(context)
161
+ when :list_tags_for_resource
162
+ Aws::GuardDuty::Endpoints::ListTagsForResource.build(context)
163
+ when :list_threat_intel_sets
164
+ Aws::GuardDuty::Endpoints::ListThreatIntelSets.build(context)
165
+ when :start_malware_scan
166
+ Aws::GuardDuty::Endpoints::StartMalwareScan.build(context)
167
+ when :start_monitoring_members
168
+ Aws::GuardDuty::Endpoints::StartMonitoringMembers.build(context)
169
+ when :stop_monitoring_members
170
+ Aws::GuardDuty::Endpoints::StopMonitoringMembers.build(context)
171
+ when :tag_resource
172
+ Aws::GuardDuty::Endpoints::TagResource.build(context)
173
+ when :unarchive_findings
174
+ Aws::GuardDuty::Endpoints::UnarchiveFindings.build(context)
175
+ when :untag_resource
176
+ Aws::GuardDuty::Endpoints::UntagResource.build(context)
177
+ when :update_detector
178
+ Aws::GuardDuty::Endpoints::UpdateDetector.build(context)
179
+ when :update_filter
180
+ Aws::GuardDuty::Endpoints::UpdateFilter.build(context)
181
+ when :update_findings_feedback
182
+ Aws::GuardDuty::Endpoints::UpdateFindingsFeedback.build(context)
183
+ when :update_ip_set
184
+ Aws::GuardDuty::Endpoints::UpdateIPSet.build(context)
185
+ when :update_malware_scan_settings
186
+ Aws::GuardDuty::Endpoints::UpdateMalwareScanSettings.build(context)
187
+ when :update_member_detectors
188
+ Aws::GuardDuty::Endpoints::UpdateMemberDetectors.build(context)
189
+ when :update_organization_configuration
190
+ Aws::GuardDuty::Endpoints::UpdateOrganizationConfiguration.build(context)
191
+ when :update_publishing_destination
192
+ Aws::GuardDuty::Endpoints::UpdatePublishingDestination.build(context)
193
+ when :update_threat_intel_set
194
+ Aws::GuardDuty::Endpoints::UpdateThreatIntelSet.build(context)
195
+ end
196
+ end
197
+ end
198
+
199
+ def add_handlers(handlers, _config)
200
+ handlers.add(Handler, step: :build, priority: 75)
201
+ end
202
+ end
203
+ end
204
+ end