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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package cloudtrail
     4  
     5  import (
     6  	"fmt"
     7  	"time"
     8  
     9  	"github.com/aavshr/aws-sdk-go/aws"
    10  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    11  	"github.com/aavshr/aws-sdk-go/aws/request"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol"
    13  	"github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc"
    14  )
    15  
    16  const opAddTags = "AddTags"
    17  
    18  // AddTagsRequest generates a "aws/request.Request" representing the
    19  // client's request for the AddTags operation. The "output" return
    20  // value will be populated with the request's response once the request completes
    21  // successfully.
    22  //
    23  // Use "Send" method on the returned Request to send the API call to the service.
    24  // the "output" return value is not valid until after Send returns without error.
    25  //
    26  // See AddTags for more information on using the AddTags
    27  // API call, and error handling.
    28  //
    29  // This method is useful when you want to inject custom logic or configuration
    30  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    31  //
    32  //
    33  //    // Example sending a request using the AddTagsRequest method.
    34  //    req, resp := client.AddTagsRequest(params)
    35  //
    36  //    err := req.Send()
    37  //    if err == nil { // resp is now filled
    38  //        fmt.Println(resp)
    39  //    }
    40  //
    41  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
    42  func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
    43  	op := &request.Operation{
    44  		Name:       opAddTags,
    45  		HTTPMethod: "POST",
    46  		HTTPPath:   "/",
    47  	}
    48  
    49  	if input == nil {
    50  		input = &AddTagsInput{}
    51  	}
    52  
    53  	output = &AddTagsOutput{}
    54  	req = c.newRequest(op, input, output)
    55  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
    56  	return
    57  }
    58  
    59  // AddTags API operation for AWS CloudTrail.
    60  //
    61  // Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing
    62  // tag's value when a new value is specified for an existing tag key. Tag key
    63  // names must be unique for a trail; you cannot have two keys with the same
    64  // name but different values. If you specify a key without a value, the tag
    65  // will be created with the specified key and a value of null. You can tag a
    66  // trail that applies to all Amazon Web Services Regions only from the Region
    67  // in which the trail was created (also known as its home region).
    68  //
    69  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    70  // with awserr.Error's Code and Message methods to get detailed information about
    71  // the error.
    72  //
    73  // See the AWS API reference guide for AWS CloudTrail's
    74  // API operation AddTags for usage and error information.
    75  //
    76  // Returned Error Types:
    77  //   * ResourceNotFoundException
    78  //   This exception is thrown when the specified resource is not found.
    79  //
    80  //   * ARNInvalidException
    81  //   This exception is thrown when an operation is called with a trail ARN that
    82  //   is not valid. The following is the format of a trail ARN.
    83  //
    84  //   arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
    85  //
    86  //   * ResourceTypeNotSupportedException
    87  //   This exception is thrown when the specified resource type is not supported
    88  //   by CloudTrail.
    89  //
    90  //   * TagsLimitExceededException
    91  //   The number of tags per trail has exceeded the permitted amount. Currently,
    92  //   the limit is 50.
    93  //
    94  //   * InvalidTrailNameException
    95  //   This exception is thrown when the provided trail name is not valid. Trail
    96  //   names must meet the following requirements:
    97  //
    98  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
    99  //      (_), or dashes (-)
   100  //
   101  //      * Start with a letter or number, and end with a letter or number
   102  //
   103  //      * Be between 3 and 128 characters
   104  //
   105  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   106  //      and my--namespace are not valid.
   107  //
   108  //      * Not be in IP address format (for example, 192.168.5.4)
   109  //
   110  //   * InvalidTagParameterException
   111  //   This exception is thrown when the specified tag key or values are not valid.
   112  //   It can also occur if there are duplicate tags or too many tags on the resource.
   113  //
   114  //   * UnsupportedOperationException
   115  //   This exception is thrown when the requested operation is not supported.
   116  //
   117  //   * OperationNotPermittedException
   118  //   This exception is thrown when the requested operation is not permitted.
   119  //
   120  //   * NotOrganizationMasterAccountException
   121  //   This exception is thrown when the Amazon Web Services account making the
   122  //   request to create or update an organization trail is not the management account
   123  //   for an organization in Organizations. For more information, see Prepare For
   124  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   125  //
   126  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
   127  func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
   128  	req, out := c.AddTagsRequest(input)
   129  	return out, req.Send()
   130  }
   131  
   132  // AddTagsWithContext is the same as AddTags with the addition of
   133  // the ability to pass a context and additional request options.
   134  //
   135  // See AddTags for details on how to use this API operation.
   136  //
   137  // The context must be non-nil and will be used for request cancellation. If
   138  // the context is nil a panic will occur. In the future the SDK may create
   139  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   140  // for more information on using Contexts.
   141  func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
   142  	req, out := c.AddTagsRequest(input)
   143  	req.SetContext(ctx)
   144  	req.ApplyOptions(opts...)
   145  	return out, req.Send()
   146  }
   147  
   148  const opCreateTrail = "CreateTrail"
   149  
   150  // CreateTrailRequest generates a "aws/request.Request" representing the
   151  // client's request for the CreateTrail operation. The "output" return
   152  // value will be populated with the request's response once the request completes
   153  // successfully.
   154  //
   155  // Use "Send" method on the returned Request to send the API call to the service.
   156  // the "output" return value is not valid until after Send returns without error.
   157  //
   158  // See CreateTrail for more information on using the CreateTrail
   159  // API call, and error handling.
   160  //
   161  // This method is useful when you want to inject custom logic or configuration
   162  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   163  //
   164  //
   165  //    // Example sending a request using the CreateTrailRequest method.
   166  //    req, resp := client.CreateTrailRequest(params)
   167  //
   168  //    err := req.Send()
   169  //    if err == nil { // resp is now filled
   170  //        fmt.Println(resp)
   171  //    }
   172  //
   173  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
   174  func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
   175  	op := &request.Operation{
   176  		Name:       opCreateTrail,
   177  		HTTPMethod: "POST",
   178  		HTTPPath:   "/",
   179  	}
   180  
   181  	if input == nil {
   182  		input = &CreateTrailInput{}
   183  	}
   184  
   185  	output = &CreateTrailOutput{}
   186  	req = c.newRequest(op, input, output)
   187  	return
   188  }
   189  
   190  // CreateTrail API operation for AWS CloudTrail.
   191  //
   192  // Creates a trail that specifies the settings for delivery of log data to an
   193  // Amazon S3 bucket.
   194  //
   195  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   196  // with awserr.Error's Code and Message methods to get detailed information about
   197  // the error.
   198  //
   199  // See the AWS API reference guide for AWS CloudTrail's
   200  // API operation CreateTrail for usage and error information.
   201  //
   202  // Returned Error Types:
   203  //   * MaximumNumberOfTrailsExceededException
   204  //   This exception is thrown when the maximum number of trails is reached.
   205  //
   206  //   * TrailAlreadyExistsException
   207  //   This exception is thrown when the specified trail already exists.
   208  //
   209  //   * S3BucketDoesNotExistException
   210  //   This exception is thrown when the specified S3 bucket does not exist.
   211  //
   212  //   * InsufficientS3BucketPolicyException
   213  //   This exception is thrown when the policy on the S3 bucket is not sufficient.
   214  //
   215  //   * InsufficientSnsTopicPolicyException
   216  //   This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
   217  //
   218  //   * InsufficientEncryptionPolicyException
   219  //   This exception is thrown when the policy on the S3 bucket or KMS key is not
   220  //   sufficient.
   221  //
   222  //   * InvalidS3BucketNameException
   223  //   This exception is thrown when the provided S3 bucket name is not valid.
   224  //
   225  //   * InvalidS3PrefixException
   226  //   This exception is thrown when the provided S3 prefix is not valid.
   227  //
   228  //   * InvalidSnsTopicNameException
   229  //   This exception is thrown when the provided SNS topic name is not valid.
   230  //
   231  //   * InvalidKmsKeyIdException
   232  //   This exception is thrown when the KMS key ARN is not valid.
   233  //
   234  //   * InvalidTrailNameException
   235  //   This exception is thrown when the provided trail name is not valid. Trail
   236  //   names must meet the following requirements:
   237  //
   238  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   239  //      (_), or dashes (-)
   240  //
   241  //      * Start with a letter or number, and end with a letter or number
   242  //
   243  //      * Be between 3 and 128 characters
   244  //
   245  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   246  //      and my--namespace are not valid.
   247  //
   248  //      * Not be in IP address format (for example, 192.168.5.4)
   249  //
   250  //   * TrailNotProvidedException
   251  //   This exception is no longer in use.
   252  //
   253  //   * InvalidParameterCombinationException
   254  //   This exception is thrown when the combination of parameters provided is not
   255  //   valid.
   256  //
   257  //   * KmsKeyNotFoundException
   258  //   This exception is thrown when the KMS key does not exist, when the S3 bucket
   259  //   and the KMS key are not in the same region, or when the KMS key associated
   260  //   with the Amazon SNS topic either does not exist or is not in the same region.
   261  //
   262  //   * KmsKeyDisabledException
   263  //   This exception is no longer in use.
   264  //
   265  //   * KmsException
   266  //   This exception is thrown when there is an issue with the specified KMS key
   267  //   and the trail can’t be updated.
   268  //
   269  //   * InvalidCloudWatchLogsLogGroupArnException
   270  //   This exception is thrown when the provided CloudWatch Logs log group is not
   271  //   valid.
   272  //
   273  //   * InvalidCloudWatchLogsRoleArnException
   274  //   This exception is thrown when the provided role is not valid.
   275  //
   276  //   * CloudWatchLogsDeliveryUnavailableException
   277  //   Cannot set a CloudWatch Logs delivery for this region.
   278  //
   279  //   * InvalidTagParameterException
   280  //   This exception is thrown when the specified tag key or values are not valid.
   281  //   It can also occur if there are duplicate tags or too many tags on the resource.
   282  //
   283  //   * UnsupportedOperationException
   284  //   This exception is thrown when the requested operation is not supported.
   285  //
   286  //   * OperationNotPermittedException
   287  //   This exception is thrown when the requested operation is not permitted.
   288  //
   289  //   * AccessNotEnabledException
   290  //   This exception is thrown when trusted access has not been enabled between
   291  //   CloudTrail and Organizations. For more information, see Enabling Trusted
   292  //   Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
   293  //   and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   294  //
   295  //   * InsufficientDependencyServiceAccessPermissionException
   296  //   This exception is thrown when the IAM user or role that is used to create
   297  //   the organization trail is lacking one or more required permissions for creating
   298  //   an organization trail in a required service. For more information, see Prepare
   299  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   300  //
   301  //   * NotOrganizationMasterAccountException
   302  //   This exception is thrown when the Amazon Web Services account making the
   303  //   request to create or update an organization trail is not the management account
   304  //   for an organization in Organizations. For more information, see Prepare For
   305  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   306  //
   307  //   * OrganizationsNotInUseException
   308  //   This exception is thrown when the request is made from an Amazon Web Services
   309  //   account that is not a member of an organization. To make this request, sign
   310  //   in using the credentials of an account that belongs to an organization.
   311  //
   312  //   * OrganizationNotInAllFeaturesModeException
   313  //   This exception is thrown when Organizations is not configured to support
   314  //   all features. All features must be enabled in Organizations to support creating
   315  //   an organization trail. For more information, see Prepare For Creating a Trail
   316  //   For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   317  //
   318  //   * CloudTrailInvalidClientTokenIdException
   319  //   This exception is thrown when a call results in the InvalidClientTokenId
   320  //   error code. This can occur when you are creating or updating a trail to send
   321  //   notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
   322  //   account.
   323  //
   324  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
   325  func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
   326  	req, out := c.CreateTrailRequest(input)
   327  	return out, req.Send()
   328  }
   329  
   330  // CreateTrailWithContext is the same as CreateTrail with the addition of
   331  // the ability to pass a context and additional request options.
   332  //
   333  // See CreateTrail for details on how to use this API operation.
   334  //
   335  // The context must be non-nil and will be used for request cancellation. If
   336  // the context is nil a panic will occur. In the future the SDK may create
   337  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   338  // for more information on using Contexts.
   339  func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) {
   340  	req, out := c.CreateTrailRequest(input)
   341  	req.SetContext(ctx)
   342  	req.ApplyOptions(opts...)
   343  	return out, req.Send()
   344  }
   345  
   346  const opDeleteTrail = "DeleteTrail"
   347  
   348  // DeleteTrailRequest generates a "aws/request.Request" representing the
   349  // client's request for the DeleteTrail operation. The "output" return
   350  // value will be populated with the request's response once the request completes
   351  // successfully.
   352  //
   353  // Use "Send" method on the returned Request to send the API call to the service.
   354  // the "output" return value is not valid until after Send returns without error.
   355  //
   356  // See DeleteTrail for more information on using the DeleteTrail
   357  // API call, and error handling.
   358  //
   359  // This method is useful when you want to inject custom logic or configuration
   360  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   361  //
   362  //
   363  //    // Example sending a request using the DeleteTrailRequest method.
   364  //    req, resp := client.DeleteTrailRequest(params)
   365  //
   366  //    err := req.Send()
   367  //    if err == nil { // resp is now filled
   368  //        fmt.Println(resp)
   369  //    }
   370  //
   371  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
   372  func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
   373  	op := &request.Operation{
   374  		Name:       opDeleteTrail,
   375  		HTTPMethod: "POST",
   376  		HTTPPath:   "/",
   377  	}
   378  
   379  	if input == nil {
   380  		input = &DeleteTrailInput{}
   381  	}
   382  
   383  	output = &DeleteTrailOutput{}
   384  	req = c.newRequest(op, input, output)
   385  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   386  	return
   387  }
   388  
   389  // DeleteTrail API operation for AWS CloudTrail.
   390  //
   391  // Deletes a trail. This operation must be called from the region in which the
   392  // trail was created. DeleteTrail cannot be called on the shadow trails (replicated
   393  // trails in other regions) of a trail that is enabled in all regions.
   394  //
   395  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   396  // with awserr.Error's Code and Message methods to get detailed information about
   397  // the error.
   398  //
   399  // See the AWS API reference guide for AWS CloudTrail's
   400  // API operation DeleteTrail for usage and error information.
   401  //
   402  // Returned Error Types:
   403  //   * TrailNotFoundException
   404  //   This exception is thrown when the trail with the given name is not found.
   405  //
   406  //   * InvalidTrailNameException
   407  //   This exception is thrown when the provided trail name is not valid. Trail
   408  //   names must meet the following requirements:
   409  //
   410  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   411  //      (_), or dashes (-)
   412  //
   413  //      * Start with a letter or number, and end with a letter or number
   414  //
   415  //      * Be between 3 and 128 characters
   416  //
   417  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   418  //      and my--namespace are not valid.
   419  //
   420  //      * Not be in IP address format (for example, 192.168.5.4)
   421  //
   422  //   * InvalidHomeRegionException
   423  //   This exception is thrown when an operation is called on a trail from a region
   424  //   other than the region in which the trail was created.
   425  //
   426  //   * UnsupportedOperationException
   427  //   This exception is thrown when the requested operation is not supported.
   428  //
   429  //   * OperationNotPermittedException
   430  //   This exception is thrown when the requested operation is not permitted.
   431  //
   432  //   * NotOrganizationMasterAccountException
   433  //   This exception is thrown when the Amazon Web Services account making the
   434  //   request to create or update an organization trail is not the management account
   435  //   for an organization in Organizations. For more information, see Prepare For
   436  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   437  //
   438  //   * InsufficientDependencyServiceAccessPermissionException
   439  //   This exception is thrown when the IAM user or role that is used to create
   440  //   the organization trail is lacking one or more required permissions for creating
   441  //   an organization trail in a required service. For more information, see Prepare
   442  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
   443  //
   444  //   * ConflictException
   445  //   This exception is thrown when the specified resource is not ready for an
   446  //   operation. This can occur when you try to run an operation on a trail before
   447  //   CloudTrail has time to fully load the trail. If this exception occurs, wait
   448  //   a few minutes, and then try the operation again.
   449  //
   450  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
   451  func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
   452  	req, out := c.DeleteTrailRequest(input)
   453  	return out, req.Send()
   454  }
   455  
   456  // DeleteTrailWithContext is the same as DeleteTrail with the addition of
   457  // the ability to pass a context and additional request options.
   458  //
   459  // See DeleteTrail for details on how to use this API operation.
   460  //
   461  // The context must be non-nil and will be used for request cancellation. If
   462  // the context is nil a panic will occur. In the future the SDK may create
   463  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   464  // for more information on using Contexts.
   465  func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) {
   466  	req, out := c.DeleteTrailRequest(input)
   467  	req.SetContext(ctx)
   468  	req.ApplyOptions(opts...)
   469  	return out, req.Send()
   470  }
   471  
   472  const opDescribeTrails = "DescribeTrails"
   473  
   474  // DescribeTrailsRequest generates a "aws/request.Request" representing the
   475  // client's request for the DescribeTrails operation. The "output" return
   476  // value will be populated with the request's response once the request completes
   477  // successfully.
   478  //
   479  // Use "Send" method on the returned Request to send the API call to the service.
   480  // the "output" return value is not valid until after Send returns without error.
   481  //
   482  // See DescribeTrails for more information on using the DescribeTrails
   483  // API call, and error handling.
   484  //
   485  // This method is useful when you want to inject custom logic or configuration
   486  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   487  //
   488  //
   489  //    // Example sending a request using the DescribeTrailsRequest method.
   490  //    req, resp := client.DescribeTrailsRequest(params)
   491  //
   492  //    err := req.Send()
   493  //    if err == nil { // resp is now filled
   494  //        fmt.Println(resp)
   495  //    }
   496  //
   497  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
   498  func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
   499  	op := &request.Operation{
   500  		Name:       opDescribeTrails,
   501  		HTTPMethod: "POST",
   502  		HTTPPath:   "/",
   503  	}
   504  
   505  	if input == nil {
   506  		input = &DescribeTrailsInput{}
   507  	}
   508  
   509  	output = &DescribeTrailsOutput{}
   510  	req = c.newRequest(op, input, output)
   511  	return
   512  }
   513  
   514  // DescribeTrails API operation for AWS CloudTrail.
   515  //
   516  // Retrieves settings for one or more trails associated with the current region
   517  // for your account.
   518  //
   519  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   520  // with awserr.Error's Code and Message methods to get detailed information about
   521  // the error.
   522  //
   523  // See the AWS API reference guide for AWS CloudTrail's
   524  // API operation DescribeTrails for usage and error information.
   525  //
   526  // Returned Error Types:
   527  //   * UnsupportedOperationException
   528  //   This exception is thrown when the requested operation is not supported.
   529  //
   530  //   * OperationNotPermittedException
   531  //   This exception is thrown when the requested operation is not permitted.
   532  //
   533  //   * InvalidTrailNameException
   534  //   This exception is thrown when the provided trail name is not valid. Trail
   535  //   names must meet the following requirements:
   536  //
   537  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   538  //      (_), or dashes (-)
   539  //
   540  //      * Start with a letter or number, and end with a letter or number
   541  //
   542  //      * Be between 3 and 128 characters
   543  //
   544  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   545  //      and my--namespace are not valid.
   546  //
   547  //      * Not be in IP address format (for example, 192.168.5.4)
   548  //
   549  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
   550  func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
   551  	req, out := c.DescribeTrailsRequest(input)
   552  	return out, req.Send()
   553  }
   554  
   555  // DescribeTrailsWithContext is the same as DescribeTrails with the addition of
   556  // the ability to pass a context and additional request options.
   557  //
   558  // See DescribeTrails for details on how to use this API operation.
   559  //
   560  // The context must be non-nil and will be used for request cancellation. If
   561  // the context is nil a panic will occur. In the future the SDK may create
   562  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   563  // for more information on using Contexts.
   564  func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) {
   565  	req, out := c.DescribeTrailsRequest(input)
   566  	req.SetContext(ctx)
   567  	req.ApplyOptions(opts...)
   568  	return out, req.Send()
   569  }
   570  
   571  const opGetEventSelectors = "GetEventSelectors"
   572  
   573  // GetEventSelectorsRequest generates a "aws/request.Request" representing the
   574  // client's request for the GetEventSelectors operation. The "output" return
   575  // value will be populated with the request's response once the request completes
   576  // successfully.
   577  //
   578  // Use "Send" method on the returned Request to send the API call to the service.
   579  // the "output" return value is not valid until after Send returns without error.
   580  //
   581  // See GetEventSelectors for more information on using the GetEventSelectors
   582  // API call, and error handling.
   583  //
   584  // This method is useful when you want to inject custom logic or configuration
   585  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   586  //
   587  //
   588  //    // Example sending a request using the GetEventSelectorsRequest method.
   589  //    req, resp := client.GetEventSelectorsRequest(params)
   590  //
   591  //    err := req.Send()
   592  //    if err == nil { // resp is now filled
   593  //        fmt.Println(resp)
   594  //    }
   595  //
   596  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
   597  func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) {
   598  	op := &request.Operation{
   599  		Name:       opGetEventSelectors,
   600  		HTTPMethod: "POST",
   601  		HTTPPath:   "/",
   602  	}
   603  
   604  	if input == nil {
   605  		input = &GetEventSelectorsInput{}
   606  	}
   607  
   608  	output = &GetEventSelectorsOutput{}
   609  	req = c.newRequest(op, input, output)
   610  	return
   611  }
   612  
   613  // GetEventSelectors API operation for AWS CloudTrail.
   614  //
   615  // Describes the settings for the event selectors that you configured for your
   616  // trail. The information returned for your event selectors includes the following:
   617  //
   618  //    * If your event selector includes read-only events, write-only events,
   619  //    or all events. This applies to both management events and data events.
   620  //
   621  //    * If your event selector includes management events.
   622  //
   623  //    * If your event selector includes data events, the resources on which
   624  //    you are logging data events.
   625  //
   626  // For more information, see Logging Data and Management Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
   627  // in the CloudTrail User Guide.
   628  //
   629  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   630  // with awserr.Error's Code and Message methods to get detailed information about
   631  // the error.
   632  //
   633  // See the AWS API reference guide for AWS CloudTrail's
   634  // API operation GetEventSelectors for usage and error information.
   635  //
   636  // Returned Error Types:
   637  //   * TrailNotFoundException
   638  //   This exception is thrown when the trail with the given name is not found.
   639  //
   640  //   * InvalidTrailNameException
   641  //   This exception is thrown when the provided trail name is not valid. Trail
   642  //   names must meet the following requirements:
   643  //
   644  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   645  //      (_), or dashes (-)
   646  //
   647  //      * Start with a letter or number, and end with a letter or number
   648  //
   649  //      * Be between 3 and 128 characters
   650  //
   651  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   652  //      and my--namespace are not valid.
   653  //
   654  //      * Not be in IP address format (for example, 192.168.5.4)
   655  //
   656  //   * UnsupportedOperationException
   657  //   This exception is thrown when the requested operation is not supported.
   658  //
   659  //   * OperationNotPermittedException
   660  //   This exception is thrown when the requested operation is not permitted.
   661  //
   662  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
   663  func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) {
   664  	req, out := c.GetEventSelectorsRequest(input)
   665  	return out, req.Send()
   666  }
   667  
   668  // GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of
   669  // the ability to pass a context and additional request options.
   670  //
   671  // See GetEventSelectors for details on how to use this API operation.
   672  //
   673  // The context must be non-nil and will be used for request cancellation. If
   674  // the context is nil a panic will occur. In the future the SDK may create
   675  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   676  // for more information on using Contexts.
   677  func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) {
   678  	req, out := c.GetEventSelectorsRequest(input)
   679  	req.SetContext(ctx)
   680  	req.ApplyOptions(opts...)
   681  	return out, req.Send()
   682  }
   683  
   684  const opGetInsightSelectors = "GetInsightSelectors"
   685  
   686  // GetInsightSelectorsRequest generates a "aws/request.Request" representing the
   687  // client's request for the GetInsightSelectors operation. The "output" return
   688  // value will be populated with the request's response once the request completes
   689  // successfully.
   690  //
   691  // Use "Send" method on the returned Request to send the API call to the service.
   692  // the "output" return value is not valid until after Send returns without error.
   693  //
   694  // See GetInsightSelectors for more information on using the GetInsightSelectors
   695  // API call, and error handling.
   696  //
   697  // This method is useful when you want to inject custom logic or configuration
   698  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   699  //
   700  //
   701  //    // Example sending a request using the GetInsightSelectorsRequest method.
   702  //    req, resp := client.GetInsightSelectorsRequest(params)
   703  //
   704  //    err := req.Send()
   705  //    if err == nil { // resp is now filled
   706  //        fmt.Println(resp)
   707  //    }
   708  //
   709  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
   710  func (c *CloudTrail) GetInsightSelectorsRequest(input *GetInsightSelectorsInput) (req *request.Request, output *GetInsightSelectorsOutput) {
   711  	op := &request.Operation{
   712  		Name:       opGetInsightSelectors,
   713  		HTTPMethod: "POST",
   714  		HTTPPath:   "/",
   715  	}
   716  
   717  	if input == nil {
   718  		input = &GetInsightSelectorsInput{}
   719  	}
   720  
   721  	output = &GetInsightSelectorsOutput{}
   722  	req = c.newRequest(op, input, output)
   723  	return
   724  }
   725  
   726  // GetInsightSelectors API operation for AWS CloudTrail.
   727  //
   728  // Describes the settings for the Insights event selectors that you configured
   729  // for your trail. GetInsightSelectors shows if CloudTrail Insights event logging
   730  // is enabled on the trail, and if it is, which insight types are enabled. If
   731  // you run GetInsightSelectors on a trail that does not have Insights events
   732  // enabled, the operation throws the exception InsightNotEnabledException
   733  //
   734  // For more information, see Logging CloudTrail Insights Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)
   735  // in the CloudTrail User Guide.
   736  //
   737  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   738  // with awserr.Error's Code and Message methods to get detailed information about
   739  // the error.
   740  //
   741  // See the AWS API reference guide for AWS CloudTrail's
   742  // API operation GetInsightSelectors for usage and error information.
   743  //
   744  // Returned Error Types:
   745  //   * TrailNotFoundException
   746  //   This exception is thrown when the trail with the given name is not found.
   747  //
   748  //   * InvalidTrailNameException
   749  //   This exception is thrown when the provided trail name is not valid. Trail
   750  //   names must meet the following requirements:
   751  //
   752  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   753  //      (_), or dashes (-)
   754  //
   755  //      * Start with a letter or number, and end with a letter or number
   756  //
   757  //      * Be between 3 and 128 characters
   758  //
   759  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   760  //      and my--namespace are not valid.
   761  //
   762  //      * Not be in IP address format (for example, 192.168.5.4)
   763  //
   764  //   * UnsupportedOperationException
   765  //   This exception is thrown when the requested operation is not supported.
   766  //
   767  //   * OperationNotPermittedException
   768  //   This exception is thrown when the requested operation is not permitted.
   769  //
   770  //   * InsightNotEnabledException
   771  //   If you run GetInsightSelectors on a trail that does not have Insights events
   772  //   enabled, the operation throws the exception InsightNotEnabledException.
   773  //
   774  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
   775  func (c *CloudTrail) GetInsightSelectors(input *GetInsightSelectorsInput) (*GetInsightSelectorsOutput, error) {
   776  	req, out := c.GetInsightSelectorsRequest(input)
   777  	return out, req.Send()
   778  }
   779  
   780  // GetInsightSelectorsWithContext is the same as GetInsightSelectors with the addition of
   781  // the ability to pass a context and additional request options.
   782  //
   783  // See GetInsightSelectors for details on how to use this API operation.
   784  //
   785  // The context must be non-nil and will be used for request cancellation. If
   786  // the context is nil a panic will occur. In the future the SDK may create
   787  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   788  // for more information on using Contexts.
   789  func (c *CloudTrail) GetInsightSelectorsWithContext(ctx aws.Context, input *GetInsightSelectorsInput, opts ...request.Option) (*GetInsightSelectorsOutput, error) {
   790  	req, out := c.GetInsightSelectorsRequest(input)
   791  	req.SetContext(ctx)
   792  	req.ApplyOptions(opts...)
   793  	return out, req.Send()
   794  }
   795  
   796  const opGetTrail = "GetTrail"
   797  
   798  // GetTrailRequest generates a "aws/request.Request" representing the
   799  // client's request for the GetTrail operation. The "output" return
   800  // value will be populated with the request's response once the request completes
   801  // successfully.
   802  //
   803  // Use "Send" method on the returned Request to send the API call to the service.
   804  // the "output" return value is not valid until after Send returns without error.
   805  //
   806  // See GetTrail for more information on using the GetTrail
   807  // API call, and error handling.
   808  //
   809  // This method is useful when you want to inject custom logic or configuration
   810  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   811  //
   812  //
   813  //    // Example sending a request using the GetTrailRequest method.
   814  //    req, resp := client.GetTrailRequest(params)
   815  //
   816  //    err := req.Send()
   817  //    if err == nil { // resp is now filled
   818  //        fmt.Println(resp)
   819  //    }
   820  //
   821  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
   822  func (c *CloudTrail) GetTrailRequest(input *GetTrailInput) (req *request.Request, output *GetTrailOutput) {
   823  	op := &request.Operation{
   824  		Name:       opGetTrail,
   825  		HTTPMethod: "POST",
   826  		HTTPPath:   "/",
   827  	}
   828  
   829  	if input == nil {
   830  		input = &GetTrailInput{}
   831  	}
   832  
   833  	output = &GetTrailOutput{}
   834  	req = c.newRequest(op, input, output)
   835  	return
   836  }
   837  
   838  // GetTrail API operation for AWS CloudTrail.
   839  //
   840  // Returns settings information for a specified trail.
   841  //
   842  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   843  // with awserr.Error's Code and Message methods to get detailed information about
   844  // the error.
   845  //
   846  // See the AWS API reference guide for AWS CloudTrail's
   847  // API operation GetTrail for usage and error information.
   848  //
   849  // Returned Error Types:
   850  //   * TrailNotFoundException
   851  //   This exception is thrown when the trail with the given name is not found.
   852  //
   853  //   * InvalidTrailNameException
   854  //   This exception is thrown when the provided trail name is not valid. Trail
   855  //   names must meet the following requirements:
   856  //
   857  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   858  //      (_), or dashes (-)
   859  //
   860  //      * Start with a letter or number, and end with a letter or number
   861  //
   862  //      * Be between 3 and 128 characters
   863  //
   864  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   865  //      and my--namespace are not valid.
   866  //
   867  //      * Not be in IP address format (for example, 192.168.5.4)
   868  //
   869  //   * UnsupportedOperationException
   870  //   This exception is thrown when the requested operation is not supported.
   871  //
   872  //   * OperationNotPermittedException
   873  //   This exception is thrown when the requested operation is not permitted.
   874  //
   875  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
   876  func (c *CloudTrail) GetTrail(input *GetTrailInput) (*GetTrailOutput, error) {
   877  	req, out := c.GetTrailRequest(input)
   878  	return out, req.Send()
   879  }
   880  
   881  // GetTrailWithContext is the same as GetTrail with the addition of
   882  // the ability to pass a context and additional request options.
   883  //
   884  // See GetTrail for details on how to use this API operation.
   885  //
   886  // The context must be non-nil and will be used for request cancellation. If
   887  // the context is nil a panic will occur. In the future the SDK may create
   888  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   889  // for more information on using Contexts.
   890  func (c *CloudTrail) GetTrailWithContext(ctx aws.Context, input *GetTrailInput, opts ...request.Option) (*GetTrailOutput, error) {
   891  	req, out := c.GetTrailRequest(input)
   892  	req.SetContext(ctx)
   893  	req.ApplyOptions(opts...)
   894  	return out, req.Send()
   895  }
   896  
   897  const opGetTrailStatus = "GetTrailStatus"
   898  
   899  // GetTrailStatusRequest generates a "aws/request.Request" representing the
   900  // client's request for the GetTrailStatus operation. The "output" return
   901  // value will be populated with the request's response once the request completes
   902  // successfully.
   903  //
   904  // Use "Send" method on the returned Request to send the API call to the service.
   905  // the "output" return value is not valid until after Send returns without error.
   906  //
   907  // See GetTrailStatus for more information on using the GetTrailStatus
   908  // API call, and error handling.
   909  //
   910  // This method is useful when you want to inject custom logic or configuration
   911  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   912  //
   913  //
   914  //    // Example sending a request using the GetTrailStatusRequest method.
   915  //    req, resp := client.GetTrailStatusRequest(params)
   916  //
   917  //    err := req.Send()
   918  //    if err == nil { // resp is now filled
   919  //        fmt.Println(resp)
   920  //    }
   921  //
   922  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
   923  func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
   924  	op := &request.Operation{
   925  		Name:       opGetTrailStatus,
   926  		HTTPMethod: "POST",
   927  		HTTPPath:   "/",
   928  	}
   929  
   930  	if input == nil {
   931  		input = &GetTrailStatusInput{}
   932  	}
   933  
   934  	output = &GetTrailStatusOutput{}
   935  	req = c.newRequest(op, input, output)
   936  	return
   937  }
   938  
   939  // GetTrailStatus API operation for AWS CloudTrail.
   940  //
   941  // Returns a JSON-formatted list of information about the specified trail. Fields
   942  // include information on delivery errors, Amazon SNS and Amazon S3 errors,
   943  // and start and stop logging times for each trail. This operation returns trail
   944  // status from a single region. To return trail status from all regions, you
   945  // must call the operation on each region.
   946  //
   947  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   948  // with awserr.Error's Code and Message methods to get detailed information about
   949  // the error.
   950  //
   951  // See the AWS API reference guide for AWS CloudTrail's
   952  // API operation GetTrailStatus for usage and error information.
   953  //
   954  // Returned Error Types:
   955  //   * TrailNotFoundException
   956  //   This exception is thrown when the trail with the given name is not found.
   957  //
   958  //   * InvalidTrailNameException
   959  //   This exception is thrown when the provided trail name is not valid. Trail
   960  //   names must meet the following requirements:
   961  //
   962  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
   963  //      (_), or dashes (-)
   964  //
   965  //      * Start with a letter or number, and end with a letter or number
   966  //
   967  //      * Be between 3 and 128 characters
   968  //
   969  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
   970  //      and my--namespace are not valid.
   971  //
   972  //      * Not be in IP address format (for example, 192.168.5.4)
   973  //
   974  //   * UnsupportedOperationException
   975  //   This exception is thrown when the requested operation is not supported.
   976  //
   977  //   * OperationNotPermittedException
   978  //   This exception is thrown when the requested operation is not permitted.
   979  //
   980  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
   981  func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
   982  	req, out := c.GetTrailStatusRequest(input)
   983  	return out, req.Send()
   984  }
   985  
   986  // GetTrailStatusWithContext is the same as GetTrailStatus with the addition of
   987  // the ability to pass a context and additional request options.
   988  //
   989  // See GetTrailStatus for details on how to use this API operation.
   990  //
   991  // The context must be non-nil and will be used for request cancellation. If
   992  // the context is nil a panic will occur. In the future the SDK may create
   993  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   994  // for more information on using Contexts.
   995  func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) {
   996  	req, out := c.GetTrailStatusRequest(input)
   997  	req.SetContext(ctx)
   998  	req.ApplyOptions(opts...)
   999  	return out, req.Send()
  1000  }
  1001  
  1002  const opListPublicKeys = "ListPublicKeys"
  1003  
  1004  // ListPublicKeysRequest generates a "aws/request.Request" representing the
  1005  // client's request for the ListPublicKeys operation. The "output" return
  1006  // value will be populated with the request's response once the request completes
  1007  // successfully.
  1008  //
  1009  // Use "Send" method on the returned Request to send the API call to the service.
  1010  // the "output" return value is not valid until after Send returns without error.
  1011  //
  1012  // See ListPublicKeys for more information on using the ListPublicKeys
  1013  // API call, and error handling.
  1014  //
  1015  // This method is useful when you want to inject custom logic or configuration
  1016  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1017  //
  1018  //
  1019  //    // Example sending a request using the ListPublicKeysRequest method.
  1020  //    req, resp := client.ListPublicKeysRequest(params)
  1021  //
  1022  //    err := req.Send()
  1023  //    if err == nil { // resp is now filled
  1024  //        fmt.Println(resp)
  1025  //    }
  1026  //
  1027  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
  1028  func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
  1029  	op := &request.Operation{
  1030  		Name:       opListPublicKeys,
  1031  		HTTPMethod: "POST",
  1032  		HTTPPath:   "/",
  1033  		Paginator: &request.Paginator{
  1034  			InputTokens:     []string{"NextToken"},
  1035  			OutputTokens:    []string{"NextToken"},
  1036  			LimitToken:      "",
  1037  			TruncationToken: "",
  1038  		},
  1039  	}
  1040  
  1041  	if input == nil {
  1042  		input = &ListPublicKeysInput{}
  1043  	}
  1044  
  1045  	output = &ListPublicKeysOutput{}
  1046  	req = c.newRequest(op, input, output)
  1047  	return
  1048  }
  1049  
  1050  // ListPublicKeys API operation for AWS CloudTrail.
  1051  //
  1052  // Returns all public keys whose private keys were used to sign the digest files
  1053  // within the specified time range. The public key is needed to validate digest
  1054  // files that were signed with its corresponding private key.
  1055  //
  1056  // CloudTrail uses different private and public key pairs per region. Each digest
  1057  // file is signed with a private key unique to its region. When you validate
  1058  // a digest file from a specific region, you must look in the same region for
  1059  // its corresponding public key.
  1060  //
  1061  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1062  // with awserr.Error's Code and Message methods to get detailed information about
  1063  // the error.
  1064  //
  1065  // See the AWS API reference guide for AWS CloudTrail's
  1066  // API operation ListPublicKeys for usage and error information.
  1067  //
  1068  // Returned Error Types:
  1069  //   * InvalidTimeRangeException
  1070  //   Occurs if the timestamp values are not valid. Either the start time occurs
  1071  //   after the end time, or the time range is outside the range of possible values.
  1072  //
  1073  //   * UnsupportedOperationException
  1074  //   This exception is thrown when the requested operation is not supported.
  1075  //
  1076  //   * OperationNotPermittedException
  1077  //   This exception is thrown when the requested operation is not permitted.
  1078  //
  1079  //   * InvalidTokenException
  1080  //   Reserved for future use.
  1081  //
  1082  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
  1083  func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
  1084  	req, out := c.ListPublicKeysRequest(input)
  1085  	return out, req.Send()
  1086  }
  1087  
  1088  // ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
  1089  // the ability to pass a context and additional request options.
  1090  //
  1091  // See ListPublicKeys for details on how to use this API operation.
  1092  //
  1093  // The context must be non-nil and will be used for request cancellation. If
  1094  // the context is nil a panic will occur. In the future the SDK may create
  1095  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1096  // for more information on using Contexts.
  1097  func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
  1098  	req, out := c.ListPublicKeysRequest(input)
  1099  	req.SetContext(ctx)
  1100  	req.ApplyOptions(opts...)
  1101  	return out, req.Send()
  1102  }
  1103  
  1104  // ListPublicKeysPages iterates over the pages of a ListPublicKeys operation,
  1105  // calling the "fn" function with the response data for each page. To stop
  1106  // iterating, return false from the fn function.
  1107  //
  1108  // See ListPublicKeys method for more information on how to use this operation.
  1109  //
  1110  // Note: This operation can generate multiple requests to a service.
  1111  //
  1112  //    // Example iterating over at most 3 pages of a ListPublicKeys operation.
  1113  //    pageNum := 0
  1114  //    err := client.ListPublicKeysPages(params,
  1115  //        func(page *cloudtrail.ListPublicKeysOutput, lastPage bool) bool {
  1116  //            pageNum++
  1117  //            fmt.Println(page)
  1118  //            return pageNum <= 3
  1119  //        })
  1120  //
  1121  func (c *CloudTrail) ListPublicKeysPages(input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool) error {
  1122  	return c.ListPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn)
  1123  }
  1124  
  1125  // ListPublicKeysPagesWithContext same as ListPublicKeysPages except
  1126  // it takes a Context and allows setting request options on the pages.
  1127  //
  1128  // The context must be non-nil and will be used for request cancellation. If
  1129  // the context is nil a panic will occur. In the future the SDK may create
  1130  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1131  // for more information on using Contexts.
  1132  func (c *CloudTrail) ListPublicKeysPagesWithContext(ctx aws.Context, input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool, opts ...request.Option) error {
  1133  	p := request.Pagination{
  1134  		NewRequest: func() (*request.Request, error) {
  1135  			var inCpy *ListPublicKeysInput
  1136  			if input != nil {
  1137  				tmp := *input
  1138  				inCpy = &tmp
  1139  			}
  1140  			req, _ := c.ListPublicKeysRequest(inCpy)
  1141  			req.SetContext(ctx)
  1142  			req.ApplyOptions(opts...)
  1143  			return req, nil
  1144  		},
  1145  	}
  1146  
  1147  	for p.Next() {
  1148  		if !fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) {
  1149  			break
  1150  		}
  1151  	}
  1152  
  1153  	return p.Err()
  1154  }
  1155  
  1156  const opListTags = "ListTags"
  1157  
  1158  // ListTagsRequest generates a "aws/request.Request" representing the
  1159  // client's request for the ListTags operation. The "output" return
  1160  // value will be populated with the request's response once the request completes
  1161  // successfully.
  1162  //
  1163  // Use "Send" method on the returned Request to send the API call to the service.
  1164  // the "output" return value is not valid until after Send returns without error.
  1165  //
  1166  // See ListTags for more information on using the ListTags
  1167  // API call, and error handling.
  1168  //
  1169  // This method is useful when you want to inject custom logic or configuration
  1170  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1171  //
  1172  //
  1173  //    // Example sending a request using the ListTagsRequest method.
  1174  //    req, resp := client.ListTagsRequest(params)
  1175  //
  1176  //    err := req.Send()
  1177  //    if err == nil { // resp is now filled
  1178  //        fmt.Println(resp)
  1179  //    }
  1180  //
  1181  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
  1182  func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  1183  	op := &request.Operation{
  1184  		Name:       opListTags,
  1185  		HTTPMethod: "POST",
  1186  		HTTPPath:   "/",
  1187  		Paginator: &request.Paginator{
  1188  			InputTokens:     []string{"NextToken"},
  1189  			OutputTokens:    []string{"NextToken"},
  1190  			LimitToken:      "",
  1191  			TruncationToken: "",
  1192  		},
  1193  	}
  1194  
  1195  	if input == nil {
  1196  		input = &ListTagsInput{}
  1197  	}
  1198  
  1199  	output = &ListTagsOutput{}
  1200  	req = c.newRequest(op, input, output)
  1201  	return
  1202  }
  1203  
  1204  // ListTags API operation for AWS CloudTrail.
  1205  //
  1206  // Lists the tags for the trail in the current region.
  1207  //
  1208  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1209  // with awserr.Error's Code and Message methods to get detailed information about
  1210  // the error.
  1211  //
  1212  // See the AWS API reference guide for AWS CloudTrail's
  1213  // API operation ListTags for usage and error information.
  1214  //
  1215  // Returned Error Types:
  1216  //   * ResourceNotFoundException
  1217  //   This exception is thrown when the specified resource is not found.
  1218  //
  1219  //   * ARNInvalidException
  1220  //   This exception is thrown when an operation is called with a trail ARN that
  1221  //   is not valid. The following is the format of a trail ARN.
  1222  //
  1223  //   arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  1224  //
  1225  //   * ResourceTypeNotSupportedException
  1226  //   This exception is thrown when the specified resource type is not supported
  1227  //   by CloudTrail.
  1228  //
  1229  //   * InvalidTrailNameException
  1230  //   This exception is thrown when the provided trail name is not valid. Trail
  1231  //   names must meet the following requirements:
  1232  //
  1233  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1234  //      (_), or dashes (-)
  1235  //
  1236  //      * Start with a letter or number, and end with a letter or number
  1237  //
  1238  //      * Be between 3 and 128 characters
  1239  //
  1240  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1241  //      and my--namespace are not valid.
  1242  //
  1243  //      * Not be in IP address format (for example, 192.168.5.4)
  1244  //
  1245  //   * UnsupportedOperationException
  1246  //   This exception is thrown when the requested operation is not supported.
  1247  //
  1248  //   * OperationNotPermittedException
  1249  //   This exception is thrown when the requested operation is not permitted.
  1250  //
  1251  //   * InvalidTokenException
  1252  //   Reserved for future use.
  1253  //
  1254  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
  1255  func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  1256  	req, out := c.ListTagsRequest(input)
  1257  	return out, req.Send()
  1258  }
  1259  
  1260  // ListTagsWithContext is the same as ListTags with the addition of
  1261  // the ability to pass a context and additional request options.
  1262  //
  1263  // See ListTags for details on how to use this API operation.
  1264  //
  1265  // The context must be non-nil and will be used for request cancellation. If
  1266  // the context is nil a panic will occur. In the future the SDK may create
  1267  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1268  // for more information on using Contexts.
  1269  func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
  1270  	req, out := c.ListTagsRequest(input)
  1271  	req.SetContext(ctx)
  1272  	req.ApplyOptions(opts...)
  1273  	return out, req.Send()
  1274  }
  1275  
  1276  // ListTagsPages iterates over the pages of a ListTags operation,
  1277  // calling the "fn" function with the response data for each page. To stop
  1278  // iterating, return false from the fn function.
  1279  //
  1280  // See ListTags method for more information on how to use this operation.
  1281  //
  1282  // Note: This operation can generate multiple requests to a service.
  1283  //
  1284  //    // Example iterating over at most 3 pages of a ListTags operation.
  1285  //    pageNum := 0
  1286  //    err := client.ListTagsPages(params,
  1287  //        func(page *cloudtrail.ListTagsOutput, lastPage bool) bool {
  1288  //            pageNum++
  1289  //            fmt.Println(page)
  1290  //            return pageNum <= 3
  1291  //        })
  1292  //
  1293  func (c *CloudTrail) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
  1294  	return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
  1295  }
  1296  
  1297  // ListTagsPagesWithContext same as ListTagsPages except
  1298  // it takes a Context and allows setting request options on the pages.
  1299  //
  1300  // The context must be non-nil and will be used for request cancellation. If
  1301  // the context is nil a panic will occur. In the future the SDK may create
  1302  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1303  // for more information on using Contexts.
  1304  func (c *CloudTrail) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
  1305  	p := request.Pagination{
  1306  		NewRequest: func() (*request.Request, error) {
  1307  			var inCpy *ListTagsInput
  1308  			if input != nil {
  1309  				tmp := *input
  1310  				inCpy = &tmp
  1311  			}
  1312  			req, _ := c.ListTagsRequest(inCpy)
  1313  			req.SetContext(ctx)
  1314  			req.ApplyOptions(opts...)
  1315  			return req, nil
  1316  		},
  1317  	}
  1318  
  1319  	for p.Next() {
  1320  		if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) {
  1321  			break
  1322  		}
  1323  	}
  1324  
  1325  	return p.Err()
  1326  }
  1327  
  1328  const opListTrails = "ListTrails"
  1329  
  1330  // ListTrailsRequest generates a "aws/request.Request" representing the
  1331  // client's request for the ListTrails operation. The "output" return
  1332  // value will be populated with the request's response once the request completes
  1333  // successfully.
  1334  //
  1335  // Use "Send" method on the returned Request to send the API call to the service.
  1336  // the "output" return value is not valid until after Send returns without error.
  1337  //
  1338  // See ListTrails for more information on using the ListTrails
  1339  // API call, and error handling.
  1340  //
  1341  // This method is useful when you want to inject custom logic or configuration
  1342  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1343  //
  1344  //
  1345  //    // Example sending a request using the ListTrailsRequest method.
  1346  //    req, resp := client.ListTrailsRequest(params)
  1347  //
  1348  //    err := req.Send()
  1349  //    if err == nil { // resp is now filled
  1350  //        fmt.Println(resp)
  1351  //    }
  1352  //
  1353  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
  1354  func (c *CloudTrail) ListTrailsRequest(input *ListTrailsInput) (req *request.Request, output *ListTrailsOutput) {
  1355  	op := &request.Operation{
  1356  		Name:       opListTrails,
  1357  		HTTPMethod: "POST",
  1358  		HTTPPath:   "/",
  1359  		Paginator: &request.Paginator{
  1360  			InputTokens:     []string{"NextToken"},
  1361  			OutputTokens:    []string{"NextToken"},
  1362  			LimitToken:      "",
  1363  			TruncationToken: "",
  1364  		},
  1365  	}
  1366  
  1367  	if input == nil {
  1368  		input = &ListTrailsInput{}
  1369  	}
  1370  
  1371  	output = &ListTrailsOutput{}
  1372  	req = c.newRequest(op, input, output)
  1373  	return
  1374  }
  1375  
  1376  // ListTrails API operation for AWS CloudTrail.
  1377  //
  1378  // Lists trails that are in the current account.
  1379  //
  1380  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1381  // with awserr.Error's Code and Message methods to get detailed information about
  1382  // the error.
  1383  //
  1384  // See the AWS API reference guide for AWS CloudTrail's
  1385  // API operation ListTrails for usage and error information.
  1386  //
  1387  // Returned Error Types:
  1388  //   * UnsupportedOperationException
  1389  //   This exception is thrown when the requested operation is not supported.
  1390  //
  1391  //   * OperationNotPermittedException
  1392  //   This exception is thrown when the requested operation is not permitted.
  1393  //
  1394  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
  1395  func (c *CloudTrail) ListTrails(input *ListTrailsInput) (*ListTrailsOutput, error) {
  1396  	req, out := c.ListTrailsRequest(input)
  1397  	return out, req.Send()
  1398  }
  1399  
  1400  // ListTrailsWithContext is the same as ListTrails with the addition of
  1401  // the ability to pass a context and additional request options.
  1402  //
  1403  // See ListTrails for details on how to use this API operation.
  1404  //
  1405  // The context must be non-nil and will be used for request cancellation. If
  1406  // the context is nil a panic will occur. In the future the SDK may create
  1407  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1408  // for more information on using Contexts.
  1409  func (c *CloudTrail) ListTrailsWithContext(ctx aws.Context, input *ListTrailsInput, opts ...request.Option) (*ListTrailsOutput, error) {
  1410  	req, out := c.ListTrailsRequest(input)
  1411  	req.SetContext(ctx)
  1412  	req.ApplyOptions(opts...)
  1413  	return out, req.Send()
  1414  }
  1415  
  1416  // ListTrailsPages iterates over the pages of a ListTrails operation,
  1417  // calling the "fn" function with the response data for each page. To stop
  1418  // iterating, return false from the fn function.
  1419  //
  1420  // See ListTrails method for more information on how to use this operation.
  1421  //
  1422  // Note: This operation can generate multiple requests to a service.
  1423  //
  1424  //    // Example iterating over at most 3 pages of a ListTrails operation.
  1425  //    pageNum := 0
  1426  //    err := client.ListTrailsPages(params,
  1427  //        func(page *cloudtrail.ListTrailsOutput, lastPage bool) bool {
  1428  //            pageNum++
  1429  //            fmt.Println(page)
  1430  //            return pageNum <= 3
  1431  //        })
  1432  //
  1433  func (c *CloudTrail) ListTrailsPages(input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool) error {
  1434  	return c.ListTrailsPagesWithContext(aws.BackgroundContext(), input, fn)
  1435  }
  1436  
  1437  // ListTrailsPagesWithContext same as ListTrailsPages except
  1438  // it takes a Context and allows setting request options on the pages.
  1439  //
  1440  // The context must be non-nil and will be used for request cancellation. If
  1441  // the context is nil a panic will occur. In the future the SDK may create
  1442  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1443  // for more information on using Contexts.
  1444  func (c *CloudTrail) ListTrailsPagesWithContext(ctx aws.Context, input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool, opts ...request.Option) error {
  1445  	p := request.Pagination{
  1446  		NewRequest: func() (*request.Request, error) {
  1447  			var inCpy *ListTrailsInput
  1448  			if input != nil {
  1449  				tmp := *input
  1450  				inCpy = &tmp
  1451  			}
  1452  			req, _ := c.ListTrailsRequest(inCpy)
  1453  			req.SetContext(ctx)
  1454  			req.ApplyOptions(opts...)
  1455  			return req, nil
  1456  		},
  1457  	}
  1458  
  1459  	for p.Next() {
  1460  		if !fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) {
  1461  			break
  1462  		}
  1463  	}
  1464  
  1465  	return p.Err()
  1466  }
  1467  
  1468  const opLookupEvents = "LookupEvents"
  1469  
  1470  // LookupEventsRequest generates a "aws/request.Request" representing the
  1471  // client's request for the LookupEvents operation. The "output" return
  1472  // value will be populated with the request's response once the request completes
  1473  // successfully.
  1474  //
  1475  // Use "Send" method on the returned Request to send the API call to the service.
  1476  // the "output" return value is not valid until after Send returns without error.
  1477  //
  1478  // See LookupEvents for more information on using the LookupEvents
  1479  // API call, and error handling.
  1480  //
  1481  // This method is useful when you want to inject custom logic or configuration
  1482  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1483  //
  1484  //
  1485  //    // Example sending a request using the LookupEventsRequest method.
  1486  //    req, resp := client.LookupEventsRequest(params)
  1487  //
  1488  //    err := req.Send()
  1489  //    if err == nil { // resp is now filled
  1490  //        fmt.Println(resp)
  1491  //    }
  1492  //
  1493  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
  1494  func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
  1495  	op := &request.Operation{
  1496  		Name:       opLookupEvents,
  1497  		HTTPMethod: "POST",
  1498  		HTTPPath:   "/",
  1499  		Paginator: &request.Paginator{
  1500  			InputTokens:     []string{"NextToken"},
  1501  			OutputTokens:    []string{"NextToken"},
  1502  			LimitToken:      "MaxResults",
  1503  			TruncationToken: "",
  1504  		},
  1505  	}
  1506  
  1507  	if input == nil {
  1508  		input = &LookupEventsInput{}
  1509  	}
  1510  
  1511  	output = &LookupEventsOutput{}
  1512  	req = c.newRequest(op, input, output)
  1513  	return
  1514  }
  1515  
  1516  // LookupEvents API operation for AWS CloudTrail.
  1517  //
  1518  // Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events)
  1519  // or CloudTrail Insights events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events)
  1520  // that are captured by CloudTrail. You can look up events that occurred in
  1521  // a region within the last 90 days. Lookup supports the following attributes
  1522  // for management events:
  1523  //
  1524  //    * Amazon Web Services access key
  1525  //
  1526  //    * Event ID
  1527  //
  1528  //    * Event name
  1529  //
  1530  //    * Event source
  1531  //
  1532  //    * Read only
  1533  //
  1534  //    * Resource name
  1535  //
  1536  //    * Resource type
  1537  //
  1538  //    * User name
  1539  //
  1540  // Lookup supports the following attributes for Insights events:
  1541  //
  1542  //    * Event ID
  1543  //
  1544  //    * Event name
  1545  //
  1546  //    * Event source
  1547  //
  1548  // All attributes are optional. The default number of results returned is 50,
  1549  // with a maximum of 50 possible. The response includes a token that you can
  1550  // use to get the next page of results.
  1551  //
  1552  // The rate of lookup requests is limited to two per second, per account, per
  1553  // region. If this limit is exceeded, a throttling error occurs.
  1554  //
  1555  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1556  // with awserr.Error's Code and Message methods to get detailed information about
  1557  // the error.
  1558  //
  1559  // See the AWS API reference guide for AWS CloudTrail's
  1560  // API operation LookupEvents for usage and error information.
  1561  //
  1562  // Returned Error Types:
  1563  //   * InvalidLookupAttributesException
  1564  //   Occurs when a lookup attribute is specified that is not valid.
  1565  //
  1566  //   * InvalidTimeRangeException
  1567  //   Occurs if the timestamp values are not valid. Either the start time occurs
  1568  //   after the end time, or the time range is outside the range of possible values.
  1569  //
  1570  //   * InvalidMaxResultsException
  1571  //   This exception is thrown if the limit specified is not valid.
  1572  //
  1573  //   * InvalidNextTokenException
  1574  //   A token that is not valid, or a token that was previously used in a request
  1575  //   with different parameters. This exception is thrown if the token is not valid.
  1576  //
  1577  //   * InvalidEventCategoryException
  1578  //   Occurs if an event category that is not valid is specified as a value of
  1579  //   EventCategory.
  1580  //
  1581  //   * UnsupportedOperationException
  1582  //   This exception is thrown when the requested operation is not supported.
  1583  //
  1584  //   * OperationNotPermittedException
  1585  //   This exception is thrown when the requested operation is not permitted.
  1586  //
  1587  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
  1588  func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
  1589  	req, out := c.LookupEventsRequest(input)
  1590  	return out, req.Send()
  1591  }
  1592  
  1593  // LookupEventsWithContext is the same as LookupEvents with the addition of
  1594  // the ability to pass a context and additional request options.
  1595  //
  1596  // See LookupEvents for details on how to use this API operation.
  1597  //
  1598  // The context must be non-nil and will be used for request cancellation. If
  1599  // the context is nil a panic will occur. In the future the SDK may create
  1600  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1601  // for more information on using Contexts.
  1602  func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) {
  1603  	req, out := c.LookupEventsRequest(input)
  1604  	req.SetContext(ctx)
  1605  	req.ApplyOptions(opts...)
  1606  	return out, req.Send()
  1607  }
  1608  
  1609  // LookupEventsPages iterates over the pages of a LookupEvents operation,
  1610  // calling the "fn" function with the response data for each page. To stop
  1611  // iterating, return false from the fn function.
  1612  //
  1613  // See LookupEvents method for more information on how to use this operation.
  1614  //
  1615  // Note: This operation can generate multiple requests to a service.
  1616  //
  1617  //    // Example iterating over at most 3 pages of a LookupEvents operation.
  1618  //    pageNum := 0
  1619  //    err := client.LookupEventsPages(params,
  1620  //        func(page *cloudtrail.LookupEventsOutput, lastPage bool) bool {
  1621  //            pageNum++
  1622  //            fmt.Println(page)
  1623  //            return pageNum <= 3
  1624  //        })
  1625  //
  1626  func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error {
  1627  	return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn)
  1628  }
  1629  
  1630  // LookupEventsPagesWithContext same as LookupEventsPages except
  1631  // it takes a Context and allows setting request options on the pages.
  1632  //
  1633  // The context must be non-nil and will be used for request cancellation. If
  1634  // the context is nil a panic will occur. In the future the SDK may create
  1635  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1636  // for more information on using Contexts.
  1637  func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
  1638  	p := request.Pagination{
  1639  		NewRequest: func() (*request.Request, error) {
  1640  			var inCpy *LookupEventsInput
  1641  			if input != nil {
  1642  				tmp := *input
  1643  				inCpy = &tmp
  1644  			}
  1645  			req, _ := c.LookupEventsRequest(inCpy)
  1646  			req.SetContext(ctx)
  1647  			req.ApplyOptions(opts...)
  1648  			return req, nil
  1649  		},
  1650  	}
  1651  
  1652  	for p.Next() {
  1653  		if !fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) {
  1654  			break
  1655  		}
  1656  	}
  1657  
  1658  	return p.Err()
  1659  }
  1660  
  1661  const opPutEventSelectors = "PutEventSelectors"
  1662  
  1663  // PutEventSelectorsRequest generates a "aws/request.Request" representing the
  1664  // client's request for the PutEventSelectors operation. The "output" return
  1665  // value will be populated with the request's response once the request completes
  1666  // successfully.
  1667  //
  1668  // Use "Send" method on the returned Request to send the API call to the service.
  1669  // the "output" return value is not valid until after Send returns without error.
  1670  //
  1671  // See PutEventSelectors for more information on using the PutEventSelectors
  1672  // API call, and error handling.
  1673  //
  1674  // This method is useful when you want to inject custom logic or configuration
  1675  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1676  //
  1677  //
  1678  //    // Example sending a request using the PutEventSelectorsRequest method.
  1679  //    req, resp := client.PutEventSelectorsRequest(params)
  1680  //
  1681  //    err := req.Send()
  1682  //    if err == nil { // resp is now filled
  1683  //        fmt.Println(resp)
  1684  //    }
  1685  //
  1686  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
  1687  func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) {
  1688  	op := &request.Operation{
  1689  		Name:       opPutEventSelectors,
  1690  		HTTPMethod: "POST",
  1691  		HTTPPath:   "/",
  1692  	}
  1693  
  1694  	if input == nil {
  1695  		input = &PutEventSelectorsInput{}
  1696  	}
  1697  
  1698  	output = &PutEventSelectorsOutput{}
  1699  	req = c.newRequest(op, input, output)
  1700  	return
  1701  }
  1702  
  1703  // PutEventSelectors API operation for AWS CloudTrail.
  1704  //
  1705  // Configures an event selector or advanced event selectors for your trail.
  1706  // Use event selectors or advanced event selectors to specify management and
  1707  // data event settings for your trail. By default, trails created without specific
  1708  // event selectors are configured to log all read and write management events,
  1709  // and no data events.
  1710  //
  1711  // When an event occurs in your account, CloudTrail evaluates the event selectors
  1712  // or advanced event selectors in all trails. For each trail, if the event matches
  1713  // any event selector, the trail processes and logs the event. If the event
  1714  // doesn't match any event selector, the trail doesn't log the event.
  1715  //
  1716  // Example
  1717  //
  1718  // You create an event selector for a trail and specify that you want write-only
  1719  // events.
  1720  //
  1721  // The EC2 GetConsoleOutput and RunInstances API operations occur in your account.
  1722  //
  1723  // CloudTrail evaluates whether the events match your event selectors.
  1724  //
  1725  // The RunInstances is a write-only event and it matches your event selector.
  1726  // The trail logs the event.
  1727  //
  1728  // The GetConsoleOutput is a read-only event that doesn't match your event selector.
  1729  // The trail doesn't log the event.
  1730  //
  1731  // The PutEventSelectors operation must be called from the region in which the
  1732  // trail was created; otherwise, an InvalidHomeRegionException exception is
  1733  // thrown.
  1734  //
  1735  // You can configure up to five event selectors for each trail. For more information,
  1736  // see Logging data and management events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
  1737  // and Quotas in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
  1738  // in the CloudTrail User Guide.
  1739  //
  1740  // You can add advanced event selectors, and conditions for your advanced event
  1741  // selectors, up to a maximum of 500 values for all conditions and selectors
  1742  // on a trail. You can use either AdvancedEventSelectors or EventSelectors,
  1743  // but not both. If you apply AdvancedEventSelectors to a trail, any existing
  1744  // EventSelectors are overwritten. For more information about advanced event
  1745  // selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  1746  // in the CloudTrail User Guide.
  1747  //
  1748  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1749  // with awserr.Error's Code and Message methods to get detailed information about
  1750  // the error.
  1751  //
  1752  // See the AWS API reference guide for AWS CloudTrail's
  1753  // API operation PutEventSelectors for usage and error information.
  1754  //
  1755  // Returned Error Types:
  1756  //   * TrailNotFoundException
  1757  //   This exception is thrown when the trail with the given name is not found.
  1758  //
  1759  //   * InvalidTrailNameException
  1760  //   This exception is thrown when the provided trail name is not valid. Trail
  1761  //   names must meet the following requirements:
  1762  //
  1763  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1764  //      (_), or dashes (-)
  1765  //
  1766  //      * Start with a letter or number, and end with a letter or number
  1767  //
  1768  //      * Be between 3 and 128 characters
  1769  //
  1770  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1771  //      and my--namespace are not valid.
  1772  //
  1773  //      * Not be in IP address format (for example, 192.168.5.4)
  1774  //
  1775  //   * InvalidHomeRegionException
  1776  //   This exception is thrown when an operation is called on a trail from a region
  1777  //   other than the region in which the trail was created.
  1778  //
  1779  //   * InvalidEventSelectorsException
  1780  //   This exception is thrown when the PutEventSelectors operation is called with
  1781  //   a number of event selectors, advanced event selectors, or data resources
  1782  //   that is not valid. The combination of event selectors or advanced event selectors
  1783  //   and data resources is not valid. A trail can have up to 5 event selectors.
  1784  //   If a trail uses advanced event selectors, a maximum of 500 total values for
  1785  //   all conditions in all advanced event selectors is allowed. A trail is limited
  1786  //   to 250 data resources. These data resources can be distributed across event
  1787  //   selectors, but the overall total cannot exceed 250.
  1788  //
  1789  //   You can:
  1790  //
  1791  //      * Specify a valid number of event selectors (1 to 5) for a trail.
  1792  //
  1793  //      * Specify a valid number of data resources (1 to 250) for an event selector.
  1794  //      The limit of number of resources on an individual event selector is configurable
  1795  //      up to 250. However, this upper limit is allowed only if the total number
  1796  //      of data resources does not exceed 250 across all event selectors for a
  1797  //      trail.
  1798  //
  1799  //      * Specify up to 500 values for all conditions in all advanced event selectors
  1800  //      for a trail.
  1801  //
  1802  //      * Specify a valid value for a parameter. For example, specifying the ReadWriteType
  1803  //      parameter with a value of read-only is not valid.
  1804  //
  1805  //   * UnsupportedOperationException
  1806  //   This exception is thrown when the requested operation is not supported.
  1807  //
  1808  //   * OperationNotPermittedException
  1809  //   This exception is thrown when the requested operation is not permitted.
  1810  //
  1811  //   * NotOrganizationMasterAccountException
  1812  //   This exception is thrown when the Amazon Web Services account making the
  1813  //   request to create or update an organization trail is not the management account
  1814  //   for an organization in Organizations. For more information, see Prepare For
  1815  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  1816  //
  1817  //   * InsufficientDependencyServiceAccessPermissionException
  1818  //   This exception is thrown when the IAM user or role that is used to create
  1819  //   the organization trail is lacking one or more required permissions for creating
  1820  //   an organization trail in a required service. For more information, see Prepare
  1821  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  1822  //
  1823  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
  1824  func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) {
  1825  	req, out := c.PutEventSelectorsRequest(input)
  1826  	return out, req.Send()
  1827  }
  1828  
  1829  // PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of
  1830  // the ability to pass a context and additional request options.
  1831  //
  1832  // See PutEventSelectors for details on how to use this API operation.
  1833  //
  1834  // The context must be non-nil and will be used for request cancellation. If
  1835  // the context is nil a panic will occur. In the future the SDK may create
  1836  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1837  // for more information on using Contexts.
  1838  func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) {
  1839  	req, out := c.PutEventSelectorsRequest(input)
  1840  	req.SetContext(ctx)
  1841  	req.ApplyOptions(opts...)
  1842  	return out, req.Send()
  1843  }
  1844  
  1845  const opPutInsightSelectors = "PutInsightSelectors"
  1846  
  1847  // PutInsightSelectorsRequest generates a "aws/request.Request" representing the
  1848  // client's request for the PutInsightSelectors operation. The "output" return
  1849  // value will be populated with the request's response once the request completes
  1850  // successfully.
  1851  //
  1852  // Use "Send" method on the returned Request to send the API call to the service.
  1853  // the "output" return value is not valid until after Send returns without error.
  1854  //
  1855  // See PutInsightSelectors for more information on using the PutInsightSelectors
  1856  // API call, and error handling.
  1857  //
  1858  // This method is useful when you want to inject custom logic or configuration
  1859  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1860  //
  1861  //
  1862  //    // Example sending a request using the PutInsightSelectorsRequest method.
  1863  //    req, resp := client.PutInsightSelectorsRequest(params)
  1864  //
  1865  //    err := req.Send()
  1866  //    if err == nil { // resp is now filled
  1867  //        fmt.Println(resp)
  1868  //    }
  1869  //
  1870  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
  1871  func (c *CloudTrail) PutInsightSelectorsRequest(input *PutInsightSelectorsInput) (req *request.Request, output *PutInsightSelectorsOutput) {
  1872  	op := &request.Operation{
  1873  		Name:       opPutInsightSelectors,
  1874  		HTTPMethod: "POST",
  1875  		HTTPPath:   "/",
  1876  	}
  1877  
  1878  	if input == nil {
  1879  		input = &PutInsightSelectorsInput{}
  1880  	}
  1881  
  1882  	output = &PutInsightSelectorsOutput{}
  1883  	req = c.newRequest(op, input, output)
  1884  	return
  1885  }
  1886  
  1887  // PutInsightSelectors API operation for AWS CloudTrail.
  1888  //
  1889  // Lets you enable Insights event logging by specifying the Insights selectors
  1890  // that you want to enable on an existing trail. You also use PutInsightSelectors
  1891  // to turn off Insights event logging, by passing an empty list of insight types.
  1892  // The valid Insights event type in this release is ApiCallRateInsight.
  1893  //
  1894  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1895  // with awserr.Error's Code and Message methods to get detailed information about
  1896  // the error.
  1897  //
  1898  // See the AWS API reference guide for AWS CloudTrail's
  1899  // API operation PutInsightSelectors for usage and error information.
  1900  //
  1901  // Returned Error Types:
  1902  //   * TrailNotFoundException
  1903  //   This exception is thrown when the trail with the given name is not found.
  1904  //
  1905  //   * InvalidTrailNameException
  1906  //   This exception is thrown when the provided trail name is not valid. Trail
  1907  //   names must meet the following requirements:
  1908  //
  1909  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1910  //      (_), or dashes (-)
  1911  //
  1912  //      * Start with a letter or number, and end with a letter or number
  1913  //
  1914  //      * Be between 3 and 128 characters
  1915  //
  1916  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1917  //      and my--namespace are not valid.
  1918  //
  1919  //      * Not be in IP address format (for example, 192.168.5.4)
  1920  //
  1921  //   * InvalidHomeRegionException
  1922  //   This exception is thrown when an operation is called on a trail from a region
  1923  //   other than the region in which the trail was created.
  1924  //
  1925  //   * InvalidInsightSelectorsException
  1926  //   The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
  1927  //   or GetInsightSelectors request is not valid, or the specified insight type
  1928  //   in the InsightSelectors statement is not a valid insight type.
  1929  //
  1930  //   * InsufficientS3BucketPolicyException
  1931  //   This exception is thrown when the policy on the S3 bucket is not sufficient.
  1932  //
  1933  //   * InsufficientEncryptionPolicyException
  1934  //   This exception is thrown when the policy on the S3 bucket or KMS key is not
  1935  //   sufficient.
  1936  //
  1937  //   * S3BucketDoesNotExistException
  1938  //   This exception is thrown when the specified S3 bucket does not exist.
  1939  //
  1940  //   * KmsException
  1941  //   This exception is thrown when there is an issue with the specified KMS key
  1942  //   and the trail can’t be updated.
  1943  //
  1944  //   * UnsupportedOperationException
  1945  //   This exception is thrown when the requested operation is not supported.
  1946  //
  1947  //   * OperationNotPermittedException
  1948  //   This exception is thrown when the requested operation is not permitted.
  1949  //
  1950  //   * NotOrganizationMasterAccountException
  1951  //   This exception is thrown when the Amazon Web Services account making the
  1952  //   request to create or update an organization trail is not the management account
  1953  //   for an organization in Organizations. For more information, see Prepare For
  1954  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  1955  //
  1956  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
  1957  func (c *CloudTrail) PutInsightSelectors(input *PutInsightSelectorsInput) (*PutInsightSelectorsOutput, error) {
  1958  	req, out := c.PutInsightSelectorsRequest(input)
  1959  	return out, req.Send()
  1960  }
  1961  
  1962  // PutInsightSelectorsWithContext is the same as PutInsightSelectors with the addition of
  1963  // the ability to pass a context and additional request options.
  1964  //
  1965  // See PutInsightSelectors for details on how to use this API operation.
  1966  //
  1967  // The context must be non-nil and will be used for request cancellation. If
  1968  // the context is nil a panic will occur. In the future the SDK may create
  1969  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1970  // for more information on using Contexts.
  1971  func (c *CloudTrail) PutInsightSelectorsWithContext(ctx aws.Context, input *PutInsightSelectorsInput, opts ...request.Option) (*PutInsightSelectorsOutput, error) {
  1972  	req, out := c.PutInsightSelectorsRequest(input)
  1973  	req.SetContext(ctx)
  1974  	req.ApplyOptions(opts...)
  1975  	return out, req.Send()
  1976  }
  1977  
  1978  const opRemoveTags = "RemoveTags"
  1979  
  1980  // RemoveTagsRequest generates a "aws/request.Request" representing the
  1981  // client's request for the RemoveTags operation. The "output" return
  1982  // value will be populated with the request's response once the request completes
  1983  // successfully.
  1984  //
  1985  // Use "Send" method on the returned Request to send the API call to the service.
  1986  // the "output" return value is not valid until after Send returns without error.
  1987  //
  1988  // See RemoveTags for more information on using the RemoveTags
  1989  // API call, and error handling.
  1990  //
  1991  // This method is useful when you want to inject custom logic or configuration
  1992  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1993  //
  1994  //
  1995  //    // Example sending a request using the RemoveTagsRequest method.
  1996  //    req, resp := client.RemoveTagsRequest(params)
  1997  //
  1998  //    err := req.Send()
  1999  //    if err == nil { // resp is now filled
  2000  //        fmt.Println(resp)
  2001  //    }
  2002  //
  2003  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
  2004  func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  2005  	op := &request.Operation{
  2006  		Name:       opRemoveTags,
  2007  		HTTPMethod: "POST",
  2008  		HTTPPath:   "/",
  2009  	}
  2010  
  2011  	if input == nil {
  2012  		input = &RemoveTagsInput{}
  2013  	}
  2014  
  2015  	output = &RemoveTagsOutput{}
  2016  	req = c.newRequest(op, input, output)
  2017  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2018  	return
  2019  }
  2020  
  2021  // RemoveTags API operation for AWS CloudTrail.
  2022  //
  2023  // Removes the specified tags from a trail.
  2024  //
  2025  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2026  // with awserr.Error's Code and Message methods to get detailed information about
  2027  // the error.
  2028  //
  2029  // See the AWS API reference guide for AWS CloudTrail's
  2030  // API operation RemoveTags for usage and error information.
  2031  //
  2032  // Returned Error Types:
  2033  //   * ResourceNotFoundException
  2034  //   This exception is thrown when the specified resource is not found.
  2035  //
  2036  //   * ARNInvalidException
  2037  //   This exception is thrown when an operation is called with a trail ARN that
  2038  //   is not valid. The following is the format of a trail ARN.
  2039  //
  2040  //   arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  2041  //
  2042  //   * ResourceTypeNotSupportedException
  2043  //   This exception is thrown when the specified resource type is not supported
  2044  //   by CloudTrail.
  2045  //
  2046  //   * InvalidTrailNameException
  2047  //   This exception is thrown when the provided trail name is not valid. Trail
  2048  //   names must meet the following requirements:
  2049  //
  2050  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2051  //      (_), or dashes (-)
  2052  //
  2053  //      * Start with a letter or number, and end with a letter or number
  2054  //
  2055  //      * Be between 3 and 128 characters
  2056  //
  2057  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2058  //      and my--namespace are not valid.
  2059  //
  2060  //      * Not be in IP address format (for example, 192.168.5.4)
  2061  //
  2062  //   * InvalidTagParameterException
  2063  //   This exception is thrown when the specified tag key or values are not valid.
  2064  //   It can also occur if there are duplicate tags or too many tags on the resource.
  2065  //
  2066  //   * UnsupportedOperationException
  2067  //   This exception is thrown when the requested operation is not supported.
  2068  //
  2069  //   * OperationNotPermittedException
  2070  //   This exception is thrown when the requested operation is not permitted.
  2071  //
  2072  //   * NotOrganizationMasterAccountException
  2073  //   This exception is thrown when the Amazon Web Services account making the
  2074  //   request to create or update an organization trail is not the management account
  2075  //   for an organization in Organizations. For more information, see Prepare For
  2076  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2077  //
  2078  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
  2079  func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  2080  	req, out := c.RemoveTagsRequest(input)
  2081  	return out, req.Send()
  2082  }
  2083  
  2084  // RemoveTagsWithContext is the same as RemoveTags with the addition of
  2085  // the ability to pass a context and additional request options.
  2086  //
  2087  // See RemoveTags for details on how to use this API operation.
  2088  //
  2089  // The context must be non-nil and will be used for request cancellation. If
  2090  // the context is nil a panic will occur. In the future the SDK may create
  2091  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2092  // for more information on using Contexts.
  2093  func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
  2094  	req, out := c.RemoveTagsRequest(input)
  2095  	req.SetContext(ctx)
  2096  	req.ApplyOptions(opts...)
  2097  	return out, req.Send()
  2098  }
  2099  
  2100  const opStartLogging = "StartLogging"
  2101  
  2102  // StartLoggingRequest generates a "aws/request.Request" representing the
  2103  // client's request for the StartLogging operation. The "output" return
  2104  // value will be populated with the request's response once the request completes
  2105  // successfully.
  2106  //
  2107  // Use "Send" method on the returned Request to send the API call to the service.
  2108  // the "output" return value is not valid until after Send returns without error.
  2109  //
  2110  // See StartLogging for more information on using the StartLogging
  2111  // API call, and error handling.
  2112  //
  2113  // This method is useful when you want to inject custom logic or configuration
  2114  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2115  //
  2116  //
  2117  //    // Example sending a request using the StartLoggingRequest method.
  2118  //    req, resp := client.StartLoggingRequest(params)
  2119  //
  2120  //    err := req.Send()
  2121  //    if err == nil { // resp is now filled
  2122  //        fmt.Println(resp)
  2123  //    }
  2124  //
  2125  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
  2126  func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
  2127  	op := &request.Operation{
  2128  		Name:       opStartLogging,
  2129  		HTTPMethod: "POST",
  2130  		HTTPPath:   "/",
  2131  	}
  2132  
  2133  	if input == nil {
  2134  		input = &StartLoggingInput{}
  2135  	}
  2136  
  2137  	output = &StartLoggingOutput{}
  2138  	req = c.newRequest(op, input, output)
  2139  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2140  	return
  2141  }
  2142  
  2143  // StartLogging API operation for AWS CloudTrail.
  2144  //
  2145  // Starts the recording of Amazon Web Services API calls and log file delivery
  2146  // for a trail. For a trail that is enabled in all regions, this operation must
  2147  // be called from the region in which the trail was created. This operation
  2148  // cannot be called on the shadow trails (replicated trails in other regions)
  2149  // of a trail that is enabled in all regions.
  2150  //
  2151  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2152  // with awserr.Error's Code and Message methods to get detailed information about
  2153  // the error.
  2154  //
  2155  // See the AWS API reference guide for AWS CloudTrail's
  2156  // API operation StartLogging for usage and error information.
  2157  //
  2158  // Returned Error Types:
  2159  //   * TrailNotFoundException
  2160  //   This exception is thrown when the trail with the given name is not found.
  2161  //
  2162  //   * InvalidTrailNameException
  2163  //   This exception is thrown when the provided trail name is not valid. Trail
  2164  //   names must meet the following requirements:
  2165  //
  2166  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2167  //      (_), or dashes (-)
  2168  //
  2169  //      * Start with a letter or number, and end with a letter or number
  2170  //
  2171  //      * Be between 3 and 128 characters
  2172  //
  2173  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2174  //      and my--namespace are not valid.
  2175  //
  2176  //      * Not be in IP address format (for example, 192.168.5.4)
  2177  //
  2178  //   * InvalidHomeRegionException
  2179  //   This exception is thrown when an operation is called on a trail from a region
  2180  //   other than the region in which the trail was created.
  2181  //
  2182  //   * UnsupportedOperationException
  2183  //   This exception is thrown when the requested operation is not supported.
  2184  //
  2185  //   * OperationNotPermittedException
  2186  //   This exception is thrown when the requested operation is not permitted.
  2187  //
  2188  //   * NotOrganizationMasterAccountException
  2189  //   This exception is thrown when the Amazon Web Services account making the
  2190  //   request to create or update an organization trail is not the management account
  2191  //   for an organization in Organizations. For more information, see Prepare For
  2192  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2193  //
  2194  //   * InsufficientDependencyServiceAccessPermissionException
  2195  //   This exception is thrown when the IAM user or role that is used to create
  2196  //   the organization trail is lacking one or more required permissions for creating
  2197  //   an organization trail in a required service. For more information, see Prepare
  2198  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2199  //
  2200  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
  2201  func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
  2202  	req, out := c.StartLoggingRequest(input)
  2203  	return out, req.Send()
  2204  }
  2205  
  2206  // StartLoggingWithContext is the same as StartLogging with the addition of
  2207  // the ability to pass a context and additional request options.
  2208  //
  2209  // See StartLogging for details on how to use this API operation.
  2210  //
  2211  // The context must be non-nil and will be used for request cancellation. If
  2212  // the context is nil a panic will occur. In the future the SDK may create
  2213  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2214  // for more information on using Contexts.
  2215  func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) {
  2216  	req, out := c.StartLoggingRequest(input)
  2217  	req.SetContext(ctx)
  2218  	req.ApplyOptions(opts...)
  2219  	return out, req.Send()
  2220  }
  2221  
  2222  const opStopLogging = "StopLogging"
  2223  
  2224  // StopLoggingRequest generates a "aws/request.Request" representing the
  2225  // client's request for the StopLogging operation. The "output" return
  2226  // value will be populated with the request's response once the request completes
  2227  // successfully.
  2228  //
  2229  // Use "Send" method on the returned Request to send the API call to the service.
  2230  // the "output" return value is not valid until after Send returns without error.
  2231  //
  2232  // See StopLogging for more information on using the StopLogging
  2233  // API call, and error handling.
  2234  //
  2235  // This method is useful when you want to inject custom logic or configuration
  2236  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2237  //
  2238  //
  2239  //    // Example sending a request using the StopLoggingRequest method.
  2240  //    req, resp := client.StopLoggingRequest(params)
  2241  //
  2242  //    err := req.Send()
  2243  //    if err == nil { // resp is now filled
  2244  //        fmt.Println(resp)
  2245  //    }
  2246  //
  2247  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
  2248  func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
  2249  	op := &request.Operation{
  2250  		Name:       opStopLogging,
  2251  		HTTPMethod: "POST",
  2252  		HTTPPath:   "/",
  2253  	}
  2254  
  2255  	if input == nil {
  2256  		input = &StopLoggingInput{}
  2257  	}
  2258  
  2259  	output = &StopLoggingOutput{}
  2260  	req = c.newRequest(op, input, output)
  2261  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2262  	return
  2263  }
  2264  
  2265  // StopLogging API operation for AWS CloudTrail.
  2266  //
  2267  // Suspends the recording of Amazon Web Services API calls and log file delivery
  2268  // for the specified trail. Under most circumstances, there is no need to use
  2269  // this action. You can update a trail without stopping it first. This action
  2270  // is the only way to stop recording. For a trail enabled in all regions, this
  2271  // operation must be called from the region in which the trail was created,
  2272  // or an InvalidHomeRegionException will occur. This operation cannot be called
  2273  // on the shadow trails (replicated trails in other regions) of a trail enabled
  2274  // in all regions.
  2275  //
  2276  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2277  // with awserr.Error's Code and Message methods to get detailed information about
  2278  // the error.
  2279  //
  2280  // See the AWS API reference guide for AWS CloudTrail's
  2281  // API operation StopLogging for usage and error information.
  2282  //
  2283  // Returned Error Types:
  2284  //   * TrailNotFoundException
  2285  //   This exception is thrown when the trail with the given name is not found.
  2286  //
  2287  //   * InvalidTrailNameException
  2288  //   This exception is thrown when the provided trail name is not valid. Trail
  2289  //   names must meet the following requirements:
  2290  //
  2291  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2292  //      (_), or dashes (-)
  2293  //
  2294  //      * Start with a letter or number, and end with a letter or number
  2295  //
  2296  //      * Be between 3 and 128 characters
  2297  //
  2298  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2299  //      and my--namespace are not valid.
  2300  //
  2301  //      * Not be in IP address format (for example, 192.168.5.4)
  2302  //
  2303  //   * InvalidHomeRegionException
  2304  //   This exception is thrown when an operation is called on a trail from a region
  2305  //   other than the region in which the trail was created.
  2306  //
  2307  //   * UnsupportedOperationException
  2308  //   This exception is thrown when the requested operation is not supported.
  2309  //
  2310  //   * OperationNotPermittedException
  2311  //   This exception is thrown when the requested operation is not permitted.
  2312  //
  2313  //   * NotOrganizationMasterAccountException
  2314  //   This exception is thrown when the Amazon Web Services account making the
  2315  //   request to create or update an organization trail is not the management account
  2316  //   for an organization in Organizations. For more information, see Prepare For
  2317  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2318  //
  2319  //   * InsufficientDependencyServiceAccessPermissionException
  2320  //   This exception is thrown when the IAM user or role that is used to create
  2321  //   the organization trail is lacking one or more required permissions for creating
  2322  //   an organization trail in a required service. For more information, see Prepare
  2323  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2324  //
  2325  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
  2326  func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
  2327  	req, out := c.StopLoggingRequest(input)
  2328  	return out, req.Send()
  2329  }
  2330  
  2331  // StopLoggingWithContext is the same as StopLogging with the addition of
  2332  // the ability to pass a context and additional request options.
  2333  //
  2334  // See StopLogging for details on how to use this API operation.
  2335  //
  2336  // The context must be non-nil and will be used for request cancellation. If
  2337  // the context is nil a panic will occur. In the future the SDK may create
  2338  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2339  // for more information on using Contexts.
  2340  func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) {
  2341  	req, out := c.StopLoggingRequest(input)
  2342  	req.SetContext(ctx)
  2343  	req.ApplyOptions(opts...)
  2344  	return out, req.Send()
  2345  }
  2346  
  2347  const opUpdateTrail = "UpdateTrail"
  2348  
  2349  // UpdateTrailRequest generates a "aws/request.Request" representing the
  2350  // client's request for the UpdateTrail operation. The "output" return
  2351  // value will be populated with the request's response once the request completes
  2352  // successfully.
  2353  //
  2354  // Use "Send" method on the returned Request to send the API call to the service.
  2355  // the "output" return value is not valid until after Send returns without error.
  2356  //
  2357  // See UpdateTrail for more information on using the UpdateTrail
  2358  // API call, and error handling.
  2359  //
  2360  // This method is useful when you want to inject custom logic or configuration
  2361  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2362  //
  2363  //
  2364  //    // Example sending a request using the UpdateTrailRequest method.
  2365  //    req, resp := client.UpdateTrailRequest(params)
  2366  //
  2367  //    err := req.Send()
  2368  //    if err == nil { // resp is now filled
  2369  //        fmt.Println(resp)
  2370  //    }
  2371  //
  2372  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
  2373  func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
  2374  	op := &request.Operation{
  2375  		Name:       opUpdateTrail,
  2376  		HTTPMethod: "POST",
  2377  		HTTPPath:   "/",
  2378  	}
  2379  
  2380  	if input == nil {
  2381  		input = &UpdateTrailInput{}
  2382  	}
  2383  
  2384  	output = &UpdateTrailOutput{}
  2385  	req = c.newRequest(op, input, output)
  2386  	return
  2387  }
  2388  
  2389  // UpdateTrail API operation for AWS CloudTrail.
  2390  //
  2391  // Updates trail settings that control what events you are logging, and how
  2392  // to handle log files. Changes to a trail do not require stopping the CloudTrail
  2393  // service. Use this action to designate an existing bucket for log delivery.
  2394  // If the existing bucket has previously been a target for CloudTrail log files,
  2395  // an IAM policy exists for the bucket. UpdateTrail must be called from the
  2396  // region in which the trail was created; otherwise, an InvalidHomeRegionException
  2397  // is thrown.
  2398  //
  2399  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2400  // with awserr.Error's Code and Message methods to get detailed information about
  2401  // the error.
  2402  //
  2403  // See the AWS API reference guide for AWS CloudTrail's
  2404  // API operation UpdateTrail for usage and error information.
  2405  //
  2406  // Returned Error Types:
  2407  //   * S3BucketDoesNotExistException
  2408  //   This exception is thrown when the specified S3 bucket does not exist.
  2409  //
  2410  //   * InsufficientS3BucketPolicyException
  2411  //   This exception is thrown when the policy on the S3 bucket is not sufficient.
  2412  //
  2413  //   * InsufficientSnsTopicPolicyException
  2414  //   This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
  2415  //
  2416  //   * InsufficientEncryptionPolicyException
  2417  //   This exception is thrown when the policy on the S3 bucket or KMS key is not
  2418  //   sufficient.
  2419  //
  2420  //   * TrailNotFoundException
  2421  //   This exception is thrown when the trail with the given name is not found.
  2422  //
  2423  //   * InvalidS3BucketNameException
  2424  //   This exception is thrown when the provided S3 bucket name is not valid.
  2425  //
  2426  //   * InvalidS3PrefixException
  2427  //   This exception is thrown when the provided S3 prefix is not valid.
  2428  //
  2429  //   * InvalidSnsTopicNameException
  2430  //   This exception is thrown when the provided SNS topic name is not valid.
  2431  //
  2432  //   * InvalidKmsKeyIdException
  2433  //   This exception is thrown when the KMS key ARN is not valid.
  2434  //
  2435  //   * InvalidTrailNameException
  2436  //   This exception is thrown when the provided trail name is not valid. Trail
  2437  //   names must meet the following requirements:
  2438  //
  2439  //      * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  2440  //      (_), or dashes (-)
  2441  //
  2442  //      * Start with a letter or number, and end with a letter or number
  2443  //
  2444  //      * Be between 3 and 128 characters
  2445  //
  2446  //      * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  2447  //      and my--namespace are not valid.
  2448  //
  2449  //      * Not be in IP address format (for example, 192.168.5.4)
  2450  //
  2451  //   * TrailNotProvidedException
  2452  //   This exception is no longer in use.
  2453  //
  2454  //   * InvalidEventSelectorsException
  2455  //   This exception is thrown when the PutEventSelectors operation is called with
  2456  //   a number of event selectors, advanced event selectors, or data resources
  2457  //   that is not valid. The combination of event selectors or advanced event selectors
  2458  //   and data resources is not valid. A trail can have up to 5 event selectors.
  2459  //   If a trail uses advanced event selectors, a maximum of 500 total values for
  2460  //   all conditions in all advanced event selectors is allowed. A trail is limited
  2461  //   to 250 data resources. These data resources can be distributed across event
  2462  //   selectors, but the overall total cannot exceed 250.
  2463  //
  2464  //   You can:
  2465  //
  2466  //      * Specify a valid number of event selectors (1 to 5) for a trail.
  2467  //
  2468  //      * Specify a valid number of data resources (1 to 250) for an event selector.
  2469  //      The limit of number of resources on an individual event selector is configurable
  2470  //      up to 250. However, this upper limit is allowed only if the total number
  2471  //      of data resources does not exceed 250 across all event selectors for a
  2472  //      trail.
  2473  //
  2474  //      * Specify up to 500 values for all conditions in all advanced event selectors
  2475  //      for a trail.
  2476  //
  2477  //      * Specify a valid value for a parameter. For example, specifying the ReadWriteType
  2478  //      parameter with a value of read-only is not valid.
  2479  //
  2480  //   * InvalidParameterCombinationException
  2481  //   This exception is thrown when the combination of parameters provided is not
  2482  //   valid.
  2483  //
  2484  //   * InvalidHomeRegionException
  2485  //   This exception is thrown when an operation is called on a trail from a region
  2486  //   other than the region in which the trail was created.
  2487  //
  2488  //   * KmsKeyNotFoundException
  2489  //   This exception is thrown when the KMS key does not exist, when the S3 bucket
  2490  //   and the KMS key are not in the same region, or when the KMS key associated
  2491  //   with the Amazon SNS topic either does not exist or is not in the same region.
  2492  //
  2493  //   * KmsKeyDisabledException
  2494  //   This exception is no longer in use.
  2495  //
  2496  //   * KmsException
  2497  //   This exception is thrown when there is an issue with the specified KMS key
  2498  //   and the trail can’t be updated.
  2499  //
  2500  //   * InvalidCloudWatchLogsLogGroupArnException
  2501  //   This exception is thrown when the provided CloudWatch Logs log group is not
  2502  //   valid.
  2503  //
  2504  //   * InvalidCloudWatchLogsRoleArnException
  2505  //   This exception is thrown when the provided role is not valid.
  2506  //
  2507  //   * CloudWatchLogsDeliveryUnavailableException
  2508  //   Cannot set a CloudWatch Logs delivery for this region.
  2509  //
  2510  //   * UnsupportedOperationException
  2511  //   This exception is thrown when the requested operation is not supported.
  2512  //
  2513  //   * OperationNotPermittedException
  2514  //   This exception is thrown when the requested operation is not permitted.
  2515  //
  2516  //   * AccessNotEnabledException
  2517  //   This exception is thrown when trusted access has not been enabled between
  2518  //   CloudTrail and Organizations. For more information, see Enabling Trusted
  2519  //   Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  2520  //   and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2521  //
  2522  //   * InsufficientDependencyServiceAccessPermissionException
  2523  //   This exception is thrown when the IAM user or role that is used to create
  2524  //   the organization trail is lacking one or more required permissions for creating
  2525  //   an organization trail in a required service. For more information, see Prepare
  2526  //   For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2527  //
  2528  //   * OrganizationsNotInUseException
  2529  //   This exception is thrown when the request is made from an Amazon Web Services
  2530  //   account that is not a member of an organization. To make this request, sign
  2531  //   in using the credentials of an account that belongs to an organization.
  2532  //
  2533  //   * NotOrganizationMasterAccountException
  2534  //   This exception is thrown when the Amazon Web Services account making the
  2535  //   request to create or update an organization trail is not the management account
  2536  //   for an organization in Organizations. For more information, see Prepare For
  2537  //   Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2538  //
  2539  //   * OrganizationNotInAllFeaturesModeException
  2540  //   This exception is thrown when Organizations is not configured to support
  2541  //   all features. All features must be enabled in Organizations to support creating
  2542  //   an organization trail. For more information, see Prepare For Creating a Trail
  2543  //   For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2544  //
  2545  //   * CloudTrailInvalidClientTokenIdException
  2546  //   This exception is thrown when a call results in the InvalidClientTokenId
  2547  //   error code. This can occur when you are creating or updating a trail to send
  2548  //   notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
  2549  //   account.
  2550  //
  2551  // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
  2552  func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
  2553  	req, out := c.UpdateTrailRequest(input)
  2554  	return out, req.Send()
  2555  }
  2556  
  2557  // UpdateTrailWithContext is the same as UpdateTrail with the addition of
  2558  // the ability to pass a context and additional request options.
  2559  //
  2560  // See UpdateTrail for details on how to use this API operation.
  2561  //
  2562  // The context must be non-nil and will be used for request cancellation. If
  2563  // the context is nil a panic will occur. In the future the SDK may create
  2564  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2565  // for more information on using Contexts.
  2566  func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) {
  2567  	req, out := c.UpdateTrailRequest(input)
  2568  	req.SetContext(ctx)
  2569  	req.ApplyOptions(opts...)
  2570  	return out, req.Send()
  2571  }
  2572  
  2573  // This exception is thrown when an operation is called with a trail ARN that
  2574  // is not valid. The following is the format of a trail ARN.
  2575  //
  2576  // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  2577  type ARNInvalidException struct {
  2578  	_            struct{}                  `type:"structure"`
  2579  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2580  
  2581  	Message_ *string `locationName:"message" type:"string"`
  2582  }
  2583  
  2584  // String returns the string representation.
  2585  //
  2586  // API parameter values that are decorated as "sensitive" in the API will not
  2587  // be included in the string output. The member name will be present, but the
  2588  // value will be replaced with "sensitive".
  2589  func (s ARNInvalidException) String() string {
  2590  	return awsutil.Prettify(s)
  2591  }
  2592  
  2593  // GoString returns the string representation.
  2594  //
  2595  // API parameter values that are decorated as "sensitive" in the API will not
  2596  // be included in the string output. The member name will be present, but the
  2597  // value will be replaced with "sensitive".
  2598  func (s ARNInvalidException) GoString() string {
  2599  	return s.String()
  2600  }
  2601  
  2602  func newErrorARNInvalidException(v protocol.ResponseMetadata) error {
  2603  	return &ARNInvalidException{
  2604  		RespMetadata: v,
  2605  	}
  2606  }
  2607  
  2608  // Code returns the exception type name.
  2609  func (s *ARNInvalidException) Code() string {
  2610  	return "CloudTrailARNInvalidException"
  2611  }
  2612  
  2613  // Message returns the exception's message.
  2614  func (s *ARNInvalidException) Message() string {
  2615  	if s.Message_ != nil {
  2616  		return *s.Message_
  2617  	}
  2618  	return ""
  2619  }
  2620  
  2621  // OrigErr always returns nil, satisfies awserr.Error interface.
  2622  func (s *ARNInvalidException) OrigErr() error {
  2623  	return nil
  2624  }
  2625  
  2626  func (s *ARNInvalidException) Error() string {
  2627  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  2628  }
  2629  
  2630  // Status code returns the HTTP status code for the request's response error.
  2631  func (s *ARNInvalidException) StatusCode() int {
  2632  	return s.RespMetadata.StatusCode
  2633  }
  2634  
  2635  // RequestID returns the service's response RequestID for request.
  2636  func (s *ARNInvalidException) RequestID() string {
  2637  	return s.RespMetadata.RequestID
  2638  }
  2639  
  2640  // This exception is thrown when trusted access has not been enabled between
  2641  // CloudTrail and Organizations. For more information, see Enabling Trusted
  2642  // Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
  2643  // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  2644  type AccessNotEnabledException struct {
  2645  	_            struct{}                  `type:"structure"`
  2646  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  2647  
  2648  	Message_ *string `locationName:"message" type:"string"`
  2649  }
  2650  
  2651  // String returns the string representation.
  2652  //
  2653  // API parameter values that are decorated as "sensitive" in the API will not
  2654  // be included in the string output. The member name will be present, but the
  2655  // value will be replaced with "sensitive".
  2656  func (s AccessNotEnabledException) String() string {
  2657  	return awsutil.Prettify(s)
  2658  }
  2659  
  2660  // GoString returns the string representation.
  2661  //
  2662  // API parameter values that are decorated as "sensitive" in the API will not
  2663  // be included in the string output. The member name will be present, but the
  2664  // value will be replaced with "sensitive".
  2665  func (s AccessNotEnabledException) GoString() string {
  2666  	return s.String()
  2667  }
  2668  
  2669  func newErrorAccessNotEnabledException(v protocol.ResponseMetadata) error {
  2670  	return &AccessNotEnabledException{
  2671  		RespMetadata: v,
  2672  	}
  2673  }
  2674  
  2675  // Code returns the exception type name.
  2676  func (s *AccessNotEnabledException) Code() string {
  2677  	return "CloudTrailAccessNotEnabledException"
  2678  }
  2679  
  2680  // Message returns the exception's message.
  2681  func (s *AccessNotEnabledException) Message() string {
  2682  	if s.Message_ != nil {
  2683  		return *s.Message_
  2684  	}
  2685  	return ""
  2686  }
  2687  
  2688  // OrigErr always returns nil, satisfies awserr.Error interface.
  2689  func (s *AccessNotEnabledException) OrigErr() error {
  2690  	return nil
  2691  }
  2692  
  2693  func (s *AccessNotEnabledException) Error() string {
  2694  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  2695  }
  2696  
  2697  // Status code returns the HTTP status code for the request's response error.
  2698  func (s *AccessNotEnabledException) StatusCode() int {
  2699  	return s.RespMetadata.StatusCode
  2700  }
  2701  
  2702  // RequestID returns the service's response RequestID for request.
  2703  func (s *AccessNotEnabledException) RequestID() string {
  2704  	return s.RespMetadata.RequestID
  2705  }
  2706  
  2707  // Specifies the tags to add to a trail.
  2708  type AddTagsInput struct {
  2709  	_ struct{} `type:"structure"`
  2710  
  2711  	// Specifies the ARN of the trail to which one or more tags will be added. The
  2712  	// format of a trail ARN is:
  2713  	//
  2714  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  2715  	//
  2716  	// ResourceId is a required field
  2717  	ResourceId *string `type:"string" required:"true"`
  2718  
  2719  	// Contains a list of tags, up to a limit of 50
  2720  	TagsList []*Tag `type:"list"`
  2721  }
  2722  
  2723  // String returns the string representation.
  2724  //
  2725  // API parameter values that are decorated as "sensitive" in the API will not
  2726  // be included in the string output. The member name will be present, but the
  2727  // value will be replaced with "sensitive".
  2728  func (s AddTagsInput) String() string {
  2729  	return awsutil.Prettify(s)
  2730  }
  2731  
  2732  // GoString returns the string representation.
  2733  //
  2734  // API parameter values that are decorated as "sensitive" in the API will not
  2735  // be included in the string output. The member name will be present, but the
  2736  // value will be replaced with "sensitive".
  2737  func (s AddTagsInput) GoString() string {
  2738  	return s.String()
  2739  }
  2740  
  2741  // Validate inspects the fields of the type to determine if they are valid.
  2742  func (s *AddTagsInput) Validate() error {
  2743  	invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  2744  	if s.ResourceId == nil {
  2745  		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2746  	}
  2747  	if s.TagsList != nil {
  2748  		for i, v := range s.TagsList {
  2749  			if v == nil {
  2750  				continue
  2751  			}
  2752  			if err := v.Validate(); err != nil {
  2753  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  2754  			}
  2755  		}
  2756  	}
  2757  
  2758  	if invalidParams.Len() > 0 {
  2759  		return invalidParams
  2760  	}
  2761  	return nil
  2762  }
  2763  
  2764  // SetResourceId sets the ResourceId field's value.
  2765  func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
  2766  	s.ResourceId = &v
  2767  	return s
  2768  }
  2769  
  2770  // SetTagsList sets the TagsList field's value.
  2771  func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
  2772  	s.TagsList = v
  2773  	return s
  2774  }
  2775  
  2776  // Returns the objects or data if successful. Otherwise, returns an error.
  2777  type AddTagsOutput struct {
  2778  	_ struct{} `type:"structure"`
  2779  }
  2780  
  2781  // String returns the string representation.
  2782  //
  2783  // API parameter values that are decorated as "sensitive" in the API will not
  2784  // be included in the string output. The member name will be present, but the
  2785  // value will be replaced with "sensitive".
  2786  func (s AddTagsOutput) String() string {
  2787  	return awsutil.Prettify(s)
  2788  }
  2789  
  2790  // GoString returns the string representation.
  2791  //
  2792  // API parameter values that are decorated as "sensitive" in the API will not
  2793  // be included in the string output. The member name will be present, but the
  2794  // value will be replaced with "sensitive".
  2795  func (s AddTagsOutput) GoString() string {
  2796  	return s.String()
  2797  }
  2798  
  2799  // Advanced event selectors let you create fine-grained selectors for the following
  2800  // CloudTrail event record fields. They help you control costs by logging only
  2801  // those events that are important to you. For more information about advanced
  2802  // event selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  2803  // in the CloudTrail User Guide.
  2804  //
  2805  //    * readOnly
  2806  //
  2807  //    * eventSource
  2808  //
  2809  //    * eventName
  2810  //
  2811  //    * eventCategory
  2812  //
  2813  //    * resources.type
  2814  //
  2815  //    * resources.ARN
  2816  //
  2817  // You cannot apply both event selectors and advanced event selectors to a trail.
  2818  type AdvancedEventSelector struct {
  2819  	_ struct{} `type:"structure"`
  2820  
  2821  	// Contains all selector statements in an advanced event selector.
  2822  	//
  2823  	// FieldSelectors is a required field
  2824  	FieldSelectors []*AdvancedFieldSelector `min:"1" type:"list" required:"true"`
  2825  
  2826  	// An optional, descriptive name for an advanced event selector, such as "Log
  2827  	// data events for only two S3 buckets".
  2828  	Name *string `type:"string"`
  2829  }
  2830  
  2831  // String returns the string representation.
  2832  //
  2833  // API parameter values that are decorated as "sensitive" in the API will not
  2834  // be included in the string output. The member name will be present, but the
  2835  // value will be replaced with "sensitive".
  2836  func (s AdvancedEventSelector) String() string {
  2837  	return awsutil.Prettify(s)
  2838  }
  2839  
  2840  // GoString returns the string representation.
  2841  //
  2842  // API parameter values that are decorated as "sensitive" in the API will not
  2843  // be included in the string output. The member name will be present, but the
  2844  // value will be replaced with "sensitive".
  2845  func (s AdvancedEventSelector) GoString() string {
  2846  	return s.String()
  2847  }
  2848  
  2849  // Validate inspects the fields of the type to determine if they are valid.
  2850  func (s *AdvancedEventSelector) Validate() error {
  2851  	invalidParams := request.ErrInvalidParams{Context: "AdvancedEventSelector"}
  2852  	if s.FieldSelectors == nil {
  2853  		invalidParams.Add(request.NewErrParamRequired("FieldSelectors"))
  2854  	}
  2855  	if s.FieldSelectors != nil && len(s.FieldSelectors) < 1 {
  2856  		invalidParams.Add(request.NewErrParamMinLen("FieldSelectors", 1))
  2857  	}
  2858  	if s.FieldSelectors != nil {
  2859  		for i, v := range s.FieldSelectors {
  2860  			if v == nil {
  2861  				continue
  2862  			}
  2863  			if err := v.Validate(); err != nil {
  2864  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FieldSelectors", i), err.(request.ErrInvalidParams))
  2865  			}
  2866  		}
  2867  	}
  2868  
  2869  	if invalidParams.Len() > 0 {
  2870  		return invalidParams
  2871  	}
  2872  	return nil
  2873  }
  2874  
  2875  // SetFieldSelectors sets the FieldSelectors field's value.
  2876  func (s *AdvancedEventSelector) SetFieldSelectors(v []*AdvancedFieldSelector) *AdvancedEventSelector {
  2877  	s.FieldSelectors = v
  2878  	return s
  2879  }
  2880  
  2881  // SetName sets the Name field's value.
  2882  func (s *AdvancedEventSelector) SetName(v string) *AdvancedEventSelector {
  2883  	s.Name = &v
  2884  	return s
  2885  }
  2886  
  2887  // A single selector statement in an advanced event selector.
  2888  type AdvancedFieldSelector struct {
  2889  	_ struct{} `type:"structure"`
  2890  
  2891  	// An operator that includes events that match the last few characters of the
  2892  	// event record field specified as the value of Field.
  2893  	EndsWith []*string `min:"1" type:"list"`
  2894  
  2895  	// An operator that includes events that match the exact value of the event
  2896  	// record field specified as the value of Field. This is the only valid operator
  2897  	// that you can use with the readOnly, eventCategory, and resources.type fields.
  2898  	Equals []*string `min:"1" type:"list"`
  2899  
  2900  	// A field in an event record on which to filter events to be logged. Supported
  2901  	// fields include readOnly, eventCategory, eventSource (for management events),
  2902  	// eventName, resources.type, and resources.ARN.
  2903  	//
  2904  	//    * readOnly - Optional. Can be set to Equals a value of true or false.
  2905  	//    A value of false logs both read and write events.
  2906  	//
  2907  	//    * eventSource - For filtering management events only. This can be set
  2908  	//    only to NotEquals kms.amazonaws.com.
  2909  	//
  2910  	//    * eventName - Can use any operator. You can use it to filter in or filter
  2911  	//    out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock.
  2912  	//    You can have multiple values for this field, separated by commas.
  2913  	//
  2914  	//    * eventCategory - This is required. It must be set to Equals, and the
  2915  	//    value must be Management or Data.
  2916  	//
  2917  	//    * resources.type - This field is required. resources.type can only use
  2918  	//    the Equals operator, and the value can be one of the following: AWS::S3::Object,
  2919  	//    AWS::S3::AccessPoint, AWS::Lambda::Function, AWS::DynamoDB::Table, AWS::S3Outposts::Object,
  2920  	//    AWS::ManagedBlockchain::Node, AWS::S3ObjectLambda::AccessPoint, or AWS::EC2::Snapshot.
  2921  	//    You can have only one resources.type field per selector. To log data
  2922  	//    events on more than one resource type, add another selector.
  2923  	//
  2924  	//    * resources.ARN - You can use any operator with resources.ARN, but if
  2925  	//    you use Equals or NotEquals, the value must exactly match the ARN of a
  2926  	//    valid resource of the type you've specified in the template as the value
  2927  	//    of resources.type. For example, if resources.type equals AWS::S3::Object,
  2928  	//    the ARN must be in one of the following formats. To log all data events
  2929  	//    for all objects in a specific S3 bucket, use the StartsWith operator,
  2930  	//    and include only the bucket ARN as the matching value. The trailing slash
  2931  	//    is intentional; do not exclude it. Replace the text between less than
  2932  	//    and greater than symbols (<>) with resource-specific information. arn:<partition>:s3:::<bucket_name>/
  2933  	//    arn:<partition>:s3:::<bucket_name>/<object_path>/ When resources.type
  2934  	//    equals AWS::S3::AccessPoint, and the operator is set to Equals or NotEquals,
  2935  	//    the ARN must be in one of the following formats. To log events on all
  2936  	//    objects in an S3 access point, we recommend that you use only the access
  2937  	//    point ARN, don’t include the object path, and use the StartsWith or
  2938  	//    NotStartsWith operators. arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
  2939  	//    arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
  2940  	//    When resources.type equals AWS::Lambda::Function, and the operator is
  2941  	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
  2942  	//    When resources.type equals AWS::DynamoDB::Table, and the operator is set
  2943  	//    to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:dynamodb:<region>:<account_ID>:table:<table_name>
  2944  	//    When resources.type equals AWS::S3Outposts::Object, and the operator is
  2945  	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
  2946  	//    When resources.type equals AWS::ManagedBlockchain::Node, and the operator
  2947  	//    is set to Equals or NotEquals, the ARN must be in the following format:
  2948  	//    arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
  2949  	//    When resources.type equals AWS::S3ObjectLambda::AccessPoint, and the operator
  2950  	//    is set to Equals or NotEquals, the ARN must be in the following format:
  2951  	//    arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
  2952  	//    When resources.type equals AWS::EC2::Snapshot, and the operator is set
  2953  	//    to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
  2954  	//
  2955  	// Field is a required field
  2956  	Field *string `min:"1" type:"string" required:"true"`
  2957  
  2958  	// An operator that excludes events that match the last few characters of the
  2959  	// event record field specified as the value of Field.
  2960  	NotEndsWith []*string `min:"1" type:"list"`
  2961  
  2962  	// An operator that excludes events that match the exact value of the event
  2963  	// record field specified as the value of Field.
  2964  	NotEquals []*string `min:"1" type:"list"`
  2965  
  2966  	// An operator that excludes events that match the first few characters of the
  2967  	// event record field specified as the value of Field.
  2968  	NotStartsWith []*string `min:"1" type:"list"`
  2969  
  2970  	// An operator that includes events that match the first few characters of the
  2971  	// event record field specified as the value of Field.
  2972  	StartsWith []*string `min:"1" type:"list"`
  2973  }
  2974  
  2975  // String returns the string representation.
  2976  //
  2977  // API parameter values that are decorated as "sensitive" in the API will not
  2978  // be included in the string output. The member name will be present, but the
  2979  // value will be replaced with "sensitive".
  2980  func (s AdvancedFieldSelector) String() string {
  2981  	return awsutil.Prettify(s)
  2982  }
  2983  
  2984  // GoString returns the string representation.
  2985  //
  2986  // API parameter values that are decorated as "sensitive" in the API will not
  2987  // be included in the string output. The member name will be present, but the
  2988  // value will be replaced with "sensitive".
  2989  func (s AdvancedFieldSelector) GoString() string {
  2990  	return s.String()
  2991  }
  2992  
  2993  // Validate inspects the fields of the type to determine if they are valid.
  2994  func (s *AdvancedFieldSelector) Validate() error {
  2995  	invalidParams := request.ErrInvalidParams{Context: "AdvancedFieldSelector"}
  2996  	if s.EndsWith != nil && len(s.EndsWith) < 1 {
  2997  		invalidParams.Add(request.NewErrParamMinLen("EndsWith", 1))
  2998  	}
  2999  	if s.Equals != nil && len(s.Equals) < 1 {
  3000  		invalidParams.Add(request.NewErrParamMinLen("Equals", 1))
  3001  	}
  3002  	if s.Field == nil {
  3003  		invalidParams.Add(request.NewErrParamRequired("Field"))
  3004  	}
  3005  	if s.Field != nil && len(*s.Field) < 1 {
  3006  		invalidParams.Add(request.NewErrParamMinLen("Field", 1))
  3007  	}
  3008  	if s.NotEndsWith != nil && len(s.NotEndsWith) < 1 {
  3009  		invalidParams.Add(request.NewErrParamMinLen("NotEndsWith", 1))
  3010  	}
  3011  	if s.NotEquals != nil && len(s.NotEquals) < 1 {
  3012  		invalidParams.Add(request.NewErrParamMinLen("NotEquals", 1))
  3013  	}
  3014  	if s.NotStartsWith != nil && len(s.NotStartsWith) < 1 {
  3015  		invalidParams.Add(request.NewErrParamMinLen("NotStartsWith", 1))
  3016  	}
  3017  	if s.StartsWith != nil && len(s.StartsWith) < 1 {
  3018  		invalidParams.Add(request.NewErrParamMinLen("StartsWith", 1))
  3019  	}
  3020  
  3021  	if invalidParams.Len() > 0 {
  3022  		return invalidParams
  3023  	}
  3024  	return nil
  3025  }
  3026  
  3027  // SetEndsWith sets the EndsWith field's value.
  3028  func (s *AdvancedFieldSelector) SetEndsWith(v []*string) *AdvancedFieldSelector {
  3029  	s.EndsWith = v
  3030  	return s
  3031  }
  3032  
  3033  // SetEquals sets the Equals field's value.
  3034  func (s *AdvancedFieldSelector) SetEquals(v []*string) *AdvancedFieldSelector {
  3035  	s.Equals = v
  3036  	return s
  3037  }
  3038  
  3039  // SetField sets the Field field's value.
  3040  func (s *AdvancedFieldSelector) SetField(v string) *AdvancedFieldSelector {
  3041  	s.Field = &v
  3042  	return s
  3043  }
  3044  
  3045  // SetNotEndsWith sets the NotEndsWith field's value.
  3046  func (s *AdvancedFieldSelector) SetNotEndsWith(v []*string) *AdvancedFieldSelector {
  3047  	s.NotEndsWith = v
  3048  	return s
  3049  }
  3050  
  3051  // SetNotEquals sets the NotEquals field's value.
  3052  func (s *AdvancedFieldSelector) SetNotEquals(v []*string) *AdvancedFieldSelector {
  3053  	s.NotEquals = v
  3054  	return s
  3055  }
  3056  
  3057  // SetNotStartsWith sets the NotStartsWith field's value.
  3058  func (s *AdvancedFieldSelector) SetNotStartsWith(v []*string) *AdvancedFieldSelector {
  3059  	s.NotStartsWith = v
  3060  	return s
  3061  }
  3062  
  3063  // SetStartsWith sets the StartsWith field's value.
  3064  func (s *AdvancedFieldSelector) SetStartsWith(v []*string) *AdvancedFieldSelector {
  3065  	s.StartsWith = v
  3066  	return s
  3067  }
  3068  
  3069  // This exception is thrown when a call results in the InvalidClientTokenId
  3070  // error code. This can occur when you are creating or updating a trail to send
  3071  // notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
  3072  // account.
  3073  type CloudTrailInvalidClientTokenIdException struct {
  3074  	_            struct{}                  `type:"structure"`
  3075  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  3076  
  3077  	Message_ *string `locationName:"message" type:"string"`
  3078  }
  3079  
  3080  // String returns the string representation.
  3081  //
  3082  // API parameter values that are decorated as "sensitive" in the API will not
  3083  // be included in the string output. The member name will be present, but the
  3084  // value will be replaced with "sensitive".
  3085  func (s CloudTrailInvalidClientTokenIdException) String() string {
  3086  	return awsutil.Prettify(s)
  3087  }
  3088  
  3089  // GoString returns the string representation.
  3090  //
  3091  // API parameter values that are decorated as "sensitive" in the API will not
  3092  // be included in the string output. The member name will be present, but the
  3093  // value will be replaced with "sensitive".
  3094  func (s CloudTrailInvalidClientTokenIdException) GoString() string {
  3095  	return s.String()
  3096  }
  3097  
  3098  func newErrorCloudTrailInvalidClientTokenIdException(v protocol.ResponseMetadata) error {
  3099  	return &CloudTrailInvalidClientTokenIdException{
  3100  		RespMetadata: v,
  3101  	}
  3102  }
  3103  
  3104  // Code returns the exception type name.
  3105  func (s *CloudTrailInvalidClientTokenIdException) Code() string {
  3106  	return "CloudTrailInvalidClientTokenIdException"
  3107  }
  3108  
  3109  // Message returns the exception's message.
  3110  func (s *CloudTrailInvalidClientTokenIdException) Message() string {
  3111  	if s.Message_ != nil {
  3112  		return *s.Message_
  3113  	}
  3114  	return ""
  3115  }
  3116  
  3117  // OrigErr always returns nil, satisfies awserr.Error interface.
  3118  func (s *CloudTrailInvalidClientTokenIdException) OrigErr() error {
  3119  	return nil
  3120  }
  3121  
  3122  func (s *CloudTrailInvalidClientTokenIdException) Error() string {
  3123  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  3124  }
  3125  
  3126  // Status code returns the HTTP status code for the request's response error.
  3127  func (s *CloudTrailInvalidClientTokenIdException) StatusCode() int {
  3128  	return s.RespMetadata.StatusCode
  3129  }
  3130  
  3131  // RequestID returns the service's response RequestID for request.
  3132  func (s *CloudTrailInvalidClientTokenIdException) RequestID() string {
  3133  	return s.RespMetadata.RequestID
  3134  }
  3135  
  3136  // Cannot set a CloudWatch Logs delivery for this region.
  3137  type CloudWatchLogsDeliveryUnavailableException struct {
  3138  	_            struct{}                  `type:"structure"`
  3139  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  3140  
  3141  	Message_ *string `locationName:"message" type:"string"`
  3142  }
  3143  
  3144  // String returns the string representation.
  3145  //
  3146  // API parameter values that are decorated as "sensitive" in the API will not
  3147  // be included in the string output. The member name will be present, but the
  3148  // value will be replaced with "sensitive".
  3149  func (s CloudWatchLogsDeliveryUnavailableException) String() string {
  3150  	return awsutil.Prettify(s)
  3151  }
  3152  
  3153  // GoString returns the string representation.
  3154  //
  3155  // API parameter values that are decorated as "sensitive" in the API will not
  3156  // be included in the string output. The member name will be present, but the
  3157  // value will be replaced with "sensitive".
  3158  func (s CloudWatchLogsDeliveryUnavailableException) GoString() string {
  3159  	return s.String()
  3160  }
  3161  
  3162  func newErrorCloudWatchLogsDeliveryUnavailableException(v protocol.ResponseMetadata) error {
  3163  	return &CloudWatchLogsDeliveryUnavailableException{
  3164  		RespMetadata: v,
  3165  	}
  3166  }
  3167  
  3168  // Code returns the exception type name.
  3169  func (s *CloudWatchLogsDeliveryUnavailableException) Code() string {
  3170  	return "CloudWatchLogsDeliveryUnavailableException"
  3171  }
  3172  
  3173  // Message returns the exception's message.
  3174  func (s *CloudWatchLogsDeliveryUnavailableException) Message() string {
  3175  	if s.Message_ != nil {
  3176  		return *s.Message_
  3177  	}
  3178  	return ""
  3179  }
  3180  
  3181  // OrigErr always returns nil, satisfies awserr.Error interface.
  3182  func (s *CloudWatchLogsDeliveryUnavailableException) OrigErr() error {
  3183  	return nil
  3184  }
  3185  
  3186  func (s *CloudWatchLogsDeliveryUnavailableException) Error() string {
  3187  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  3188  }
  3189  
  3190  // Status code returns the HTTP status code for the request's response error.
  3191  func (s *CloudWatchLogsDeliveryUnavailableException) StatusCode() int {
  3192  	return s.RespMetadata.StatusCode
  3193  }
  3194  
  3195  // RequestID returns the service's response RequestID for request.
  3196  func (s *CloudWatchLogsDeliveryUnavailableException) RequestID() string {
  3197  	return s.RespMetadata.RequestID
  3198  }
  3199  
  3200  // This exception is thrown when the specified resource is not ready for an
  3201  // operation. This can occur when you try to run an operation on a trail before
  3202  // CloudTrail has time to fully load the trail. If this exception occurs, wait
  3203  // a few minutes, and then try the operation again.
  3204  type ConflictException struct {
  3205  	_            struct{}                  `type:"structure"`
  3206  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  3207  
  3208  	Message_ *string `locationName:"message" type:"string"`
  3209  }
  3210  
  3211  // String returns the string representation.
  3212  //
  3213  // API parameter values that are decorated as "sensitive" in the API will not
  3214  // be included in the string output. The member name will be present, but the
  3215  // value will be replaced with "sensitive".
  3216  func (s ConflictException) String() string {
  3217  	return awsutil.Prettify(s)
  3218  }
  3219  
  3220  // GoString returns the string representation.
  3221  //
  3222  // API parameter values that are decorated as "sensitive" in the API will not
  3223  // be included in the string output. The member name will be present, but the
  3224  // value will be replaced with "sensitive".
  3225  func (s ConflictException) GoString() string {
  3226  	return s.String()
  3227  }
  3228  
  3229  func newErrorConflictException(v protocol.ResponseMetadata) error {
  3230  	return &ConflictException{
  3231  		RespMetadata: v,
  3232  	}
  3233  }
  3234  
  3235  // Code returns the exception type name.
  3236  func (s *ConflictException) Code() string {
  3237  	return "ConflictException"
  3238  }
  3239  
  3240  // Message returns the exception's message.
  3241  func (s *ConflictException) Message() string {
  3242  	if s.Message_ != nil {
  3243  		return *s.Message_
  3244  	}
  3245  	return ""
  3246  }
  3247  
  3248  // OrigErr always returns nil, satisfies awserr.Error interface.
  3249  func (s *ConflictException) OrigErr() error {
  3250  	return nil
  3251  }
  3252  
  3253  func (s *ConflictException) Error() string {
  3254  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  3255  }
  3256  
  3257  // Status code returns the HTTP status code for the request's response error.
  3258  func (s *ConflictException) StatusCode() int {
  3259  	return s.RespMetadata.StatusCode
  3260  }
  3261  
  3262  // RequestID returns the service's response RequestID for request.
  3263  func (s *ConflictException) RequestID() string {
  3264  	return s.RespMetadata.RequestID
  3265  }
  3266  
  3267  // Specifies the settings for each trail.
  3268  type CreateTrailInput struct {
  3269  	_ struct{} `type:"structure"`
  3270  
  3271  	// Specifies a log group name using an Amazon Resource Name (ARN), a unique
  3272  	// identifier that represents the log group to which CloudTrail logs will be
  3273  	// delivered. Not required unless you specify CloudWatchLogsRoleArn.
  3274  	CloudWatchLogsLogGroupArn *string `type:"string"`
  3275  
  3276  	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
  3277  	// a user's log group.
  3278  	CloudWatchLogsRoleArn *string `type:"string"`
  3279  
  3280  	// Specifies whether log file integrity validation is enabled. The default is
  3281  	// false.
  3282  	//
  3283  	// When you disable log file integrity validation, the chain of digest files
  3284  	// is broken after one hour. CloudTrail does not create digest files for log
  3285  	// files that were delivered during a period in which log file integrity validation
  3286  	// was disabled. For example, if you enable log file integrity validation at
  3287  	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
  3288  	// on January 10, digest files will not be created for the log files delivered
  3289  	// from noon on January 2 to noon on January 10. The same applies whenever you
  3290  	// stop CloudTrail logging or delete a trail.
  3291  	EnableLogFileValidation *bool `type:"boolean"`
  3292  
  3293  	// Specifies whether the trail is publishing events from global services such
  3294  	// as IAM to the log files.
  3295  	IncludeGlobalServiceEvents *bool `type:"boolean"`
  3296  
  3297  	// Specifies whether the trail is created in the current region or in all regions.
  3298  	// The default is false, which creates a trail only in the region where you
  3299  	// are signed in. As a best practice, consider creating trails that log events
  3300  	// in all regions.
  3301  	IsMultiRegionTrail *bool `type:"boolean"`
  3302  
  3303  	// Specifies whether the trail is created for all accounts in an organization
  3304  	// in Organizations, or only for the current Amazon Web Services account. The
  3305  	// default is false, and cannot be true unless the call is made on behalf of
  3306  	// an Amazon Web Services account that is the management account for an organization
  3307  	// in Organizations.
  3308  	IsOrganizationTrail *bool `type:"boolean"`
  3309  
  3310  	// Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  3311  	// The value can be an alias name prefixed by "alias/", a fully specified ARN
  3312  	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
  3313  	//
  3314  	// CloudTrail also supports KMS multi-Region keys. For more information about
  3315  	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  3316  	// in the Key Management Service Developer Guide.
  3317  	//
  3318  	// Examples:
  3319  	//
  3320  	//    * alias/MyAliasName
  3321  	//
  3322  	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  3323  	//
  3324  	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  3325  	//
  3326  	//    * 12345678-1234-1234-1234-123456789012
  3327  	KmsKeyId *string `type:"string"`
  3328  
  3329  	// Specifies the name of the trail. The name must meet the following requirements:
  3330  	//
  3331  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  3332  	//    (_), or dashes (-)
  3333  	//
  3334  	//    * Start with a letter or number, and end with a letter or number
  3335  	//
  3336  	//    * Be between 3 and 128 characters
  3337  	//
  3338  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  3339  	//    and my--namespace are not valid.
  3340  	//
  3341  	//    * Not be in IP address format (for example, 192.168.5.4)
  3342  	//
  3343  	// Name is a required field
  3344  	Name *string `type:"string" required:"true"`
  3345  
  3346  	// Specifies the name of the Amazon S3 bucket designated for publishing log
  3347  	// files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  3348  	//
  3349  	// S3BucketName is a required field
  3350  	S3BucketName *string `type:"string" required:"true"`
  3351  
  3352  	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  3353  	// you have designated for log file delivery. For more information, see Finding
  3354  	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  3355  	// The maximum length is 200 characters.
  3356  	S3KeyPrefix *string `type:"string"`
  3357  
  3358  	// Specifies the name of the Amazon SNS topic defined for notification of log
  3359  	// file delivery. The maximum length is 256 characters.
  3360  	SnsTopicName *string `type:"string"`
  3361  
  3362  	// A list of tags.
  3363  	TagsList []*Tag `type:"list"`
  3364  }
  3365  
  3366  // String returns the string representation.
  3367  //
  3368  // API parameter values that are decorated as "sensitive" in the API will not
  3369  // be included in the string output. The member name will be present, but the
  3370  // value will be replaced with "sensitive".
  3371  func (s CreateTrailInput) String() string {
  3372  	return awsutil.Prettify(s)
  3373  }
  3374  
  3375  // GoString returns the string representation.
  3376  //
  3377  // API parameter values that are decorated as "sensitive" in the API will not
  3378  // be included in the string output. The member name will be present, but the
  3379  // value will be replaced with "sensitive".
  3380  func (s CreateTrailInput) GoString() string {
  3381  	return s.String()
  3382  }
  3383  
  3384  // Validate inspects the fields of the type to determine if they are valid.
  3385  func (s *CreateTrailInput) Validate() error {
  3386  	invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
  3387  	if s.Name == nil {
  3388  		invalidParams.Add(request.NewErrParamRequired("Name"))
  3389  	}
  3390  	if s.S3BucketName == nil {
  3391  		invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
  3392  	}
  3393  	if s.TagsList != nil {
  3394  		for i, v := range s.TagsList {
  3395  			if v == nil {
  3396  				continue
  3397  			}
  3398  			if err := v.Validate(); err != nil {
  3399  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  3400  			}
  3401  		}
  3402  	}
  3403  
  3404  	if invalidParams.Len() > 0 {
  3405  		return invalidParams
  3406  	}
  3407  	return nil
  3408  }
  3409  
  3410  // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  3411  func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput {
  3412  	s.CloudWatchLogsLogGroupArn = &v
  3413  	return s
  3414  }
  3415  
  3416  // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  3417  func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput {
  3418  	s.CloudWatchLogsRoleArn = &v
  3419  	return s
  3420  }
  3421  
  3422  // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
  3423  func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput {
  3424  	s.EnableLogFileValidation = &v
  3425  	return s
  3426  }
  3427  
  3428  // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  3429  func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput {
  3430  	s.IncludeGlobalServiceEvents = &v
  3431  	return s
  3432  }
  3433  
  3434  // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  3435  func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput {
  3436  	s.IsMultiRegionTrail = &v
  3437  	return s
  3438  }
  3439  
  3440  // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  3441  func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput {
  3442  	s.IsOrganizationTrail = &v
  3443  	return s
  3444  }
  3445  
  3446  // SetKmsKeyId sets the KmsKeyId field's value.
  3447  func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput {
  3448  	s.KmsKeyId = &v
  3449  	return s
  3450  }
  3451  
  3452  // SetName sets the Name field's value.
  3453  func (s *CreateTrailInput) SetName(v string) *CreateTrailInput {
  3454  	s.Name = &v
  3455  	return s
  3456  }
  3457  
  3458  // SetS3BucketName sets the S3BucketName field's value.
  3459  func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput {
  3460  	s.S3BucketName = &v
  3461  	return s
  3462  }
  3463  
  3464  // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  3465  func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput {
  3466  	s.S3KeyPrefix = &v
  3467  	return s
  3468  }
  3469  
  3470  // SetSnsTopicName sets the SnsTopicName field's value.
  3471  func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput {
  3472  	s.SnsTopicName = &v
  3473  	return s
  3474  }
  3475  
  3476  // SetTagsList sets the TagsList field's value.
  3477  func (s *CreateTrailInput) SetTagsList(v []*Tag) *CreateTrailInput {
  3478  	s.TagsList = v
  3479  	return s
  3480  }
  3481  
  3482  // Returns the objects or data listed below if successful. Otherwise, returns
  3483  // an error.
  3484  type CreateTrailOutput struct {
  3485  	_ struct{} `type:"structure"`
  3486  
  3487  	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  3488  	// logs will be delivered.
  3489  	CloudWatchLogsLogGroupArn *string `type:"string"`
  3490  
  3491  	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
  3492  	// a user's log group.
  3493  	CloudWatchLogsRoleArn *string `type:"string"`
  3494  
  3495  	// Specifies whether the trail is publishing events from global services such
  3496  	// as IAM to the log files.
  3497  	IncludeGlobalServiceEvents *bool `type:"boolean"`
  3498  
  3499  	// Specifies whether the trail exists in one region or in all regions.
  3500  	IsMultiRegionTrail *bool `type:"boolean"`
  3501  
  3502  	// Specifies whether the trail is an organization trail.
  3503  	IsOrganizationTrail *bool `type:"boolean"`
  3504  
  3505  	// Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  3506  	// The value is a fully specified ARN to a KMS key in the following format.
  3507  	//
  3508  	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  3509  	KmsKeyId *string `type:"string"`
  3510  
  3511  	// Specifies whether log file integrity validation is enabled.
  3512  	LogFileValidationEnabled *bool `type:"boolean"`
  3513  
  3514  	// Specifies the name of the trail.
  3515  	Name *string `type:"string"`
  3516  
  3517  	// Specifies the name of the Amazon S3 bucket designated for publishing log
  3518  	// files.
  3519  	S3BucketName *string `type:"string"`
  3520  
  3521  	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  3522  	// you have designated for log file delivery. For more information, see Finding
  3523  	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  3524  	S3KeyPrefix *string `type:"string"`
  3525  
  3526  	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  3527  	// when log files are delivered. The format of a topic ARN is:
  3528  	//
  3529  	// arn:aws:sns:us-east-2:123456789012:MyTopic
  3530  	SnsTopicARN *string `type:"string"`
  3531  
  3532  	// This field is no longer in use. Use SnsTopicARN.
  3533  	//
  3534  	// Deprecated: SnsTopicName has been deprecated
  3535  	SnsTopicName *string `deprecated:"true" type:"string"`
  3536  
  3537  	// Specifies the ARN of the trail that was created. The format of a trail ARN
  3538  	// is:
  3539  	//
  3540  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  3541  	TrailARN *string `type:"string"`
  3542  }
  3543  
  3544  // String returns the string representation.
  3545  //
  3546  // API parameter values that are decorated as "sensitive" in the API will not
  3547  // be included in the string output. The member name will be present, but the
  3548  // value will be replaced with "sensitive".
  3549  func (s CreateTrailOutput) String() string {
  3550  	return awsutil.Prettify(s)
  3551  }
  3552  
  3553  // GoString returns the string representation.
  3554  //
  3555  // API parameter values that are decorated as "sensitive" in the API will not
  3556  // be included in the string output. The member name will be present, but the
  3557  // value will be replaced with "sensitive".
  3558  func (s CreateTrailOutput) GoString() string {
  3559  	return s.String()
  3560  }
  3561  
  3562  // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  3563  func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput {
  3564  	s.CloudWatchLogsLogGroupArn = &v
  3565  	return s
  3566  }
  3567  
  3568  // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  3569  func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput {
  3570  	s.CloudWatchLogsRoleArn = &v
  3571  	return s
  3572  }
  3573  
  3574  // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  3575  func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput {
  3576  	s.IncludeGlobalServiceEvents = &v
  3577  	return s
  3578  }
  3579  
  3580  // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  3581  func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput {
  3582  	s.IsMultiRegionTrail = &v
  3583  	return s
  3584  }
  3585  
  3586  // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  3587  func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput {
  3588  	s.IsOrganizationTrail = &v
  3589  	return s
  3590  }
  3591  
  3592  // SetKmsKeyId sets the KmsKeyId field's value.
  3593  func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput {
  3594  	s.KmsKeyId = &v
  3595  	return s
  3596  }
  3597  
  3598  // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  3599  func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
  3600  	s.LogFileValidationEnabled = &v
  3601  	return s
  3602  }
  3603  
  3604  // SetName sets the Name field's value.
  3605  func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput {
  3606  	s.Name = &v
  3607  	return s
  3608  }
  3609  
  3610  // SetS3BucketName sets the S3BucketName field's value.
  3611  func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput {
  3612  	s.S3BucketName = &v
  3613  	return s
  3614  }
  3615  
  3616  // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  3617  func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput {
  3618  	s.S3KeyPrefix = &v
  3619  	return s
  3620  }
  3621  
  3622  // SetSnsTopicARN sets the SnsTopicARN field's value.
  3623  func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput {
  3624  	s.SnsTopicARN = &v
  3625  	return s
  3626  }
  3627  
  3628  // SetSnsTopicName sets the SnsTopicName field's value.
  3629  func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput {
  3630  	s.SnsTopicName = &v
  3631  	return s
  3632  }
  3633  
  3634  // SetTrailARN sets the TrailARN field's value.
  3635  func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput {
  3636  	s.TrailARN = &v
  3637  	return s
  3638  }
  3639  
  3640  // The Amazon S3 buckets, Lambda functions, or Amazon DynamoDB tables that you
  3641  // specify in your event selectors for your trail to log data events. Data events
  3642  // provide information about the resource operations performed on or within
  3643  // a resource itself. These are also known as data plane operations. You can
  3644  // specify up to 250 data resources for a trail.
  3645  //
  3646  // The total number of allowed data resources is 250. This number can be distributed
  3647  // between 1 and 5 event selectors, but the total cannot exceed 250 across all
  3648  // selectors.
  3649  //
  3650  // If you are using advanced event selectors, the maximum total number of values
  3651  // for all conditions, across all advanced event selectors for the trail, is
  3652  // 500.
  3653  //
  3654  // The following example demonstrates how logging works when you configure logging
  3655  // of all data events for an S3 bucket named bucket-1. In this example, the
  3656  // CloudTrail user specified an empty prefix, and the option to log both Read
  3657  // and Write data events.
  3658  //
  3659  // A user uploads an image file to bucket-1.
  3660  //
  3661  // The PutObject API operation is an Amazon S3 object-level API. It is recorded
  3662  // as a data event in CloudTrail. Because the CloudTrail user specified an S3
  3663  // bucket with an empty prefix, events that occur on any object in that bucket
  3664  // are logged. The trail processes and logs the event.
  3665  //
  3666  // A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.
  3667  //
  3668  // The PutObject API operation occurred for an object in an S3 bucket that the
  3669  // CloudTrail user didn't specify for the trail. The trail doesn’t log the
  3670  // event.
  3671  //
  3672  // The following example demonstrates how logging works when you configure logging
  3673  // of Lambda data events for a Lambda function named MyLambdaFunction, but not
  3674  // for all Lambda functions.
  3675  //
  3676  // A user runs a script that includes a call to the MyLambdaFunction function
  3677  // and the MyOtherLambdaFunction function.
  3678  //
  3679  // The Invoke API operation on MyLambdaFunction is an Lambda API. It is recorded
  3680  // as a data event in CloudTrail. Because the CloudTrail user specified logging
  3681  // data events for MyLambdaFunction, any invocations of that function are logged.
  3682  // The trail processes and logs the event.
  3683  //
  3684  // The Invoke API operation on MyOtherLambdaFunction is an Lambda API. Because
  3685  // the CloudTrail user did not specify logging data events for all Lambda functions,
  3686  // the Invoke operation for MyOtherLambdaFunction does not match the function
  3687  // specified for the trail. The trail doesn’t log the event.
  3688  type DataResource struct {
  3689  	_ struct{} `type:"structure"`
  3690  
  3691  	// The resource type in which you want to log data events. You can specify AWS::S3::Object,
  3692  	// AWS::Lambda::Function, or AWS::DynamoDB::Table resources.
  3693  	//
  3694  	// The AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, AWS::S3ObjectLambda::AccessPoint,
  3695  	// and AWS::EC2::Snapshot resource types are not valid in basic event selectors.
  3696  	// To log data events on these resource types, use advanced event selectors.
  3697  	Type *string `type:"string"`
  3698  
  3699  	// An array of Amazon Resource Name (ARN) strings or partial ARN strings for
  3700  	// the specified objects.
  3701  	//
  3702  	//    * To log data events for all objects in all S3 buckets in your Amazon
  3703  	//    Web Services account, specify the prefix as arn:aws:s3:::. This also enables
  3704  	//    logging of data event activity performed by any user or role in your Amazon
  3705  	//    Web Services account, even if that activity is performed on a bucket that
  3706  	//    belongs to another Amazon Web Services account.
  3707  	//
  3708  	//    * To log data events for all objects in an S3 bucket, specify the bucket
  3709  	//    and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
  3710  	//    data events for all objects in this S3 bucket.
  3711  	//
  3712  	//    * To log data events for specific objects, specify the S3 bucket and object
  3713  	//    prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
  3714  	//    events for objects in this S3 bucket that match the prefix.
  3715  	//
  3716  	//    * To log data events for all Lambda functions in your Amazon Web Services
  3717  	//    account, specify the prefix as arn:aws:lambda. This also enables logging
  3718  	//    of Invoke activity performed by any user or role in your Amazon Web Services
  3719  	//    account, even if that activity is performed on a function that belongs
  3720  	//    to another Amazon Web Services account.
  3721  	//
  3722  	//    * To log data events for a specific Lambda function, specify the function
  3723  	//    ARN. Lambda function ARNs are exact. For example, if you specify a function
  3724  	//    ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events
  3725  	//    will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
  3726  	//    They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
  3727  	//
  3728  	//    * To log data events for all DynamoDB tables in your Amazon Web Services
  3729  	//    account, specify the prefix as arn:aws:dynamodb.
  3730  	Values []*string `type:"list"`
  3731  }
  3732  
  3733  // String returns the string representation.
  3734  //
  3735  // API parameter values that are decorated as "sensitive" in the API will not
  3736  // be included in the string output. The member name will be present, but the
  3737  // value will be replaced with "sensitive".
  3738  func (s DataResource) String() string {
  3739  	return awsutil.Prettify(s)
  3740  }
  3741  
  3742  // GoString returns the string representation.
  3743  //
  3744  // API parameter values that are decorated as "sensitive" in the API will not
  3745  // be included in the string output. The member name will be present, but the
  3746  // value will be replaced with "sensitive".
  3747  func (s DataResource) GoString() string {
  3748  	return s.String()
  3749  }
  3750  
  3751  // SetType sets the Type field's value.
  3752  func (s *DataResource) SetType(v string) *DataResource {
  3753  	s.Type = &v
  3754  	return s
  3755  }
  3756  
  3757  // SetValues sets the Values field's value.
  3758  func (s *DataResource) SetValues(v []*string) *DataResource {
  3759  	s.Values = v
  3760  	return s
  3761  }
  3762  
  3763  // The request that specifies the name of a trail to delete.
  3764  type DeleteTrailInput struct {
  3765  	_ struct{} `type:"structure"`
  3766  
  3767  	// Specifies the name or the CloudTrail ARN of the trail to be deleted. The
  3768  	// following is the format of a trail ARN. arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  3769  	//
  3770  	// Name is a required field
  3771  	Name *string `type:"string" required:"true"`
  3772  }
  3773  
  3774  // String returns the string representation.
  3775  //
  3776  // API parameter values that are decorated as "sensitive" in the API will not
  3777  // be included in the string output. The member name will be present, but the
  3778  // value will be replaced with "sensitive".
  3779  func (s DeleteTrailInput) String() string {
  3780  	return awsutil.Prettify(s)
  3781  }
  3782  
  3783  // GoString returns the string representation.
  3784  //
  3785  // API parameter values that are decorated as "sensitive" in the API will not
  3786  // be included in the string output. The member name will be present, but the
  3787  // value will be replaced with "sensitive".
  3788  func (s DeleteTrailInput) GoString() string {
  3789  	return s.String()
  3790  }
  3791  
  3792  // Validate inspects the fields of the type to determine if they are valid.
  3793  func (s *DeleteTrailInput) Validate() error {
  3794  	invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
  3795  	if s.Name == nil {
  3796  		invalidParams.Add(request.NewErrParamRequired("Name"))
  3797  	}
  3798  
  3799  	if invalidParams.Len() > 0 {
  3800  		return invalidParams
  3801  	}
  3802  	return nil
  3803  }
  3804  
  3805  // SetName sets the Name field's value.
  3806  func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput {
  3807  	s.Name = &v
  3808  	return s
  3809  }
  3810  
  3811  // Returns the objects or data listed below if successful. Otherwise, returns
  3812  // an error.
  3813  type DeleteTrailOutput struct {
  3814  	_ struct{} `type:"structure"`
  3815  }
  3816  
  3817  // String returns the string representation.
  3818  //
  3819  // API parameter values that are decorated as "sensitive" in the API will not
  3820  // be included in the string output. The member name will be present, but the
  3821  // value will be replaced with "sensitive".
  3822  func (s DeleteTrailOutput) String() string {
  3823  	return awsutil.Prettify(s)
  3824  }
  3825  
  3826  // GoString returns the string representation.
  3827  //
  3828  // API parameter values that are decorated as "sensitive" in the API will not
  3829  // be included in the string output. The member name will be present, but the
  3830  // value will be replaced with "sensitive".
  3831  func (s DeleteTrailOutput) GoString() string {
  3832  	return s.String()
  3833  }
  3834  
  3835  // Returns information about the trail.
  3836  type DescribeTrailsInput struct {
  3837  	_ struct{} `type:"structure"`
  3838  
  3839  	// Specifies whether to include shadow trails in the response. A shadow trail
  3840  	// is the replication in a region of a trail that was created in a different
  3841  	// region, or in the case of an organization trail, the replication of an organization
  3842  	// trail in member accounts. If you do not include shadow trails, organization
  3843  	// trails in a member account and region replication trails will not be returned.
  3844  	// The default is true.
  3845  	IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`
  3846  
  3847  	// Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
  3848  	// The format of a trail ARN is:
  3849  	//
  3850  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  3851  	//
  3852  	// If an empty list is specified, information for the trail in the current region
  3853  	// is returned.
  3854  	//
  3855  	//    * If an empty list is specified and IncludeShadowTrails is false, then
  3856  	//    information for all trails in the current region is returned.
  3857  	//
  3858  	//    * If an empty list is specified and IncludeShadowTrails is null or true,
  3859  	//    then information for all trails in the current region and any associated
  3860  	//    shadow trails in other regions is returned.
  3861  	//
  3862  	// If one or more trail names are specified, information is returned only if
  3863  	// the names match the names of trails belonging only to the current region.
  3864  	// To return information about a trail in another region, you must specify its
  3865  	// trail ARN.
  3866  	TrailNameList []*string `locationName:"trailNameList" type:"list"`
  3867  }
  3868  
  3869  // String returns the string representation.
  3870  //
  3871  // API parameter values that are decorated as "sensitive" in the API will not
  3872  // be included in the string output. The member name will be present, but the
  3873  // value will be replaced with "sensitive".
  3874  func (s DescribeTrailsInput) String() string {
  3875  	return awsutil.Prettify(s)
  3876  }
  3877  
  3878  // GoString returns the string representation.
  3879  //
  3880  // API parameter values that are decorated as "sensitive" in the API will not
  3881  // be included in the string output. The member name will be present, but the
  3882  // value will be replaced with "sensitive".
  3883  func (s DescribeTrailsInput) GoString() string {
  3884  	return s.String()
  3885  }
  3886  
  3887  // SetIncludeShadowTrails sets the IncludeShadowTrails field's value.
  3888  func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput {
  3889  	s.IncludeShadowTrails = &v
  3890  	return s
  3891  }
  3892  
  3893  // SetTrailNameList sets the TrailNameList field's value.
  3894  func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput {
  3895  	s.TrailNameList = v
  3896  	return s
  3897  }
  3898  
  3899  // Returns the objects or data listed below if successful. Otherwise, returns
  3900  // an error.
  3901  type DescribeTrailsOutput struct {
  3902  	_ struct{} `type:"structure"`
  3903  
  3904  	// The list of trail objects. Trail objects with string values are only returned
  3905  	// if values for the objects exist in a trail's configuration. For example,
  3906  	// SNSTopicName and SNSTopicARN are only returned in results if a trail is configured
  3907  	// to send SNS notifications. Similarly, KMSKeyId only appears in results if
  3908  	// a trail's log files are encrypted with KMS customer managed keys.
  3909  	TrailList []*Trail `locationName:"trailList" type:"list"`
  3910  }
  3911  
  3912  // String returns the string representation.
  3913  //
  3914  // API parameter values that are decorated as "sensitive" in the API will not
  3915  // be included in the string output. The member name will be present, but the
  3916  // value will be replaced with "sensitive".
  3917  func (s DescribeTrailsOutput) String() string {
  3918  	return awsutil.Prettify(s)
  3919  }
  3920  
  3921  // GoString returns the string representation.
  3922  //
  3923  // API parameter values that are decorated as "sensitive" in the API will not
  3924  // be included in the string output. The member name will be present, but the
  3925  // value will be replaced with "sensitive".
  3926  func (s DescribeTrailsOutput) GoString() string {
  3927  	return s.String()
  3928  }
  3929  
  3930  // SetTrailList sets the TrailList field's value.
  3931  func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput {
  3932  	s.TrailList = v
  3933  	return s
  3934  }
  3935  
  3936  // Contains information about an event that was returned by a lookup request.
  3937  // The result includes a representation of a CloudTrail event.
  3938  type Event struct {
  3939  	_ struct{} `type:"structure"`
  3940  
  3941  	// The Amazon Web Services access key ID that was used to sign the request.
  3942  	// If the request was made with temporary security credentials, this is the
  3943  	// access key ID of the temporary credentials.
  3944  	AccessKeyId *string `type:"string"`
  3945  
  3946  	// A JSON string that contains a representation of the event returned.
  3947  	CloudTrailEvent *string `type:"string"`
  3948  
  3949  	// The CloudTrail ID of the event returned.
  3950  	EventId *string `type:"string"`
  3951  
  3952  	// The name of the event returned.
  3953  	EventName *string `type:"string"`
  3954  
  3955  	// The Amazon Web Services service to which the request was made.
  3956  	EventSource *string `type:"string"`
  3957  
  3958  	// The date and time of the event returned.
  3959  	EventTime *time.Time `type:"timestamp"`
  3960  
  3961  	// Information about whether the event is a write event or a read event.
  3962  	ReadOnly *string `type:"string"`
  3963  
  3964  	// A list of resources referenced by the event returned.
  3965  	Resources []*Resource `type:"list"`
  3966  
  3967  	// A user name or role name of the requester that called the API in the event
  3968  	// returned.
  3969  	Username *string `type:"string"`
  3970  }
  3971  
  3972  // String returns the string representation.
  3973  //
  3974  // API parameter values that are decorated as "sensitive" in the API will not
  3975  // be included in the string output. The member name will be present, but the
  3976  // value will be replaced with "sensitive".
  3977  func (s Event) String() string {
  3978  	return awsutil.Prettify(s)
  3979  }
  3980  
  3981  // GoString returns the string representation.
  3982  //
  3983  // API parameter values that are decorated as "sensitive" in the API will not
  3984  // be included in the string output. The member name will be present, but the
  3985  // value will be replaced with "sensitive".
  3986  func (s Event) GoString() string {
  3987  	return s.String()
  3988  }
  3989  
  3990  // SetAccessKeyId sets the AccessKeyId field's value.
  3991  func (s *Event) SetAccessKeyId(v string) *Event {
  3992  	s.AccessKeyId = &v
  3993  	return s
  3994  }
  3995  
  3996  // SetCloudTrailEvent sets the CloudTrailEvent field's value.
  3997  func (s *Event) SetCloudTrailEvent(v string) *Event {
  3998  	s.CloudTrailEvent = &v
  3999  	return s
  4000  }
  4001  
  4002  // SetEventId sets the EventId field's value.
  4003  func (s *Event) SetEventId(v string) *Event {
  4004  	s.EventId = &v
  4005  	return s
  4006  }
  4007  
  4008  // SetEventName sets the EventName field's value.
  4009  func (s *Event) SetEventName(v string) *Event {
  4010  	s.EventName = &v
  4011  	return s
  4012  }
  4013  
  4014  // SetEventSource sets the EventSource field's value.
  4015  func (s *Event) SetEventSource(v string) *Event {
  4016  	s.EventSource = &v
  4017  	return s
  4018  }
  4019  
  4020  // SetEventTime sets the EventTime field's value.
  4021  func (s *Event) SetEventTime(v time.Time) *Event {
  4022  	s.EventTime = &v
  4023  	return s
  4024  }
  4025  
  4026  // SetReadOnly sets the ReadOnly field's value.
  4027  func (s *Event) SetReadOnly(v string) *Event {
  4028  	s.ReadOnly = &v
  4029  	return s
  4030  }
  4031  
  4032  // SetResources sets the Resources field's value.
  4033  func (s *Event) SetResources(v []*Resource) *Event {
  4034  	s.Resources = v
  4035  	return s
  4036  }
  4037  
  4038  // SetUsername sets the Username field's value.
  4039  func (s *Event) SetUsername(v string) *Event {
  4040  	s.Username = &v
  4041  	return s
  4042  }
  4043  
  4044  // Use event selectors to further specify the management and data event settings
  4045  // for your trail. By default, trails created without specific event selectors
  4046  // will be configured to log all read and write management events, and no data
  4047  // events. When an event occurs in your account, CloudTrail evaluates the event
  4048  // selector for all trails. For each trail, if the event matches any event selector,
  4049  // the trail processes and logs the event. If the event doesn't match any event
  4050  // selector, the trail doesn't log the event.
  4051  //
  4052  // You can configure up to five event selectors for a trail.
  4053  //
  4054  // You cannot apply both event selectors and advanced event selectors to a trail.
  4055  type EventSelector struct {
  4056  	_ struct{} `type:"structure"`
  4057  
  4058  	// CloudTrail supports data event logging for Amazon S3 objects, Lambda functions,
  4059  	// and Amazon DynamoDB tables with basic event selectors. You can specify up
  4060  	// to 250 resources for an individual event selector, but the total number of
  4061  	// data resources cannot exceed 250 across all event selectors in a trail. This
  4062  	// limit does not apply if you configure resource logging for all data events.
  4063  	//
  4064  	// For more information, see Data Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events)
  4065  	// and Limits in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
  4066  	// in the CloudTrail User Guide.
  4067  	DataResources []*DataResource `type:"list"`
  4068  
  4069  	// An optional list of service event sources from which you do not want management
  4070  	// events to be logged on your trail. In this release, the list can be empty
  4071  	// (disables the filter), or it can filter out Key Management Service or Amazon
  4072  	// RDS Data API events by containing kms.amazonaws.com or rdsdata.amazonaws.com.
  4073  	// By default, ExcludeManagementEventSources is empty, and KMS and Amazon RDS
  4074  	// Data API events are logged to your trail.
  4075  	ExcludeManagementEventSources []*string `type:"list"`
  4076  
  4077  	// Specify if you want your event selector to include management events for
  4078  	// your trail.
  4079  	//
  4080  	// For more information, see Management Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events)
  4081  	// in the CloudTrail User Guide.
  4082  	//
  4083  	// By default, the value is true.
  4084  	//
  4085  	// The first copy of management events is free. You are charged for additional
  4086  	// copies of management events that you are logging on any subsequent trail
  4087  	// in the same region. For more information about CloudTrail pricing, see CloudTrail
  4088  	// Pricing (http://aws.amazon.com/cloudtrail/pricing/).
  4089  	IncludeManagementEvents *bool `type:"boolean"`
  4090  
  4091  	// Specify if you want your trail to log read-only events, write-only events,
  4092  	// or all. For example, the EC2 GetConsoleOutput is a read-only API operation
  4093  	// and RunInstances is a write-only API operation.
  4094  	//
  4095  	// By default, the value is All.
  4096  	ReadWriteType *string `type:"string" enum:"ReadWriteType"`
  4097  }
  4098  
  4099  // String returns the string representation.
  4100  //
  4101  // API parameter values that are decorated as "sensitive" in the API will not
  4102  // be included in the string output. The member name will be present, but the
  4103  // value will be replaced with "sensitive".
  4104  func (s EventSelector) String() string {
  4105  	return awsutil.Prettify(s)
  4106  }
  4107  
  4108  // GoString returns the string representation.
  4109  //
  4110  // API parameter values that are decorated as "sensitive" in the API will not
  4111  // be included in the string output. The member name will be present, but the
  4112  // value will be replaced with "sensitive".
  4113  func (s EventSelector) GoString() string {
  4114  	return s.String()
  4115  }
  4116  
  4117  // SetDataResources sets the DataResources field's value.
  4118  func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector {
  4119  	s.DataResources = v
  4120  	return s
  4121  }
  4122  
  4123  // SetExcludeManagementEventSources sets the ExcludeManagementEventSources field's value.
  4124  func (s *EventSelector) SetExcludeManagementEventSources(v []*string) *EventSelector {
  4125  	s.ExcludeManagementEventSources = v
  4126  	return s
  4127  }
  4128  
  4129  // SetIncludeManagementEvents sets the IncludeManagementEvents field's value.
  4130  func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector {
  4131  	s.IncludeManagementEvents = &v
  4132  	return s
  4133  }
  4134  
  4135  // SetReadWriteType sets the ReadWriteType field's value.
  4136  func (s *EventSelector) SetReadWriteType(v string) *EventSelector {
  4137  	s.ReadWriteType = &v
  4138  	return s
  4139  }
  4140  
  4141  type GetEventSelectorsInput struct {
  4142  	_ struct{} `type:"structure"`
  4143  
  4144  	// Specifies the name of the trail or trail ARN. If you specify a trail name,
  4145  	// the string must meet the following requirements:
  4146  	//
  4147  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  4148  	//    (_), or dashes (-)
  4149  	//
  4150  	//    * Start with a letter or number, and end with a letter or number
  4151  	//
  4152  	//    * Be between 3 and 128 characters
  4153  	//
  4154  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  4155  	//    and my--namespace are not valid.
  4156  	//
  4157  	//    * Not be in IP address format (for example, 192.168.5.4)
  4158  	//
  4159  	// If you specify a trail ARN, it must be in the format:
  4160  	//
  4161  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4162  	//
  4163  	// TrailName is a required field
  4164  	TrailName *string `type:"string" required:"true"`
  4165  }
  4166  
  4167  // String returns the string representation.
  4168  //
  4169  // API parameter values that are decorated as "sensitive" in the API will not
  4170  // be included in the string output. The member name will be present, but the
  4171  // value will be replaced with "sensitive".
  4172  func (s GetEventSelectorsInput) String() string {
  4173  	return awsutil.Prettify(s)
  4174  }
  4175  
  4176  // GoString returns the string representation.
  4177  //
  4178  // API parameter values that are decorated as "sensitive" in the API will not
  4179  // be included in the string output. The member name will be present, but the
  4180  // value will be replaced with "sensitive".
  4181  func (s GetEventSelectorsInput) GoString() string {
  4182  	return s.String()
  4183  }
  4184  
  4185  // Validate inspects the fields of the type to determine if they are valid.
  4186  func (s *GetEventSelectorsInput) Validate() error {
  4187  	invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
  4188  	if s.TrailName == nil {
  4189  		invalidParams.Add(request.NewErrParamRequired("TrailName"))
  4190  	}
  4191  
  4192  	if invalidParams.Len() > 0 {
  4193  		return invalidParams
  4194  	}
  4195  	return nil
  4196  }
  4197  
  4198  // SetTrailName sets the TrailName field's value.
  4199  func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
  4200  	s.TrailName = &v
  4201  	return s
  4202  }
  4203  
  4204  type GetEventSelectorsOutput struct {
  4205  	_ struct{} `type:"structure"`
  4206  
  4207  	// The advanced event selectors that are configured for the trail.
  4208  	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  4209  
  4210  	// The event selectors that are configured for the trail.
  4211  	EventSelectors []*EventSelector `type:"list"`
  4212  
  4213  	// The specified trail ARN that has the event selectors.
  4214  	TrailARN *string `type:"string"`
  4215  }
  4216  
  4217  // String returns the string representation.
  4218  //
  4219  // API parameter values that are decorated as "sensitive" in the API will not
  4220  // be included in the string output. The member name will be present, but the
  4221  // value will be replaced with "sensitive".
  4222  func (s GetEventSelectorsOutput) String() string {
  4223  	return awsutil.Prettify(s)
  4224  }
  4225  
  4226  // GoString returns the string representation.
  4227  //
  4228  // API parameter values that are decorated as "sensitive" in the API will not
  4229  // be included in the string output. The member name will be present, but the
  4230  // value will be replaced with "sensitive".
  4231  func (s GetEventSelectorsOutput) GoString() string {
  4232  	return s.String()
  4233  }
  4234  
  4235  // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  4236  func (s *GetEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventSelectorsOutput {
  4237  	s.AdvancedEventSelectors = v
  4238  	return s
  4239  }
  4240  
  4241  // SetEventSelectors sets the EventSelectors field's value.
  4242  func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput {
  4243  	s.EventSelectors = v
  4244  	return s
  4245  }
  4246  
  4247  // SetTrailARN sets the TrailARN field's value.
  4248  func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput {
  4249  	s.TrailARN = &v
  4250  	return s
  4251  }
  4252  
  4253  type GetInsightSelectorsInput struct {
  4254  	_ struct{} `type:"structure"`
  4255  
  4256  	// Specifies the name of the trail or trail ARN. If you specify a trail name,
  4257  	// the string must meet the following requirements:
  4258  	//
  4259  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  4260  	//    (_), or dashes (-)
  4261  	//
  4262  	//    * Start with a letter or number, and end with a letter or number
  4263  	//
  4264  	//    * Be between 3 and 128 characters
  4265  	//
  4266  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  4267  	//    and my--namespace are not valid.
  4268  	//
  4269  	//    * Not be in IP address format (for example, 192.168.5.4)
  4270  	//
  4271  	// If you specify a trail ARN, it must be in the format:
  4272  	//
  4273  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4274  	//
  4275  	// TrailName is a required field
  4276  	TrailName *string `type:"string" required:"true"`
  4277  }
  4278  
  4279  // String returns the string representation.
  4280  //
  4281  // API parameter values that are decorated as "sensitive" in the API will not
  4282  // be included in the string output. The member name will be present, but the
  4283  // value will be replaced with "sensitive".
  4284  func (s GetInsightSelectorsInput) String() string {
  4285  	return awsutil.Prettify(s)
  4286  }
  4287  
  4288  // GoString returns the string representation.
  4289  //
  4290  // API parameter values that are decorated as "sensitive" in the API will not
  4291  // be included in the string output. The member name will be present, but the
  4292  // value will be replaced with "sensitive".
  4293  func (s GetInsightSelectorsInput) GoString() string {
  4294  	return s.String()
  4295  }
  4296  
  4297  // Validate inspects the fields of the type to determine if they are valid.
  4298  func (s *GetInsightSelectorsInput) Validate() error {
  4299  	invalidParams := request.ErrInvalidParams{Context: "GetInsightSelectorsInput"}
  4300  	if s.TrailName == nil {
  4301  		invalidParams.Add(request.NewErrParamRequired("TrailName"))
  4302  	}
  4303  
  4304  	if invalidParams.Len() > 0 {
  4305  		return invalidParams
  4306  	}
  4307  	return nil
  4308  }
  4309  
  4310  // SetTrailName sets the TrailName field's value.
  4311  func (s *GetInsightSelectorsInput) SetTrailName(v string) *GetInsightSelectorsInput {
  4312  	s.TrailName = &v
  4313  	return s
  4314  }
  4315  
  4316  type GetInsightSelectorsOutput struct {
  4317  	_ struct{} `type:"structure"`
  4318  
  4319  	// A JSON string that contains the insight types you want to log on a trail.
  4320  	// In this release, only ApiCallRateInsight is supported as an insight type.
  4321  	InsightSelectors []*InsightSelector `type:"list"`
  4322  
  4323  	// The Amazon Resource Name (ARN) of a trail for which you want to get Insights
  4324  	// selectors.
  4325  	TrailARN *string `type:"string"`
  4326  }
  4327  
  4328  // String returns the string representation.
  4329  //
  4330  // API parameter values that are decorated as "sensitive" in the API will not
  4331  // be included in the string output. The member name will be present, but the
  4332  // value will be replaced with "sensitive".
  4333  func (s GetInsightSelectorsOutput) String() string {
  4334  	return awsutil.Prettify(s)
  4335  }
  4336  
  4337  // GoString returns the string representation.
  4338  //
  4339  // API parameter values that are decorated as "sensitive" in the API will not
  4340  // be included in the string output. The member name will be present, but the
  4341  // value will be replaced with "sensitive".
  4342  func (s GetInsightSelectorsOutput) GoString() string {
  4343  	return s.String()
  4344  }
  4345  
  4346  // SetInsightSelectors sets the InsightSelectors field's value.
  4347  func (s *GetInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *GetInsightSelectorsOutput {
  4348  	s.InsightSelectors = v
  4349  	return s
  4350  }
  4351  
  4352  // SetTrailARN sets the TrailARN field's value.
  4353  func (s *GetInsightSelectorsOutput) SetTrailARN(v string) *GetInsightSelectorsOutput {
  4354  	s.TrailARN = &v
  4355  	return s
  4356  }
  4357  
  4358  type GetTrailInput struct {
  4359  	_ struct{} `type:"structure"`
  4360  
  4361  	// The name or the Amazon Resource Name (ARN) of the trail for which you want
  4362  	// to retrieve settings information.
  4363  	//
  4364  	// Name is a required field
  4365  	Name *string `type:"string" required:"true"`
  4366  }
  4367  
  4368  // String returns the string representation.
  4369  //
  4370  // API parameter values that are decorated as "sensitive" in the API will not
  4371  // be included in the string output. The member name will be present, but the
  4372  // value will be replaced with "sensitive".
  4373  func (s GetTrailInput) String() string {
  4374  	return awsutil.Prettify(s)
  4375  }
  4376  
  4377  // GoString returns the string representation.
  4378  //
  4379  // API parameter values that are decorated as "sensitive" in the API will not
  4380  // be included in the string output. The member name will be present, but the
  4381  // value will be replaced with "sensitive".
  4382  func (s GetTrailInput) GoString() string {
  4383  	return s.String()
  4384  }
  4385  
  4386  // Validate inspects the fields of the type to determine if they are valid.
  4387  func (s *GetTrailInput) Validate() error {
  4388  	invalidParams := request.ErrInvalidParams{Context: "GetTrailInput"}
  4389  	if s.Name == nil {
  4390  		invalidParams.Add(request.NewErrParamRequired("Name"))
  4391  	}
  4392  
  4393  	if invalidParams.Len() > 0 {
  4394  		return invalidParams
  4395  	}
  4396  	return nil
  4397  }
  4398  
  4399  // SetName sets the Name field's value.
  4400  func (s *GetTrailInput) SetName(v string) *GetTrailInput {
  4401  	s.Name = &v
  4402  	return s
  4403  }
  4404  
  4405  type GetTrailOutput struct {
  4406  	_ struct{} `type:"structure"`
  4407  
  4408  	// The settings for a trail.
  4409  	Trail *Trail `type:"structure"`
  4410  }
  4411  
  4412  // String returns the string representation.
  4413  //
  4414  // API parameter values that are decorated as "sensitive" in the API will not
  4415  // be included in the string output. The member name will be present, but the
  4416  // value will be replaced with "sensitive".
  4417  func (s GetTrailOutput) String() string {
  4418  	return awsutil.Prettify(s)
  4419  }
  4420  
  4421  // GoString returns the string representation.
  4422  //
  4423  // API parameter values that are decorated as "sensitive" in the API will not
  4424  // be included in the string output. The member name will be present, but the
  4425  // value will be replaced with "sensitive".
  4426  func (s GetTrailOutput) GoString() string {
  4427  	return s.String()
  4428  }
  4429  
  4430  // SetTrail sets the Trail field's value.
  4431  func (s *GetTrailOutput) SetTrail(v *Trail) *GetTrailOutput {
  4432  	s.Trail = v
  4433  	return s
  4434  }
  4435  
  4436  // The name of a trail about which you want the current status.
  4437  type GetTrailStatusInput struct {
  4438  	_ struct{} `type:"structure"`
  4439  
  4440  	// Specifies the name or the CloudTrail ARN of the trail for which you are requesting
  4441  	// status. To get the status of a shadow trail (a replication of the trail in
  4442  	// another region), you must specify its ARN. The following is the format of
  4443  	// a trail ARN.
  4444  	//
  4445  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  4446  	//
  4447  	// Name is a required field
  4448  	Name *string `type:"string" required:"true"`
  4449  }
  4450  
  4451  // String returns the string representation.
  4452  //
  4453  // API parameter values that are decorated as "sensitive" in the API will not
  4454  // be included in the string output. The member name will be present, but the
  4455  // value will be replaced with "sensitive".
  4456  func (s GetTrailStatusInput) String() string {
  4457  	return awsutil.Prettify(s)
  4458  }
  4459  
  4460  // GoString returns the string representation.
  4461  //
  4462  // API parameter values that are decorated as "sensitive" in the API will not
  4463  // be included in the string output. The member name will be present, but the
  4464  // value will be replaced with "sensitive".
  4465  func (s GetTrailStatusInput) GoString() string {
  4466  	return s.String()
  4467  }
  4468  
  4469  // Validate inspects the fields of the type to determine if they are valid.
  4470  func (s *GetTrailStatusInput) Validate() error {
  4471  	invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
  4472  	if s.Name == nil {
  4473  		invalidParams.Add(request.NewErrParamRequired("Name"))
  4474  	}
  4475  
  4476  	if invalidParams.Len() > 0 {
  4477  		return invalidParams
  4478  	}
  4479  	return nil
  4480  }
  4481  
  4482  // SetName sets the Name field's value.
  4483  func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput {
  4484  	s.Name = &v
  4485  	return s
  4486  }
  4487  
  4488  // Returns the objects or data listed below if successful. Otherwise, returns
  4489  // an error.
  4490  type GetTrailStatusOutput struct {
  4491  	_ struct{} `type:"structure"`
  4492  
  4493  	// Whether the CloudTrail trail is currently logging Amazon Web Services API
  4494  	// calls.
  4495  	IsLogging *bool `type:"boolean"`
  4496  
  4497  	// Displays any CloudWatch Logs error that CloudTrail encountered when attempting
  4498  	// to deliver logs to CloudWatch Logs.
  4499  	LatestCloudWatchLogsDeliveryError *string `type:"string"`
  4500  
  4501  	// Displays the most recent date and time when CloudTrail delivered logs to
  4502  	// CloudWatch Logs.
  4503  	LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"`
  4504  
  4505  	// This field is no longer in use.
  4506  	LatestDeliveryAttemptSucceeded *string `type:"string"`
  4507  
  4508  	// This field is no longer in use.
  4509  	LatestDeliveryAttemptTime *string `type:"string"`
  4510  
  4511  	// Displays any Amazon S3 error that CloudTrail encountered when attempting
  4512  	// to deliver log files to the designated bucket. For more information, see
  4513  	// Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  4514  	// in the Amazon S3 API Reference.
  4515  	//
  4516  	// This error occurs only when there is a problem with the destination S3 bucket,
  4517  	// and does not occur for requests that time out. To resolve the issue, create
  4518  	// a new bucket, and then call UpdateTrail to specify the new bucket; or fix
  4519  	// the existing objects so that CloudTrail can again write to the bucket.
  4520  	LatestDeliveryError *string `type:"string"`
  4521  
  4522  	// Specifies the date and time that CloudTrail last delivered log files to an
  4523  	// account's Amazon S3 bucket.
  4524  	LatestDeliveryTime *time.Time `type:"timestamp"`
  4525  
  4526  	// Displays any Amazon S3 error that CloudTrail encountered when attempting
  4527  	// to deliver a digest file to the designated bucket. For more information,
  4528  	// see Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  4529  	// in the Amazon S3 API Reference.
  4530  	//
  4531  	// This error occurs only when there is a problem with the destination S3 bucket,
  4532  	// and does not occur for requests that time out. To resolve the issue, create
  4533  	// a new bucket, and then call UpdateTrail to specify the new bucket; or fix
  4534  	// the existing objects so that CloudTrail can again write to the bucket.
  4535  	LatestDigestDeliveryError *string `type:"string"`
  4536  
  4537  	// Specifies the date and time that CloudTrail last delivered a digest file
  4538  	// to an account's Amazon S3 bucket.
  4539  	LatestDigestDeliveryTime *time.Time `type:"timestamp"`
  4540  
  4541  	// This field is no longer in use.
  4542  	LatestNotificationAttemptSucceeded *string `type:"string"`
  4543  
  4544  	// This field is no longer in use.
  4545  	LatestNotificationAttemptTime *string `type:"string"`
  4546  
  4547  	// Displays any Amazon SNS error that CloudTrail encountered when attempting
  4548  	// to send a notification. For more information about Amazon SNS errors, see
  4549  	// the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
  4550  	LatestNotificationError *string `type:"string"`
  4551  
  4552  	// Specifies the date and time of the most recent Amazon SNS notification that
  4553  	// CloudTrail has written a new log file to an account's Amazon S3 bucket.
  4554  	LatestNotificationTime *time.Time `type:"timestamp"`
  4555  
  4556  	// Specifies the most recent date and time when CloudTrail started recording
  4557  	// API calls for an Amazon Web Services account.
  4558  	StartLoggingTime *time.Time `type:"timestamp"`
  4559  
  4560  	// Specifies the most recent date and time when CloudTrail stopped recording
  4561  	// API calls for an Amazon Web Services account.
  4562  	StopLoggingTime *time.Time `type:"timestamp"`
  4563  
  4564  	// This field is no longer in use.
  4565  	TimeLoggingStarted *string `type:"string"`
  4566  
  4567  	// This field is no longer in use.
  4568  	TimeLoggingStopped *string `type:"string"`
  4569  }
  4570  
  4571  // String returns the string representation.
  4572  //
  4573  // API parameter values that are decorated as "sensitive" in the API will not
  4574  // be included in the string output. The member name will be present, but the
  4575  // value will be replaced with "sensitive".
  4576  func (s GetTrailStatusOutput) String() string {
  4577  	return awsutil.Prettify(s)
  4578  }
  4579  
  4580  // GoString returns the string representation.
  4581  //
  4582  // API parameter values that are decorated as "sensitive" in the API will not
  4583  // be included in the string output. The member name will be present, but the
  4584  // value will be replaced with "sensitive".
  4585  func (s GetTrailStatusOutput) GoString() string {
  4586  	return s.String()
  4587  }
  4588  
  4589  // SetIsLogging sets the IsLogging field's value.
  4590  func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput {
  4591  	s.IsLogging = &v
  4592  	return s
  4593  }
  4594  
  4595  // SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.
  4596  func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput {
  4597  	s.LatestCloudWatchLogsDeliveryError = &v
  4598  	return s
  4599  }
  4600  
  4601  // SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.
  4602  func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput {
  4603  	s.LatestCloudWatchLogsDeliveryTime = &v
  4604  	return s
  4605  }
  4606  
  4607  // SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.
  4608  func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput {
  4609  	s.LatestDeliveryAttemptSucceeded = &v
  4610  	return s
  4611  }
  4612  
  4613  // SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.
  4614  func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput {
  4615  	s.LatestDeliveryAttemptTime = &v
  4616  	return s
  4617  }
  4618  
  4619  // SetLatestDeliveryError sets the LatestDeliveryError field's value.
  4620  func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput {
  4621  	s.LatestDeliveryError = &v
  4622  	return s
  4623  }
  4624  
  4625  // SetLatestDeliveryTime sets the LatestDeliveryTime field's value.
  4626  func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput {
  4627  	s.LatestDeliveryTime = &v
  4628  	return s
  4629  }
  4630  
  4631  // SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.
  4632  func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput {
  4633  	s.LatestDigestDeliveryError = &v
  4634  	return s
  4635  }
  4636  
  4637  // SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.
  4638  func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput {
  4639  	s.LatestDigestDeliveryTime = &v
  4640  	return s
  4641  }
  4642  
  4643  // SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.
  4644  func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput {
  4645  	s.LatestNotificationAttemptSucceeded = &v
  4646  	return s
  4647  }
  4648  
  4649  // SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.
  4650  func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput {
  4651  	s.LatestNotificationAttemptTime = &v
  4652  	return s
  4653  }
  4654  
  4655  // SetLatestNotificationError sets the LatestNotificationError field's value.
  4656  func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput {
  4657  	s.LatestNotificationError = &v
  4658  	return s
  4659  }
  4660  
  4661  // SetLatestNotificationTime sets the LatestNotificationTime field's value.
  4662  func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput {
  4663  	s.LatestNotificationTime = &v
  4664  	return s
  4665  }
  4666  
  4667  // SetStartLoggingTime sets the StartLoggingTime field's value.
  4668  func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput {
  4669  	s.StartLoggingTime = &v
  4670  	return s
  4671  }
  4672  
  4673  // SetStopLoggingTime sets the StopLoggingTime field's value.
  4674  func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput {
  4675  	s.StopLoggingTime = &v
  4676  	return s
  4677  }
  4678  
  4679  // SetTimeLoggingStarted sets the TimeLoggingStarted field's value.
  4680  func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput {
  4681  	s.TimeLoggingStarted = &v
  4682  	return s
  4683  }
  4684  
  4685  // SetTimeLoggingStopped sets the TimeLoggingStopped field's value.
  4686  func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput {
  4687  	s.TimeLoggingStopped = &v
  4688  	return s
  4689  }
  4690  
  4691  // If you run GetInsightSelectors on a trail that does not have Insights events
  4692  // enabled, the operation throws the exception InsightNotEnabledException.
  4693  type InsightNotEnabledException struct {
  4694  	_            struct{}                  `type:"structure"`
  4695  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4696  
  4697  	Message_ *string `locationName:"message" type:"string"`
  4698  }
  4699  
  4700  // String returns the string representation.
  4701  //
  4702  // API parameter values that are decorated as "sensitive" in the API will not
  4703  // be included in the string output. The member name will be present, but the
  4704  // value will be replaced with "sensitive".
  4705  func (s InsightNotEnabledException) String() string {
  4706  	return awsutil.Prettify(s)
  4707  }
  4708  
  4709  // GoString returns the string representation.
  4710  //
  4711  // API parameter values that are decorated as "sensitive" in the API will not
  4712  // be included in the string output. The member name will be present, but the
  4713  // value will be replaced with "sensitive".
  4714  func (s InsightNotEnabledException) GoString() string {
  4715  	return s.String()
  4716  }
  4717  
  4718  func newErrorInsightNotEnabledException(v protocol.ResponseMetadata) error {
  4719  	return &InsightNotEnabledException{
  4720  		RespMetadata: v,
  4721  	}
  4722  }
  4723  
  4724  // Code returns the exception type name.
  4725  func (s *InsightNotEnabledException) Code() string {
  4726  	return "InsightNotEnabledException"
  4727  }
  4728  
  4729  // Message returns the exception's message.
  4730  func (s *InsightNotEnabledException) Message() string {
  4731  	if s.Message_ != nil {
  4732  		return *s.Message_
  4733  	}
  4734  	return ""
  4735  }
  4736  
  4737  // OrigErr always returns nil, satisfies awserr.Error interface.
  4738  func (s *InsightNotEnabledException) OrigErr() error {
  4739  	return nil
  4740  }
  4741  
  4742  func (s *InsightNotEnabledException) Error() string {
  4743  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4744  }
  4745  
  4746  // Status code returns the HTTP status code for the request's response error.
  4747  func (s *InsightNotEnabledException) StatusCode() int {
  4748  	return s.RespMetadata.StatusCode
  4749  }
  4750  
  4751  // RequestID returns the service's response RequestID for request.
  4752  func (s *InsightNotEnabledException) RequestID() string {
  4753  	return s.RespMetadata.RequestID
  4754  }
  4755  
  4756  // A JSON string that contains a list of insight types that are logged on a
  4757  // trail.
  4758  type InsightSelector struct {
  4759  	_ struct{} `type:"structure"`
  4760  
  4761  	// The type of Insights events to log on a trail. The valid Insights type in
  4762  	// this release is ApiCallRateInsight.
  4763  	InsightType *string `type:"string" enum:"InsightType"`
  4764  }
  4765  
  4766  // String returns the string representation.
  4767  //
  4768  // API parameter values that are decorated as "sensitive" in the API will not
  4769  // be included in the string output. The member name will be present, but the
  4770  // value will be replaced with "sensitive".
  4771  func (s InsightSelector) String() string {
  4772  	return awsutil.Prettify(s)
  4773  }
  4774  
  4775  // GoString returns the string representation.
  4776  //
  4777  // API parameter values that are decorated as "sensitive" in the API will not
  4778  // be included in the string output. The member name will be present, but the
  4779  // value will be replaced with "sensitive".
  4780  func (s InsightSelector) GoString() string {
  4781  	return s.String()
  4782  }
  4783  
  4784  // SetInsightType sets the InsightType field's value.
  4785  func (s *InsightSelector) SetInsightType(v string) *InsightSelector {
  4786  	s.InsightType = &v
  4787  	return s
  4788  }
  4789  
  4790  // This exception is thrown when the IAM user or role that is used to create
  4791  // the organization trail is lacking one or more required permissions for creating
  4792  // an organization trail in a required service. For more information, see Prepare
  4793  // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  4794  type InsufficientDependencyServiceAccessPermissionException struct {
  4795  	_            struct{}                  `type:"structure"`
  4796  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4797  
  4798  	Message_ *string `locationName:"message" type:"string"`
  4799  }
  4800  
  4801  // String returns the string representation.
  4802  //
  4803  // API parameter values that are decorated as "sensitive" in the API will not
  4804  // be included in the string output. The member name will be present, but the
  4805  // value will be replaced with "sensitive".
  4806  func (s InsufficientDependencyServiceAccessPermissionException) String() string {
  4807  	return awsutil.Prettify(s)
  4808  }
  4809  
  4810  // GoString returns the string representation.
  4811  //
  4812  // API parameter values that are decorated as "sensitive" in the API will not
  4813  // be included in the string output. The member name will be present, but the
  4814  // value will be replaced with "sensitive".
  4815  func (s InsufficientDependencyServiceAccessPermissionException) GoString() string {
  4816  	return s.String()
  4817  }
  4818  
  4819  func newErrorInsufficientDependencyServiceAccessPermissionException(v protocol.ResponseMetadata) error {
  4820  	return &InsufficientDependencyServiceAccessPermissionException{
  4821  		RespMetadata: v,
  4822  	}
  4823  }
  4824  
  4825  // Code returns the exception type name.
  4826  func (s *InsufficientDependencyServiceAccessPermissionException) Code() string {
  4827  	return "InsufficientDependencyServiceAccessPermissionException"
  4828  }
  4829  
  4830  // Message returns the exception's message.
  4831  func (s *InsufficientDependencyServiceAccessPermissionException) Message() string {
  4832  	if s.Message_ != nil {
  4833  		return *s.Message_
  4834  	}
  4835  	return ""
  4836  }
  4837  
  4838  // OrigErr always returns nil, satisfies awserr.Error interface.
  4839  func (s *InsufficientDependencyServiceAccessPermissionException) OrigErr() error {
  4840  	return nil
  4841  }
  4842  
  4843  func (s *InsufficientDependencyServiceAccessPermissionException) Error() string {
  4844  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4845  }
  4846  
  4847  // Status code returns the HTTP status code for the request's response error.
  4848  func (s *InsufficientDependencyServiceAccessPermissionException) StatusCode() int {
  4849  	return s.RespMetadata.StatusCode
  4850  }
  4851  
  4852  // RequestID returns the service's response RequestID for request.
  4853  func (s *InsufficientDependencyServiceAccessPermissionException) RequestID() string {
  4854  	return s.RespMetadata.RequestID
  4855  }
  4856  
  4857  // This exception is thrown when the policy on the S3 bucket or KMS key is not
  4858  // sufficient.
  4859  type InsufficientEncryptionPolicyException struct {
  4860  	_            struct{}                  `type:"structure"`
  4861  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4862  
  4863  	Message_ *string `locationName:"message" type:"string"`
  4864  }
  4865  
  4866  // String returns the string representation.
  4867  //
  4868  // API parameter values that are decorated as "sensitive" in the API will not
  4869  // be included in the string output. The member name will be present, but the
  4870  // value will be replaced with "sensitive".
  4871  func (s InsufficientEncryptionPolicyException) String() string {
  4872  	return awsutil.Prettify(s)
  4873  }
  4874  
  4875  // GoString returns the string representation.
  4876  //
  4877  // API parameter values that are decorated as "sensitive" in the API will not
  4878  // be included in the string output. The member name will be present, but the
  4879  // value will be replaced with "sensitive".
  4880  func (s InsufficientEncryptionPolicyException) GoString() string {
  4881  	return s.String()
  4882  }
  4883  
  4884  func newErrorInsufficientEncryptionPolicyException(v protocol.ResponseMetadata) error {
  4885  	return &InsufficientEncryptionPolicyException{
  4886  		RespMetadata: v,
  4887  	}
  4888  }
  4889  
  4890  // Code returns the exception type name.
  4891  func (s *InsufficientEncryptionPolicyException) Code() string {
  4892  	return "InsufficientEncryptionPolicyException"
  4893  }
  4894  
  4895  // Message returns the exception's message.
  4896  func (s *InsufficientEncryptionPolicyException) Message() string {
  4897  	if s.Message_ != nil {
  4898  		return *s.Message_
  4899  	}
  4900  	return ""
  4901  }
  4902  
  4903  // OrigErr always returns nil, satisfies awserr.Error interface.
  4904  func (s *InsufficientEncryptionPolicyException) OrigErr() error {
  4905  	return nil
  4906  }
  4907  
  4908  func (s *InsufficientEncryptionPolicyException) Error() string {
  4909  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4910  }
  4911  
  4912  // Status code returns the HTTP status code for the request's response error.
  4913  func (s *InsufficientEncryptionPolicyException) StatusCode() int {
  4914  	return s.RespMetadata.StatusCode
  4915  }
  4916  
  4917  // RequestID returns the service's response RequestID for request.
  4918  func (s *InsufficientEncryptionPolicyException) RequestID() string {
  4919  	return s.RespMetadata.RequestID
  4920  }
  4921  
  4922  // This exception is thrown when the policy on the S3 bucket is not sufficient.
  4923  type InsufficientS3BucketPolicyException struct {
  4924  	_            struct{}                  `type:"structure"`
  4925  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4926  
  4927  	Message_ *string `locationName:"message" type:"string"`
  4928  }
  4929  
  4930  // String returns the string representation.
  4931  //
  4932  // API parameter values that are decorated as "sensitive" in the API will not
  4933  // be included in the string output. The member name will be present, but the
  4934  // value will be replaced with "sensitive".
  4935  func (s InsufficientS3BucketPolicyException) String() string {
  4936  	return awsutil.Prettify(s)
  4937  }
  4938  
  4939  // GoString returns the string representation.
  4940  //
  4941  // API parameter values that are decorated as "sensitive" in the API will not
  4942  // be included in the string output. The member name will be present, but the
  4943  // value will be replaced with "sensitive".
  4944  func (s InsufficientS3BucketPolicyException) GoString() string {
  4945  	return s.String()
  4946  }
  4947  
  4948  func newErrorInsufficientS3BucketPolicyException(v protocol.ResponseMetadata) error {
  4949  	return &InsufficientS3BucketPolicyException{
  4950  		RespMetadata: v,
  4951  	}
  4952  }
  4953  
  4954  // Code returns the exception type name.
  4955  func (s *InsufficientS3BucketPolicyException) Code() string {
  4956  	return "InsufficientS3BucketPolicyException"
  4957  }
  4958  
  4959  // Message returns the exception's message.
  4960  func (s *InsufficientS3BucketPolicyException) Message() string {
  4961  	if s.Message_ != nil {
  4962  		return *s.Message_
  4963  	}
  4964  	return ""
  4965  }
  4966  
  4967  // OrigErr always returns nil, satisfies awserr.Error interface.
  4968  func (s *InsufficientS3BucketPolicyException) OrigErr() error {
  4969  	return nil
  4970  }
  4971  
  4972  func (s *InsufficientS3BucketPolicyException) Error() string {
  4973  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  4974  }
  4975  
  4976  // Status code returns the HTTP status code for the request's response error.
  4977  func (s *InsufficientS3BucketPolicyException) StatusCode() int {
  4978  	return s.RespMetadata.StatusCode
  4979  }
  4980  
  4981  // RequestID returns the service's response RequestID for request.
  4982  func (s *InsufficientS3BucketPolicyException) RequestID() string {
  4983  	return s.RespMetadata.RequestID
  4984  }
  4985  
  4986  // This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
  4987  type InsufficientSnsTopicPolicyException struct {
  4988  	_            struct{}                  `type:"structure"`
  4989  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  4990  
  4991  	Message_ *string `locationName:"message" type:"string"`
  4992  }
  4993  
  4994  // String returns the string representation.
  4995  //
  4996  // API parameter values that are decorated as "sensitive" in the API will not
  4997  // be included in the string output. The member name will be present, but the
  4998  // value will be replaced with "sensitive".
  4999  func (s InsufficientSnsTopicPolicyException) String() string {
  5000  	return awsutil.Prettify(s)
  5001  }
  5002  
  5003  // GoString returns the string representation.
  5004  //
  5005  // API parameter values that are decorated as "sensitive" in the API will not
  5006  // be included in the string output. The member name will be present, but the
  5007  // value will be replaced with "sensitive".
  5008  func (s InsufficientSnsTopicPolicyException) GoString() string {
  5009  	return s.String()
  5010  }
  5011  
  5012  func newErrorInsufficientSnsTopicPolicyException(v protocol.ResponseMetadata) error {
  5013  	return &InsufficientSnsTopicPolicyException{
  5014  		RespMetadata: v,
  5015  	}
  5016  }
  5017  
  5018  // Code returns the exception type name.
  5019  func (s *InsufficientSnsTopicPolicyException) Code() string {
  5020  	return "InsufficientSnsTopicPolicyException"
  5021  }
  5022  
  5023  // Message returns the exception's message.
  5024  func (s *InsufficientSnsTopicPolicyException) Message() string {
  5025  	if s.Message_ != nil {
  5026  		return *s.Message_
  5027  	}
  5028  	return ""
  5029  }
  5030  
  5031  // OrigErr always returns nil, satisfies awserr.Error interface.
  5032  func (s *InsufficientSnsTopicPolicyException) OrigErr() error {
  5033  	return nil
  5034  }
  5035  
  5036  func (s *InsufficientSnsTopicPolicyException) Error() string {
  5037  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5038  }
  5039  
  5040  // Status code returns the HTTP status code for the request's response error.
  5041  func (s *InsufficientSnsTopicPolicyException) StatusCode() int {
  5042  	return s.RespMetadata.StatusCode
  5043  }
  5044  
  5045  // RequestID returns the service's response RequestID for request.
  5046  func (s *InsufficientSnsTopicPolicyException) RequestID() string {
  5047  	return s.RespMetadata.RequestID
  5048  }
  5049  
  5050  // This exception is thrown when the provided CloudWatch Logs log group is not
  5051  // valid.
  5052  type InvalidCloudWatchLogsLogGroupArnException struct {
  5053  	_            struct{}                  `type:"structure"`
  5054  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5055  
  5056  	Message_ *string `locationName:"message" type:"string"`
  5057  }
  5058  
  5059  // String returns the string representation.
  5060  //
  5061  // API parameter values that are decorated as "sensitive" in the API will not
  5062  // be included in the string output. The member name will be present, but the
  5063  // value will be replaced with "sensitive".
  5064  func (s InvalidCloudWatchLogsLogGroupArnException) String() string {
  5065  	return awsutil.Prettify(s)
  5066  }
  5067  
  5068  // GoString returns the string representation.
  5069  //
  5070  // API parameter values that are decorated as "sensitive" in the API will not
  5071  // be included in the string output. The member name will be present, but the
  5072  // value will be replaced with "sensitive".
  5073  func (s InvalidCloudWatchLogsLogGroupArnException) GoString() string {
  5074  	return s.String()
  5075  }
  5076  
  5077  func newErrorInvalidCloudWatchLogsLogGroupArnException(v protocol.ResponseMetadata) error {
  5078  	return &InvalidCloudWatchLogsLogGroupArnException{
  5079  		RespMetadata: v,
  5080  	}
  5081  }
  5082  
  5083  // Code returns the exception type name.
  5084  func (s *InvalidCloudWatchLogsLogGroupArnException) Code() string {
  5085  	return "InvalidCloudWatchLogsLogGroupArnException"
  5086  }
  5087  
  5088  // Message returns the exception's message.
  5089  func (s *InvalidCloudWatchLogsLogGroupArnException) Message() string {
  5090  	if s.Message_ != nil {
  5091  		return *s.Message_
  5092  	}
  5093  	return ""
  5094  }
  5095  
  5096  // OrigErr always returns nil, satisfies awserr.Error interface.
  5097  func (s *InvalidCloudWatchLogsLogGroupArnException) OrigErr() error {
  5098  	return nil
  5099  }
  5100  
  5101  func (s *InvalidCloudWatchLogsLogGroupArnException) Error() string {
  5102  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5103  }
  5104  
  5105  // Status code returns the HTTP status code for the request's response error.
  5106  func (s *InvalidCloudWatchLogsLogGroupArnException) StatusCode() int {
  5107  	return s.RespMetadata.StatusCode
  5108  }
  5109  
  5110  // RequestID returns the service's response RequestID for request.
  5111  func (s *InvalidCloudWatchLogsLogGroupArnException) RequestID() string {
  5112  	return s.RespMetadata.RequestID
  5113  }
  5114  
  5115  // This exception is thrown when the provided role is not valid.
  5116  type InvalidCloudWatchLogsRoleArnException struct {
  5117  	_            struct{}                  `type:"structure"`
  5118  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5119  
  5120  	Message_ *string `locationName:"message" type:"string"`
  5121  }
  5122  
  5123  // String returns the string representation.
  5124  //
  5125  // API parameter values that are decorated as "sensitive" in the API will not
  5126  // be included in the string output. The member name will be present, but the
  5127  // value will be replaced with "sensitive".
  5128  func (s InvalidCloudWatchLogsRoleArnException) String() string {
  5129  	return awsutil.Prettify(s)
  5130  }
  5131  
  5132  // GoString returns the string representation.
  5133  //
  5134  // API parameter values that are decorated as "sensitive" in the API will not
  5135  // be included in the string output. The member name will be present, but the
  5136  // value will be replaced with "sensitive".
  5137  func (s InvalidCloudWatchLogsRoleArnException) GoString() string {
  5138  	return s.String()
  5139  }
  5140  
  5141  func newErrorInvalidCloudWatchLogsRoleArnException(v protocol.ResponseMetadata) error {
  5142  	return &InvalidCloudWatchLogsRoleArnException{
  5143  		RespMetadata: v,
  5144  	}
  5145  }
  5146  
  5147  // Code returns the exception type name.
  5148  func (s *InvalidCloudWatchLogsRoleArnException) Code() string {
  5149  	return "InvalidCloudWatchLogsRoleArnException"
  5150  }
  5151  
  5152  // Message returns the exception's message.
  5153  func (s *InvalidCloudWatchLogsRoleArnException) Message() string {
  5154  	if s.Message_ != nil {
  5155  		return *s.Message_
  5156  	}
  5157  	return ""
  5158  }
  5159  
  5160  // OrigErr always returns nil, satisfies awserr.Error interface.
  5161  func (s *InvalidCloudWatchLogsRoleArnException) OrigErr() error {
  5162  	return nil
  5163  }
  5164  
  5165  func (s *InvalidCloudWatchLogsRoleArnException) Error() string {
  5166  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5167  }
  5168  
  5169  // Status code returns the HTTP status code for the request's response error.
  5170  func (s *InvalidCloudWatchLogsRoleArnException) StatusCode() int {
  5171  	return s.RespMetadata.StatusCode
  5172  }
  5173  
  5174  // RequestID returns the service's response RequestID for request.
  5175  func (s *InvalidCloudWatchLogsRoleArnException) RequestID() string {
  5176  	return s.RespMetadata.RequestID
  5177  }
  5178  
  5179  // Occurs if an event category that is not valid is specified as a value of
  5180  // EventCategory.
  5181  type InvalidEventCategoryException struct {
  5182  	_            struct{}                  `type:"structure"`
  5183  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5184  
  5185  	Message_ *string `locationName:"message" type:"string"`
  5186  }
  5187  
  5188  // String returns the string representation.
  5189  //
  5190  // API parameter values that are decorated as "sensitive" in the API will not
  5191  // be included in the string output. The member name will be present, but the
  5192  // value will be replaced with "sensitive".
  5193  func (s InvalidEventCategoryException) String() string {
  5194  	return awsutil.Prettify(s)
  5195  }
  5196  
  5197  // GoString returns the string representation.
  5198  //
  5199  // API parameter values that are decorated as "sensitive" in the API will not
  5200  // be included in the string output. The member name will be present, but the
  5201  // value will be replaced with "sensitive".
  5202  func (s InvalidEventCategoryException) GoString() string {
  5203  	return s.String()
  5204  }
  5205  
  5206  func newErrorInvalidEventCategoryException(v protocol.ResponseMetadata) error {
  5207  	return &InvalidEventCategoryException{
  5208  		RespMetadata: v,
  5209  	}
  5210  }
  5211  
  5212  // Code returns the exception type name.
  5213  func (s *InvalidEventCategoryException) Code() string {
  5214  	return "InvalidEventCategoryException"
  5215  }
  5216  
  5217  // Message returns the exception's message.
  5218  func (s *InvalidEventCategoryException) Message() string {
  5219  	if s.Message_ != nil {
  5220  		return *s.Message_
  5221  	}
  5222  	return ""
  5223  }
  5224  
  5225  // OrigErr always returns nil, satisfies awserr.Error interface.
  5226  func (s *InvalidEventCategoryException) OrigErr() error {
  5227  	return nil
  5228  }
  5229  
  5230  func (s *InvalidEventCategoryException) Error() string {
  5231  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5232  }
  5233  
  5234  // Status code returns the HTTP status code for the request's response error.
  5235  func (s *InvalidEventCategoryException) StatusCode() int {
  5236  	return s.RespMetadata.StatusCode
  5237  }
  5238  
  5239  // RequestID returns the service's response RequestID for request.
  5240  func (s *InvalidEventCategoryException) RequestID() string {
  5241  	return s.RespMetadata.RequestID
  5242  }
  5243  
  5244  // This exception is thrown when the PutEventSelectors operation is called with
  5245  // a number of event selectors, advanced event selectors, or data resources
  5246  // that is not valid. The combination of event selectors or advanced event selectors
  5247  // and data resources is not valid. A trail can have up to 5 event selectors.
  5248  // If a trail uses advanced event selectors, a maximum of 500 total values for
  5249  // all conditions in all advanced event selectors is allowed. A trail is limited
  5250  // to 250 data resources. These data resources can be distributed across event
  5251  // selectors, but the overall total cannot exceed 250.
  5252  //
  5253  // You can:
  5254  //
  5255  //    * Specify a valid number of event selectors (1 to 5) for a trail.
  5256  //
  5257  //    * Specify a valid number of data resources (1 to 250) for an event selector.
  5258  //    The limit of number of resources on an individual event selector is configurable
  5259  //    up to 250. However, this upper limit is allowed only if the total number
  5260  //    of data resources does not exceed 250 across all event selectors for a
  5261  //    trail.
  5262  //
  5263  //    * Specify up to 500 values for all conditions in all advanced event selectors
  5264  //    for a trail.
  5265  //
  5266  //    * Specify a valid value for a parameter. For example, specifying the ReadWriteType
  5267  //    parameter with a value of read-only is not valid.
  5268  type InvalidEventSelectorsException struct {
  5269  	_            struct{}                  `type:"structure"`
  5270  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5271  
  5272  	Message_ *string `locationName:"message" type:"string"`
  5273  }
  5274  
  5275  // String returns the string representation.
  5276  //
  5277  // API parameter values that are decorated as "sensitive" in the API will not
  5278  // be included in the string output. The member name will be present, but the
  5279  // value will be replaced with "sensitive".
  5280  func (s InvalidEventSelectorsException) String() string {
  5281  	return awsutil.Prettify(s)
  5282  }
  5283  
  5284  // GoString returns the string representation.
  5285  //
  5286  // API parameter values that are decorated as "sensitive" in the API will not
  5287  // be included in the string output. The member name will be present, but the
  5288  // value will be replaced with "sensitive".
  5289  func (s InvalidEventSelectorsException) GoString() string {
  5290  	return s.String()
  5291  }
  5292  
  5293  func newErrorInvalidEventSelectorsException(v protocol.ResponseMetadata) error {
  5294  	return &InvalidEventSelectorsException{
  5295  		RespMetadata: v,
  5296  	}
  5297  }
  5298  
  5299  // Code returns the exception type name.
  5300  func (s *InvalidEventSelectorsException) Code() string {
  5301  	return "InvalidEventSelectorsException"
  5302  }
  5303  
  5304  // Message returns the exception's message.
  5305  func (s *InvalidEventSelectorsException) Message() string {
  5306  	if s.Message_ != nil {
  5307  		return *s.Message_
  5308  	}
  5309  	return ""
  5310  }
  5311  
  5312  // OrigErr always returns nil, satisfies awserr.Error interface.
  5313  func (s *InvalidEventSelectorsException) OrigErr() error {
  5314  	return nil
  5315  }
  5316  
  5317  func (s *InvalidEventSelectorsException) Error() string {
  5318  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5319  }
  5320  
  5321  // Status code returns the HTTP status code for the request's response error.
  5322  func (s *InvalidEventSelectorsException) StatusCode() int {
  5323  	return s.RespMetadata.StatusCode
  5324  }
  5325  
  5326  // RequestID returns the service's response RequestID for request.
  5327  func (s *InvalidEventSelectorsException) RequestID() string {
  5328  	return s.RespMetadata.RequestID
  5329  }
  5330  
  5331  // This exception is thrown when an operation is called on a trail from a region
  5332  // other than the region in which the trail was created.
  5333  type InvalidHomeRegionException struct {
  5334  	_            struct{}                  `type:"structure"`
  5335  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5336  
  5337  	Message_ *string `locationName:"message" type:"string"`
  5338  }
  5339  
  5340  // String returns the string representation.
  5341  //
  5342  // API parameter values that are decorated as "sensitive" in the API will not
  5343  // be included in the string output. The member name will be present, but the
  5344  // value will be replaced with "sensitive".
  5345  func (s InvalidHomeRegionException) String() string {
  5346  	return awsutil.Prettify(s)
  5347  }
  5348  
  5349  // GoString returns the string representation.
  5350  //
  5351  // API parameter values that are decorated as "sensitive" in the API will not
  5352  // be included in the string output. The member name will be present, but the
  5353  // value will be replaced with "sensitive".
  5354  func (s InvalidHomeRegionException) GoString() string {
  5355  	return s.String()
  5356  }
  5357  
  5358  func newErrorInvalidHomeRegionException(v protocol.ResponseMetadata) error {
  5359  	return &InvalidHomeRegionException{
  5360  		RespMetadata: v,
  5361  	}
  5362  }
  5363  
  5364  // Code returns the exception type name.
  5365  func (s *InvalidHomeRegionException) Code() string {
  5366  	return "InvalidHomeRegionException"
  5367  }
  5368  
  5369  // Message returns the exception's message.
  5370  func (s *InvalidHomeRegionException) Message() string {
  5371  	if s.Message_ != nil {
  5372  		return *s.Message_
  5373  	}
  5374  	return ""
  5375  }
  5376  
  5377  // OrigErr always returns nil, satisfies awserr.Error interface.
  5378  func (s *InvalidHomeRegionException) OrigErr() error {
  5379  	return nil
  5380  }
  5381  
  5382  func (s *InvalidHomeRegionException) Error() string {
  5383  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5384  }
  5385  
  5386  // Status code returns the HTTP status code for the request's response error.
  5387  func (s *InvalidHomeRegionException) StatusCode() int {
  5388  	return s.RespMetadata.StatusCode
  5389  }
  5390  
  5391  // RequestID returns the service's response RequestID for request.
  5392  func (s *InvalidHomeRegionException) RequestID() string {
  5393  	return s.RespMetadata.RequestID
  5394  }
  5395  
  5396  // The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
  5397  // or GetInsightSelectors request is not valid, or the specified insight type
  5398  // in the InsightSelectors statement is not a valid insight type.
  5399  type InvalidInsightSelectorsException struct {
  5400  	_            struct{}                  `type:"structure"`
  5401  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5402  
  5403  	Message_ *string `locationName:"message" type:"string"`
  5404  }
  5405  
  5406  // String returns the string representation.
  5407  //
  5408  // API parameter values that are decorated as "sensitive" in the API will not
  5409  // be included in the string output. The member name will be present, but the
  5410  // value will be replaced with "sensitive".
  5411  func (s InvalidInsightSelectorsException) String() string {
  5412  	return awsutil.Prettify(s)
  5413  }
  5414  
  5415  // GoString returns the string representation.
  5416  //
  5417  // API parameter values that are decorated as "sensitive" in the API will not
  5418  // be included in the string output. The member name will be present, but the
  5419  // value will be replaced with "sensitive".
  5420  func (s InvalidInsightSelectorsException) GoString() string {
  5421  	return s.String()
  5422  }
  5423  
  5424  func newErrorInvalidInsightSelectorsException(v protocol.ResponseMetadata) error {
  5425  	return &InvalidInsightSelectorsException{
  5426  		RespMetadata: v,
  5427  	}
  5428  }
  5429  
  5430  // Code returns the exception type name.
  5431  func (s *InvalidInsightSelectorsException) Code() string {
  5432  	return "InvalidInsightSelectorsException"
  5433  }
  5434  
  5435  // Message returns the exception's message.
  5436  func (s *InvalidInsightSelectorsException) Message() string {
  5437  	if s.Message_ != nil {
  5438  		return *s.Message_
  5439  	}
  5440  	return ""
  5441  }
  5442  
  5443  // OrigErr always returns nil, satisfies awserr.Error interface.
  5444  func (s *InvalidInsightSelectorsException) OrigErr() error {
  5445  	return nil
  5446  }
  5447  
  5448  func (s *InvalidInsightSelectorsException) Error() string {
  5449  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5450  }
  5451  
  5452  // Status code returns the HTTP status code for the request's response error.
  5453  func (s *InvalidInsightSelectorsException) StatusCode() int {
  5454  	return s.RespMetadata.StatusCode
  5455  }
  5456  
  5457  // RequestID returns the service's response RequestID for request.
  5458  func (s *InvalidInsightSelectorsException) RequestID() string {
  5459  	return s.RespMetadata.RequestID
  5460  }
  5461  
  5462  // This exception is thrown when the KMS key ARN is not valid.
  5463  type InvalidKmsKeyIdException struct {
  5464  	_            struct{}                  `type:"structure"`
  5465  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5466  
  5467  	Message_ *string `locationName:"message" type:"string"`
  5468  }
  5469  
  5470  // String returns the string representation.
  5471  //
  5472  // API parameter values that are decorated as "sensitive" in the API will not
  5473  // be included in the string output. The member name will be present, but the
  5474  // value will be replaced with "sensitive".
  5475  func (s InvalidKmsKeyIdException) String() string {
  5476  	return awsutil.Prettify(s)
  5477  }
  5478  
  5479  // GoString returns the string representation.
  5480  //
  5481  // API parameter values that are decorated as "sensitive" in the API will not
  5482  // be included in the string output. The member name will be present, but the
  5483  // value will be replaced with "sensitive".
  5484  func (s InvalidKmsKeyIdException) GoString() string {
  5485  	return s.String()
  5486  }
  5487  
  5488  func newErrorInvalidKmsKeyIdException(v protocol.ResponseMetadata) error {
  5489  	return &InvalidKmsKeyIdException{
  5490  		RespMetadata: v,
  5491  	}
  5492  }
  5493  
  5494  // Code returns the exception type name.
  5495  func (s *InvalidKmsKeyIdException) Code() string {
  5496  	return "InvalidKmsKeyIdException"
  5497  }
  5498  
  5499  // Message returns the exception's message.
  5500  func (s *InvalidKmsKeyIdException) Message() string {
  5501  	if s.Message_ != nil {
  5502  		return *s.Message_
  5503  	}
  5504  	return ""
  5505  }
  5506  
  5507  // OrigErr always returns nil, satisfies awserr.Error interface.
  5508  func (s *InvalidKmsKeyIdException) OrigErr() error {
  5509  	return nil
  5510  }
  5511  
  5512  func (s *InvalidKmsKeyIdException) Error() string {
  5513  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5514  }
  5515  
  5516  // Status code returns the HTTP status code for the request's response error.
  5517  func (s *InvalidKmsKeyIdException) StatusCode() int {
  5518  	return s.RespMetadata.StatusCode
  5519  }
  5520  
  5521  // RequestID returns the service's response RequestID for request.
  5522  func (s *InvalidKmsKeyIdException) RequestID() string {
  5523  	return s.RespMetadata.RequestID
  5524  }
  5525  
  5526  // Occurs when a lookup attribute is specified that is not valid.
  5527  type InvalidLookupAttributesException struct {
  5528  	_            struct{}                  `type:"structure"`
  5529  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5530  
  5531  	Message_ *string `locationName:"message" type:"string"`
  5532  }
  5533  
  5534  // String returns the string representation.
  5535  //
  5536  // API parameter values that are decorated as "sensitive" in the API will not
  5537  // be included in the string output. The member name will be present, but the
  5538  // value will be replaced with "sensitive".
  5539  func (s InvalidLookupAttributesException) String() string {
  5540  	return awsutil.Prettify(s)
  5541  }
  5542  
  5543  // GoString returns the string representation.
  5544  //
  5545  // API parameter values that are decorated as "sensitive" in the API will not
  5546  // be included in the string output. The member name will be present, but the
  5547  // value will be replaced with "sensitive".
  5548  func (s InvalidLookupAttributesException) GoString() string {
  5549  	return s.String()
  5550  }
  5551  
  5552  func newErrorInvalidLookupAttributesException(v protocol.ResponseMetadata) error {
  5553  	return &InvalidLookupAttributesException{
  5554  		RespMetadata: v,
  5555  	}
  5556  }
  5557  
  5558  // Code returns the exception type name.
  5559  func (s *InvalidLookupAttributesException) Code() string {
  5560  	return "InvalidLookupAttributesException"
  5561  }
  5562  
  5563  // Message returns the exception's message.
  5564  func (s *InvalidLookupAttributesException) Message() string {
  5565  	if s.Message_ != nil {
  5566  		return *s.Message_
  5567  	}
  5568  	return ""
  5569  }
  5570  
  5571  // OrigErr always returns nil, satisfies awserr.Error interface.
  5572  func (s *InvalidLookupAttributesException) OrigErr() error {
  5573  	return nil
  5574  }
  5575  
  5576  func (s *InvalidLookupAttributesException) Error() string {
  5577  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5578  }
  5579  
  5580  // Status code returns the HTTP status code for the request's response error.
  5581  func (s *InvalidLookupAttributesException) StatusCode() int {
  5582  	return s.RespMetadata.StatusCode
  5583  }
  5584  
  5585  // RequestID returns the service's response RequestID for request.
  5586  func (s *InvalidLookupAttributesException) RequestID() string {
  5587  	return s.RespMetadata.RequestID
  5588  }
  5589  
  5590  // This exception is thrown if the limit specified is not valid.
  5591  type InvalidMaxResultsException struct {
  5592  	_            struct{}                  `type:"structure"`
  5593  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5594  
  5595  	Message_ *string `locationName:"message" type:"string"`
  5596  }
  5597  
  5598  // String returns the string representation.
  5599  //
  5600  // API parameter values that are decorated as "sensitive" in the API will not
  5601  // be included in the string output. The member name will be present, but the
  5602  // value will be replaced with "sensitive".
  5603  func (s InvalidMaxResultsException) String() string {
  5604  	return awsutil.Prettify(s)
  5605  }
  5606  
  5607  // GoString returns the string representation.
  5608  //
  5609  // API parameter values that are decorated as "sensitive" in the API will not
  5610  // be included in the string output. The member name will be present, but the
  5611  // value will be replaced with "sensitive".
  5612  func (s InvalidMaxResultsException) GoString() string {
  5613  	return s.String()
  5614  }
  5615  
  5616  func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error {
  5617  	return &InvalidMaxResultsException{
  5618  		RespMetadata: v,
  5619  	}
  5620  }
  5621  
  5622  // Code returns the exception type name.
  5623  func (s *InvalidMaxResultsException) Code() string {
  5624  	return "InvalidMaxResultsException"
  5625  }
  5626  
  5627  // Message returns the exception's message.
  5628  func (s *InvalidMaxResultsException) Message() string {
  5629  	if s.Message_ != nil {
  5630  		return *s.Message_
  5631  	}
  5632  	return ""
  5633  }
  5634  
  5635  // OrigErr always returns nil, satisfies awserr.Error interface.
  5636  func (s *InvalidMaxResultsException) OrigErr() error {
  5637  	return nil
  5638  }
  5639  
  5640  func (s *InvalidMaxResultsException) Error() string {
  5641  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5642  }
  5643  
  5644  // Status code returns the HTTP status code for the request's response error.
  5645  func (s *InvalidMaxResultsException) StatusCode() int {
  5646  	return s.RespMetadata.StatusCode
  5647  }
  5648  
  5649  // RequestID returns the service's response RequestID for request.
  5650  func (s *InvalidMaxResultsException) RequestID() string {
  5651  	return s.RespMetadata.RequestID
  5652  }
  5653  
  5654  // A token that is not valid, or a token that was previously used in a request
  5655  // with different parameters. This exception is thrown if the token is not valid.
  5656  type InvalidNextTokenException struct {
  5657  	_            struct{}                  `type:"structure"`
  5658  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5659  
  5660  	Message_ *string `locationName:"message" type:"string"`
  5661  }
  5662  
  5663  // String returns the string representation.
  5664  //
  5665  // API parameter values that are decorated as "sensitive" in the API will not
  5666  // be included in the string output. The member name will be present, but the
  5667  // value will be replaced with "sensitive".
  5668  func (s InvalidNextTokenException) String() string {
  5669  	return awsutil.Prettify(s)
  5670  }
  5671  
  5672  // GoString returns the string representation.
  5673  //
  5674  // API parameter values that are decorated as "sensitive" in the API will not
  5675  // be included in the string output. The member name will be present, but the
  5676  // value will be replaced with "sensitive".
  5677  func (s InvalidNextTokenException) GoString() string {
  5678  	return s.String()
  5679  }
  5680  
  5681  func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error {
  5682  	return &InvalidNextTokenException{
  5683  		RespMetadata: v,
  5684  	}
  5685  }
  5686  
  5687  // Code returns the exception type name.
  5688  func (s *InvalidNextTokenException) Code() string {
  5689  	return "InvalidNextTokenException"
  5690  }
  5691  
  5692  // Message returns the exception's message.
  5693  func (s *InvalidNextTokenException) Message() string {
  5694  	if s.Message_ != nil {
  5695  		return *s.Message_
  5696  	}
  5697  	return ""
  5698  }
  5699  
  5700  // OrigErr always returns nil, satisfies awserr.Error interface.
  5701  func (s *InvalidNextTokenException) OrigErr() error {
  5702  	return nil
  5703  }
  5704  
  5705  func (s *InvalidNextTokenException) Error() string {
  5706  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5707  }
  5708  
  5709  // Status code returns the HTTP status code for the request's response error.
  5710  func (s *InvalidNextTokenException) StatusCode() int {
  5711  	return s.RespMetadata.StatusCode
  5712  }
  5713  
  5714  // RequestID returns the service's response RequestID for request.
  5715  func (s *InvalidNextTokenException) RequestID() string {
  5716  	return s.RespMetadata.RequestID
  5717  }
  5718  
  5719  // This exception is thrown when the combination of parameters provided is not
  5720  // valid.
  5721  type InvalidParameterCombinationException struct {
  5722  	_            struct{}                  `type:"structure"`
  5723  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5724  
  5725  	Message_ *string `locationName:"message" type:"string"`
  5726  }
  5727  
  5728  // String returns the string representation.
  5729  //
  5730  // API parameter values that are decorated as "sensitive" in the API will not
  5731  // be included in the string output. The member name will be present, but the
  5732  // value will be replaced with "sensitive".
  5733  func (s InvalidParameterCombinationException) String() string {
  5734  	return awsutil.Prettify(s)
  5735  }
  5736  
  5737  // GoString returns the string representation.
  5738  //
  5739  // API parameter values that are decorated as "sensitive" in the API will not
  5740  // be included in the string output. The member name will be present, but the
  5741  // value will be replaced with "sensitive".
  5742  func (s InvalidParameterCombinationException) GoString() string {
  5743  	return s.String()
  5744  }
  5745  
  5746  func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error {
  5747  	return &InvalidParameterCombinationException{
  5748  		RespMetadata: v,
  5749  	}
  5750  }
  5751  
  5752  // Code returns the exception type name.
  5753  func (s *InvalidParameterCombinationException) Code() string {
  5754  	return "InvalidParameterCombinationException"
  5755  }
  5756  
  5757  // Message returns the exception's message.
  5758  func (s *InvalidParameterCombinationException) Message() string {
  5759  	if s.Message_ != nil {
  5760  		return *s.Message_
  5761  	}
  5762  	return ""
  5763  }
  5764  
  5765  // OrigErr always returns nil, satisfies awserr.Error interface.
  5766  func (s *InvalidParameterCombinationException) OrigErr() error {
  5767  	return nil
  5768  }
  5769  
  5770  func (s *InvalidParameterCombinationException) Error() string {
  5771  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5772  }
  5773  
  5774  // Status code returns the HTTP status code for the request's response error.
  5775  func (s *InvalidParameterCombinationException) StatusCode() int {
  5776  	return s.RespMetadata.StatusCode
  5777  }
  5778  
  5779  // RequestID returns the service's response RequestID for request.
  5780  func (s *InvalidParameterCombinationException) RequestID() string {
  5781  	return s.RespMetadata.RequestID
  5782  }
  5783  
  5784  // This exception is thrown when the provided S3 bucket name is not valid.
  5785  type InvalidS3BucketNameException struct {
  5786  	_            struct{}                  `type:"structure"`
  5787  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5788  
  5789  	Message_ *string `locationName:"message" type:"string"`
  5790  }
  5791  
  5792  // String returns the string representation.
  5793  //
  5794  // API parameter values that are decorated as "sensitive" in the API will not
  5795  // be included in the string output. The member name will be present, but the
  5796  // value will be replaced with "sensitive".
  5797  func (s InvalidS3BucketNameException) String() string {
  5798  	return awsutil.Prettify(s)
  5799  }
  5800  
  5801  // GoString returns the string representation.
  5802  //
  5803  // API parameter values that are decorated as "sensitive" in the API will not
  5804  // be included in the string output. The member name will be present, but the
  5805  // value will be replaced with "sensitive".
  5806  func (s InvalidS3BucketNameException) GoString() string {
  5807  	return s.String()
  5808  }
  5809  
  5810  func newErrorInvalidS3BucketNameException(v protocol.ResponseMetadata) error {
  5811  	return &InvalidS3BucketNameException{
  5812  		RespMetadata: v,
  5813  	}
  5814  }
  5815  
  5816  // Code returns the exception type name.
  5817  func (s *InvalidS3BucketNameException) Code() string {
  5818  	return "InvalidS3BucketNameException"
  5819  }
  5820  
  5821  // Message returns the exception's message.
  5822  func (s *InvalidS3BucketNameException) Message() string {
  5823  	if s.Message_ != nil {
  5824  		return *s.Message_
  5825  	}
  5826  	return ""
  5827  }
  5828  
  5829  // OrigErr always returns nil, satisfies awserr.Error interface.
  5830  func (s *InvalidS3BucketNameException) OrigErr() error {
  5831  	return nil
  5832  }
  5833  
  5834  func (s *InvalidS3BucketNameException) Error() string {
  5835  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5836  }
  5837  
  5838  // Status code returns the HTTP status code for the request's response error.
  5839  func (s *InvalidS3BucketNameException) StatusCode() int {
  5840  	return s.RespMetadata.StatusCode
  5841  }
  5842  
  5843  // RequestID returns the service's response RequestID for request.
  5844  func (s *InvalidS3BucketNameException) RequestID() string {
  5845  	return s.RespMetadata.RequestID
  5846  }
  5847  
  5848  // This exception is thrown when the provided S3 prefix is not valid.
  5849  type InvalidS3PrefixException struct {
  5850  	_            struct{}                  `type:"structure"`
  5851  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5852  
  5853  	Message_ *string `locationName:"message" type:"string"`
  5854  }
  5855  
  5856  // String returns the string representation.
  5857  //
  5858  // API parameter values that are decorated as "sensitive" in the API will not
  5859  // be included in the string output. The member name will be present, but the
  5860  // value will be replaced with "sensitive".
  5861  func (s InvalidS3PrefixException) String() string {
  5862  	return awsutil.Prettify(s)
  5863  }
  5864  
  5865  // GoString returns the string representation.
  5866  //
  5867  // API parameter values that are decorated as "sensitive" in the API will not
  5868  // be included in the string output. The member name will be present, but the
  5869  // value will be replaced with "sensitive".
  5870  func (s InvalidS3PrefixException) GoString() string {
  5871  	return s.String()
  5872  }
  5873  
  5874  func newErrorInvalidS3PrefixException(v protocol.ResponseMetadata) error {
  5875  	return &InvalidS3PrefixException{
  5876  		RespMetadata: v,
  5877  	}
  5878  }
  5879  
  5880  // Code returns the exception type name.
  5881  func (s *InvalidS3PrefixException) Code() string {
  5882  	return "InvalidS3PrefixException"
  5883  }
  5884  
  5885  // Message returns the exception's message.
  5886  func (s *InvalidS3PrefixException) Message() string {
  5887  	if s.Message_ != nil {
  5888  		return *s.Message_
  5889  	}
  5890  	return ""
  5891  }
  5892  
  5893  // OrigErr always returns nil, satisfies awserr.Error interface.
  5894  func (s *InvalidS3PrefixException) OrigErr() error {
  5895  	return nil
  5896  }
  5897  
  5898  func (s *InvalidS3PrefixException) Error() string {
  5899  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5900  }
  5901  
  5902  // Status code returns the HTTP status code for the request's response error.
  5903  func (s *InvalidS3PrefixException) StatusCode() int {
  5904  	return s.RespMetadata.StatusCode
  5905  }
  5906  
  5907  // RequestID returns the service's response RequestID for request.
  5908  func (s *InvalidS3PrefixException) RequestID() string {
  5909  	return s.RespMetadata.RequestID
  5910  }
  5911  
  5912  // This exception is thrown when the provided SNS topic name is not valid.
  5913  type InvalidSnsTopicNameException struct {
  5914  	_            struct{}                  `type:"structure"`
  5915  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5916  
  5917  	Message_ *string `locationName:"message" type:"string"`
  5918  }
  5919  
  5920  // String returns the string representation.
  5921  //
  5922  // API parameter values that are decorated as "sensitive" in the API will not
  5923  // be included in the string output. The member name will be present, but the
  5924  // value will be replaced with "sensitive".
  5925  func (s InvalidSnsTopicNameException) String() string {
  5926  	return awsutil.Prettify(s)
  5927  }
  5928  
  5929  // GoString returns the string representation.
  5930  //
  5931  // API parameter values that are decorated as "sensitive" in the API will not
  5932  // be included in the string output. The member name will be present, but the
  5933  // value will be replaced with "sensitive".
  5934  func (s InvalidSnsTopicNameException) GoString() string {
  5935  	return s.String()
  5936  }
  5937  
  5938  func newErrorInvalidSnsTopicNameException(v protocol.ResponseMetadata) error {
  5939  	return &InvalidSnsTopicNameException{
  5940  		RespMetadata: v,
  5941  	}
  5942  }
  5943  
  5944  // Code returns the exception type name.
  5945  func (s *InvalidSnsTopicNameException) Code() string {
  5946  	return "InvalidSnsTopicNameException"
  5947  }
  5948  
  5949  // Message returns the exception's message.
  5950  func (s *InvalidSnsTopicNameException) Message() string {
  5951  	if s.Message_ != nil {
  5952  		return *s.Message_
  5953  	}
  5954  	return ""
  5955  }
  5956  
  5957  // OrigErr always returns nil, satisfies awserr.Error interface.
  5958  func (s *InvalidSnsTopicNameException) OrigErr() error {
  5959  	return nil
  5960  }
  5961  
  5962  func (s *InvalidSnsTopicNameException) Error() string {
  5963  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  5964  }
  5965  
  5966  // Status code returns the HTTP status code for the request's response error.
  5967  func (s *InvalidSnsTopicNameException) StatusCode() int {
  5968  	return s.RespMetadata.StatusCode
  5969  }
  5970  
  5971  // RequestID returns the service's response RequestID for request.
  5972  func (s *InvalidSnsTopicNameException) RequestID() string {
  5973  	return s.RespMetadata.RequestID
  5974  }
  5975  
  5976  // This exception is thrown when the specified tag key or values are not valid.
  5977  // It can also occur if there are duplicate tags or too many tags on the resource.
  5978  type InvalidTagParameterException struct {
  5979  	_            struct{}                  `type:"structure"`
  5980  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  5981  
  5982  	Message_ *string `locationName:"message" type:"string"`
  5983  }
  5984  
  5985  // String returns the string representation.
  5986  //
  5987  // API parameter values that are decorated as "sensitive" in the API will not
  5988  // be included in the string output. The member name will be present, but the
  5989  // value will be replaced with "sensitive".
  5990  func (s InvalidTagParameterException) String() string {
  5991  	return awsutil.Prettify(s)
  5992  }
  5993  
  5994  // GoString returns the string representation.
  5995  //
  5996  // API parameter values that are decorated as "sensitive" in the API will not
  5997  // be included in the string output. The member name will be present, but the
  5998  // value will be replaced with "sensitive".
  5999  func (s InvalidTagParameterException) GoString() string {
  6000  	return s.String()
  6001  }
  6002  
  6003  func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error {
  6004  	return &InvalidTagParameterException{
  6005  		RespMetadata: v,
  6006  	}
  6007  }
  6008  
  6009  // Code returns the exception type name.
  6010  func (s *InvalidTagParameterException) Code() string {
  6011  	return "InvalidTagParameterException"
  6012  }
  6013  
  6014  // Message returns the exception's message.
  6015  func (s *InvalidTagParameterException) Message() string {
  6016  	if s.Message_ != nil {
  6017  		return *s.Message_
  6018  	}
  6019  	return ""
  6020  }
  6021  
  6022  // OrigErr always returns nil, satisfies awserr.Error interface.
  6023  func (s *InvalidTagParameterException) OrigErr() error {
  6024  	return nil
  6025  }
  6026  
  6027  func (s *InvalidTagParameterException) Error() string {
  6028  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6029  }
  6030  
  6031  // Status code returns the HTTP status code for the request's response error.
  6032  func (s *InvalidTagParameterException) StatusCode() int {
  6033  	return s.RespMetadata.StatusCode
  6034  }
  6035  
  6036  // RequestID returns the service's response RequestID for request.
  6037  func (s *InvalidTagParameterException) RequestID() string {
  6038  	return s.RespMetadata.RequestID
  6039  }
  6040  
  6041  // Occurs if the timestamp values are not valid. Either the start time occurs
  6042  // after the end time, or the time range is outside the range of possible values.
  6043  type InvalidTimeRangeException struct {
  6044  	_            struct{}                  `type:"structure"`
  6045  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6046  
  6047  	Message_ *string `locationName:"message" type:"string"`
  6048  }
  6049  
  6050  // String returns the string representation.
  6051  //
  6052  // API parameter values that are decorated as "sensitive" in the API will not
  6053  // be included in the string output. The member name will be present, but the
  6054  // value will be replaced with "sensitive".
  6055  func (s InvalidTimeRangeException) String() string {
  6056  	return awsutil.Prettify(s)
  6057  }
  6058  
  6059  // GoString returns the string representation.
  6060  //
  6061  // API parameter values that are decorated as "sensitive" in the API will not
  6062  // be included in the string output. The member name will be present, but the
  6063  // value will be replaced with "sensitive".
  6064  func (s InvalidTimeRangeException) GoString() string {
  6065  	return s.String()
  6066  }
  6067  
  6068  func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error {
  6069  	return &InvalidTimeRangeException{
  6070  		RespMetadata: v,
  6071  	}
  6072  }
  6073  
  6074  // Code returns the exception type name.
  6075  func (s *InvalidTimeRangeException) Code() string {
  6076  	return "InvalidTimeRangeException"
  6077  }
  6078  
  6079  // Message returns the exception's message.
  6080  func (s *InvalidTimeRangeException) Message() string {
  6081  	if s.Message_ != nil {
  6082  		return *s.Message_
  6083  	}
  6084  	return ""
  6085  }
  6086  
  6087  // OrigErr always returns nil, satisfies awserr.Error interface.
  6088  func (s *InvalidTimeRangeException) OrigErr() error {
  6089  	return nil
  6090  }
  6091  
  6092  func (s *InvalidTimeRangeException) Error() string {
  6093  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6094  }
  6095  
  6096  // Status code returns the HTTP status code for the request's response error.
  6097  func (s *InvalidTimeRangeException) StatusCode() int {
  6098  	return s.RespMetadata.StatusCode
  6099  }
  6100  
  6101  // RequestID returns the service's response RequestID for request.
  6102  func (s *InvalidTimeRangeException) RequestID() string {
  6103  	return s.RespMetadata.RequestID
  6104  }
  6105  
  6106  // Reserved for future use.
  6107  type InvalidTokenException struct {
  6108  	_            struct{}                  `type:"structure"`
  6109  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6110  
  6111  	Message_ *string `locationName:"message" type:"string"`
  6112  }
  6113  
  6114  // String returns the string representation.
  6115  //
  6116  // API parameter values that are decorated as "sensitive" in the API will not
  6117  // be included in the string output. The member name will be present, but the
  6118  // value will be replaced with "sensitive".
  6119  func (s InvalidTokenException) String() string {
  6120  	return awsutil.Prettify(s)
  6121  }
  6122  
  6123  // GoString returns the string representation.
  6124  //
  6125  // API parameter values that are decorated as "sensitive" in the API will not
  6126  // be included in the string output. The member name will be present, but the
  6127  // value will be replaced with "sensitive".
  6128  func (s InvalidTokenException) GoString() string {
  6129  	return s.String()
  6130  }
  6131  
  6132  func newErrorInvalidTokenException(v protocol.ResponseMetadata) error {
  6133  	return &InvalidTokenException{
  6134  		RespMetadata: v,
  6135  	}
  6136  }
  6137  
  6138  // Code returns the exception type name.
  6139  func (s *InvalidTokenException) Code() string {
  6140  	return "InvalidTokenException"
  6141  }
  6142  
  6143  // Message returns the exception's message.
  6144  func (s *InvalidTokenException) Message() string {
  6145  	if s.Message_ != nil {
  6146  		return *s.Message_
  6147  	}
  6148  	return ""
  6149  }
  6150  
  6151  // OrigErr always returns nil, satisfies awserr.Error interface.
  6152  func (s *InvalidTokenException) OrigErr() error {
  6153  	return nil
  6154  }
  6155  
  6156  func (s *InvalidTokenException) Error() string {
  6157  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6158  }
  6159  
  6160  // Status code returns the HTTP status code for the request's response error.
  6161  func (s *InvalidTokenException) StatusCode() int {
  6162  	return s.RespMetadata.StatusCode
  6163  }
  6164  
  6165  // RequestID returns the service's response RequestID for request.
  6166  func (s *InvalidTokenException) RequestID() string {
  6167  	return s.RespMetadata.RequestID
  6168  }
  6169  
  6170  // This exception is thrown when the provided trail name is not valid. Trail
  6171  // names must meet the following requirements:
  6172  //
  6173  //    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  6174  //    (_), or dashes (-)
  6175  //
  6176  //    * Start with a letter or number, and end with a letter or number
  6177  //
  6178  //    * Be between 3 and 128 characters
  6179  //
  6180  //    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  6181  //    and my--namespace are not valid.
  6182  //
  6183  //    * Not be in IP address format (for example, 192.168.5.4)
  6184  type InvalidTrailNameException struct {
  6185  	_            struct{}                  `type:"structure"`
  6186  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6187  
  6188  	Message_ *string `locationName:"message" type:"string"`
  6189  }
  6190  
  6191  // String returns the string representation.
  6192  //
  6193  // API parameter values that are decorated as "sensitive" in the API will not
  6194  // be included in the string output. The member name will be present, but the
  6195  // value will be replaced with "sensitive".
  6196  func (s InvalidTrailNameException) String() string {
  6197  	return awsutil.Prettify(s)
  6198  }
  6199  
  6200  // GoString returns the string representation.
  6201  //
  6202  // API parameter values that are decorated as "sensitive" in the API will not
  6203  // be included in the string output. The member name will be present, but the
  6204  // value will be replaced with "sensitive".
  6205  func (s InvalidTrailNameException) GoString() string {
  6206  	return s.String()
  6207  }
  6208  
  6209  func newErrorInvalidTrailNameException(v protocol.ResponseMetadata) error {
  6210  	return &InvalidTrailNameException{
  6211  		RespMetadata: v,
  6212  	}
  6213  }
  6214  
  6215  // Code returns the exception type name.
  6216  func (s *InvalidTrailNameException) Code() string {
  6217  	return "InvalidTrailNameException"
  6218  }
  6219  
  6220  // Message returns the exception's message.
  6221  func (s *InvalidTrailNameException) Message() string {
  6222  	if s.Message_ != nil {
  6223  		return *s.Message_
  6224  	}
  6225  	return ""
  6226  }
  6227  
  6228  // OrigErr always returns nil, satisfies awserr.Error interface.
  6229  func (s *InvalidTrailNameException) OrigErr() error {
  6230  	return nil
  6231  }
  6232  
  6233  func (s *InvalidTrailNameException) Error() string {
  6234  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6235  }
  6236  
  6237  // Status code returns the HTTP status code for the request's response error.
  6238  func (s *InvalidTrailNameException) StatusCode() int {
  6239  	return s.RespMetadata.StatusCode
  6240  }
  6241  
  6242  // RequestID returns the service's response RequestID for request.
  6243  func (s *InvalidTrailNameException) RequestID() string {
  6244  	return s.RespMetadata.RequestID
  6245  }
  6246  
  6247  // This exception is thrown when there is an issue with the specified KMS key
  6248  // and the trail can’t be updated.
  6249  type KmsException struct {
  6250  	_            struct{}                  `type:"structure"`
  6251  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6252  
  6253  	Message_ *string `locationName:"message" type:"string"`
  6254  }
  6255  
  6256  // String returns the string representation.
  6257  //
  6258  // API parameter values that are decorated as "sensitive" in the API will not
  6259  // be included in the string output. The member name will be present, but the
  6260  // value will be replaced with "sensitive".
  6261  func (s KmsException) String() string {
  6262  	return awsutil.Prettify(s)
  6263  }
  6264  
  6265  // GoString returns the string representation.
  6266  //
  6267  // API parameter values that are decorated as "sensitive" in the API will not
  6268  // be included in the string output. The member name will be present, but the
  6269  // value will be replaced with "sensitive".
  6270  func (s KmsException) GoString() string {
  6271  	return s.String()
  6272  }
  6273  
  6274  func newErrorKmsException(v protocol.ResponseMetadata) error {
  6275  	return &KmsException{
  6276  		RespMetadata: v,
  6277  	}
  6278  }
  6279  
  6280  // Code returns the exception type name.
  6281  func (s *KmsException) Code() string {
  6282  	return "KmsException"
  6283  }
  6284  
  6285  // Message returns the exception's message.
  6286  func (s *KmsException) Message() string {
  6287  	if s.Message_ != nil {
  6288  		return *s.Message_
  6289  	}
  6290  	return ""
  6291  }
  6292  
  6293  // OrigErr always returns nil, satisfies awserr.Error interface.
  6294  func (s *KmsException) OrigErr() error {
  6295  	return nil
  6296  }
  6297  
  6298  func (s *KmsException) Error() string {
  6299  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6300  }
  6301  
  6302  // Status code returns the HTTP status code for the request's response error.
  6303  func (s *KmsException) StatusCode() int {
  6304  	return s.RespMetadata.StatusCode
  6305  }
  6306  
  6307  // RequestID returns the service's response RequestID for request.
  6308  func (s *KmsException) RequestID() string {
  6309  	return s.RespMetadata.RequestID
  6310  }
  6311  
  6312  // This exception is no longer in use.
  6313  //
  6314  // Deprecated: KmsKeyDisabledException has been deprecated
  6315  type KmsKeyDisabledException struct {
  6316  	_            struct{}                  `deprecated:"true" type:"structure"`
  6317  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6318  
  6319  	Message_ *string `locationName:"message" type:"string"`
  6320  }
  6321  
  6322  // String returns the string representation.
  6323  //
  6324  // API parameter values that are decorated as "sensitive" in the API will not
  6325  // be included in the string output. The member name will be present, but the
  6326  // value will be replaced with "sensitive".
  6327  func (s KmsKeyDisabledException) String() string {
  6328  	return awsutil.Prettify(s)
  6329  }
  6330  
  6331  // GoString returns the string representation.
  6332  //
  6333  // API parameter values that are decorated as "sensitive" in the API will not
  6334  // be included in the string output. The member name will be present, but the
  6335  // value will be replaced with "sensitive".
  6336  func (s KmsKeyDisabledException) GoString() string {
  6337  	return s.String()
  6338  }
  6339  
  6340  func newErrorKmsKeyDisabledException(v protocol.ResponseMetadata) error {
  6341  	return &KmsKeyDisabledException{
  6342  		RespMetadata: v,
  6343  	}
  6344  }
  6345  
  6346  // Code returns the exception type name.
  6347  func (s *KmsKeyDisabledException) Code() string {
  6348  	return "KmsKeyDisabledException"
  6349  }
  6350  
  6351  // Message returns the exception's message.
  6352  func (s *KmsKeyDisabledException) Message() string {
  6353  	if s.Message_ != nil {
  6354  		return *s.Message_
  6355  	}
  6356  	return ""
  6357  }
  6358  
  6359  // OrigErr always returns nil, satisfies awserr.Error interface.
  6360  func (s *KmsKeyDisabledException) OrigErr() error {
  6361  	return nil
  6362  }
  6363  
  6364  func (s *KmsKeyDisabledException) Error() string {
  6365  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6366  }
  6367  
  6368  // Status code returns the HTTP status code for the request's response error.
  6369  func (s *KmsKeyDisabledException) StatusCode() int {
  6370  	return s.RespMetadata.StatusCode
  6371  }
  6372  
  6373  // RequestID returns the service's response RequestID for request.
  6374  func (s *KmsKeyDisabledException) RequestID() string {
  6375  	return s.RespMetadata.RequestID
  6376  }
  6377  
  6378  // This exception is thrown when the KMS key does not exist, when the S3 bucket
  6379  // and the KMS key are not in the same region, or when the KMS key associated
  6380  // with the Amazon SNS topic either does not exist or is not in the same region.
  6381  type KmsKeyNotFoundException struct {
  6382  	_            struct{}                  `type:"structure"`
  6383  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6384  
  6385  	Message_ *string `locationName:"message" type:"string"`
  6386  }
  6387  
  6388  // String returns the string representation.
  6389  //
  6390  // API parameter values that are decorated as "sensitive" in the API will not
  6391  // be included in the string output. The member name will be present, but the
  6392  // value will be replaced with "sensitive".
  6393  func (s KmsKeyNotFoundException) String() string {
  6394  	return awsutil.Prettify(s)
  6395  }
  6396  
  6397  // GoString returns the string representation.
  6398  //
  6399  // API parameter values that are decorated as "sensitive" in the API will not
  6400  // be included in the string output. The member name will be present, but the
  6401  // value will be replaced with "sensitive".
  6402  func (s KmsKeyNotFoundException) GoString() string {
  6403  	return s.String()
  6404  }
  6405  
  6406  func newErrorKmsKeyNotFoundException(v protocol.ResponseMetadata) error {
  6407  	return &KmsKeyNotFoundException{
  6408  		RespMetadata: v,
  6409  	}
  6410  }
  6411  
  6412  // Code returns the exception type name.
  6413  func (s *KmsKeyNotFoundException) Code() string {
  6414  	return "KmsKeyNotFoundException"
  6415  }
  6416  
  6417  // Message returns the exception's message.
  6418  func (s *KmsKeyNotFoundException) Message() string {
  6419  	if s.Message_ != nil {
  6420  		return *s.Message_
  6421  	}
  6422  	return ""
  6423  }
  6424  
  6425  // OrigErr always returns nil, satisfies awserr.Error interface.
  6426  func (s *KmsKeyNotFoundException) OrigErr() error {
  6427  	return nil
  6428  }
  6429  
  6430  func (s *KmsKeyNotFoundException) Error() string {
  6431  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6432  }
  6433  
  6434  // Status code returns the HTTP status code for the request's response error.
  6435  func (s *KmsKeyNotFoundException) StatusCode() int {
  6436  	return s.RespMetadata.StatusCode
  6437  }
  6438  
  6439  // RequestID returns the service's response RequestID for request.
  6440  func (s *KmsKeyNotFoundException) RequestID() string {
  6441  	return s.RespMetadata.RequestID
  6442  }
  6443  
  6444  // Requests the public keys for a specified time range.
  6445  type ListPublicKeysInput struct {
  6446  	_ struct{} `type:"structure"`
  6447  
  6448  	// Optionally specifies, in UTC, the end of the time range to look up public
  6449  	// keys for CloudTrail digest files. If not specified, the current time is used.
  6450  	EndTime *time.Time `type:"timestamp"`
  6451  
  6452  	// Reserved for future use.
  6453  	NextToken *string `type:"string"`
  6454  
  6455  	// Optionally specifies, in UTC, the start of the time range to look up public
  6456  	// keys for CloudTrail digest files. If not specified, the current time is used,
  6457  	// and the current public key is returned.
  6458  	StartTime *time.Time `type:"timestamp"`
  6459  }
  6460  
  6461  // String returns the string representation.
  6462  //
  6463  // API parameter values that are decorated as "sensitive" in the API will not
  6464  // be included in the string output. The member name will be present, but the
  6465  // value will be replaced with "sensitive".
  6466  func (s ListPublicKeysInput) String() string {
  6467  	return awsutil.Prettify(s)
  6468  }
  6469  
  6470  // GoString returns the string representation.
  6471  //
  6472  // API parameter values that are decorated as "sensitive" in the API will not
  6473  // be included in the string output. The member name will be present, but the
  6474  // value will be replaced with "sensitive".
  6475  func (s ListPublicKeysInput) GoString() string {
  6476  	return s.String()
  6477  }
  6478  
  6479  // SetEndTime sets the EndTime field's value.
  6480  func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput {
  6481  	s.EndTime = &v
  6482  	return s
  6483  }
  6484  
  6485  // SetNextToken sets the NextToken field's value.
  6486  func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput {
  6487  	s.NextToken = &v
  6488  	return s
  6489  }
  6490  
  6491  // SetStartTime sets the StartTime field's value.
  6492  func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput {
  6493  	s.StartTime = &v
  6494  	return s
  6495  }
  6496  
  6497  // Returns the objects or data listed below if successful. Otherwise, returns
  6498  // an error.
  6499  type ListPublicKeysOutput struct {
  6500  	_ struct{} `type:"structure"`
  6501  
  6502  	// Reserved for future use.
  6503  	NextToken *string `type:"string"`
  6504  
  6505  	// Contains an array of PublicKey objects.
  6506  	//
  6507  	// The returned public keys may have validity time ranges that overlap.
  6508  	PublicKeyList []*PublicKey `type:"list"`
  6509  }
  6510  
  6511  // String returns the string representation.
  6512  //
  6513  // API parameter values that are decorated as "sensitive" in the API will not
  6514  // be included in the string output. The member name will be present, but the
  6515  // value will be replaced with "sensitive".
  6516  func (s ListPublicKeysOutput) String() string {
  6517  	return awsutil.Prettify(s)
  6518  }
  6519  
  6520  // GoString returns the string representation.
  6521  //
  6522  // API parameter values that are decorated as "sensitive" in the API will not
  6523  // be included in the string output. The member name will be present, but the
  6524  // value will be replaced with "sensitive".
  6525  func (s ListPublicKeysOutput) GoString() string {
  6526  	return s.String()
  6527  }
  6528  
  6529  // SetNextToken sets the NextToken field's value.
  6530  func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput {
  6531  	s.NextToken = &v
  6532  	return s
  6533  }
  6534  
  6535  // SetPublicKeyList sets the PublicKeyList field's value.
  6536  func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput {
  6537  	s.PublicKeyList = v
  6538  	return s
  6539  }
  6540  
  6541  // Specifies a list of trail tags to return.
  6542  type ListTagsInput struct {
  6543  	_ struct{} `type:"structure"`
  6544  
  6545  	// Reserved for future use.
  6546  	NextToken *string `type:"string"`
  6547  
  6548  	// Specifies a list of trail ARNs whose tags will be listed. The list has a
  6549  	// limit of 20 ARNs. The following is the format of a trail ARN.
  6550  	//
  6551  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  6552  	//
  6553  	// ResourceIdList is a required field
  6554  	ResourceIdList []*string `type:"list" required:"true"`
  6555  }
  6556  
  6557  // String returns the string representation.
  6558  //
  6559  // API parameter values that are decorated as "sensitive" in the API will not
  6560  // be included in the string output. The member name will be present, but the
  6561  // value will be replaced with "sensitive".
  6562  func (s ListTagsInput) String() string {
  6563  	return awsutil.Prettify(s)
  6564  }
  6565  
  6566  // GoString returns the string representation.
  6567  //
  6568  // API parameter values that are decorated as "sensitive" in the API will not
  6569  // be included in the string output. The member name will be present, but the
  6570  // value will be replaced with "sensitive".
  6571  func (s ListTagsInput) GoString() string {
  6572  	return s.String()
  6573  }
  6574  
  6575  // Validate inspects the fields of the type to determine if they are valid.
  6576  func (s *ListTagsInput) Validate() error {
  6577  	invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  6578  	if s.ResourceIdList == nil {
  6579  		invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
  6580  	}
  6581  
  6582  	if invalidParams.Len() > 0 {
  6583  		return invalidParams
  6584  	}
  6585  	return nil
  6586  }
  6587  
  6588  // SetNextToken sets the NextToken field's value.
  6589  func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
  6590  	s.NextToken = &v
  6591  	return s
  6592  }
  6593  
  6594  // SetResourceIdList sets the ResourceIdList field's value.
  6595  func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput {
  6596  	s.ResourceIdList = v
  6597  	return s
  6598  }
  6599  
  6600  // Returns the objects or data listed below if successful. Otherwise, returns
  6601  // an error.
  6602  type ListTagsOutput struct {
  6603  	_ struct{} `type:"structure"`
  6604  
  6605  	// Reserved for future use.
  6606  	NextToken *string `type:"string"`
  6607  
  6608  	// A list of resource tags.
  6609  	ResourceTagList []*ResourceTag `type:"list"`
  6610  }
  6611  
  6612  // String returns the string representation.
  6613  //
  6614  // API parameter values that are decorated as "sensitive" in the API will not
  6615  // be included in the string output. The member name will be present, but the
  6616  // value will be replaced with "sensitive".
  6617  func (s ListTagsOutput) String() string {
  6618  	return awsutil.Prettify(s)
  6619  }
  6620  
  6621  // GoString returns the string representation.
  6622  //
  6623  // API parameter values that are decorated as "sensitive" in the API will not
  6624  // be included in the string output. The member name will be present, but the
  6625  // value will be replaced with "sensitive".
  6626  func (s ListTagsOutput) GoString() string {
  6627  	return s.String()
  6628  }
  6629  
  6630  // SetNextToken sets the NextToken field's value.
  6631  func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
  6632  	s.NextToken = &v
  6633  	return s
  6634  }
  6635  
  6636  // SetResourceTagList sets the ResourceTagList field's value.
  6637  func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput {
  6638  	s.ResourceTagList = v
  6639  	return s
  6640  }
  6641  
  6642  type ListTrailsInput struct {
  6643  	_ struct{} `type:"structure"`
  6644  
  6645  	// The token to use to get the next page of results after a previous API call.
  6646  	// This token must be passed in with the same parameters that were specified
  6647  	// in the the original call. For example, if the original call specified an
  6648  	// AttributeKey of 'Username' with a value of 'root', the call with NextToken
  6649  	// should include those same parameters.
  6650  	NextToken *string `type:"string"`
  6651  }
  6652  
  6653  // String returns the string representation.
  6654  //
  6655  // API parameter values that are decorated as "sensitive" in the API will not
  6656  // be included in the string output. The member name will be present, but the
  6657  // value will be replaced with "sensitive".
  6658  func (s ListTrailsInput) String() string {
  6659  	return awsutil.Prettify(s)
  6660  }
  6661  
  6662  // GoString returns the string representation.
  6663  //
  6664  // API parameter values that are decorated as "sensitive" in the API will not
  6665  // be included in the string output. The member name will be present, but the
  6666  // value will be replaced with "sensitive".
  6667  func (s ListTrailsInput) GoString() string {
  6668  	return s.String()
  6669  }
  6670  
  6671  // SetNextToken sets the NextToken field's value.
  6672  func (s *ListTrailsInput) SetNextToken(v string) *ListTrailsInput {
  6673  	s.NextToken = &v
  6674  	return s
  6675  }
  6676  
  6677  type ListTrailsOutput struct {
  6678  	_ struct{} `type:"structure"`
  6679  
  6680  	// The token to use to get the next page of results after a previous API call.
  6681  	// If the token does not appear, there are no more results to return. The token
  6682  	// must be passed in with the same parameters as the previous call. For example,
  6683  	// if the original call specified an AttributeKey of 'Username' with a value
  6684  	// of 'root', the call with NextToken should include those same parameters.
  6685  	NextToken *string `type:"string"`
  6686  
  6687  	// Returns the name, ARN, and home region of trails in the current account.
  6688  	Trails []*TrailInfo `type:"list"`
  6689  }
  6690  
  6691  // String returns the string representation.
  6692  //
  6693  // API parameter values that are decorated as "sensitive" in the API will not
  6694  // be included in the string output. The member name will be present, but the
  6695  // value will be replaced with "sensitive".
  6696  func (s ListTrailsOutput) String() string {
  6697  	return awsutil.Prettify(s)
  6698  }
  6699  
  6700  // GoString returns the string representation.
  6701  //
  6702  // API parameter values that are decorated as "sensitive" in the API will not
  6703  // be included in the string output. The member name will be present, but the
  6704  // value will be replaced with "sensitive".
  6705  func (s ListTrailsOutput) GoString() string {
  6706  	return s.String()
  6707  }
  6708  
  6709  // SetNextToken sets the NextToken field's value.
  6710  func (s *ListTrailsOutput) SetNextToken(v string) *ListTrailsOutput {
  6711  	s.NextToken = &v
  6712  	return s
  6713  }
  6714  
  6715  // SetTrails sets the Trails field's value.
  6716  func (s *ListTrailsOutput) SetTrails(v []*TrailInfo) *ListTrailsOutput {
  6717  	s.Trails = v
  6718  	return s
  6719  }
  6720  
  6721  // Specifies an attribute and value that filter the events returned.
  6722  type LookupAttribute struct {
  6723  	_ struct{} `type:"structure"`
  6724  
  6725  	// Specifies an attribute on which to filter the events returned.
  6726  	//
  6727  	// AttributeKey is a required field
  6728  	AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`
  6729  
  6730  	// Specifies a value for the specified AttributeKey.
  6731  	//
  6732  	// AttributeValue is a required field
  6733  	AttributeValue *string `type:"string" required:"true"`
  6734  }
  6735  
  6736  // String returns the string representation.
  6737  //
  6738  // API parameter values that are decorated as "sensitive" in the API will not
  6739  // be included in the string output. The member name will be present, but the
  6740  // value will be replaced with "sensitive".
  6741  func (s LookupAttribute) String() string {
  6742  	return awsutil.Prettify(s)
  6743  }
  6744  
  6745  // GoString returns the string representation.
  6746  //
  6747  // API parameter values that are decorated as "sensitive" in the API will not
  6748  // be included in the string output. The member name will be present, but the
  6749  // value will be replaced with "sensitive".
  6750  func (s LookupAttribute) GoString() string {
  6751  	return s.String()
  6752  }
  6753  
  6754  // Validate inspects the fields of the type to determine if they are valid.
  6755  func (s *LookupAttribute) Validate() error {
  6756  	invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
  6757  	if s.AttributeKey == nil {
  6758  		invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
  6759  	}
  6760  	if s.AttributeValue == nil {
  6761  		invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
  6762  	}
  6763  
  6764  	if invalidParams.Len() > 0 {
  6765  		return invalidParams
  6766  	}
  6767  	return nil
  6768  }
  6769  
  6770  // SetAttributeKey sets the AttributeKey field's value.
  6771  func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute {
  6772  	s.AttributeKey = &v
  6773  	return s
  6774  }
  6775  
  6776  // SetAttributeValue sets the AttributeValue field's value.
  6777  func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute {
  6778  	s.AttributeValue = &v
  6779  	return s
  6780  }
  6781  
  6782  // Contains a request for LookupEvents.
  6783  type LookupEventsInput struct {
  6784  	_ struct{} `type:"structure"`
  6785  
  6786  	// Specifies that only events that occur before or at the specified time are
  6787  	// returned. If the specified end time is before the specified start time, an
  6788  	// error is returned.
  6789  	EndTime *time.Time `type:"timestamp"`
  6790  
  6791  	// Specifies the event category. If you do not specify an event category, events
  6792  	// of the category are not returned in the response. For example, if you do
  6793  	// not specify insight as the value of EventCategory, no Insights events are
  6794  	// returned.
  6795  	EventCategory *string `type:"string" enum:"EventCategory"`
  6796  
  6797  	// Contains a list of lookup attributes. Currently the list can contain only
  6798  	// one item.
  6799  	LookupAttributes []*LookupAttribute `type:"list"`
  6800  
  6801  	// The number of events to return. Possible values are 1 through 50. The default
  6802  	// is 50.
  6803  	MaxResults *int64 `min:"1" type:"integer"`
  6804  
  6805  	// The token to use to get the next page of results after a previous API call.
  6806  	// This token must be passed in with the same parameters that were specified
  6807  	// in the the original call. For example, if the original call specified an
  6808  	// AttributeKey of 'Username' with a value of 'root', the call with NextToken
  6809  	// should include those same parameters.
  6810  	NextToken *string `type:"string"`
  6811  
  6812  	// Specifies that only events that occur after or at the specified time are
  6813  	// returned. If the specified start time is after the specified end time, an
  6814  	// error is returned.
  6815  	StartTime *time.Time `type:"timestamp"`
  6816  }
  6817  
  6818  // String returns the string representation.
  6819  //
  6820  // API parameter values that are decorated as "sensitive" in the API will not
  6821  // be included in the string output. The member name will be present, but the
  6822  // value will be replaced with "sensitive".
  6823  func (s LookupEventsInput) String() string {
  6824  	return awsutil.Prettify(s)
  6825  }
  6826  
  6827  // GoString returns the string representation.
  6828  //
  6829  // API parameter values that are decorated as "sensitive" in the API will not
  6830  // be included in the string output. The member name will be present, but the
  6831  // value will be replaced with "sensitive".
  6832  func (s LookupEventsInput) GoString() string {
  6833  	return s.String()
  6834  }
  6835  
  6836  // Validate inspects the fields of the type to determine if they are valid.
  6837  func (s *LookupEventsInput) Validate() error {
  6838  	invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
  6839  	if s.MaxResults != nil && *s.MaxResults < 1 {
  6840  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  6841  	}
  6842  	if s.LookupAttributes != nil {
  6843  		for i, v := range s.LookupAttributes {
  6844  			if v == nil {
  6845  				continue
  6846  			}
  6847  			if err := v.Validate(); err != nil {
  6848  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
  6849  			}
  6850  		}
  6851  	}
  6852  
  6853  	if invalidParams.Len() > 0 {
  6854  		return invalidParams
  6855  	}
  6856  	return nil
  6857  }
  6858  
  6859  // SetEndTime sets the EndTime field's value.
  6860  func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput {
  6861  	s.EndTime = &v
  6862  	return s
  6863  }
  6864  
  6865  // SetEventCategory sets the EventCategory field's value.
  6866  func (s *LookupEventsInput) SetEventCategory(v string) *LookupEventsInput {
  6867  	s.EventCategory = &v
  6868  	return s
  6869  }
  6870  
  6871  // SetLookupAttributes sets the LookupAttributes field's value.
  6872  func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput {
  6873  	s.LookupAttributes = v
  6874  	return s
  6875  }
  6876  
  6877  // SetMaxResults sets the MaxResults field's value.
  6878  func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput {
  6879  	s.MaxResults = &v
  6880  	return s
  6881  }
  6882  
  6883  // SetNextToken sets the NextToken field's value.
  6884  func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput {
  6885  	s.NextToken = &v
  6886  	return s
  6887  }
  6888  
  6889  // SetStartTime sets the StartTime field's value.
  6890  func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput {
  6891  	s.StartTime = &v
  6892  	return s
  6893  }
  6894  
  6895  // Contains a response to a LookupEvents action.
  6896  type LookupEventsOutput struct {
  6897  	_ struct{} `type:"structure"`
  6898  
  6899  	// A list of events returned based on the lookup attributes specified and the
  6900  	// CloudTrail event. The events list is sorted by time. The most recent event
  6901  	// is listed first.
  6902  	Events []*Event `type:"list"`
  6903  
  6904  	// The token to use to get the next page of results after a previous API call.
  6905  	// If the token does not appear, there are no more results to return. The token
  6906  	// must be passed in with the same parameters as the previous call. For example,
  6907  	// if the original call specified an AttributeKey of 'Username' with a value
  6908  	// of 'root', the call with NextToken should include those same parameters.
  6909  	NextToken *string `type:"string"`
  6910  }
  6911  
  6912  // String returns the string representation.
  6913  //
  6914  // API parameter values that are decorated as "sensitive" in the API will not
  6915  // be included in the string output. The member name will be present, but the
  6916  // value will be replaced with "sensitive".
  6917  func (s LookupEventsOutput) String() string {
  6918  	return awsutil.Prettify(s)
  6919  }
  6920  
  6921  // GoString returns the string representation.
  6922  //
  6923  // API parameter values that are decorated as "sensitive" in the API will not
  6924  // be included in the string output. The member name will be present, but the
  6925  // value will be replaced with "sensitive".
  6926  func (s LookupEventsOutput) GoString() string {
  6927  	return s.String()
  6928  }
  6929  
  6930  // SetEvents sets the Events field's value.
  6931  func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput {
  6932  	s.Events = v
  6933  	return s
  6934  }
  6935  
  6936  // SetNextToken sets the NextToken field's value.
  6937  func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput {
  6938  	s.NextToken = &v
  6939  	return s
  6940  }
  6941  
  6942  // This exception is thrown when the maximum number of trails is reached.
  6943  type MaximumNumberOfTrailsExceededException struct {
  6944  	_            struct{}                  `type:"structure"`
  6945  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  6946  
  6947  	Message_ *string `locationName:"message" type:"string"`
  6948  }
  6949  
  6950  // String returns the string representation.
  6951  //
  6952  // API parameter values that are decorated as "sensitive" in the API will not
  6953  // be included in the string output. The member name will be present, but the
  6954  // value will be replaced with "sensitive".
  6955  func (s MaximumNumberOfTrailsExceededException) String() string {
  6956  	return awsutil.Prettify(s)
  6957  }
  6958  
  6959  // GoString returns the string representation.
  6960  //
  6961  // API parameter values that are decorated as "sensitive" in the API will not
  6962  // be included in the string output. The member name will be present, but the
  6963  // value will be replaced with "sensitive".
  6964  func (s MaximumNumberOfTrailsExceededException) GoString() string {
  6965  	return s.String()
  6966  }
  6967  
  6968  func newErrorMaximumNumberOfTrailsExceededException(v protocol.ResponseMetadata) error {
  6969  	return &MaximumNumberOfTrailsExceededException{
  6970  		RespMetadata: v,
  6971  	}
  6972  }
  6973  
  6974  // Code returns the exception type name.
  6975  func (s *MaximumNumberOfTrailsExceededException) Code() string {
  6976  	return "MaximumNumberOfTrailsExceededException"
  6977  }
  6978  
  6979  // Message returns the exception's message.
  6980  func (s *MaximumNumberOfTrailsExceededException) Message() string {
  6981  	if s.Message_ != nil {
  6982  		return *s.Message_
  6983  	}
  6984  	return ""
  6985  }
  6986  
  6987  // OrigErr always returns nil, satisfies awserr.Error interface.
  6988  func (s *MaximumNumberOfTrailsExceededException) OrigErr() error {
  6989  	return nil
  6990  }
  6991  
  6992  func (s *MaximumNumberOfTrailsExceededException) Error() string {
  6993  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  6994  }
  6995  
  6996  // Status code returns the HTTP status code for the request's response error.
  6997  func (s *MaximumNumberOfTrailsExceededException) StatusCode() int {
  6998  	return s.RespMetadata.StatusCode
  6999  }
  7000  
  7001  // RequestID returns the service's response RequestID for request.
  7002  func (s *MaximumNumberOfTrailsExceededException) RequestID() string {
  7003  	return s.RespMetadata.RequestID
  7004  }
  7005  
  7006  // This exception is thrown when the Amazon Web Services account making the
  7007  // request to create or update an organization trail is not the management account
  7008  // for an organization in Organizations. For more information, see Prepare For
  7009  // Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  7010  type NotOrganizationMasterAccountException struct {
  7011  	_            struct{}                  `type:"structure"`
  7012  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7013  
  7014  	Message_ *string `locationName:"message" type:"string"`
  7015  }
  7016  
  7017  // String returns the string representation.
  7018  //
  7019  // API parameter values that are decorated as "sensitive" in the API will not
  7020  // be included in the string output. The member name will be present, but the
  7021  // value will be replaced with "sensitive".
  7022  func (s NotOrganizationMasterAccountException) String() string {
  7023  	return awsutil.Prettify(s)
  7024  }
  7025  
  7026  // GoString returns the string representation.
  7027  //
  7028  // API parameter values that are decorated as "sensitive" in the API will not
  7029  // be included in the string output. The member name will be present, but the
  7030  // value will be replaced with "sensitive".
  7031  func (s NotOrganizationMasterAccountException) GoString() string {
  7032  	return s.String()
  7033  }
  7034  
  7035  func newErrorNotOrganizationMasterAccountException(v protocol.ResponseMetadata) error {
  7036  	return &NotOrganizationMasterAccountException{
  7037  		RespMetadata: v,
  7038  	}
  7039  }
  7040  
  7041  // Code returns the exception type name.
  7042  func (s *NotOrganizationMasterAccountException) Code() string {
  7043  	return "NotOrganizationMasterAccountException"
  7044  }
  7045  
  7046  // Message returns the exception's message.
  7047  func (s *NotOrganizationMasterAccountException) Message() string {
  7048  	if s.Message_ != nil {
  7049  		return *s.Message_
  7050  	}
  7051  	return ""
  7052  }
  7053  
  7054  // OrigErr always returns nil, satisfies awserr.Error interface.
  7055  func (s *NotOrganizationMasterAccountException) OrigErr() error {
  7056  	return nil
  7057  }
  7058  
  7059  func (s *NotOrganizationMasterAccountException) Error() string {
  7060  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7061  }
  7062  
  7063  // Status code returns the HTTP status code for the request's response error.
  7064  func (s *NotOrganizationMasterAccountException) StatusCode() int {
  7065  	return s.RespMetadata.StatusCode
  7066  }
  7067  
  7068  // RequestID returns the service's response RequestID for request.
  7069  func (s *NotOrganizationMasterAccountException) RequestID() string {
  7070  	return s.RespMetadata.RequestID
  7071  }
  7072  
  7073  // This exception is thrown when the requested operation is not permitted.
  7074  type OperationNotPermittedException struct {
  7075  	_            struct{}                  `type:"structure"`
  7076  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7077  
  7078  	Message_ *string `locationName:"message" type:"string"`
  7079  }
  7080  
  7081  // String returns the string representation.
  7082  //
  7083  // API parameter values that are decorated as "sensitive" in the API will not
  7084  // be included in the string output. The member name will be present, but the
  7085  // value will be replaced with "sensitive".
  7086  func (s OperationNotPermittedException) String() string {
  7087  	return awsutil.Prettify(s)
  7088  }
  7089  
  7090  // GoString returns the string representation.
  7091  //
  7092  // API parameter values that are decorated as "sensitive" in the API will not
  7093  // be included in the string output. The member name will be present, but the
  7094  // value will be replaced with "sensitive".
  7095  func (s OperationNotPermittedException) GoString() string {
  7096  	return s.String()
  7097  }
  7098  
  7099  func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error {
  7100  	return &OperationNotPermittedException{
  7101  		RespMetadata: v,
  7102  	}
  7103  }
  7104  
  7105  // Code returns the exception type name.
  7106  func (s *OperationNotPermittedException) Code() string {
  7107  	return "OperationNotPermittedException"
  7108  }
  7109  
  7110  // Message returns the exception's message.
  7111  func (s *OperationNotPermittedException) Message() string {
  7112  	if s.Message_ != nil {
  7113  		return *s.Message_
  7114  	}
  7115  	return ""
  7116  }
  7117  
  7118  // OrigErr always returns nil, satisfies awserr.Error interface.
  7119  func (s *OperationNotPermittedException) OrigErr() error {
  7120  	return nil
  7121  }
  7122  
  7123  func (s *OperationNotPermittedException) Error() string {
  7124  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7125  }
  7126  
  7127  // Status code returns the HTTP status code for the request's response error.
  7128  func (s *OperationNotPermittedException) StatusCode() int {
  7129  	return s.RespMetadata.StatusCode
  7130  }
  7131  
  7132  // RequestID returns the service's response RequestID for request.
  7133  func (s *OperationNotPermittedException) RequestID() string {
  7134  	return s.RespMetadata.RequestID
  7135  }
  7136  
  7137  // This exception is thrown when Organizations is not configured to support
  7138  // all features. All features must be enabled in Organizations to support creating
  7139  // an organization trail. For more information, see Prepare For Creating a Trail
  7140  // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
  7141  type OrganizationNotInAllFeaturesModeException struct {
  7142  	_            struct{}                  `type:"structure"`
  7143  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7144  
  7145  	Message_ *string `locationName:"message" type:"string"`
  7146  }
  7147  
  7148  // String returns the string representation.
  7149  //
  7150  // API parameter values that are decorated as "sensitive" in the API will not
  7151  // be included in the string output. The member name will be present, but the
  7152  // value will be replaced with "sensitive".
  7153  func (s OrganizationNotInAllFeaturesModeException) String() string {
  7154  	return awsutil.Prettify(s)
  7155  }
  7156  
  7157  // GoString returns the string representation.
  7158  //
  7159  // API parameter values that are decorated as "sensitive" in the API will not
  7160  // be included in the string output. The member name will be present, but the
  7161  // value will be replaced with "sensitive".
  7162  func (s OrganizationNotInAllFeaturesModeException) GoString() string {
  7163  	return s.String()
  7164  }
  7165  
  7166  func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error {
  7167  	return &OrganizationNotInAllFeaturesModeException{
  7168  		RespMetadata: v,
  7169  	}
  7170  }
  7171  
  7172  // Code returns the exception type name.
  7173  func (s *OrganizationNotInAllFeaturesModeException) Code() string {
  7174  	return "OrganizationNotInAllFeaturesModeException"
  7175  }
  7176  
  7177  // Message returns the exception's message.
  7178  func (s *OrganizationNotInAllFeaturesModeException) Message() string {
  7179  	if s.Message_ != nil {
  7180  		return *s.Message_
  7181  	}
  7182  	return ""
  7183  }
  7184  
  7185  // OrigErr always returns nil, satisfies awserr.Error interface.
  7186  func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error {
  7187  	return nil
  7188  }
  7189  
  7190  func (s *OrganizationNotInAllFeaturesModeException) Error() string {
  7191  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7192  }
  7193  
  7194  // Status code returns the HTTP status code for the request's response error.
  7195  func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int {
  7196  	return s.RespMetadata.StatusCode
  7197  }
  7198  
  7199  // RequestID returns the service's response RequestID for request.
  7200  func (s *OrganizationNotInAllFeaturesModeException) RequestID() string {
  7201  	return s.RespMetadata.RequestID
  7202  }
  7203  
  7204  // This exception is thrown when the request is made from an Amazon Web Services
  7205  // account that is not a member of an organization. To make this request, sign
  7206  // in using the credentials of an account that belongs to an organization.
  7207  type OrganizationsNotInUseException struct {
  7208  	_            struct{}                  `type:"structure"`
  7209  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7210  
  7211  	Message_ *string `locationName:"message" type:"string"`
  7212  }
  7213  
  7214  // String returns the string representation.
  7215  //
  7216  // API parameter values that are decorated as "sensitive" in the API will not
  7217  // be included in the string output. The member name will be present, but the
  7218  // value will be replaced with "sensitive".
  7219  func (s OrganizationsNotInUseException) String() string {
  7220  	return awsutil.Prettify(s)
  7221  }
  7222  
  7223  // GoString returns the string representation.
  7224  //
  7225  // API parameter values that are decorated as "sensitive" in the API will not
  7226  // be included in the string output. The member name will be present, but the
  7227  // value will be replaced with "sensitive".
  7228  func (s OrganizationsNotInUseException) GoString() string {
  7229  	return s.String()
  7230  }
  7231  
  7232  func newErrorOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
  7233  	return &OrganizationsNotInUseException{
  7234  		RespMetadata: v,
  7235  	}
  7236  }
  7237  
  7238  // Code returns the exception type name.
  7239  func (s *OrganizationsNotInUseException) Code() string {
  7240  	return "OrganizationsNotInUseException"
  7241  }
  7242  
  7243  // Message returns the exception's message.
  7244  func (s *OrganizationsNotInUseException) Message() string {
  7245  	if s.Message_ != nil {
  7246  		return *s.Message_
  7247  	}
  7248  	return ""
  7249  }
  7250  
  7251  // OrigErr always returns nil, satisfies awserr.Error interface.
  7252  func (s *OrganizationsNotInUseException) OrigErr() error {
  7253  	return nil
  7254  }
  7255  
  7256  func (s *OrganizationsNotInUseException) Error() string {
  7257  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7258  }
  7259  
  7260  // Status code returns the HTTP status code for the request's response error.
  7261  func (s *OrganizationsNotInUseException) StatusCode() int {
  7262  	return s.RespMetadata.StatusCode
  7263  }
  7264  
  7265  // RequestID returns the service's response RequestID for request.
  7266  func (s *OrganizationsNotInUseException) RequestID() string {
  7267  	return s.RespMetadata.RequestID
  7268  }
  7269  
  7270  // Contains information about a returned public key.
  7271  type PublicKey struct {
  7272  	_ struct{} `type:"structure"`
  7273  
  7274  	// The fingerprint of the public key.
  7275  	Fingerprint *string `type:"string"`
  7276  
  7277  	// The ending time of validity of the public key.
  7278  	ValidityEndTime *time.Time `type:"timestamp"`
  7279  
  7280  	// The starting time of validity of the public key.
  7281  	ValidityStartTime *time.Time `type:"timestamp"`
  7282  
  7283  	// The DER encoded public key value in PKCS#1 format.
  7284  	// Value is automatically base64 encoded/decoded by the SDK.
  7285  	Value []byte `type:"blob"`
  7286  }
  7287  
  7288  // String returns the string representation.
  7289  //
  7290  // API parameter values that are decorated as "sensitive" in the API will not
  7291  // be included in the string output. The member name will be present, but the
  7292  // value will be replaced with "sensitive".
  7293  func (s PublicKey) String() string {
  7294  	return awsutil.Prettify(s)
  7295  }
  7296  
  7297  // GoString returns the string representation.
  7298  //
  7299  // API parameter values that are decorated as "sensitive" in the API will not
  7300  // be included in the string output. The member name will be present, but the
  7301  // value will be replaced with "sensitive".
  7302  func (s PublicKey) GoString() string {
  7303  	return s.String()
  7304  }
  7305  
  7306  // SetFingerprint sets the Fingerprint field's value.
  7307  func (s *PublicKey) SetFingerprint(v string) *PublicKey {
  7308  	s.Fingerprint = &v
  7309  	return s
  7310  }
  7311  
  7312  // SetValidityEndTime sets the ValidityEndTime field's value.
  7313  func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey {
  7314  	s.ValidityEndTime = &v
  7315  	return s
  7316  }
  7317  
  7318  // SetValidityStartTime sets the ValidityStartTime field's value.
  7319  func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey {
  7320  	s.ValidityStartTime = &v
  7321  	return s
  7322  }
  7323  
  7324  // SetValue sets the Value field's value.
  7325  func (s *PublicKey) SetValue(v []byte) *PublicKey {
  7326  	s.Value = v
  7327  	return s
  7328  }
  7329  
  7330  type PutEventSelectorsInput struct {
  7331  	_ struct{} `type:"structure"`
  7332  
  7333  	// Specifies the settings for advanced event selectors. You can add advanced
  7334  	// event selectors, and conditions for your advanced event selectors, up to
  7335  	// a maximum of 500 values for all conditions and selectors on a trail. You
  7336  	// can use either AdvancedEventSelectors or EventSelectors, but not both. If
  7337  	// you apply AdvancedEventSelectors to a trail, any existing EventSelectors
  7338  	// are overwritten. For more information about advanced event selectors, see
  7339  	// Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
  7340  	// in the CloudTrail User Guide.
  7341  	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  7342  
  7343  	// Specifies the settings for your event selectors. You can configure up to
  7344  	// five event selectors for a trail. You can use either EventSelectors or AdvancedEventSelectors
  7345  	// in a PutEventSelectors request, but not both. If you apply EventSelectors
  7346  	// to a trail, any existing AdvancedEventSelectors are overwritten.
  7347  	EventSelectors []*EventSelector `type:"list"`
  7348  
  7349  	// Specifies the name of the trail or trail ARN. If you specify a trail name,
  7350  	// the string must meet the following requirements:
  7351  	//
  7352  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  7353  	//    (_), or dashes (-)
  7354  	//
  7355  	//    * Start with a letter or number, and end with a letter or number
  7356  	//
  7357  	//    * Be between 3 and 128 characters
  7358  	//
  7359  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  7360  	//    and my--namespace are not valid.
  7361  	//
  7362  	//    * Not be in IP address format (for example, 192.168.5.4)
  7363  	//
  7364  	// If you specify a trail ARN, it must be in the following format.
  7365  	//
  7366  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  7367  	//
  7368  	// TrailName is a required field
  7369  	TrailName *string `type:"string" required:"true"`
  7370  }
  7371  
  7372  // String returns the string representation.
  7373  //
  7374  // API parameter values that are decorated as "sensitive" in the API will not
  7375  // be included in the string output. The member name will be present, but the
  7376  // value will be replaced with "sensitive".
  7377  func (s PutEventSelectorsInput) String() string {
  7378  	return awsutil.Prettify(s)
  7379  }
  7380  
  7381  // GoString returns the string representation.
  7382  //
  7383  // API parameter values that are decorated as "sensitive" in the API will not
  7384  // be included in the string output. The member name will be present, but the
  7385  // value will be replaced with "sensitive".
  7386  func (s PutEventSelectorsInput) GoString() string {
  7387  	return s.String()
  7388  }
  7389  
  7390  // Validate inspects the fields of the type to determine if they are valid.
  7391  func (s *PutEventSelectorsInput) Validate() error {
  7392  	invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
  7393  	if s.TrailName == nil {
  7394  		invalidParams.Add(request.NewErrParamRequired("TrailName"))
  7395  	}
  7396  	if s.AdvancedEventSelectors != nil {
  7397  		for i, v := range s.AdvancedEventSelectors {
  7398  			if v == nil {
  7399  				continue
  7400  			}
  7401  			if err := v.Validate(); err != nil {
  7402  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
  7403  			}
  7404  		}
  7405  	}
  7406  
  7407  	if invalidParams.Len() > 0 {
  7408  		return invalidParams
  7409  	}
  7410  	return nil
  7411  }
  7412  
  7413  // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  7414  func (s *PutEventSelectorsInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsInput {
  7415  	s.AdvancedEventSelectors = v
  7416  	return s
  7417  }
  7418  
  7419  // SetEventSelectors sets the EventSelectors field's value.
  7420  func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
  7421  	s.EventSelectors = v
  7422  	return s
  7423  }
  7424  
  7425  // SetTrailName sets the TrailName field's value.
  7426  func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput {
  7427  	s.TrailName = &v
  7428  	return s
  7429  }
  7430  
  7431  type PutEventSelectorsOutput struct {
  7432  	_ struct{} `type:"structure"`
  7433  
  7434  	// Specifies the advanced event selectors configured for your trail.
  7435  	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
  7436  
  7437  	// Specifies the event selectors configured for your trail.
  7438  	EventSelectors []*EventSelector `type:"list"`
  7439  
  7440  	// Specifies the ARN of the trail that was updated with event selectors. The
  7441  	// following is the format of a trail ARN.
  7442  	//
  7443  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  7444  	TrailARN *string `type:"string"`
  7445  }
  7446  
  7447  // String returns the string representation.
  7448  //
  7449  // API parameter values that are decorated as "sensitive" in the API will not
  7450  // be included in the string output. The member name will be present, but the
  7451  // value will be replaced with "sensitive".
  7452  func (s PutEventSelectorsOutput) String() string {
  7453  	return awsutil.Prettify(s)
  7454  }
  7455  
  7456  // GoString returns the string representation.
  7457  //
  7458  // API parameter values that are decorated as "sensitive" in the API will not
  7459  // be included in the string output. The member name will be present, but the
  7460  // value will be replaced with "sensitive".
  7461  func (s PutEventSelectorsOutput) GoString() string {
  7462  	return s.String()
  7463  }
  7464  
  7465  // SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
  7466  func (s *PutEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsOutput {
  7467  	s.AdvancedEventSelectors = v
  7468  	return s
  7469  }
  7470  
  7471  // SetEventSelectors sets the EventSelectors field's value.
  7472  func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput {
  7473  	s.EventSelectors = v
  7474  	return s
  7475  }
  7476  
  7477  // SetTrailARN sets the TrailARN field's value.
  7478  func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput {
  7479  	s.TrailARN = &v
  7480  	return s
  7481  }
  7482  
  7483  type PutInsightSelectorsInput struct {
  7484  	_ struct{} `type:"structure"`
  7485  
  7486  	// A JSON string that contains the Insights types that you want to log on a
  7487  	// trail. The valid Insights type in this release is ApiCallRateInsight.
  7488  	//
  7489  	// InsightSelectors is a required field
  7490  	InsightSelectors []*InsightSelector `type:"list" required:"true"`
  7491  
  7492  	// The name of the CloudTrail trail for which you want to change or add Insights
  7493  	// selectors.
  7494  	//
  7495  	// TrailName is a required field
  7496  	TrailName *string `type:"string" required:"true"`
  7497  }
  7498  
  7499  // String returns the string representation.
  7500  //
  7501  // API parameter values that are decorated as "sensitive" in the API will not
  7502  // be included in the string output. The member name will be present, but the
  7503  // value will be replaced with "sensitive".
  7504  func (s PutInsightSelectorsInput) String() string {
  7505  	return awsutil.Prettify(s)
  7506  }
  7507  
  7508  // GoString returns the string representation.
  7509  //
  7510  // API parameter values that are decorated as "sensitive" in the API will not
  7511  // be included in the string output. The member name will be present, but the
  7512  // value will be replaced with "sensitive".
  7513  func (s PutInsightSelectorsInput) GoString() string {
  7514  	return s.String()
  7515  }
  7516  
  7517  // Validate inspects the fields of the type to determine if they are valid.
  7518  func (s *PutInsightSelectorsInput) Validate() error {
  7519  	invalidParams := request.ErrInvalidParams{Context: "PutInsightSelectorsInput"}
  7520  	if s.InsightSelectors == nil {
  7521  		invalidParams.Add(request.NewErrParamRequired("InsightSelectors"))
  7522  	}
  7523  	if s.TrailName == nil {
  7524  		invalidParams.Add(request.NewErrParamRequired("TrailName"))
  7525  	}
  7526  
  7527  	if invalidParams.Len() > 0 {
  7528  		return invalidParams
  7529  	}
  7530  	return nil
  7531  }
  7532  
  7533  // SetInsightSelectors sets the InsightSelectors field's value.
  7534  func (s *PutInsightSelectorsInput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsInput {
  7535  	s.InsightSelectors = v
  7536  	return s
  7537  }
  7538  
  7539  // SetTrailName sets the TrailName field's value.
  7540  func (s *PutInsightSelectorsInput) SetTrailName(v string) *PutInsightSelectorsInput {
  7541  	s.TrailName = &v
  7542  	return s
  7543  }
  7544  
  7545  type PutInsightSelectorsOutput struct {
  7546  	_ struct{} `type:"structure"`
  7547  
  7548  	// A JSON string that contains the Insights event types that you want to log
  7549  	// on a trail. The valid Insights type in this release is ApiCallRateInsight.
  7550  	InsightSelectors []*InsightSelector `type:"list"`
  7551  
  7552  	// The Amazon Resource Name (ARN) of a trail for which you want to change or
  7553  	// add Insights selectors.
  7554  	TrailARN *string `type:"string"`
  7555  }
  7556  
  7557  // String returns the string representation.
  7558  //
  7559  // API parameter values that are decorated as "sensitive" in the API will not
  7560  // be included in the string output. The member name will be present, but the
  7561  // value will be replaced with "sensitive".
  7562  func (s PutInsightSelectorsOutput) String() string {
  7563  	return awsutil.Prettify(s)
  7564  }
  7565  
  7566  // GoString returns the string representation.
  7567  //
  7568  // API parameter values that are decorated as "sensitive" in the API will not
  7569  // be included in the string output. The member name will be present, but the
  7570  // value will be replaced with "sensitive".
  7571  func (s PutInsightSelectorsOutput) GoString() string {
  7572  	return s.String()
  7573  }
  7574  
  7575  // SetInsightSelectors sets the InsightSelectors field's value.
  7576  func (s *PutInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsOutput {
  7577  	s.InsightSelectors = v
  7578  	return s
  7579  }
  7580  
  7581  // SetTrailARN sets the TrailARN field's value.
  7582  func (s *PutInsightSelectorsOutput) SetTrailARN(v string) *PutInsightSelectorsOutput {
  7583  	s.TrailARN = &v
  7584  	return s
  7585  }
  7586  
  7587  // Specifies the tags to remove from a trail.
  7588  type RemoveTagsInput struct {
  7589  	_ struct{} `type:"structure"`
  7590  
  7591  	// Specifies the ARN of the trail from which tags should be removed. The format
  7592  	// of a trail ARN is:
  7593  	//
  7594  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  7595  	//
  7596  	// ResourceId is a required field
  7597  	ResourceId *string `type:"string" required:"true"`
  7598  
  7599  	// Specifies a list of tags to be removed.
  7600  	TagsList []*Tag `type:"list"`
  7601  }
  7602  
  7603  // String returns the string representation.
  7604  //
  7605  // API parameter values that are decorated as "sensitive" in the API will not
  7606  // be included in the string output. The member name will be present, but the
  7607  // value will be replaced with "sensitive".
  7608  func (s RemoveTagsInput) String() string {
  7609  	return awsutil.Prettify(s)
  7610  }
  7611  
  7612  // GoString returns the string representation.
  7613  //
  7614  // API parameter values that are decorated as "sensitive" in the API will not
  7615  // be included in the string output. The member name will be present, but the
  7616  // value will be replaced with "sensitive".
  7617  func (s RemoveTagsInput) GoString() string {
  7618  	return s.String()
  7619  }
  7620  
  7621  // Validate inspects the fields of the type to determine if they are valid.
  7622  func (s *RemoveTagsInput) Validate() error {
  7623  	invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  7624  	if s.ResourceId == nil {
  7625  		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  7626  	}
  7627  	if s.TagsList != nil {
  7628  		for i, v := range s.TagsList {
  7629  			if v == nil {
  7630  				continue
  7631  			}
  7632  			if err := v.Validate(); err != nil {
  7633  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  7634  			}
  7635  		}
  7636  	}
  7637  
  7638  	if invalidParams.Len() > 0 {
  7639  		return invalidParams
  7640  	}
  7641  	return nil
  7642  }
  7643  
  7644  // SetResourceId sets the ResourceId field's value.
  7645  func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput {
  7646  	s.ResourceId = &v
  7647  	return s
  7648  }
  7649  
  7650  // SetTagsList sets the TagsList field's value.
  7651  func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput {
  7652  	s.TagsList = v
  7653  	return s
  7654  }
  7655  
  7656  // Returns the objects or data listed below if successful. Otherwise, returns
  7657  // an error.
  7658  type RemoveTagsOutput struct {
  7659  	_ struct{} `type:"structure"`
  7660  }
  7661  
  7662  // String returns the string representation.
  7663  //
  7664  // API parameter values that are decorated as "sensitive" in the API will not
  7665  // be included in the string output. The member name will be present, but the
  7666  // value will be replaced with "sensitive".
  7667  func (s RemoveTagsOutput) String() string {
  7668  	return awsutil.Prettify(s)
  7669  }
  7670  
  7671  // GoString returns the string representation.
  7672  //
  7673  // API parameter values that are decorated as "sensitive" in the API will not
  7674  // be included in the string output. The member name will be present, but the
  7675  // value will be replaced with "sensitive".
  7676  func (s RemoveTagsOutput) GoString() string {
  7677  	return s.String()
  7678  }
  7679  
  7680  // Specifies the type and name of a resource referenced by an event.
  7681  type Resource struct {
  7682  	_ struct{} `type:"structure"`
  7683  
  7684  	// The name of the resource referenced by the event returned. These are user-created
  7685  	// names whose values will depend on the environment. For example, the resource
  7686  	// name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
  7687  	// for an EC2 Instance.
  7688  	ResourceName *string `type:"string"`
  7689  
  7690  	// The type of a resource referenced by the event returned. When the resource
  7691  	// type cannot be determined, null is returned. Some examples of resource types
  7692  	// are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and
  7693  	// AccessKey for IAM. To learn more about how to look up and filter events by
  7694  	// the resource types supported for a service, see Filtering CloudTrail Events
  7695  	// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html#filtering-cloudtrail-events).
  7696  	ResourceType *string `type:"string"`
  7697  }
  7698  
  7699  // String returns the string representation.
  7700  //
  7701  // API parameter values that are decorated as "sensitive" in the API will not
  7702  // be included in the string output. The member name will be present, but the
  7703  // value will be replaced with "sensitive".
  7704  func (s Resource) String() string {
  7705  	return awsutil.Prettify(s)
  7706  }
  7707  
  7708  // GoString returns the string representation.
  7709  //
  7710  // API parameter values that are decorated as "sensitive" in the API will not
  7711  // be included in the string output. The member name will be present, but the
  7712  // value will be replaced with "sensitive".
  7713  func (s Resource) GoString() string {
  7714  	return s.String()
  7715  }
  7716  
  7717  // SetResourceName sets the ResourceName field's value.
  7718  func (s *Resource) SetResourceName(v string) *Resource {
  7719  	s.ResourceName = &v
  7720  	return s
  7721  }
  7722  
  7723  // SetResourceType sets the ResourceType field's value.
  7724  func (s *Resource) SetResourceType(v string) *Resource {
  7725  	s.ResourceType = &v
  7726  	return s
  7727  }
  7728  
  7729  // This exception is thrown when the specified resource is not found.
  7730  type ResourceNotFoundException struct {
  7731  	_            struct{}                  `type:"structure"`
  7732  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7733  
  7734  	Message_ *string `locationName:"message" type:"string"`
  7735  }
  7736  
  7737  // String returns the string representation.
  7738  //
  7739  // API parameter values that are decorated as "sensitive" in the API will not
  7740  // be included in the string output. The member name will be present, but the
  7741  // value will be replaced with "sensitive".
  7742  func (s ResourceNotFoundException) String() string {
  7743  	return awsutil.Prettify(s)
  7744  }
  7745  
  7746  // GoString returns the string representation.
  7747  //
  7748  // API parameter values that are decorated as "sensitive" in the API will not
  7749  // be included in the string output. The member name will be present, but the
  7750  // value will be replaced with "sensitive".
  7751  func (s ResourceNotFoundException) GoString() string {
  7752  	return s.String()
  7753  }
  7754  
  7755  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  7756  	return &ResourceNotFoundException{
  7757  		RespMetadata: v,
  7758  	}
  7759  }
  7760  
  7761  // Code returns the exception type name.
  7762  func (s *ResourceNotFoundException) Code() string {
  7763  	return "ResourceNotFoundException"
  7764  }
  7765  
  7766  // Message returns the exception's message.
  7767  func (s *ResourceNotFoundException) Message() string {
  7768  	if s.Message_ != nil {
  7769  		return *s.Message_
  7770  	}
  7771  	return ""
  7772  }
  7773  
  7774  // OrigErr always returns nil, satisfies awserr.Error interface.
  7775  func (s *ResourceNotFoundException) OrigErr() error {
  7776  	return nil
  7777  }
  7778  
  7779  func (s *ResourceNotFoundException) Error() string {
  7780  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7781  }
  7782  
  7783  // Status code returns the HTTP status code for the request's response error.
  7784  func (s *ResourceNotFoundException) StatusCode() int {
  7785  	return s.RespMetadata.StatusCode
  7786  }
  7787  
  7788  // RequestID returns the service's response RequestID for request.
  7789  func (s *ResourceNotFoundException) RequestID() string {
  7790  	return s.RespMetadata.RequestID
  7791  }
  7792  
  7793  // A resource tag.
  7794  type ResourceTag struct {
  7795  	_ struct{} `type:"structure"`
  7796  
  7797  	// Specifies the ARN of the resource.
  7798  	ResourceId *string `type:"string"`
  7799  
  7800  	// A list of tags.
  7801  	TagsList []*Tag `type:"list"`
  7802  }
  7803  
  7804  // String returns the string representation.
  7805  //
  7806  // API parameter values that are decorated as "sensitive" in the API will not
  7807  // be included in the string output. The member name will be present, but the
  7808  // value will be replaced with "sensitive".
  7809  func (s ResourceTag) String() string {
  7810  	return awsutil.Prettify(s)
  7811  }
  7812  
  7813  // GoString returns the string representation.
  7814  //
  7815  // API parameter values that are decorated as "sensitive" in the API will not
  7816  // be included in the string output. The member name will be present, but the
  7817  // value will be replaced with "sensitive".
  7818  func (s ResourceTag) GoString() string {
  7819  	return s.String()
  7820  }
  7821  
  7822  // SetResourceId sets the ResourceId field's value.
  7823  func (s *ResourceTag) SetResourceId(v string) *ResourceTag {
  7824  	s.ResourceId = &v
  7825  	return s
  7826  }
  7827  
  7828  // SetTagsList sets the TagsList field's value.
  7829  func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag {
  7830  	s.TagsList = v
  7831  	return s
  7832  }
  7833  
  7834  // This exception is thrown when the specified resource type is not supported
  7835  // by CloudTrail.
  7836  type ResourceTypeNotSupportedException struct {
  7837  	_            struct{}                  `type:"structure"`
  7838  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7839  
  7840  	Message_ *string `locationName:"message" type:"string"`
  7841  }
  7842  
  7843  // String returns the string representation.
  7844  //
  7845  // API parameter values that are decorated as "sensitive" in the API will not
  7846  // be included in the string output. The member name will be present, but the
  7847  // value will be replaced with "sensitive".
  7848  func (s ResourceTypeNotSupportedException) String() string {
  7849  	return awsutil.Prettify(s)
  7850  }
  7851  
  7852  // GoString returns the string representation.
  7853  //
  7854  // API parameter values that are decorated as "sensitive" in the API will not
  7855  // be included in the string output. The member name will be present, but the
  7856  // value will be replaced with "sensitive".
  7857  func (s ResourceTypeNotSupportedException) GoString() string {
  7858  	return s.String()
  7859  }
  7860  
  7861  func newErrorResourceTypeNotSupportedException(v protocol.ResponseMetadata) error {
  7862  	return &ResourceTypeNotSupportedException{
  7863  		RespMetadata: v,
  7864  	}
  7865  }
  7866  
  7867  // Code returns the exception type name.
  7868  func (s *ResourceTypeNotSupportedException) Code() string {
  7869  	return "ResourceTypeNotSupportedException"
  7870  }
  7871  
  7872  // Message returns the exception's message.
  7873  func (s *ResourceTypeNotSupportedException) Message() string {
  7874  	if s.Message_ != nil {
  7875  		return *s.Message_
  7876  	}
  7877  	return ""
  7878  }
  7879  
  7880  // OrigErr always returns nil, satisfies awserr.Error interface.
  7881  func (s *ResourceTypeNotSupportedException) OrigErr() error {
  7882  	return nil
  7883  }
  7884  
  7885  func (s *ResourceTypeNotSupportedException) Error() string {
  7886  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7887  }
  7888  
  7889  // Status code returns the HTTP status code for the request's response error.
  7890  func (s *ResourceTypeNotSupportedException) StatusCode() int {
  7891  	return s.RespMetadata.StatusCode
  7892  }
  7893  
  7894  // RequestID returns the service's response RequestID for request.
  7895  func (s *ResourceTypeNotSupportedException) RequestID() string {
  7896  	return s.RespMetadata.RequestID
  7897  }
  7898  
  7899  // This exception is thrown when the specified S3 bucket does not exist.
  7900  type S3BucketDoesNotExistException struct {
  7901  	_            struct{}                  `type:"structure"`
  7902  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  7903  
  7904  	Message_ *string `locationName:"message" type:"string"`
  7905  }
  7906  
  7907  // String returns the string representation.
  7908  //
  7909  // API parameter values that are decorated as "sensitive" in the API will not
  7910  // be included in the string output. The member name will be present, but the
  7911  // value will be replaced with "sensitive".
  7912  func (s S3BucketDoesNotExistException) String() string {
  7913  	return awsutil.Prettify(s)
  7914  }
  7915  
  7916  // GoString returns the string representation.
  7917  //
  7918  // API parameter values that are decorated as "sensitive" in the API will not
  7919  // be included in the string output. The member name will be present, but the
  7920  // value will be replaced with "sensitive".
  7921  func (s S3BucketDoesNotExistException) GoString() string {
  7922  	return s.String()
  7923  }
  7924  
  7925  func newErrorS3BucketDoesNotExistException(v protocol.ResponseMetadata) error {
  7926  	return &S3BucketDoesNotExistException{
  7927  		RespMetadata: v,
  7928  	}
  7929  }
  7930  
  7931  // Code returns the exception type name.
  7932  func (s *S3BucketDoesNotExistException) Code() string {
  7933  	return "S3BucketDoesNotExistException"
  7934  }
  7935  
  7936  // Message returns the exception's message.
  7937  func (s *S3BucketDoesNotExistException) Message() string {
  7938  	if s.Message_ != nil {
  7939  		return *s.Message_
  7940  	}
  7941  	return ""
  7942  }
  7943  
  7944  // OrigErr always returns nil, satisfies awserr.Error interface.
  7945  func (s *S3BucketDoesNotExistException) OrigErr() error {
  7946  	return nil
  7947  }
  7948  
  7949  func (s *S3BucketDoesNotExistException) Error() string {
  7950  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  7951  }
  7952  
  7953  // Status code returns the HTTP status code for the request's response error.
  7954  func (s *S3BucketDoesNotExistException) StatusCode() int {
  7955  	return s.RespMetadata.StatusCode
  7956  }
  7957  
  7958  // RequestID returns the service's response RequestID for request.
  7959  func (s *S3BucketDoesNotExistException) RequestID() string {
  7960  	return s.RespMetadata.RequestID
  7961  }
  7962  
  7963  // The request to CloudTrail to start logging Amazon Web Services API calls
  7964  // for an account.
  7965  type StartLoggingInput struct {
  7966  	_ struct{} `type:"structure"`
  7967  
  7968  	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  7969  	// logs Amazon Web Services API calls. The following is the format of a trail
  7970  	// ARN.
  7971  	//
  7972  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  7973  	//
  7974  	// Name is a required field
  7975  	Name *string `type:"string" required:"true"`
  7976  }
  7977  
  7978  // String returns the string representation.
  7979  //
  7980  // API parameter values that are decorated as "sensitive" in the API will not
  7981  // be included in the string output. The member name will be present, but the
  7982  // value will be replaced with "sensitive".
  7983  func (s StartLoggingInput) String() string {
  7984  	return awsutil.Prettify(s)
  7985  }
  7986  
  7987  // GoString returns the string representation.
  7988  //
  7989  // API parameter values that are decorated as "sensitive" in the API will not
  7990  // be included in the string output. The member name will be present, but the
  7991  // value will be replaced with "sensitive".
  7992  func (s StartLoggingInput) GoString() string {
  7993  	return s.String()
  7994  }
  7995  
  7996  // Validate inspects the fields of the type to determine if they are valid.
  7997  func (s *StartLoggingInput) Validate() error {
  7998  	invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
  7999  	if s.Name == nil {
  8000  		invalidParams.Add(request.NewErrParamRequired("Name"))
  8001  	}
  8002  
  8003  	if invalidParams.Len() > 0 {
  8004  		return invalidParams
  8005  	}
  8006  	return nil
  8007  }
  8008  
  8009  // SetName sets the Name field's value.
  8010  func (s *StartLoggingInput) SetName(v string) *StartLoggingInput {
  8011  	s.Name = &v
  8012  	return s
  8013  }
  8014  
  8015  // Returns the objects or data listed below if successful. Otherwise, returns
  8016  // an error.
  8017  type StartLoggingOutput struct {
  8018  	_ struct{} `type:"structure"`
  8019  }
  8020  
  8021  // String returns the string representation.
  8022  //
  8023  // API parameter values that are decorated as "sensitive" in the API will not
  8024  // be included in the string output. The member name will be present, but the
  8025  // value will be replaced with "sensitive".
  8026  func (s StartLoggingOutput) String() string {
  8027  	return awsutil.Prettify(s)
  8028  }
  8029  
  8030  // GoString returns the string representation.
  8031  //
  8032  // API parameter values that are decorated as "sensitive" in the API will not
  8033  // be included in the string output. The member name will be present, but the
  8034  // value will be replaced with "sensitive".
  8035  func (s StartLoggingOutput) GoString() string {
  8036  	return s.String()
  8037  }
  8038  
  8039  // Passes the request to CloudTrail to stop logging Amazon Web Services API
  8040  // calls for the specified account.
  8041  type StopLoggingInput struct {
  8042  	_ struct{} `type:"structure"`
  8043  
  8044  	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  8045  	// will stop logging Amazon Web Services API calls. The following is the format
  8046  	// of a trail ARN.
  8047  	//
  8048  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8049  	//
  8050  	// Name is a required field
  8051  	Name *string `type:"string" required:"true"`
  8052  }
  8053  
  8054  // String returns the string representation.
  8055  //
  8056  // API parameter values that are decorated as "sensitive" in the API will not
  8057  // be included in the string output. The member name will be present, but the
  8058  // value will be replaced with "sensitive".
  8059  func (s StopLoggingInput) String() string {
  8060  	return awsutil.Prettify(s)
  8061  }
  8062  
  8063  // GoString returns the string representation.
  8064  //
  8065  // API parameter values that are decorated as "sensitive" in the API will not
  8066  // be included in the string output. The member name will be present, but the
  8067  // value will be replaced with "sensitive".
  8068  func (s StopLoggingInput) GoString() string {
  8069  	return s.String()
  8070  }
  8071  
  8072  // Validate inspects the fields of the type to determine if they are valid.
  8073  func (s *StopLoggingInput) Validate() error {
  8074  	invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
  8075  	if s.Name == nil {
  8076  		invalidParams.Add(request.NewErrParamRequired("Name"))
  8077  	}
  8078  
  8079  	if invalidParams.Len() > 0 {
  8080  		return invalidParams
  8081  	}
  8082  	return nil
  8083  }
  8084  
  8085  // SetName sets the Name field's value.
  8086  func (s *StopLoggingInput) SetName(v string) *StopLoggingInput {
  8087  	s.Name = &v
  8088  	return s
  8089  }
  8090  
  8091  // Returns the objects or data listed below if successful. Otherwise, returns
  8092  // an error.
  8093  type StopLoggingOutput struct {
  8094  	_ struct{} `type:"structure"`
  8095  }
  8096  
  8097  // String returns the string representation.
  8098  //
  8099  // API parameter values that are decorated as "sensitive" in the API will not
  8100  // be included in the string output. The member name will be present, but the
  8101  // value will be replaced with "sensitive".
  8102  func (s StopLoggingOutput) String() string {
  8103  	return awsutil.Prettify(s)
  8104  }
  8105  
  8106  // GoString returns the string representation.
  8107  //
  8108  // API parameter values that are decorated as "sensitive" in the API will not
  8109  // be included in the string output. The member name will be present, but the
  8110  // value will be replaced with "sensitive".
  8111  func (s StopLoggingOutput) GoString() string {
  8112  	return s.String()
  8113  }
  8114  
  8115  // A custom key-value pair associated with a resource such as a CloudTrail trail.
  8116  type Tag struct {
  8117  	_ struct{} `type:"structure"`
  8118  
  8119  	// The key in a key-value pair. The key must be must be no longer than 128 Unicode
  8120  	// characters. The key must be unique for the resource to which it applies.
  8121  	//
  8122  	// Key is a required field
  8123  	Key *string `type:"string" required:"true"`
  8124  
  8125  	// The value in a key-value pair of a tag. The value must be no longer than
  8126  	// 256 Unicode characters.
  8127  	Value *string `type:"string"`
  8128  }
  8129  
  8130  // String returns the string representation.
  8131  //
  8132  // API parameter values that are decorated as "sensitive" in the API will not
  8133  // be included in the string output. The member name will be present, but the
  8134  // value will be replaced with "sensitive".
  8135  func (s Tag) String() string {
  8136  	return awsutil.Prettify(s)
  8137  }
  8138  
  8139  // GoString returns the string representation.
  8140  //
  8141  // API parameter values that are decorated as "sensitive" in the API will not
  8142  // be included in the string output. The member name will be present, but the
  8143  // value will be replaced with "sensitive".
  8144  func (s Tag) GoString() string {
  8145  	return s.String()
  8146  }
  8147  
  8148  // Validate inspects the fields of the type to determine if they are valid.
  8149  func (s *Tag) Validate() error {
  8150  	invalidParams := request.ErrInvalidParams{Context: "Tag"}
  8151  	if s.Key == nil {
  8152  		invalidParams.Add(request.NewErrParamRequired("Key"))
  8153  	}
  8154  
  8155  	if invalidParams.Len() > 0 {
  8156  		return invalidParams
  8157  	}
  8158  	return nil
  8159  }
  8160  
  8161  // SetKey sets the Key field's value.
  8162  func (s *Tag) SetKey(v string) *Tag {
  8163  	s.Key = &v
  8164  	return s
  8165  }
  8166  
  8167  // SetValue sets the Value field's value.
  8168  func (s *Tag) SetValue(v string) *Tag {
  8169  	s.Value = &v
  8170  	return s
  8171  }
  8172  
  8173  // The number of tags per trail has exceeded the permitted amount. Currently,
  8174  // the limit is 50.
  8175  type TagsLimitExceededException struct {
  8176  	_            struct{}                  `type:"structure"`
  8177  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8178  
  8179  	Message_ *string `locationName:"message" type:"string"`
  8180  }
  8181  
  8182  // String returns the string representation.
  8183  //
  8184  // API parameter values that are decorated as "sensitive" in the API will not
  8185  // be included in the string output. The member name will be present, but the
  8186  // value will be replaced with "sensitive".
  8187  func (s TagsLimitExceededException) String() string {
  8188  	return awsutil.Prettify(s)
  8189  }
  8190  
  8191  // GoString returns the string representation.
  8192  //
  8193  // API parameter values that are decorated as "sensitive" in the API will not
  8194  // be included in the string output. The member name will be present, but the
  8195  // value will be replaced with "sensitive".
  8196  func (s TagsLimitExceededException) GoString() string {
  8197  	return s.String()
  8198  }
  8199  
  8200  func newErrorTagsLimitExceededException(v protocol.ResponseMetadata) error {
  8201  	return &TagsLimitExceededException{
  8202  		RespMetadata: v,
  8203  	}
  8204  }
  8205  
  8206  // Code returns the exception type name.
  8207  func (s *TagsLimitExceededException) Code() string {
  8208  	return "TagsLimitExceededException"
  8209  }
  8210  
  8211  // Message returns the exception's message.
  8212  func (s *TagsLimitExceededException) Message() string {
  8213  	if s.Message_ != nil {
  8214  		return *s.Message_
  8215  	}
  8216  	return ""
  8217  }
  8218  
  8219  // OrigErr always returns nil, satisfies awserr.Error interface.
  8220  func (s *TagsLimitExceededException) OrigErr() error {
  8221  	return nil
  8222  }
  8223  
  8224  func (s *TagsLimitExceededException) Error() string {
  8225  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8226  }
  8227  
  8228  // Status code returns the HTTP status code for the request's response error.
  8229  func (s *TagsLimitExceededException) StatusCode() int {
  8230  	return s.RespMetadata.StatusCode
  8231  }
  8232  
  8233  // RequestID returns the service's response RequestID for request.
  8234  func (s *TagsLimitExceededException) RequestID() string {
  8235  	return s.RespMetadata.RequestID
  8236  }
  8237  
  8238  // The settings for a trail.
  8239  type Trail struct {
  8240  	_ struct{} `type:"structure"`
  8241  
  8242  	// Specifies an Amazon Resource Name (ARN), a unique identifier that represents
  8243  	// the log group to which CloudTrail logs will be delivered.
  8244  	CloudWatchLogsLogGroupArn *string `type:"string"`
  8245  
  8246  	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
  8247  	// a user's log group.
  8248  	CloudWatchLogsRoleArn *string `type:"string"`
  8249  
  8250  	// Specifies if the trail has custom event selectors.
  8251  	HasCustomEventSelectors *bool `type:"boolean"`
  8252  
  8253  	// Specifies whether a trail has insight types specified in an InsightSelector
  8254  	// list.
  8255  	HasInsightSelectors *bool `type:"boolean"`
  8256  
  8257  	// The region in which the trail was created.
  8258  	HomeRegion *string `type:"string"`
  8259  
  8260  	// Set to True to include Amazon Web Services API calls from Amazon Web Services
  8261  	// global services such as IAM. Otherwise, False.
  8262  	IncludeGlobalServiceEvents *bool `type:"boolean"`
  8263  
  8264  	// Specifies whether the trail exists only in one region or exists in all regions.
  8265  	IsMultiRegionTrail *bool `type:"boolean"`
  8266  
  8267  	// Specifies whether the trail is an organization trail.
  8268  	IsOrganizationTrail *bool `type:"boolean"`
  8269  
  8270  	// Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  8271  	// The value is a fully specified ARN to a KMS key in the following format.
  8272  	//
  8273  	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  8274  	KmsKeyId *string `type:"string"`
  8275  
  8276  	// Specifies whether log file validation is enabled.
  8277  	LogFileValidationEnabled *bool `type:"boolean"`
  8278  
  8279  	// Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
  8280  	Name *string `type:"string"`
  8281  
  8282  	// Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
  8283  	// See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  8284  	S3BucketName *string `type:"string"`
  8285  
  8286  	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  8287  	// you have designated for log file delivery. For more information, see Finding
  8288  	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  8289  	// The maximum length is 200 characters.
  8290  	S3KeyPrefix *string `type:"string"`
  8291  
  8292  	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  8293  	// when log files are delivered. The following is the format of a topic ARN.
  8294  	//
  8295  	// arn:aws:sns:us-east-2:123456789012:MyTopic
  8296  	SnsTopicARN *string `type:"string"`
  8297  
  8298  	// This field is no longer in use. Use SnsTopicARN.
  8299  	//
  8300  	// Deprecated: SnsTopicName has been deprecated
  8301  	SnsTopicName *string `deprecated:"true" type:"string"`
  8302  
  8303  	// Specifies the ARN of the trail. The following is the format of a trail ARN.
  8304  	//
  8305  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8306  	TrailARN *string `type:"string"`
  8307  }
  8308  
  8309  // String returns the string representation.
  8310  //
  8311  // API parameter values that are decorated as "sensitive" in the API will not
  8312  // be included in the string output. The member name will be present, but the
  8313  // value will be replaced with "sensitive".
  8314  func (s Trail) String() string {
  8315  	return awsutil.Prettify(s)
  8316  }
  8317  
  8318  // GoString returns the string representation.
  8319  //
  8320  // API parameter values that are decorated as "sensitive" in the API will not
  8321  // be included in the string output. The member name will be present, but the
  8322  // value will be replaced with "sensitive".
  8323  func (s Trail) GoString() string {
  8324  	return s.String()
  8325  }
  8326  
  8327  // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  8328  func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail {
  8329  	s.CloudWatchLogsLogGroupArn = &v
  8330  	return s
  8331  }
  8332  
  8333  // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  8334  func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail {
  8335  	s.CloudWatchLogsRoleArn = &v
  8336  	return s
  8337  }
  8338  
  8339  // SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.
  8340  func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail {
  8341  	s.HasCustomEventSelectors = &v
  8342  	return s
  8343  }
  8344  
  8345  // SetHasInsightSelectors sets the HasInsightSelectors field's value.
  8346  func (s *Trail) SetHasInsightSelectors(v bool) *Trail {
  8347  	s.HasInsightSelectors = &v
  8348  	return s
  8349  }
  8350  
  8351  // SetHomeRegion sets the HomeRegion field's value.
  8352  func (s *Trail) SetHomeRegion(v string) *Trail {
  8353  	s.HomeRegion = &v
  8354  	return s
  8355  }
  8356  
  8357  // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  8358  func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail {
  8359  	s.IncludeGlobalServiceEvents = &v
  8360  	return s
  8361  }
  8362  
  8363  // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  8364  func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail {
  8365  	s.IsMultiRegionTrail = &v
  8366  	return s
  8367  }
  8368  
  8369  // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  8370  func (s *Trail) SetIsOrganizationTrail(v bool) *Trail {
  8371  	s.IsOrganizationTrail = &v
  8372  	return s
  8373  }
  8374  
  8375  // SetKmsKeyId sets the KmsKeyId field's value.
  8376  func (s *Trail) SetKmsKeyId(v string) *Trail {
  8377  	s.KmsKeyId = &v
  8378  	return s
  8379  }
  8380  
  8381  // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  8382  func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail {
  8383  	s.LogFileValidationEnabled = &v
  8384  	return s
  8385  }
  8386  
  8387  // SetName sets the Name field's value.
  8388  func (s *Trail) SetName(v string) *Trail {
  8389  	s.Name = &v
  8390  	return s
  8391  }
  8392  
  8393  // SetS3BucketName sets the S3BucketName field's value.
  8394  func (s *Trail) SetS3BucketName(v string) *Trail {
  8395  	s.S3BucketName = &v
  8396  	return s
  8397  }
  8398  
  8399  // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  8400  func (s *Trail) SetS3KeyPrefix(v string) *Trail {
  8401  	s.S3KeyPrefix = &v
  8402  	return s
  8403  }
  8404  
  8405  // SetSnsTopicARN sets the SnsTopicARN field's value.
  8406  func (s *Trail) SetSnsTopicARN(v string) *Trail {
  8407  	s.SnsTopicARN = &v
  8408  	return s
  8409  }
  8410  
  8411  // SetSnsTopicName sets the SnsTopicName field's value.
  8412  func (s *Trail) SetSnsTopicName(v string) *Trail {
  8413  	s.SnsTopicName = &v
  8414  	return s
  8415  }
  8416  
  8417  // SetTrailARN sets the TrailARN field's value.
  8418  func (s *Trail) SetTrailARN(v string) *Trail {
  8419  	s.TrailARN = &v
  8420  	return s
  8421  }
  8422  
  8423  // This exception is thrown when the specified trail already exists.
  8424  type TrailAlreadyExistsException struct {
  8425  	_            struct{}                  `type:"structure"`
  8426  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8427  
  8428  	Message_ *string `locationName:"message" type:"string"`
  8429  }
  8430  
  8431  // String returns the string representation.
  8432  //
  8433  // API parameter values that are decorated as "sensitive" in the API will not
  8434  // be included in the string output. The member name will be present, but the
  8435  // value will be replaced with "sensitive".
  8436  func (s TrailAlreadyExistsException) String() string {
  8437  	return awsutil.Prettify(s)
  8438  }
  8439  
  8440  // GoString returns the string representation.
  8441  //
  8442  // API parameter values that are decorated as "sensitive" in the API will not
  8443  // be included in the string output. The member name will be present, but the
  8444  // value will be replaced with "sensitive".
  8445  func (s TrailAlreadyExistsException) GoString() string {
  8446  	return s.String()
  8447  }
  8448  
  8449  func newErrorTrailAlreadyExistsException(v protocol.ResponseMetadata) error {
  8450  	return &TrailAlreadyExistsException{
  8451  		RespMetadata: v,
  8452  	}
  8453  }
  8454  
  8455  // Code returns the exception type name.
  8456  func (s *TrailAlreadyExistsException) Code() string {
  8457  	return "TrailAlreadyExistsException"
  8458  }
  8459  
  8460  // Message returns the exception's message.
  8461  func (s *TrailAlreadyExistsException) Message() string {
  8462  	if s.Message_ != nil {
  8463  		return *s.Message_
  8464  	}
  8465  	return ""
  8466  }
  8467  
  8468  // OrigErr always returns nil, satisfies awserr.Error interface.
  8469  func (s *TrailAlreadyExistsException) OrigErr() error {
  8470  	return nil
  8471  }
  8472  
  8473  func (s *TrailAlreadyExistsException) Error() string {
  8474  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8475  }
  8476  
  8477  // Status code returns the HTTP status code for the request's response error.
  8478  func (s *TrailAlreadyExistsException) StatusCode() int {
  8479  	return s.RespMetadata.StatusCode
  8480  }
  8481  
  8482  // RequestID returns the service's response RequestID for request.
  8483  func (s *TrailAlreadyExistsException) RequestID() string {
  8484  	return s.RespMetadata.RequestID
  8485  }
  8486  
  8487  // Information about a CloudTrail trail, including the trail's name, home region,
  8488  // and Amazon Resource Name (ARN).
  8489  type TrailInfo struct {
  8490  	_ struct{} `type:"structure"`
  8491  
  8492  	// The Amazon Web Services Region in which a trail was created.
  8493  	HomeRegion *string `type:"string"`
  8494  
  8495  	// The name of a trail.
  8496  	Name *string `type:"string"`
  8497  
  8498  	// The ARN of a trail.
  8499  	TrailARN *string `type:"string"`
  8500  }
  8501  
  8502  // String returns the string representation.
  8503  //
  8504  // API parameter values that are decorated as "sensitive" in the API will not
  8505  // be included in the string output. The member name will be present, but the
  8506  // value will be replaced with "sensitive".
  8507  func (s TrailInfo) String() string {
  8508  	return awsutil.Prettify(s)
  8509  }
  8510  
  8511  // GoString returns the string representation.
  8512  //
  8513  // API parameter values that are decorated as "sensitive" in the API will not
  8514  // be included in the string output. The member name will be present, but the
  8515  // value will be replaced with "sensitive".
  8516  func (s TrailInfo) GoString() string {
  8517  	return s.String()
  8518  }
  8519  
  8520  // SetHomeRegion sets the HomeRegion field's value.
  8521  func (s *TrailInfo) SetHomeRegion(v string) *TrailInfo {
  8522  	s.HomeRegion = &v
  8523  	return s
  8524  }
  8525  
  8526  // SetName sets the Name field's value.
  8527  func (s *TrailInfo) SetName(v string) *TrailInfo {
  8528  	s.Name = &v
  8529  	return s
  8530  }
  8531  
  8532  // SetTrailARN sets the TrailARN field's value.
  8533  func (s *TrailInfo) SetTrailARN(v string) *TrailInfo {
  8534  	s.TrailARN = &v
  8535  	return s
  8536  }
  8537  
  8538  // This exception is thrown when the trail with the given name is not found.
  8539  type TrailNotFoundException struct {
  8540  	_            struct{}                  `type:"structure"`
  8541  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8542  
  8543  	Message_ *string `locationName:"message" type:"string"`
  8544  }
  8545  
  8546  // String returns the string representation.
  8547  //
  8548  // API parameter values that are decorated as "sensitive" in the API will not
  8549  // be included in the string output. The member name will be present, but the
  8550  // value will be replaced with "sensitive".
  8551  func (s TrailNotFoundException) String() string {
  8552  	return awsutil.Prettify(s)
  8553  }
  8554  
  8555  // GoString returns the string representation.
  8556  //
  8557  // API parameter values that are decorated as "sensitive" in the API will not
  8558  // be included in the string output. The member name will be present, but the
  8559  // value will be replaced with "sensitive".
  8560  func (s TrailNotFoundException) GoString() string {
  8561  	return s.String()
  8562  }
  8563  
  8564  func newErrorTrailNotFoundException(v protocol.ResponseMetadata) error {
  8565  	return &TrailNotFoundException{
  8566  		RespMetadata: v,
  8567  	}
  8568  }
  8569  
  8570  // Code returns the exception type name.
  8571  func (s *TrailNotFoundException) Code() string {
  8572  	return "TrailNotFoundException"
  8573  }
  8574  
  8575  // Message returns the exception's message.
  8576  func (s *TrailNotFoundException) Message() string {
  8577  	if s.Message_ != nil {
  8578  		return *s.Message_
  8579  	}
  8580  	return ""
  8581  }
  8582  
  8583  // OrigErr always returns nil, satisfies awserr.Error interface.
  8584  func (s *TrailNotFoundException) OrigErr() error {
  8585  	return nil
  8586  }
  8587  
  8588  func (s *TrailNotFoundException) Error() string {
  8589  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8590  }
  8591  
  8592  // Status code returns the HTTP status code for the request's response error.
  8593  func (s *TrailNotFoundException) StatusCode() int {
  8594  	return s.RespMetadata.StatusCode
  8595  }
  8596  
  8597  // RequestID returns the service's response RequestID for request.
  8598  func (s *TrailNotFoundException) RequestID() string {
  8599  	return s.RespMetadata.RequestID
  8600  }
  8601  
  8602  // This exception is no longer in use.
  8603  type TrailNotProvidedException struct {
  8604  	_            struct{}                  `type:"structure"`
  8605  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8606  
  8607  	Message_ *string `locationName:"message" type:"string"`
  8608  }
  8609  
  8610  // String returns the string representation.
  8611  //
  8612  // API parameter values that are decorated as "sensitive" in the API will not
  8613  // be included in the string output. The member name will be present, but the
  8614  // value will be replaced with "sensitive".
  8615  func (s TrailNotProvidedException) String() string {
  8616  	return awsutil.Prettify(s)
  8617  }
  8618  
  8619  // GoString returns the string representation.
  8620  //
  8621  // API parameter values that are decorated as "sensitive" in the API will not
  8622  // be included in the string output. The member name will be present, but the
  8623  // value will be replaced with "sensitive".
  8624  func (s TrailNotProvidedException) GoString() string {
  8625  	return s.String()
  8626  }
  8627  
  8628  func newErrorTrailNotProvidedException(v protocol.ResponseMetadata) error {
  8629  	return &TrailNotProvidedException{
  8630  		RespMetadata: v,
  8631  	}
  8632  }
  8633  
  8634  // Code returns the exception type name.
  8635  func (s *TrailNotProvidedException) Code() string {
  8636  	return "TrailNotProvidedException"
  8637  }
  8638  
  8639  // Message returns the exception's message.
  8640  func (s *TrailNotProvidedException) Message() string {
  8641  	if s.Message_ != nil {
  8642  		return *s.Message_
  8643  	}
  8644  	return ""
  8645  }
  8646  
  8647  // OrigErr always returns nil, satisfies awserr.Error interface.
  8648  func (s *TrailNotProvidedException) OrigErr() error {
  8649  	return nil
  8650  }
  8651  
  8652  func (s *TrailNotProvidedException) Error() string {
  8653  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8654  }
  8655  
  8656  // Status code returns the HTTP status code for the request's response error.
  8657  func (s *TrailNotProvidedException) StatusCode() int {
  8658  	return s.RespMetadata.StatusCode
  8659  }
  8660  
  8661  // RequestID returns the service's response RequestID for request.
  8662  func (s *TrailNotProvidedException) RequestID() string {
  8663  	return s.RespMetadata.RequestID
  8664  }
  8665  
  8666  // This exception is thrown when the requested operation is not supported.
  8667  type UnsupportedOperationException struct {
  8668  	_            struct{}                  `type:"structure"`
  8669  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  8670  
  8671  	Message_ *string `locationName:"message" type:"string"`
  8672  }
  8673  
  8674  // String returns the string representation.
  8675  //
  8676  // API parameter values that are decorated as "sensitive" in the API will not
  8677  // be included in the string output. The member name will be present, but the
  8678  // value will be replaced with "sensitive".
  8679  func (s UnsupportedOperationException) String() string {
  8680  	return awsutil.Prettify(s)
  8681  }
  8682  
  8683  // GoString returns the string representation.
  8684  //
  8685  // API parameter values that are decorated as "sensitive" in the API will not
  8686  // be included in the string output. The member name will be present, but the
  8687  // value will be replaced with "sensitive".
  8688  func (s UnsupportedOperationException) GoString() string {
  8689  	return s.String()
  8690  }
  8691  
  8692  func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error {
  8693  	return &UnsupportedOperationException{
  8694  		RespMetadata: v,
  8695  	}
  8696  }
  8697  
  8698  // Code returns the exception type name.
  8699  func (s *UnsupportedOperationException) Code() string {
  8700  	return "UnsupportedOperationException"
  8701  }
  8702  
  8703  // Message returns the exception's message.
  8704  func (s *UnsupportedOperationException) Message() string {
  8705  	if s.Message_ != nil {
  8706  		return *s.Message_
  8707  	}
  8708  	return ""
  8709  }
  8710  
  8711  // OrigErr always returns nil, satisfies awserr.Error interface.
  8712  func (s *UnsupportedOperationException) OrigErr() error {
  8713  	return nil
  8714  }
  8715  
  8716  func (s *UnsupportedOperationException) Error() string {
  8717  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  8718  }
  8719  
  8720  // Status code returns the HTTP status code for the request's response error.
  8721  func (s *UnsupportedOperationException) StatusCode() int {
  8722  	return s.RespMetadata.StatusCode
  8723  }
  8724  
  8725  // RequestID returns the service's response RequestID for request.
  8726  func (s *UnsupportedOperationException) RequestID() string {
  8727  	return s.RespMetadata.RequestID
  8728  }
  8729  
  8730  // Specifies settings to update for the trail.
  8731  type UpdateTrailInput struct {
  8732  	_ struct{} `type:"structure"`
  8733  
  8734  	// Specifies a log group name using an Amazon Resource Name (ARN), a unique
  8735  	// identifier that represents the log group to which CloudTrail logs are delivered.
  8736  	// Not required unless you specify CloudWatchLogsRoleArn.
  8737  	CloudWatchLogsLogGroupArn *string `type:"string"`
  8738  
  8739  	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
  8740  	// a user's log group.
  8741  	CloudWatchLogsRoleArn *string `type:"string"`
  8742  
  8743  	// Specifies whether log file validation is enabled. The default is false.
  8744  	//
  8745  	// When you disable log file integrity validation, the chain of digest files
  8746  	// is broken after one hour. CloudTrail does not create digest files for log
  8747  	// files that were delivered during a period in which log file integrity validation
  8748  	// was disabled. For example, if you enable log file integrity validation at
  8749  	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
  8750  	// on January 10, digest files will not be created for the log files delivered
  8751  	// from noon on January 2 to noon on January 10. The same applies whenever you
  8752  	// stop CloudTrail logging or delete a trail.
  8753  	EnableLogFileValidation *bool `type:"boolean"`
  8754  
  8755  	// Specifies whether the trail is publishing events from global services such
  8756  	// as IAM to the log files.
  8757  	IncludeGlobalServiceEvents *bool `type:"boolean"`
  8758  
  8759  	// Specifies whether the trail applies only to the current region or to all
  8760  	// regions. The default is false. If the trail exists only in the current region
  8761  	// and this value is set to true, shadow trails (replications of the trail)
  8762  	// will be created in the other regions. If the trail exists in all regions
  8763  	// and this value is set to false, the trail will remain in the region where
  8764  	// it was created, and its shadow trails in other regions will be deleted. As
  8765  	// a best practice, consider using trails that log events in all regions.
  8766  	IsMultiRegionTrail *bool `type:"boolean"`
  8767  
  8768  	// Specifies whether the trail is applied to all accounts in an organization
  8769  	// in Organizations, or only for the current Amazon Web Services account. The
  8770  	// default is false, and cannot be true unless the call is made on behalf of
  8771  	// an Amazon Web Services account that is the management account for an organization
  8772  	// in Organizations. If the trail is not an organization trail and this is set
  8773  	// to true, the trail will be created in all Amazon Web Services accounts that
  8774  	// belong to the organization. If the trail is an organization trail and this
  8775  	// is set to false, the trail will remain in the current Amazon Web Services
  8776  	// account but be deleted from all member accounts in the organization.
  8777  	IsOrganizationTrail *bool `type:"boolean"`
  8778  
  8779  	// Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  8780  	// The value can be an alias name prefixed by "alias/", a fully specified ARN
  8781  	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
  8782  	//
  8783  	// CloudTrail also supports KMS multi-Region keys. For more information about
  8784  	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
  8785  	// in the Key Management Service Developer Guide.
  8786  	//
  8787  	// Examples:
  8788  	//
  8789  	//    * alias/MyAliasName
  8790  	//
  8791  	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
  8792  	//
  8793  	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  8794  	//
  8795  	//    * 12345678-1234-1234-1234-123456789012
  8796  	KmsKeyId *string `type:"string"`
  8797  
  8798  	// Specifies the name of the trail or trail ARN. If Name is a trail name, the
  8799  	// string must meet the following requirements:
  8800  	//
  8801  	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  8802  	//    (_), or dashes (-)
  8803  	//
  8804  	//    * Start with a letter or number, and end with a letter or number
  8805  	//
  8806  	//    * Be between 3 and 128 characters
  8807  	//
  8808  	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
  8809  	//    and my--namespace are not valid.
  8810  	//
  8811  	//    * Not be in IP address format (for example, 192.168.5.4)
  8812  	//
  8813  	// If Name is a trail ARN, it must be in the following format.
  8814  	//
  8815  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8816  	//
  8817  	// Name is a required field
  8818  	Name *string `type:"string" required:"true"`
  8819  
  8820  	// Specifies the name of the Amazon S3 bucket designated for publishing log
  8821  	// files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  8822  	S3BucketName *string `type:"string"`
  8823  
  8824  	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  8825  	// you have designated for log file delivery. For more information, see Finding
  8826  	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  8827  	// The maximum length is 200 characters.
  8828  	S3KeyPrefix *string `type:"string"`
  8829  
  8830  	// Specifies the name of the Amazon SNS topic defined for notification of log
  8831  	// file delivery. The maximum length is 256 characters.
  8832  	SnsTopicName *string `type:"string"`
  8833  }
  8834  
  8835  // String returns the string representation.
  8836  //
  8837  // API parameter values that are decorated as "sensitive" in the API will not
  8838  // be included in the string output. The member name will be present, but the
  8839  // value will be replaced with "sensitive".
  8840  func (s UpdateTrailInput) String() string {
  8841  	return awsutil.Prettify(s)
  8842  }
  8843  
  8844  // GoString returns the string representation.
  8845  //
  8846  // API parameter values that are decorated as "sensitive" in the API will not
  8847  // be included in the string output. The member name will be present, but the
  8848  // value will be replaced with "sensitive".
  8849  func (s UpdateTrailInput) GoString() string {
  8850  	return s.String()
  8851  }
  8852  
  8853  // Validate inspects the fields of the type to determine if they are valid.
  8854  func (s *UpdateTrailInput) Validate() error {
  8855  	invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
  8856  	if s.Name == nil {
  8857  		invalidParams.Add(request.NewErrParamRequired("Name"))
  8858  	}
  8859  
  8860  	if invalidParams.Len() > 0 {
  8861  		return invalidParams
  8862  	}
  8863  	return nil
  8864  }
  8865  
  8866  // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  8867  func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput {
  8868  	s.CloudWatchLogsLogGroupArn = &v
  8869  	return s
  8870  }
  8871  
  8872  // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  8873  func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput {
  8874  	s.CloudWatchLogsRoleArn = &v
  8875  	return s
  8876  }
  8877  
  8878  // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
  8879  func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput {
  8880  	s.EnableLogFileValidation = &v
  8881  	return s
  8882  }
  8883  
  8884  // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  8885  func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput {
  8886  	s.IncludeGlobalServiceEvents = &v
  8887  	return s
  8888  }
  8889  
  8890  // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  8891  func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput {
  8892  	s.IsMultiRegionTrail = &v
  8893  	return s
  8894  }
  8895  
  8896  // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  8897  func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput {
  8898  	s.IsOrganizationTrail = &v
  8899  	return s
  8900  }
  8901  
  8902  // SetKmsKeyId sets the KmsKeyId field's value.
  8903  func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput {
  8904  	s.KmsKeyId = &v
  8905  	return s
  8906  }
  8907  
  8908  // SetName sets the Name field's value.
  8909  func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput {
  8910  	s.Name = &v
  8911  	return s
  8912  }
  8913  
  8914  // SetS3BucketName sets the S3BucketName field's value.
  8915  func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput {
  8916  	s.S3BucketName = &v
  8917  	return s
  8918  }
  8919  
  8920  // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  8921  func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput {
  8922  	s.S3KeyPrefix = &v
  8923  	return s
  8924  }
  8925  
  8926  // SetSnsTopicName sets the SnsTopicName field's value.
  8927  func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput {
  8928  	s.SnsTopicName = &v
  8929  	return s
  8930  }
  8931  
  8932  // Returns the objects or data listed below if successful. Otherwise, returns
  8933  // an error.
  8934  type UpdateTrailOutput struct {
  8935  	_ struct{} `type:"structure"`
  8936  
  8937  	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  8938  	// logs are delivered.
  8939  	CloudWatchLogsLogGroupArn *string `type:"string"`
  8940  
  8941  	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
  8942  	// a user's log group.
  8943  	CloudWatchLogsRoleArn *string `type:"string"`
  8944  
  8945  	// Specifies whether the trail is publishing events from global services such
  8946  	// as IAM to the log files.
  8947  	IncludeGlobalServiceEvents *bool `type:"boolean"`
  8948  
  8949  	// Specifies whether the trail exists in one region or in all regions.
  8950  	IsMultiRegionTrail *bool `type:"boolean"`
  8951  
  8952  	// Specifies whether the trail is an organization trail.
  8953  	IsOrganizationTrail *bool `type:"boolean"`
  8954  
  8955  	// Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  8956  	// The value is a fully specified ARN to a KMS key in the following format.
  8957  	//
  8958  	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
  8959  	KmsKeyId *string `type:"string"`
  8960  
  8961  	// Specifies whether log file integrity validation is enabled.
  8962  	LogFileValidationEnabled *bool `type:"boolean"`
  8963  
  8964  	// Specifies the name of the trail.
  8965  	Name *string `type:"string"`
  8966  
  8967  	// Specifies the name of the Amazon S3 bucket designated for publishing log
  8968  	// files.
  8969  	S3BucketName *string `type:"string"`
  8970  
  8971  	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
  8972  	// you have designated for log file delivery. For more information, see Finding
  8973  	// Your IAM Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  8974  	S3KeyPrefix *string `type:"string"`
  8975  
  8976  	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  8977  	// when log files are delivered. The following is the format of a topic ARN.
  8978  	//
  8979  	// arn:aws:sns:us-east-2:123456789012:MyTopic
  8980  	SnsTopicARN *string `type:"string"`
  8981  
  8982  	// This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
  8983  	//
  8984  	// Deprecated: SnsTopicName has been deprecated
  8985  	SnsTopicName *string `deprecated:"true" type:"string"`
  8986  
  8987  	// Specifies the ARN of the trail that was updated. The following is the format
  8988  	// of a trail ARN.
  8989  	//
  8990  	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
  8991  	TrailARN *string `type:"string"`
  8992  }
  8993  
  8994  // String returns the string representation.
  8995  //
  8996  // API parameter values that are decorated as "sensitive" in the API will not
  8997  // be included in the string output. The member name will be present, but the
  8998  // value will be replaced with "sensitive".
  8999  func (s UpdateTrailOutput) String() string {
  9000  	return awsutil.Prettify(s)
  9001  }
  9002  
  9003  // GoString returns the string representation.
  9004  //
  9005  // API parameter values that are decorated as "sensitive" in the API will not
  9006  // be included in the string output. The member name will be present, but the
  9007  // value will be replaced with "sensitive".
  9008  func (s UpdateTrailOutput) GoString() string {
  9009  	return s.String()
  9010  }
  9011  
  9012  // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
  9013  func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput {
  9014  	s.CloudWatchLogsLogGroupArn = &v
  9015  	return s
  9016  }
  9017  
  9018  // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
  9019  func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput {
  9020  	s.CloudWatchLogsRoleArn = &v
  9021  	return s
  9022  }
  9023  
  9024  // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
  9025  func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput {
  9026  	s.IncludeGlobalServiceEvents = &v
  9027  	return s
  9028  }
  9029  
  9030  // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
  9031  func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput {
  9032  	s.IsMultiRegionTrail = &v
  9033  	return s
  9034  }
  9035  
  9036  // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
  9037  func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput {
  9038  	s.IsOrganizationTrail = &v
  9039  	return s
  9040  }
  9041  
  9042  // SetKmsKeyId sets the KmsKeyId field's value.
  9043  func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput {
  9044  	s.KmsKeyId = &v
  9045  	return s
  9046  }
  9047  
  9048  // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
  9049  func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput {
  9050  	s.LogFileValidationEnabled = &v
  9051  	return s
  9052  }
  9053  
  9054  // SetName sets the Name field's value.
  9055  func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput {
  9056  	s.Name = &v
  9057  	return s
  9058  }
  9059  
  9060  // SetS3BucketName sets the S3BucketName field's value.
  9061  func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput {
  9062  	s.S3BucketName = &v
  9063  	return s
  9064  }
  9065  
  9066  // SetS3KeyPrefix sets the S3KeyPrefix field's value.
  9067  func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput {
  9068  	s.S3KeyPrefix = &v
  9069  	return s
  9070  }
  9071  
  9072  // SetSnsTopicARN sets the SnsTopicARN field's value.
  9073  func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput {
  9074  	s.SnsTopicARN = &v
  9075  	return s
  9076  }
  9077  
  9078  // SetSnsTopicName sets the SnsTopicName field's value.
  9079  func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput {
  9080  	s.SnsTopicName = &v
  9081  	return s
  9082  }
  9083  
  9084  // SetTrailARN sets the TrailARN field's value.
  9085  func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput {
  9086  	s.TrailARN = &v
  9087  	return s
  9088  }
  9089  
  9090  const (
  9091  	// EventCategoryInsight is a EventCategory enum value
  9092  	EventCategoryInsight = "insight"
  9093  )
  9094  
  9095  // EventCategory_Values returns all elements of the EventCategory enum
  9096  func EventCategory_Values() []string {
  9097  	return []string{
  9098  		EventCategoryInsight,
  9099  	}
  9100  }
  9101  
  9102  const (
  9103  	// InsightTypeApiCallRateInsight is a InsightType enum value
  9104  	InsightTypeApiCallRateInsight = "ApiCallRateInsight"
  9105  )
  9106  
  9107  // InsightType_Values returns all elements of the InsightType enum
  9108  func InsightType_Values() []string {
  9109  	return []string{
  9110  		InsightTypeApiCallRateInsight,
  9111  	}
  9112  }
  9113  
  9114  const (
  9115  	// LookupAttributeKeyEventId is a LookupAttributeKey enum value
  9116  	LookupAttributeKeyEventId = "EventId"
  9117  
  9118  	// LookupAttributeKeyEventName is a LookupAttributeKey enum value
  9119  	LookupAttributeKeyEventName = "EventName"
  9120  
  9121  	// LookupAttributeKeyReadOnly is a LookupAttributeKey enum value
  9122  	LookupAttributeKeyReadOnly = "ReadOnly"
  9123  
  9124  	// LookupAttributeKeyUsername is a LookupAttributeKey enum value
  9125  	LookupAttributeKeyUsername = "Username"
  9126  
  9127  	// LookupAttributeKeyResourceType is a LookupAttributeKey enum value
  9128  	LookupAttributeKeyResourceType = "ResourceType"
  9129  
  9130  	// LookupAttributeKeyResourceName is a LookupAttributeKey enum value
  9131  	LookupAttributeKeyResourceName = "ResourceName"
  9132  
  9133  	// LookupAttributeKeyEventSource is a LookupAttributeKey enum value
  9134  	LookupAttributeKeyEventSource = "EventSource"
  9135  
  9136  	// LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value
  9137  	LookupAttributeKeyAccessKeyId = "AccessKeyId"
  9138  )
  9139  
  9140  // LookupAttributeKey_Values returns all elements of the LookupAttributeKey enum
  9141  func LookupAttributeKey_Values() []string {
  9142  	return []string{
  9143  		LookupAttributeKeyEventId,
  9144  		LookupAttributeKeyEventName,
  9145  		LookupAttributeKeyReadOnly,
  9146  		LookupAttributeKeyUsername,
  9147  		LookupAttributeKeyResourceType,
  9148  		LookupAttributeKeyResourceName,
  9149  		LookupAttributeKeyEventSource,
  9150  		LookupAttributeKeyAccessKeyId,
  9151  	}
  9152  }
  9153  
  9154  const (
  9155  	// ReadWriteTypeReadOnly is a ReadWriteType enum value
  9156  	ReadWriteTypeReadOnly = "ReadOnly"
  9157  
  9158  	// ReadWriteTypeWriteOnly is a ReadWriteType enum value
  9159  	ReadWriteTypeWriteOnly = "WriteOnly"
  9160  
  9161  	// ReadWriteTypeAll is a ReadWriteType enum value
  9162  	ReadWriteTypeAll = "All"
  9163  )
  9164  
  9165  // ReadWriteType_Values returns all elements of the ReadWriteType enum
  9166  func ReadWriteType_Values() []string {
  9167  	return []string{
  9168  		ReadWriteTypeReadOnly,
  9169  		ReadWriteTypeWriteOnly,
  9170  		ReadWriteTypeAll,
  9171  	}
  9172  }