amazonka-cloudtrail-2.0: Amazon CloudTrail SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudTrail.GetTrailStatus

Description

Returns a JSON-formatted list of information about the specified trail. Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop logging times for each trail. This operation returns trail status from a single region. To return trail status from all regions, you must call the operation on each region.

Synopsis

Creating a Request

data GetTrailStatus Source #

The name of a trail about which you want the current status.

See: newGetTrailStatus smart constructor.

Constructors

GetTrailStatus' 

Fields

  • name :: Text

    Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another region), you must specify its ARN. The following is the format of a trail ARN.

    arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

Instances

Instances details
ToJSON GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

ToHeaders GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

ToPath GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

ToQuery GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

AWSRequest GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Associated Types

type AWSResponse GetTrailStatus #

Generic GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Associated Types

type Rep GetTrailStatus :: Type -> Type #

Read GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Show GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

NFData GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Methods

rnf :: GetTrailStatus -> () #

Eq GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Hashable GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

type AWSResponse GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

type Rep GetTrailStatus Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

type Rep GetTrailStatus = D1 ('MetaData "GetTrailStatus" "Amazonka.CloudTrail.GetTrailStatus" "amazonka-cloudtrail-2.0-6vmpMB1YeZzDIMmexWGsF3" 'False) (C1 ('MetaCons "GetTrailStatus'" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newGetTrailStatus Source #

Create a value of GetTrailStatus with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

GetTrailStatus, getTrailStatus_name - Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another region), you must specify its ARN. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

Request Lenses

getTrailStatus_name :: Lens' GetTrailStatus Text Source #

Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another region), you must specify its ARN. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

Destructuring the Response

data GetTrailStatusResponse Source #

Returns the objects or data listed below if successful. Otherwise, returns an error.

See: newGetTrailStatusResponse smart constructor.

Constructors

GetTrailStatusResponse' 

Fields

Instances

Instances details
Generic GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Associated Types

type Rep GetTrailStatusResponse :: Type -> Type #

Read GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Show GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

NFData GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

Methods

rnf :: GetTrailStatusResponse -> () #

Eq GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

type Rep GetTrailStatusResponse Source # 
Instance details

Defined in Amazonka.CloudTrail.GetTrailStatus

type Rep GetTrailStatusResponse = D1 ('MetaData "GetTrailStatusResponse" "Amazonka.CloudTrail.GetTrailStatus" "amazonka-cloudtrail-2.0-6vmpMB1YeZzDIMmexWGsF3" 'False) (C1 ('MetaCons "GetTrailStatusResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "isLogging") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "latestCloudWatchLogsDeliveryError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "latestCloudWatchLogsDeliveryTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "latestDeliveryAttemptSucceeded") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "latestDeliveryAttemptTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "latestDeliveryError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "latestDeliveryTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "latestDigestDeliveryError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "latestDigestDeliveryTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))))) :*: (((S1 ('MetaSel ('Just "latestNotificationAttemptSucceeded") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "latestNotificationAttemptTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "latestNotificationError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "latestNotificationTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: ((S1 ('MetaSel ('Just "startLoggingTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "stopLoggingTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX))) :*: (S1 ('MetaSel ('Just "timeLoggingStarted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "timeLoggingStopped") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))))

newGetTrailStatusResponse Source #

Create a value of GetTrailStatusResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:isLogging:GetTrailStatusResponse', getTrailStatusResponse_isLogging - Whether the CloudTrail trail is currently logging Amazon Web Services API calls.

$sel:latestCloudWatchLogsDeliveryError:GetTrailStatusResponse', getTrailStatusResponse_latestCloudWatchLogsDeliveryError - Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

$sel:latestCloudWatchLogsDeliveryTime:GetTrailStatusResponse', getTrailStatusResponse_latestCloudWatchLogsDeliveryTime - Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

$sel:latestDeliveryAttemptSucceeded:GetTrailStatusResponse', getTrailStatusResponse_latestDeliveryAttemptSucceeded - This field is no longer in use.

$sel:latestDeliveryAttemptTime:GetTrailStatusResponse', getTrailStatusResponse_latestDeliveryAttemptTime - This field is no longer in use.

$sel:latestDeliveryError:GetTrailStatusResponse', getTrailStatusResponse_latestDeliveryError - Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

$sel:latestDeliveryTime:GetTrailStatusResponse', getTrailStatusResponse_latestDeliveryTime - Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

$sel:latestDigestDeliveryError:GetTrailStatusResponse', getTrailStatusResponse_latestDigestDeliveryError - Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

$sel:latestDigestDeliveryTime:GetTrailStatusResponse', getTrailStatusResponse_latestDigestDeliveryTime - Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket.

$sel:latestNotificationAttemptSucceeded:GetTrailStatusResponse', getTrailStatusResponse_latestNotificationAttemptSucceeded - This field is no longer in use.

$sel:latestNotificationAttemptTime:GetTrailStatusResponse', getTrailStatusResponse_latestNotificationAttemptTime - This field is no longer in use.

$sel:latestNotificationError:GetTrailStatusResponse', getTrailStatusResponse_latestNotificationError - Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

$sel:latestNotificationTime:GetTrailStatusResponse', getTrailStatusResponse_latestNotificationTime - Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

$sel:startLoggingTime:GetTrailStatusResponse', getTrailStatusResponse_startLoggingTime - Specifies the most recent date and time when CloudTrail started recording API calls for an Amazon Web Services account.

$sel:stopLoggingTime:GetTrailStatusResponse', getTrailStatusResponse_stopLoggingTime - Specifies the most recent date and time when CloudTrail stopped recording API calls for an Amazon Web Services account.

$sel:timeLoggingStarted:GetTrailStatusResponse', getTrailStatusResponse_timeLoggingStarted - This field is no longer in use.

$sel:timeLoggingStopped:GetTrailStatusResponse', getTrailStatusResponse_timeLoggingStopped - This field is no longer in use.

$sel:httpStatus:GetTrailStatusResponse', getTrailStatusResponse_httpStatus - The response's http status code.

Response Lenses

getTrailStatusResponse_isLogging :: Lens' GetTrailStatusResponse (Maybe Bool) Source #

Whether the CloudTrail trail is currently logging Amazon Web Services API calls.

getTrailStatusResponse_latestCloudWatchLogsDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.

getTrailStatusResponse_latestCloudWatchLogsDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.

getTrailStatusResponse_latestDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

getTrailStatusResponse_latestDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.

getTrailStatusResponse_latestDigestDeliveryError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.

This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, create a new bucket, and then call UpdateTrail to specify the new bucket; or fix the existing objects so that CloudTrail can again write to the bucket.

getTrailStatusResponse_latestDigestDeliveryTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket.

getTrailStatusResponse_latestNotificationError :: Lens' GetTrailStatusResponse (Maybe Text) Source #

Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.

getTrailStatusResponse_latestNotificationTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.

getTrailStatusResponse_startLoggingTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the most recent date and time when CloudTrail started recording API calls for an Amazon Web Services account.

getTrailStatusResponse_stopLoggingTime :: Lens' GetTrailStatusResponse (Maybe UTCTime) Source #

Specifies the most recent date and time when CloudTrail stopped recording API calls for an Amazon Web Services account.