pub struct Client { /* private fields */ }
Expand description
Client for Amazon Detective
Client for invoking operations on Amazon Detective. Each operation on Amazon Detective is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_detective::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_detective::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AcceptInvitation
operation has
a Client::accept_invitation
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.accept_invitation()
.graph_arn("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn accept_invitation(&self) -> AcceptInvitationFluentBuilder
pub fn accept_invitation(&self) -> AcceptInvitationFluentBuilder
Constructs a fluent builder for the AcceptInvitation
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph that the member account is accepting the invitation for.
The member account status in the behavior graph must be
INVITED
.
- On success, responds with
AcceptInvitationOutput
- On failure, responds with
SdkError<AcceptInvitationError>
Source§impl Client
impl Client
Sourcepub fn batch_get_graph_member_datasources(
&self,
) -> BatchGetGraphMemberDatasourcesFluentBuilder
pub fn batch_get_graph_member_datasources( &self, ) -> BatchGetGraphMemberDatasourcesFluentBuilder
Constructs a fluent builder for the BatchGetGraphMemberDatasources
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph.
account_ids(impl Into<String>)
/set_account_ids(Option<Vec::<String>>)
:
required: trueThe list of Amazon Web Services accounts to get data source package information on.
- On success, responds with
BatchGetGraphMemberDatasourcesOutput
with field(s):member_datasources(Option<Vec::<MembershipDatasources>>)
:Details on the status of data source packages for members of the behavior graph.
unprocessed_accounts(Option<Vec::<UnprocessedAccount>>)
:Accounts that data source package information could not be retrieved for.
- On failure, responds with
SdkError<BatchGetGraphMemberDatasourcesError>
Source§impl Client
impl Client
Sourcepub fn batch_get_membership_datasources(
&self,
) -> BatchGetMembershipDatasourcesFluentBuilder
pub fn batch_get_membership_datasources( &self, ) -> BatchGetMembershipDatasourcesFluentBuilder
Constructs a fluent builder for the BatchGetMembershipDatasources
operation.
- The fluent builder is configurable:
graph_arns(impl Into<String>)
/set_graph_arns(Option<Vec::<String>>)
:
required: trueThe ARN of the behavior graph.
- On success, responds with
BatchGetMembershipDatasourcesOutput
with field(s):membership_datasources(Option<Vec::<MembershipDatasources>>)
:Details on the data source package history for an member of the behavior graph.
unprocessed_graphs(Option<Vec::<UnprocessedGraph>>)
:Graphs that data source package information could not be retrieved for.
- On failure, responds with
SdkError<BatchGetMembershipDatasourcesError>
Source§impl Client
impl Client
Sourcepub fn create_graph(&self) -> CreateGraphFluentBuilder
pub fn create_graph(&self) -> CreateGraphFluentBuilder
Constructs a fluent builder for the CreateGraph
operation.
- The fluent builder is configurable:
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to assign to the new behavior graph. You can add up to 50 tags. For each tag, you provide the tag key and the tag value. Each tag key can contain up to 128 characters. Each tag value can contain up to 256 characters.
- On success, responds with
CreateGraphOutput
with field(s):graph_arn(Option<String>)
:The ARN of the new behavior graph.
- On failure, responds with
SdkError<CreateGraphError>
Source§impl Client
impl Client
Sourcepub fn create_members(&self) -> CreateMembersFluentBuilder
pub fn create_members(&self) -> CreateMembersFluentBuilder
Constructs a fluent builder for the CreateMembers
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph.
message(impl Into<String>)
/set_message(Option<String>)
:
required: falseCustomized message text to include in the invitation email message to the invited member accounts.
disable_email_notification(bool)
/set_disable_email_notification(Option<bool>)
:
required: falseif set to
true
, then the invited accounts do not receive email notifications. By default, this is set tofalse
, and the invited accounts receive email notifications.Organization accounts in the organization behavior graph do not receive email notifications.
accounts(Account)
/set_accounts(Option<Vec::<Account>>)
:
required: trueThe list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.
- On success, responds with
CreateMembersOutput
with field(s):members(Option<Vec::<MemberDetail>>)
:The set of member account invitation or enablement requests that Detective was able to process. This includes accounts that are being verified, that failed verification, and that passed verification and are being sent an invitation or are being enabled.
unprocessed_accounts(Option<Vec::<UnprocessedAccount>>)
:The list of accounts for which Detective was unable to process the invitation or enablement request. For each account, the list provides the reason why the request could not be processed. The list includes accounts that are already member accounts in the behavior graph.
- On failure, responds with
SdkError<CreateMembersError>
Source§impl Client
impl Client
Sourcepub fn delete_graph(&self) -> DeleteGraphFluentBuilder
pub fn delete_graph(&self) -> DeleteGraphFluentBuilder
Constructs a fluent builder for the DeleteGraph
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to disable.
- On success, responds with
DeleteGraphOutput
- On failure, responds with
SdkError<DeleteGraphError>
Source§impl Client
impl Client
Sourcepub fn delete_members(&self) -> DeleteMembersFluentBuilder
pub fn delete_members(&self) -> DeleteMembersFluentBuilder
Constructs a fluent builder for the DeleteMembers
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to remove members from.
account_ids(impl Into<String>)
/set_account_ids(Option<Vec::<String>>)
:
required: trueThe list of Amazon Web Services account identifiers for the member accounts to remove from the behavior graph. You can remove up to 50 member accounts at a time.
- On success, responds with
DeleteMembersOutput
with field(s):account_ids(Option<Vec::<String>>)
:The list of Amazon Web Services account identifiers for the member accounts that Detective successfully removed from the behavior graph.
unprocessed_accounts(Option<Vec::<UnprocessedAccount>>)
:The list of member accounts that Detective was not able to remove from the behavior graph. For each member account, provides the reason that the deletion could not be processed.
- On failure, responds with
SdkError<DeleteMembersError>
Source§impl Client
impl Client
Sourcepub fn describe_organization_configuration(
&self,
) -> DescribeOrganizationConfigurationFluentBuilder
pub fn describe_organization_configuration( &self, ) -> DescribeOrganizationConfigurationFluentBuilder
Constructs a fluent builder for the DescribeOrganizationConfiguration
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the organization behavior graph.
- On success, responds with
DescribeOrganizationConfigurationOutput
with field(s):auto_enable(bool)
:Indicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.
- On failure, responds with
SdkError<DescribeOrganizationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn disable_organization_admin_account(
&self,
) -> DisableOrganizationAdminAccountFluentBuilder
pub fn disable_organization_admin_account( &self, ) -> DisableOrganizationAdminAccountFluentBuilder
Constructs a fluent builder for the DisableOrganizationAdminAccount
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DisableOrganizationAdminAccountOutput
- On failure, responds with
SdkError<DisableOrganizationAdminAccountError>
Source§impl Client
impl Client
Sourcepub fn disassociate_membership(&self) -> DisassociateMembershipFluentBuilder
pub fn disassociate_membership(&self) -> DisassociateMembershipFluentBuilder
Constructs a fluent builder for the DisassociateMembership
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to remove the member account from.
The member account’s member status in the behavior graph must be
ENABLED
.
- On success, responds with
DisassociateMembershipOutput
- On failure, responds with
SdkError<DisassociateMembershipError>
Source§impl Client
impl Client
Sourcepub fn enable_organization_admin_account(
&self,
) -> EnableOrganizationAdminAccountFluentBuilder
pub fn enable_organization_admin_account( &self, ) -> EnableOrganizationAdminAccountFluentBuilder
Constructs a fluent builder for the EnableOrganizationAdminAccount
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe Amazon Web Services account identifier of the account to designate as the Detective administrator account for the organization.
- On success, responds with
EnableOrganizationAdminAccountOutput
- On failure, responds with
SdkError<EnableOrganizationAdminAccountError>
Source§impl Client
impl Client
Sourcepub fn get_investigation(&self) -> GetInvestigationFluentBuilder
pub fn get_investigation(&self) -> GetInvestigationFluentBuilder
Constructs a fluent builder for the GetInvestigation
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the behavior graph.
investigation_id(impl Into<String>)
/set_investigation_id(Option<String>)
:
required: trueThe investigation ID of the investigation report.
- On success, responds with
GetInvestigationOutput
with field(s):graph_arn(Option<String>)
:The Amazon Resource Name (ARN) of the behavior graph.
investigation_id(Option<String>)
:The investigation ID of the investigation report.
entity_arn(Option<String>)
:The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.
entity_type(Option<EntityType>)
:Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.
created_time(Option<DateTime>)
:The creation time of the investigation report in UTC time stamp format.
scope_start_time(Option<DateTime>)
:The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example,
2021-08-18T16:35:56.284Z
.scope_end_time(Option<DateTime>)
:The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example,
2021-08-18T16:35:56.284Z
.status(Option<Status>)
:The status based on the completion status of the investigation.
severity(Option<Severity>)
:The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.
state(Option<State>)
:The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.
- On failure, responds with
SdkError<GetInvestigationError>
Source§impl Client
impl Client
Sourcepub fn get_members(&self) -> GetMembersFluentBuilder
pub fn get_members(&self) -> GetMembersFluentBuilder
Constructs a fluent builder for the GetMembers
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph for which to request the member details.
account_ids(impl Into<String>)
/set_account_ids(Option<Vec::<String>>)
:
required: trueThe list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.
You cannot use
GetMembers
to retrieve information about member accounts that were removed from the behavior graph.
- On success, responds with
GetMembersOutput
with field(s):member_details(Option<Vec::<MemberDetail>>)
:The member account details that Detective is returning in response to the request.
unprocessed_accounts(Option<Vec::<UnprocessedAccount>>)
:The requested member accounts for which Detective was unable to return member details.
For each account, provides the reason why the request could not be processed.
- On failure, responds with
SdkError<GetMembersError>
Source§impl Client
impl Client
Sourcepub fn list_datasource_packages(&self) -> ListDatasourcePackagesFluentBuilder
pub fn list_datasource_packages(&self) -> ListDatasourcePackagesFluentBuilder
Constructs a fluent builder for the ListDatasourcePackages
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFor requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return.
- On success, responds with
ListDatasourcePackagesOutput
with field(s):datasource_packages(Option<HashMap::<DatasourcePackage, DatasourcePackageIngestDetail>>)
:Details on the data source packages active in the behavior graph.
next_token(Option<String>)
:For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
- On failure, responds with
SdkError<ListDatasourcePackagesError>
Source§impl Client
impl Client
Sourcepub fn list_graphs(&self) -> ListGraphsFluentBuilder
pub fn list_graphs(&self) -> ListGraphsFluentBuilder
Constructs a fluent builder for the ListGraphs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFor requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of graphs to return at a time. The total must be less than the overall limit on the number of results to return, which is currently 200.
- On success, responds with
ListGraphsOutput
with field(s):graph_list(Option<Vec::<Graph>>)
:A list of behavior graphs that the account is an administrator account for.
next_token(Option<String>)
:If there are more behavior graphs remaining in the results, then this is the pagination token to use to request the next page of behavior graphs.
- On failure, responds with
SdkError<ListGraphsError>
Source§impl Client
impl Client
Sourcepub fn list_indicators(&self) -> ListIndicatorsFluentBuilder
pub fn list_indicators(&self) -> ListIndicatorsFluentBuilder
Constructs a fluent builder for the ListIndicators
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the behavior graph.
investigation_id(impl Into<String>)
/set_investigation_id(Option<String>)
:
required: trueThe investigation ID of the investigation report.
indicator_type(IndicatorType)
/set_indicator_type(Option<IndicatorType>)
:
required: falseFor the list of indicators of compromise that are generated by Detective investigations, see Detective investigations.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseLists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.
Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLists the maximum number of indicators in a page.
- On success, responds with
ListIndicatorsOutput
with field(s):graph_arn(Option<String>)
:The Amazon Resource Name (ARN) of the behavior graph.
investigation_id(Option<String>)
:The investigation ID of the investigation report.
next_token(Option<String>)
:Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.
Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.
indicators(Option<Vec::<Indicator>>)
:Lists the indicators of compromise.
- On failure, responds with
SdkError<ListIndicatorsError>
Source§impl Client
impl Client
Sourcepub fn list_investigations(&self) -> ListInvestigationsFluentBuilder
pub fn list_investigations(&self) -> ListInvestigationsFluentBuilder
Constructs a fluent builder for the ListInvestigations
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the behavior graph.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseLists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.
Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLists the maximum number of investigations in a page.
filter_criteria(FilterCriteria)
/set_filter_criteria(Option<FilterCriteria>)
:
required: falseFilters the investigation results based on a criteria.
sort_criteria(SortCriteria)
/set_sort_criteria(Option<SortCriteria>)
:
required: falseSorts the investigation results based on a criteria.
- On success, responds with
ListInvestigationsOutput
with field(s):investigation_details(Option<Vec::<InvestigationDetail>>)
:Lists the summary of uncommon behavior or malicious activity which indicates a compromise.
next_token(Option<String>)
:Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.
Each pagination token expires after 24 hours.
- On failure, responds with
SdkError<ListInvestigationsError>
Source§impl Client
impl Client
Sourcepub fn list_invitations(&self) -> ListInvitationsFluentBuilder
pub fn list_invitations(&self) -> ListInvitationsFluentBuilder
Constructs a fluent builder for the ListInvitations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFor requests to retrieve the next page of results, the pagination token that was returned with the previous page of results. The initial request does not include a pagination token.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of behavior graph invitations to return in the response. The total must be less than the overall limit on the number of results to return, which is currently 200.
- On success, responds with
ListInvitationsOutput
with field(s):invitations(Option<Vec::<MemberDetail>>)
:The list of behavior graphs for which the member account has open or accepted invitations.
next_token(Option<String>)
:If there are more behavior graphs remaining in the results, then this is the pagination token to use to request the next page of behavior graphs.
- On failure, responds with
SdkError<ListInvitationsError>
Source§impl Client
impl Client
Sourcepub fn list_members(&self) -> ListMembersFluentBuilder
pub fn list_members(&self) -> ListMembersFluentBuilder
Constructs a fluent builder for the ListMembers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph for which to retrieve the list of member accounts.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFor requests to retrieve the next page of member account results, the pagination token that was returned with the previous page of results. The initial request does not include a pagination token.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of member accounts to include in the response. The total must be less than the overall limit on the number of results to return, which is currently 200.
- On success, responds with
ListMembersOutput
with field(s):member_details(Option<Vec::<MemberDetail>>)
:The list of member accounts in the behavior graph.
For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.
For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.
next_token(Option<String>)
:If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.
- On failure, responds with
SdkError<ListMembersError>
Source§impl Client
impl Client
Sourcepub fn list_organization_admin_accounts(
&self,
) -> ListOrganizationAdminAccountsFluentBuilder
pub fn list_organization_admin_accounts( &self, ) -> ListOrganizationAdminAccountsFluentBuilder
Constructs a fluent builder for the ListOrganizationAdminAccounts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseFor requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return.
- On success, responds with
ListOrganizationAdminAccountsOutput
with field(s):administrators(Option<Vec::<Administrator>>)
:The list of Detective administrator accounts.
next_token(Option<String>)
:If there are more accounts remaining in the results, then this is the pagination token to use to request the next page of accounts.
- On failure, responds with
SdkError<ListOrganizationAdminAccountsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the behavior graph for which to retrieve the tag values.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The tag values that are assigned to the behavior graph. The request returns up to 50 tag values.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn reject_invitation(&self) -> RejectInvitationFluentBuilder
pub fn reject_invitation(&self) -> RejectInvitationFluentBuilder
Constructs a fluent builder for the RejectInvitation
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to reject the invitation to.
The member account’s current member status in the behavior graph must be
INVITED
.
- On success, responds with
RejectInvitationOutput
- On failure, responds with
SdkError<RejectInvitationError>
Source§impl Client
impl Client
Sourcepub fn start_investigation(&self) -> StartInvestigationFluentBuilder
pub fn start_investigation(&self) -> StartInvestigationFluentBuilder
Constructs a fluent builder for the StartInvestigation
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the behavior graph.
entity_arn(impl Into<String>)
/set_entity_arn(Option<String>)
:
required: trueThe unique Amazon Resource Name (ARN) of the IAM user and IAM role.
scope_start_time(DateTime)
/set_scope_start_time(Option<DateTime>)
:
required: trueThe data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example,
2021-08-18T16:35:56.284Z
.scope_end_time(DateTime)
/set_scope_end_time(Option<DateTime>)
:
required: trueThe data and time when the investigation ended. The value is an UTC ISO8601 formatted string. For example,
2021-08-18T16:35:56.284Z
.
- On success, responds with
StartInvestigationOutput
with field(s):investigation_id(Option<String>)
:The investigation ID of the investigation report.
- On failure, responds with
SdkError<StartInvestigationError>
Source§impl Client
impl Client
Sourcepub fn start_monitoring_member(&self) -> StartMonitoringMemberFluentBuilder
pub fn start_monitoring_member(&self) -> StartMonitoringMemberFluentBuilder
Constructs a fluent builder for the StartMonitoringMember
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph.
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe account ID of the member account to try to enable.
The account must be an invited member account with a status of
ACCEPTED_BUT_DISABLED
.
- On success, responds with
StartMonitoringMemberOutput
- On failure, responds with
SdkError<StartMonitoringMemberError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to assign the tags to.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe tags to assign to the behavior graph. You can add up to 50 tags. For each tag, you provide the tag key and the tag value. Each tag key can contain up to 128 characters. Each tag value can contain up to 256 characters.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the behavior graph to remove the tags from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe tag keys of the tags to remove from the behavior graph. You can remove up to 50 tags at a time.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_datasource_packages(
&self,
) -> UpdateDatasourcePackagesFluentBuilder
pub fn update_datasource_packages( &self, ) -> UpdateDatasourcePackagesFluentBuilder
Constructs a fluent builder for the UpdateDatasourcePackages
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the behavior graph.
datasource_packages(DatasourcePackage)
/set_datasource_packages(Option<Vec::<DatasourcePackage>>)
:
required: trueThe data source package start for the behavior graph.
- On success, responds with
UpdateDatasourcePackagesOutput
- On failure, responds with
SdkError<UpdateDatasourcePackagesError>
Source§impl Client
impl Client
Sourcepub fn update_investigation_state(
&self,
) -> UpdateInvestigationStateFluentBuilder
pub fn update_investigation_state( &self, ) -> UpdateInvestigationStateFluentBuilder
Constructs a fluent builder for the UpdateInvestigationState
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the behavior graph.
investigation_id(impl Into<String>)
/set_investigation_id(Option<String>)
:
required: trueThe investigation ID of the investigation report.
state(State)
/set_state(Option<State>)
:
required: trueThe current state of the investigation. An archived investigation indicates you have completed reviewing the investigation.
- On success, responds with
UpdateInvestigationStateOutput
- On failure, responds with
SdkError<UpdateInvestigationStateError>
Source§impl Client
impl Client
Sourcepub fn update_organization_configuration(
&self,
) -> UpdateOrganizationConfigurationFluentBuilder
pub fn update_organization_configuration( &self, ) -> UpdateOrganizationConfigurationFluentBuilder
Constructs a fluent builder for the UpdateOrganizationConfiguration
operation.
- The fluent builder is configurable:
graph_arn(impl Into<String>)
/set_graph_arn(Option<String>)
:
required: trueThe ARN of the organization behavior graph.
auto_enable(bool)
/set_auto_enable(Option<bool>)
:
required: falseIndicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.
- On success, responds with
UpdateOrganizationConfigurationOutput
- On failure, responds with
SdkError<UpdateOrganizationConfigurationError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);