pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description

Client for AWS CloudTrail

Client for invoking operations on AWS CloudTrail. Each operation on AWS CloudTrail is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_cloudtrail::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::RetryConfig;
    let shared_config = aws_config::load_from_env().await;
    let config = aws_sdk_cloudtrail::config::Builder::from(&shared_config)
        .retry_config(RetryConfig::disabled())
        .build();
    let client = aws_sdk_cloudtrail::Client::from_conf(config);

Implementations

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the AddTags operation.

Constructs a fluent builder for the CancelQuery operation.

Constructs a fluent builder for the CreateEventDataStore operation.

Constructs a fluent builder for the CreateTrail operation.

Constructs a fluent builder for the DeleteEventDataStore operation.

Constructs a fluent builder for the DeleteTrail operation.

Constructs a fluent builder for the DescribeQuery operation.

Constructs a fluent builder for the DescribeTrails operation.

  • The fluent builder is configurable:
    • trail_name_list(Vec<String>) / set_trail_name_list(Option<Vec<String>>):

      Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:

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

      If an empty list is specified, information for the trail in the current region is returned.

      • If an empty list is specified and IncludeShadowTrails is false, then information for all trails in the current region is returned.

      • If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current region and any associated shadow trails in other regions is returned.

      If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current region. To return information about a trail in another region, you must specify its trail ARN.

    • include_shadow_trails(bool) / set_include_shadow_trails(Option<bool>):

      Specifies whether to include shadow trails in the response. A shadow trail is the replication in a region of a trail that was created in a different region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and region replication trails will not be returned. The default is true.

  • On success, responds with DescribeTrailsOutput with field(s):
    • trail_list(Option<Vec<Trail>>):

      The list of trail objects. Trail objects with string values are only returned if values for the objects exist in a trail’s configuration. For example, SNSTopicName and SNSTopicARN are only returned in results if a trail is configured to send SNS notifications. Similarly, KMSKeyId only appears in results if a trail’s log files are encrypted with KMS customer managed keys.

  • On failure, responds with SdkError<DescribeTrailsError>

Constructs a fluent builder for the GetEventDataStore operation.

Constructs a fluent builder for the GetEventSelectors operation.

Constructs a fluent builder for the GetInsightSelectors operation.

  • The fluent builder is configurable:
    • trail_name(impl Into<String>) / set_trail_name(Option<String>):

      Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

      • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)

      • Start with a letter or number, and end with a letter or number

      • Be between 3 and 128 characters

      • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my–namespace are not valid.

      • Not be in IP address format (for example, 192.168.5.4)

      If you specify a trail ARN, it must be in the format:

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

  • On success, responds with GetInsightSelectorsOutput with field(s):
  • On failure, responds with SdkError<GetInsightSelectorsError>

Constructs a fluent builder for the GetQueryResults operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetTrail operation.

Constructs a fluent builder for the GetTrailStatus operation.

Constructs a fluent builder for the ListEventDataStores operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListPublicKeys operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListQueries operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTags operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTrails operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • next_token(impl Into<String>) / set_next_token(Option<String>):

      The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the the original call. For example, if the original call specified an AttributeKey of ‘Username’ with a value of ‘root’, the call with NextToken should include those same parameters.

  • On success, responds with ListTrailsOutput with field(s):
    • trails(Option<Vec<TrailInfo>>):

      Returns the name, ARN, and home region of trails in the current account.

    • next_token(Option<String>):

      The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of ‘Username’ with a value of ‘root’, the call with NextToken should include those same parameters.

  • On failure, responds with SdkError<ListTrailsError>

Constructs a fluent builder for the LookupEvents operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the PutEventSelectors operation.

Constructs a fluent builder for the PutInsightSelectors operation.

Constructs a fluent builder for the RemoveTags operation.

Constructs a fluent builder for the RestoreEventDataStore operation.

Constructs a fluent builder for the StartLogging operation.

Constructs a fluent builder for the StartQuery operation.

Constructs a fluent builder for the StopLogging operation.

Constructs a fluent builder for the UpdateEventDataStore operation.

Constructs a fluent builder for the UpdateTrail operation.

Creates a client with the given service config and connector override.

Creates a new client from a shared config.

Creates a new client from the service Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more