Struct aws_sdk_detective::Client
source · 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 that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
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 call()
function that returns an async future that
returns a result, as illustrated below:
let result = client.accept_invitation()
.graph_arn("example")
.call()
.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>)
:The 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>)
:The ARN of the behavior graph.
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The 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(Vec<String>)
/set_graph_arns(Option<Vec<String>>)
:The 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(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The 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>)
:The ARN of the behavior graph.
message(impl Into<String>)
/set_message(Option<String>)
:Customized message text to include in the invitation email message to the invited member accounts.
disable_email_notification(bool)
/set_disable_email_notification(bool)
:if 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(Vec<Account>)
/set_accounts(Option<Vec<Account>>)
:The 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>)
:The 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>)
:The ARN of the behavior graph to remove members from.
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The 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>)
:The 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>)
:The 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>)
:The 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_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>)
:The ARN of the behavior graph for which to request the member details.
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The 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>)
:The ARN of the behavior graph.
next_token(impl Into<String>)
/set_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.
max_results(i32)
/set_max_results(Option<i32>)
:The 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>)
: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.
max_results(i32)
/set_max_results(Option<i32>)
:The 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_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>)
:For 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>)
:The 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>)
:The ARN of the behavior graph for which to retrieve the list of member accounts.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:For 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>)
:The 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>)
: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.
max_results(i32)
/set_max_results(Option<i32>)
:The 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>)
:The 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>)
:The 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_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>)
:The ARN of the behavior graph.
account_id(impl Into<String>)
/set_account_id(Option<String>)
:The 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>)
:The ARN of the behavior graph to assign the tags to.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The 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>)
:The ARN of the behavior graph to remove the tags from.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The 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>)
:The ARN of the behavior graph.
datasource_packages(Vec<DatasourcePackage>)
/set_datasource_packages(Option<Vec<DatasourcePackage>>)
:The 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_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>)
:The ARN of the organization behavior graph.
auto_enable(bool)
/set_auto_enable(bool)
:Indicates 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 with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config( client: Client<DynConnector, DynMiddleware<DynConnector>>, conf: Config ) -> Self
Creates a client with the given service configuration.
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.
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 if the
conf
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
conf
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it.