github.com/aavshr/aws-sdk-go@v1.41.3/service/cloudtrail/errors.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package cloudtrail
     4  
     5  import (
     6  	"github.com/aavshr/aws-sdk-go/private/protocol"
     7  )
     8  
     9  const (
    10  
    11  	// ErrCodeARNInvalidException for service response error code
    12  	// "CloudTrailARNInvalidException".
    13  	//
    14  	// This exception is thrown when an operation is called with a trail ARN that
    15  	// is not valid. The following is the format of a trail ARN.
    16  	//
    17  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
    18  	ErrCodeARNInvalidException = "CloudTrailARNInvalidException"
    19  
    20  	// ErrCodeAccessNotEnabledException for service response error code
    21  	// "CloudTrailAccessNotEnabledException".
    22  	//
    23  	// This exception is thrown when trusted access has not been enabled between
    24  	// CloudTrail and Organizations. For more information, see Enabling Trusted
    25  	// Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
    26  	// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
    27  	ErrCodeAccessNotEnabledException = "CloudTrailAccessNotEnabledException"
    28  
    29  	// ErrCodeCloudTrailInvalidClientTokenIdException for service response error code
    30  	// "CloudTrailInvalidClientTokenIdException".
    31  	//
    32  	// This exception is thrown when a call results in the InvalidClientTokenId
    33  	// error code. This can occur when you are creating or updating a trail to send
    34  	// notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
    35  	// account.
    36  	ErrCodeCloudTrailInvalidClientTokenIdException = "CloudTrailInvalidClientTokenIdException"
    37  
    38  	// ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code
    39  	// "CloudWatchLogsDeliveryUnavailableException".
    40  	//
    41  	// Cannot set a CloudWatch Logs delivery for this region.
    42  	ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException"
    43  
    44  	// ErrCodeConflictException for service response error code
    45  	// "ConflictException".
    46  	//
    47  	// This exception is thrown when the specified resource is not ready for an
    48  	// operation. This can occur when you try to run an operation on a trail before
    49  	// CloudTrail has time to fully load the trail. If this exception occurs, wait
    50  	// a few minutes, and then try the operation again.
    51  	ErrCodeConflictException = "ConflictException"
    52  
    53  	// ErrCodeInsightNotEnabledException for service response error code
    54  	// "InsightNotEnabledException".
    55  	//
    56  	// If you run GetInsightSelectors on a trail that does not have Insights events
    57  	// enabled, the operation throws the exception InsightNotEnabledException.
    58  	ErrCodeInsightNotEnabledException = "InsightNotEnabledException"
    59  
    60  	// ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code
    61  	// "InsufficientDependencyServiceAccessPermissionException".
    62  	//
    63  	// This exception is thrown when the IAM user or role that is used to create
    64  	// the organization trail is lacking one or more required permissions for creating
    65  	// an organization trail in a required service. For more information, see Prepare
    66  	// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
    67  	ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException"
    68  
    69  	// ErrCodeInsufficientEncryptionPolicyException for service response error code
    70  	// "InsufficientEncryptionPolicyException".
    71  	//
    72  	// This exception is thrown when the policy on the S3 bucket or KMS key is not
    73  	// sufficient.
    74  	ErrCodeInsufficientEncryptionPolicyException = "InsufficientEncryptionPolicyException"
    75  
    76  	// ErrCodeInsufficientS3BucketPolicyException for service response error code
    77  	// "InsufficientS3BucketPolicyException".
    78  	//
    79  	// This exception is thrown when the policy on the S3 bucket is not sufficient.
    80  	ErrCodeInsufficientS3BucketPolicyException = "InsufficientS3BucketPolicyException"
    81  
    82  	// ErrCodeInsufficientSnsTopicPolicyException for service response error code
    83  	// "InsufficientSnsTopicPolicyException".
    84  	//
    85  	// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
    86  	ErrCodeInsufficientSnsTopicPolicyException = "InsufficientSnsTopicPolicyException"
    87  
    88  	// ErrCodeInvalidCloudWatchLogsLogGroupArnException for service response error code
    89  	// "InvalidCloudWatchLogsLogGroupArnException".
    90  	//
    91  	// This exception is thrown when the provided CloudWatch Logs log group is not
    92  	// valid.
    93  	ErrCodeInvalidCloudWatchLogsLogGroupArnException = "InvalidCloudWatchLogsLogGroupArnException"
    94  
    95  	// ErrCodeInvalidCloudWatchLogsRoleArnException for service response error code
    96  	// "InvalidCloudWatchLogsRoleArnException".
    97  	//
    98  	// This exception is thrown when the provided role is not valid.
    99  	ErrCodeInvalidCloudWatchLogsRoleArnException = "InvalidCloudWatchLogsRoleArnException"
   100  
   101  	// ErrCodeInvalidEventCategoryException for service response error code
   102  	// "InvalidEventCategoryException".
   103  	//
   104  	// Occurs if an event category that is not valid is specified as a value of
   105  	// EventCategory.
   106  	ErrCodeInvalidEventCategoryException = "InvalidEventCategoryException"
   107  
   108  	// ErrCodeInvalidEventSelectorsException for service response error code
   109  	// "InvalidEventSelectorsException".
   110  	//
   111  	// This exception is thrown when the PutEventSelectors operation is called with
   112  	// a number of event selectors, advanced event selectors, or data resources
   113  	// that is not valid. The combination of event selectors or advanced event selectors
   114  	// and data resources is not valid. A trail can have up to 5 event selectors.
   115  	// If a trail uses advanced event selectors, a maximum of 500 total values for
   116  	// all conditions in all advanced event selectors is allowed. A trail is limited
   117  	// to 250 data resources. These data resources can be distributed across event
   118  	// selectors, but the overall total cannot exceed 250.
   119  	//
   120  	// You can:
   121  	//
   122  	//    * Specify a valid number of event selectors (1 to 5) for a trail.
   123  	//
   124  	//    * Specify a valid number of data resources (1 to 250) for an event selector.
   125  	//    The limit of number of resources on an individual event selector is configurable
   126  	//    up to 250. However, this upper limit is allowed only if the total number
   127  	//    of data resources does not exceed 250 across all event selectors for a
   128  	//    trail.
   129  	//
   130  	//    * Specify up to 500 values for all conditions in all advanced event selectors
   131  	//    for a trail.
   132  	//
   133  	//    * Specify a valid value for a parameter. For example, specifying the ReadWriteType
   134  	//    parameter with a value of read-only is not valid.
   135  	ErrCodeInvalidEventSelectorsException = "InvalidEventSelectorsException"
   136  
   137  	// ErrCodeInvalidHomeRegionException for service response error code
   138  	// "InvalidHomeRegionException".
   139  	//
   140  	// This exception is thrown when an operation is called on a trail from a region
   141  	// other than the region in which the trail was created.
   142  	ErrCodeInvalidHomeRegionException = "InvalidHomeRegionException"
   143  
   144  	// ErrCodeInvalidInsightSelectorsException for service response error code
   145  	// "InvalidInsightSelectorsException".
   146  	//
   147  	// The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
   148  	// or GetInsightSelectors request is not valid, or the specified insight type
   149  	// in the InsightSelectors statement is not a valid insight type.
   150  	ErrCodeInvalidInsightSelectorsException = "InvalidInsightSelectorsException"
   151  
   152  	// ErrCodeInvalidKmsKeyIdException for service response error code
   153  	// "InvalidKmsKeyIdException".
   154  	//
   155  	// This exception is thrown when the KMS key ARN is not valid.
   156  	ErrCodeInvalidKmsKeyIdException = "InvalidKmsKeyIdException"
   157  
   158  	// ErrCodeInvalidLookupAttributesException for service response error code
   159  	// "InvalidLookupAttributesException".
   160  	//
   161  	// Occurs when a lookup attribute is specified that is not valid.
   162  	ErrCodeInvalidLookupAttributesException = "InvalidLookupAttributesException"
   163  
   164  	// ErrCodeInvalidMaxResultsException for service response error code
   165  	// "InvalidMaxResultsException".
   166  	//
   167  	// This exception is thrown if the limit specified is not valid.
   168  	ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException"
   169  
   170  	// ErrCodeInvalidNextTokenException for service response error code
   171  	// "InvalidNextTokenException".
   172  	//
   173  	// A token that is not valid, or a token that was previously used in a request
   174  	// with different parameters. This exception is thrown if the token is not valid.
   175  	ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
   176  
   177  	// ErrCodeInvalidParameterCombinationException for service response error code
   178  	// "InvalidParameterCombinationException".
   179  	//
   180  	// This exception is thrown when the combination of parameters provided is not
   181  	// valid.
   182  	ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
   183  
   184  	// ErrCodeInvalidS3BucketNameException for service response error code
   185  	// "InvalidS3BucketNameException".
   186  	//
   187  	// This exception is thrown when the provided S3 bucket name is not valid.
   188  	ErrCodeInvalidS3BucketNameException = "InvalidS3BucketNameException"
   189  
   190  	// ErrCodeInvalidS3PrefixException for service response error code
   191  	// "InvalidS3PrefixException".
   192  	//
   193  	// This exception is thrown when the provided S3 prefix is not valid.
   194  	ErrCodeInvalidS3PrefixException = "InvalidS3PrefixException"
   195  
   196  	// ErrCodeInvalidSnsTopicNameException for service response error code
   197  	// "InvalidSnsTopicNameException".
   198  	//
   199  	// This exception is thrown when the provided SNS topic name is not valid.
   200  	ErrCodeInvalidSnsTopicNameException = "InvalidSnsTopicNameException"
   201  
   202  	// ErrCodeInvalidTagParameterException for service response error code
   203  	// "InvalidTagParameterException".
   204  	//
   205  	// This exception is thrown when the specified tag key or values are not valid.
   206  	// It can also occur if there are duplicate tags or too many tags on the resource.
   207  	ErrCodeInvalidTagParameterException = "InvalidTagParameterException"
   208  
   209  	// ErrCodeInvalidTimeRangeException for service response error code
   210  	// "InvalidTimeRangeException".
   211  	//
   212  	// Occurs if the timestamp values are not valid. Either the start time occurs
   213  	// after the end time, or the time range is outside the range of possible values.
   214  	ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
   215  
   216  	// ErrCodeInvalidTokenException for service response error code
   217  	// "InvalidTokenException".
   218  	//
   219  	// Reserved for future use.
   220  	ErrCodeInvalidTokenException = "InvalidTokenException"
   221  
   222  	// ErrCodeInvalidTrailNameException for service response error code
   223  	// "InvalidTrailNameException".
   224  	//
   225  	// This exception is thrown when the provided trail name is not valid. Trail
   226  	// names must meet the following requirements:
   227  	//
   228  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   229  	//    (_), or dashes (-)
   230  	//
   231  	//    * Start with a letter or number, and end with a letter or number
   232  	//
   233  	//    * Be between 3 and 128 characters
   234  	//
   235  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   236  	//    and my--namespace are not valid.
   237  	//
   238  	//    * Not be in IP address format (for example, 192.168.5.4)
   239  	ErrCodeInvalidTrailNameException = "InvalidTrailNameException"
   240  
   241  	// ErrCodeKmsException for service response error code
   242  	// "KmsException".
   243  	//
   244  	// This exception is thrown when there is an issue with the specified KMS key
   245  	// and the trail can’t be updated.
   246  	ErrCodeKmsException = "KmsException"
   247  
   248  	// ErrCodeKmsKeyDisabledException for service response error code
   249  	// "KmsKeyDisabledException".
   250  	//
   251  	// This exception is no longer in use.
   252  	ErrCodeKmsKeyDisabledException = "KmsKeyDisabledException"
   253  
   254  	// ErrCodeKmsKeyNotFoundException for service response error code
   255  	// "KmsKeyNotFoundException".
   256  	//
   257  	// This exception is thrown when the KMS key does not exist, when the S3 bucket
   258  	// and the KMS key are not in the same region, or when the KMS key associated
   259  	// with the Amazon SNS topic either does not exist or is not in the same region.
   260  	ErrCodeKmsKeyNotFoundException = "KmsKeyNotFoundException"
   261  
   262  	// ErrCodeMaximumNumberOfTrailsExceededException for service response error code
   263  	// "MaximumNumberOfTrailsExceededException".
   264  	//
   265  	// This exception is thrown when the maximum number of trails is reached.
   266  	ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException"
   267  
   268  	// ErrCodeNotOrganizationMasterAccountException for service response error code
   269  	// "NotOrganizationMasterAccountException".
   270  	//
   271  	// This exception is thrown when the Amazon Web Services account making the
   272  	// request to create or update an organization trail is not the management account
   273  	// for an organization in Organizations. For more information, see Prepare For
   274  	// Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   275  	ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException"
   276  
   277  	// ErrCodeOperationNotPermittedException for service response error code
   278  	// "OperationNotPermittedException".
   279  	//
   280  	// This exception is thrown when the requested operation is not permitted.
   281  	ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
   282  
   283  	// ErrCodeOrganizationNotInAllFeaturesModeException for service response error code
   284  	// "OrganizationNotInAllFeaturesModeException".
   285  	//
   286  	// This exception is thrown when Organizations is not configured to support
   287  	// all features. All features must be enabled in Organizations to support creating
   288  	// an organization trail. For more information, see Prepare For Creating a Trail
   289  	// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   290  	ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException"
   291  
   292  	// ErrCodeOrganizationsNotInUseException for service response error code
   293  	// "OrganizationsNotInUseException".
   294  	//
   295  	// This exception is thrown when the request is made from an Amazon Web Services
   296  	// account that is not a member of an organization. To make this request, sign
   297  	// in using the credentials of an account that belongs to an organization.
   298  	ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException"
   299  
   300  	// ErrCodeResourceNotFoundException for service response error code
   301  	// "ResourceNotFoundException".
   302  	//
   303  	// This exception is thrown when the specified resource is not found.
   304  	ErrCodeResourceNotFoundException = "ResourceNotFoundException"
   305  
   306  	// ErrCodeResourceTypeNotSupportedException for service response error code
   307  	// "ResourceTypeNotSupportedException".
   308  	//
   309  	// This exception is thrown when the specified resource type is not supported
   310  	// by CloudTrail.
   311  	ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException"
   312  
   313  	// ErrCodeS3BucketDoesNotExistException for service response error code
   314  	// "S3BucketDoesNotExistException".
   315  	//
   316  	// This exception is thrown when the specified S3 bucket does not exist.
   317  	ErrCodeS3BucketDoesNotExistException = "S3BucketDoesNotExistException"
   318  
   319  	// ErrCodeTagsLimitExceededException for service response error code
   320  	// "TagsLimitExceededException".
   321  	//
   322  	// The number of tags per trail has exceeded the permitted amount. Currently,
   323  	// the limit is 50.
   324  	ErrCodeTagsLimitExceededException = "TagsLimitExceededException"
   325  
   326  	// ErrCodeTrailAlreadyExistsException for service response error code
   327  	// "TrailAlreadyExistsException".
   328  	//
   329  	// This exception is thrown when the specified trail already exists.
   330  	ErrCodeTrailAlreadyExistsException = "TrailAlreadyExistsException"
   331  
   332  	// ErrCodeTrailNotFoundException for service response error code
   333  	// "TrailNotFoundException".
   334  	//
   335  	// This exception is thrown when the trail with the given name is not found.
   336  	ErrCodeTrailNotFoundException = "TrailNotFoundException"
   337  
   338  	// ErrCodeTrailNotProvidedException for service response error code
   339  	// "TrailNotProvidedException".
   340  	//
   341  	// This exception is no longer in use.
   342  	ErrCodeTrailNotProvidedException = "TrailNotProvidedException"
   343  
   344  	// ErrCodeUnsupportedOperationException for service response error code
   345  	// "UnsupportedOperationException".
   346  	//
   347  	// This exception is thrown when the requested operation is not supported.
   348  	ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
   349  )
   350  
   351  var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
   352  	"CloudTrailARNInvalidException":                          newErrorARNInvalidException,
   353  	"CloudTrailAccessNotEnabledException":                    newErrorAccessNotEnabledException,
   354  	"CloudTrailInvalidClientTokenIdException":                newErrorCloudTrailInvalidClientTokenIdException,
   355  	"CloudWatchLogsDeliveryUnavailableException":             newErrorCloudWatchLogsDeliveryUnavailableException,
   356  	"ConflictException":                                      newErrorConflictException,
   357  	"InsightNotEnabledException":                             newErrorInsightNotEnabledException,
   358  	"InsufficientDependencyServiceAccessPermissionException": newErrorInsufficientDependencyServiceAccessPermissionException,
   359  	"InsufficientEncryptionPolicyException":                  newErrorInsufficientEncryptionPolicyException,
   360  	"InsufficientS3BucketPolicyException":                    newErrorInsufficientS3BucketPolicyException,
   361  	"InsufficientSnsTopicPolicyException":                    newErrorInsufficientSnsTopicPolicyException,
   362  	"InvalidCloudWatchLogsLogGroupArnException":              newErrorInvalidCloudWatchLogsLogGroupArnException,
   363  	"InvalidCloudWatchLogsRoleArnException":                  newErrorInvalidCloudWatchLogsRoleArnException,
   364  	"InvalidEventCategoryException":                          newErrorInvalidEventCategoryException,
   365  	"InvalidEventSelectorsException":                         newErrorInvalidEventSelectorsException,
   366  	"InvalidHomeRegionException":                             newErrorInvalidHomeRegionException,
   367  	"InvalidInsightSelectorsException":                       newErrorInvalidInsightSelectorsException,
   368  	"InvalidKmsKeyIdException":                               newErrorInvalidKmsKeyIdException,
   369  	"InvalidLookupAttributesException":                       newErrorInvalidLookupAttributesException,
   370  	"InvalidMaxResultsException":                             newErrorInvalidMaxResultsException,
   371  	"InvalidNextTokenException":                              newErrorInvalidNextTokenException,
   372  	"InvalidParameterCombinationException":                   newErrorInvalidParameterCombinationException,
   373  	"InvalidS3BucketNameException":                           newErrorInvalidS3BucketNameException,
   374  	"InvalidS3PrefixException":                               newErrorInvalidS3PrefixException,
   375  	"InvalidSnsTopicNameException":                           newErrorInvalidSnsTopicNameException,
   376  	"InvalidTagParameterException":                           newErrorInvalidTagParameterException,
   377  	"InvalidTimeRangeException":                              newErrorInvalidTimeRangeException,
   378  	"InvalidTokenException":                                  newErrorInvalidTokenException,
   379  	"InvalidTrailNameException":                              newErrorInvalidTrailNameException,
   380  	"KmsException":                                           newErrorKmsException,
   381  	"KmsKeyDisabledException":                                newErrorKmsKeyDisabledException,
   382  	"KmsKeyNotFoundException":                                newErrorKmsKeyNotFoundException,
   383  	"MaximumNumberOfTrailsExceededException":                 newErrorMaximumNumberOfTrailsExceededException,
   384  	"NotOrganizationMasterAccountException":                  newErrorNotOrganizationMasterAccountException,
   385  	"OperationNotPermittedException":                         newErrorOperationNotPermittedException,
   386  	"OrganizationNotInAllFeaturesModeException":              newErrorOrganizationNotInAllFeaturesModeException,
   387  	"OrganizationsNotInUseException":                         newErrorOrganizationsNotInUseException,
   388  	"ResourceNotFoundException":                              newErrorResourceNotFoundException,
   389  	"ResourceTypeNotSupportedException":                      newErrorResourceTypeNotSupportedException,
   390  	"S3BucketDoesNotExistException":                          newErrorS3BucketDoesNotExistException,
   391  	"TagsLimitExceededException":                             newErrorTagsLimitExceededException,
   392  	"TrailAlreadyExistsException":                            newErrorTrailAlreadyExistsException,
   393  	"TrailNotFoundException":                                 newErrorTrailNotFoundException,
   394  	"TrailNotProvidedException":                              newErrorTrailNotProvidedException,
   395  	"UnsupportedOperationException":                          newErrorUnsupportedOperationException,
   396  }