Module Values.CreateImportTaskResponseSource

Starts an import from a data source to CloudWatch Log and creates a managed log group as the destination for the imported data. Currently, CloudTrail Event Data Store is the only supported data source. The import task must satisfy the following constraints: The specified source must be in an ACTIVE state. The API caller must have permissions to access the data in the provided source and to perform iam:PassRole on the provided import role which has the same permissions, as described below. The provided IAM role must trust the "cloudtrail.amazonaws.com" principal and have the following permissions: cloudtrail:GetEventDataStoreData logs:CreateLogGroup logs:CreateLogStream logs:PutResourcePolicy (If source has an associated Amazon Web Services KMS Key) kms:Decrypt (If source has an associated Amazon Web Services KMS Key) kms:GenerateDataKey Example IAM policy for provided import role: [ { "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::123456789012:role/apiCallerCredentials", "Condition": { "StringLike": { "iam:AssociatedResourceARN": "arn:aws:logs:us-east-1:123456789012:log-group:aws/cloudtrail/f1d45bff-d0e3-4868-b5d9-2eb678aa32fb:*" } } }, { "Effect": "Allow", "Action": [ "cloudtrail:GetEventDataStoreData" ], "Resource": [ "arn:aws:cloudtrail:us-east-1:123456789012:eventdatastore/f1d45bff-d0e3-4868-b5d9-2eb678aa32fb" ] }, { "Effect": "Allow", "Action": [ "logs:CreateImportTask", "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutResourcePolicy" ], "Resource": [ "arn:aws:logs:us-east-1:123456789012:log-group:/aws/cloudtrail/*" ] }, { "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": [ "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012" ] } ] If the import source has a customer managed key, the "cloudtrail.amazonaws.com" principal needs permissions to perform kms:Decrypt and kms:GenerateDataKey. There can be no more than 3 active imports per account at a given time. The startEventTime must be less than or equal to endEventTime. The data being imported must be within the specified source's retention period.

Sourcetype nonrec t = {
  1. importId : ImportId.t option;
    (*

    A unique identifier for the import task.

    *)
  2. importDestinationArn : Arn.t option;
    (*

    The ARN of the CloudWatch Logs log group created as the destination for the imported events.

    *)
  3. creationTime : Timestamp.t option;
    (*

    The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

    *)
}
Sourcetype nonrec error = [
  1. | `AccessDeniedException of AccessDeniedException.t
  2. | `ConflictException of ConflictException.t
  3. | `InvalidOperationException of InvalidOperationException.t
  4. | `InvalidParameterException of InvalidParameterException.t
  5. | `ResourceNotFoundException of ResourceNotFoundException.t
  6. | `ThrottlingException of ThrottlingException.t
  7. | `ValidationException of ValidationException.t
  8. | `Unknown_operation_error of string * string option
]
Sourceval make : ?importId:??? -> ?importDestinationArn:??? -> ?creationTime:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `AccessDeniedException of unit | `ConflictException of unit | `InvalidOperationException of unit | `InvalidParameterException of unit | `ResourceNotFoundException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option | `ValidationException of unit ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `AccessDeniedException of unit | `ConflictException of unit | `InvalidOperationException of unit | `InvalidParameterException of unit | `ResourceNotFoundException of unit | `ThrottlingException of unit | `Unknown_operation_error of string * string option | `ValidationException of unit ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `Long of Timestamp.t | `String of ImportId.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t