lib/aws-sdk-guardduty/errors.rb in aws-sdk-guardduty-1.69.0 vs lib/aws-sdk-guardduty/errors.rb in aws-sdk-guardduty-1.70.0
- old
+ new
@@ -25,18 +25,39 @@
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
# information about the request that generated the error.
# See {Seahorse::Client::RequestContext} for more information.
#
# ## Error Classes
+ # * {AccessDeniedException}
# * {BadRequestException}
# * {ConflictException}
# * {InternalServerErrorException}
#
# Additionally, error classes are dynamically generated for service errors based on the error code
# if they are not defined above.
module Errors
extend Aws::Errors::DynamicErrors
+
+ class AccessDeniedException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::GuardDuty::Types::AccessDeniedException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+
+ # @return [String]
+ def message
+ @message || @data[:message]
+ end
+
+ # @return [String]
+ def type
+ @data[:type]
+ end
+ end
class BadRequestException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message