Struct aws_sdk_inspector2::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for Inspector2
Client for invoking operations on Inspector2. Each operation on Inspector2 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_inspector2::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_inspector2::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_inspector2::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the AssociateMember
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:The Amazon Web Services account ID of the member account to be associated.
- On success, responds with
AssociateMemberOutput
with field(s):account_id(Option<String>)
:The Amazon Web Services account ID of the successfully associated member account.
- On failure, responds with
SdkError<AssociateMemberError>
Constructs a fluent builder for the BatchGetAccountStatus
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The 12-digit Amazon Web Services account IDs of the accounts to retrieve Amazon Inspector status for.
- On success, responds with
BatchGetAccountStatusOutput
with field(s):accounts(Option<Vec<AccountState>>)
:An array of objects that provide details on the status of Amazon Inspector for each of the requested accounts.
failed_accounts(Option<Vec<FailedAccount>>)
:An array of objects detailing any accounts that failed to enable Amazon Inspector and why.
- On failure, responds with
SdkError<BatchGetAccountStatusError>
Constructs a fluent builder for the BatchGetFreeTrialInfo
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The account IDs to get free trial status for.
- On success, responds with
BatchGetFreeTrialInfoOutput
with field(s):accounts(Option<Vec<FreeTrialAccountInfo>>)
:An array of objects that provide Amazon Inspector free trial details for each of the requested accounts.
failed_accounts(Option<Vec<FreeTrialInfoError>>)
:An array of objects detailing any accounts that free trial data could not be returned for.
- On failure, responds with
SdkError<BatchGetFreeTrialInfoError>
Constructs a fluent builder for the CancelFindingsReport
operation.
- The fluent builder is configurable:
report_id(impl Into<String>)
/set_report_id(Option<String>)
:The ID of the report to be canceled.
- On success, responds with
CancelFindingsReportOutput
with field(s):report_id(Option<String>)
:The ID of the canceled report.
- On failure, responds with
SdkError<CancelFindingsReportError>
Constructs a fluent builder for the CreateFilter
operation.
- The fluent builder is configurable:
action(FilterAction)
/set_action(Option<FilterAction>)
:Defines the action that is to be applied to the findings that match the filter.
description(impl Into<String>)
/set_description(Option<String>)
:A description of the filter.
filter_criteria(FilterCriteria)
/set_filter_criteria(Option<FilterCriteria>)
:Defines the criteria to be used in the filter for querying findings.
name(impl Into<String>)
/set_name(Option<String>)
:The name of the filter. Minimum length of 3. Maximum length of 64. Valid characters include alphanumeric characters, dot (.), underscore (_), and dash (-). Spaces are not allowed.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:A list of tags for the filter.
- On success, responds with
CreateFilterOutput
with field(s):arn(Option<String>)
:The Amazon Resource Number (ARN) of the successfully created filter.
- On failure, responds with
SdkError<CreateFilterError>
Constructs a fluent builder for the CreateFindingsReport
operation.
- The fluent builder is configurable:
filter_criteria(FilterCriteria)
/set_filter_criteria(Option<FilterCriteria>)
:The filter criteria to apply to the results of the finding report.
report_format(ReportFormat)
/set_report_format(Option<ReportFormat>)
:The format to generate the report in.
s3_destination(Destination)
/set_s3_destination(Option<Destination>)
:The Amazon S3 export destination for the report.
- On success, responds with
CreateFindingsReportOutput
with field(s):report_id(Option<String>)
:The ID of the report.
- On failure, responds with
SdkError<CreateFindingsReportError>
Constructs a fluent builder for the DeleteFilter
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:The Amazon Resource Number (ARN) of the filter to be deleted.
- On success, responds with
DeleteFilterOutput
with field(s):arn(Option<String>)
:The Amazon Resource Number (ARN) of the filter that has been deleted.
- On failure, responds with
SdkError<DeleteFilterError>
pub fn describe_organization_configuration(
&self
) -> DescribeOrganizationConfiguration<C, M, R>
pub fn describe_organization_configuration(
&self
) -> DescribeOrganizationConfiguration<C, M, R>
Constructs a fluent builder for the DescribeOrganizationConfiguration
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
DescribeOrganizationConfigurationOutput
with field(s):auto_enable(Option<AutoEnable>)
:The scan types are automatically enabled for new members of your organization.
max_account_limit_reached(Option<bool>)
:Represents whether your organization has reached the maximum Amazon Web Services account limit for Amazon Inspector.
- On failure, responds with
SdkError<DescribeOrganizationConfigurationError>
Constructs a fluent builder for the Disable
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:An array of account IDs you want to disable Amazon Inspector scans for.
resource_types(Vec<ResourceScanType>)
/set_resource_types(Option<Vec<ResourceScanType>>)
:The resource scan types you want to disable.
- On success, responds with
DisableOutput
with field(s):accounts(Option<Vec<Account>>)
:Information on the accounts that have had Amazon Inspector scans successfully disabled. Details are provided for each account.
failed_accounts(Option<Vec<FailedAccount>>)
:Information on any accounts for which Amazon Inspector scans could not be disabled. Details are provided for each account.
- On failure, responds with
SdkError<DisableError>
Constructs a fluent builder for the DisableDelegatedAdminAccount
operation.
- The fluent builder is configurable:
delegated_admin_account_id(impl Into<String>)
/set_delegated_admin_account_id(Option<String>)
:The Amazon Web Services account ID of the current Amazon Inspector delegated administrator.
- On success, responds with
DisableDelegatedAdminAccountOutput
with field(s):delegated_admin_account_id(Option<String>)
:The Amazon Web Services account ID of the successfully disabled delegated administrator.
- On failure, responds with
SdkError<DisableDelegatedAdminAccountError>
Constructs a fluent builder for the DisassociateMember
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:The Amazon Web Services account ID of the member account to disassociate.
- On success, responds with
DisassociateMemberOutput
with field(s):account_id(Option<String>)
:The Amazon Web Services account ID of the successfully disassociated member.
- On failure, responds with
SdkError<DisassociateMemberError>
Constructs a fluent builder for the Enable
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:A list of account IDs you want to enable Amazon Inspector scans for.
resource_types(Vec<ResourceScanType>)
/set_resource_types(Option<Vec<ResourceScanType>>)
:The resource scan types you want to enable.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:The idempotency token for the request.
- On success, responds with
EnableOutput
with field(s):accounts(Option<Vec<Account>>)
:Information on the accounts that have had Amazon Inspector scans successfully enabled. Details are provided for each account.
failed_accounts(Option<Vec<FailedAccount>>)
:Information on any accounts for which Amazon Inspector scans could not be enabled. Details are provided for each account.
- On failure, responds with
SdkError<EnableError>
Constructs a fluent builder for the EnableDelegatedAdminAccount
operation.
- The fluent builder is configurable:
delegated_admin_account_id(impl Into<String>)
/set_delegated_admin_account_id(Option<String>)
:The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:The idempotency token for the request.
- On success, responds with
EnableDelegatedAdminAccountOutput
with field(s):delegated_admin_account_id(Option<String>)
:The Amazon Web Services account ID of the successfully Amazon Inspector delegated administrator.
- On failure, responds with
SdkError<EnableDelegatedAdminAccountError>
Constructs a fluent builder for the GetDelegatedAdminAccount
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetDelegatedAdminAccountOutput
with field(s):delegated_admin(Option<DelegatedAdmin>)
:The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
- On failure, responds with
SdkError<GetDelegatedAdminAccountError>
Constructs a fluent builder for the GetFindingsReportStatus
operation.
- The fluent builder is configurable:
report_id(impl Into<String>)
/set_report_id(Option<String>)
:The ID of the report to retrieve the status of.
- On success, responds with
GetFindingsReportStatusOutput
with field(s):report_id(Option<String>)
:The ID of the report.
status(Option<ExternalReportStatus>)
:The status of the report.
error_code(Option<ReportingErrorCode>)
:The error code of the report.
error_message(Option<String>)
:The error message of the report.
destination(Option<Destination>)
:The destination of the report.
filter_criteria(Option<FilterCriteria>)
:The filter criteria associated with the report.
- On failure, responds with
SdkError<GetFindingsReportStatusError>
Constructs a fluent builder for the GetMember
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:The Amazon Web Services account ID of the member account to retrieve information on.
- On success, responds with
GetMemberOutput
with field(s):member(Option<Member>)
:Details of the retrieved member account.
- On failure, responds with
SdkError<GetMemberError>
Constructs a fluent builder for the ListAccountPermissions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
service(Service)
/set_service(Option<Service>)
:The service scan type to check permissions for.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On success, responds with
ListAccountPermissionsOutput
with field(s):permissions(Option<Vec<Permission>>)
:Contains details on the permissions an account has to configure Amazon Inspector.
next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On failure, responds with
SdkError<ListAccountPermissionsError>
Constructs a fluent builder for the ListCoverage
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.filter_criteria(CoverageFilterCriteria)
/set_filter_criteria(Option<CoverageFilterCriteria>)
:An object that contains details on the filters to apply to the coverage data for your environment.
- On success, responds with
ListCoverageOutput
with field(s):next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.covered_resources(Option<Vec<CoveredResource>>)
:An object that contains details on the covered resources in your environment.
- On failure, responds with
SdkError<ListCoverageError>
Constructs a fluent builder for the ListCoverageStatistics
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
filter_criteria(CoverageFilterCriteria)
/set_filter_criteria(Option<CoverageFilterCriteria>)
:An object that contains details on the filters to apply to the coverage data for your environment.
group_by(GroupKey)
/set_group_by(Option<GroupKey>)
:The value to group the results by.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On success, responds with
ListCoverageStatisticsOutput
with field(s):counts_by_group(Option<Vec<Counts>>)
:An array with the number for each group.
total_counts(Option<i64>)
:The total number for all groups.
next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On failure, responds with
SdkError<ListCoverageStatisticsError>
Constructs a fluent builder for the ListDelegatedAdminAccounts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On success, responds with
ListDelegatedAdminAccountsOutput
with field(s):delegated_admin_accounts(Option<Vec<DelegatedAdminAccount>>)
:Details of the Amazon Inspector delegated administrator of your organization.
next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On failure, responds with
SdkError<ListDelegatedAdminAccountsError>
Constructs a fluent builder for the ListFilters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
arns(Vec<String>)
/set_arns(Option<Vec<String>>)
:The Amazon resource number (ARN) of the filter.
action(FilterAction)
/set_action(Option<FilterAction>)
:The action the filter applies to matched findings.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
- On success, responds with
ListFiltersOutput
with field(s):filters(Option<Vec<Filter>>)
:Contains details on the filters associated with your account.
next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On failure, responds with
SdkError<ListFiltersError>
Constructs a fluent builder for the ListFindingAggregations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
aggregation_type(AggregationType)
/set_aggregation_type(Option<AggregationType>)
:The type of the aggregation request.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
account_ids(Vec<StringFilter>)
/set_account_ids(Option<Vec<StringFilter>>)
:The Amazon Web Services account IDs to retrieve finding aggregation data for.
aggregation_request(AggregationRequest)
/set_aggregation_request(Option<AggregationRequest>)
:Details of the aggregation request that is used to filter your aggregation results.
- On success, responds with
ListFindingAggregationsOutput
with field(s):aggregation_type(Option<AggregationType>)
:The type of aggregation to perform.
responses(Option<Vec<AggregationResponse>>)
:Objects that contain the results of an aggregation operation.
next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On failure, responds with
SdkError<ListFindingAggregationsError>
Constructs a fluent builder for the ListFindings
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.filter_criteria(FilterCriteria)
/set_filter_criteria(Option<FilterCriteria>)
:Details on the filters to apply to your finding results.
sort_criteria(SortCriteria)
/set_sort_criteria(Option<SortCriteria>)
:Details on the sort criteria to apply to your finding results.
- On success, responds with
ListFindingsOutput
with field(s):next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.findings(Option<Vec<Finding>>)
:Contains details on the findings in your environment.
- On failure, responds with
SdkError<ListFindingsError>
Constructs a fluent builder for the ListMembers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
only_associated(bool)
/set_only_associated(Option<bool>)
:Specifies whether to list only currently associated members if
True
or to list all members within the organization ifFalse
.max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.
- On success, responds with
ListMembersOutput
with field(s):members(Option<Vec<Member>>)
:An object that contains details for each member account.
next_token(Option<String>)
:The pagination parameter to be used on the next list operation to retrieve more items.
- On failure, responds with
SdkError<ListMembersError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon resource number (ARN) of the resource to list tags of.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap<String, String>>)
:The tags associated with the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Constructs a fluent builder for the ListUsageTotals
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in the response.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the
NextToken
value returned from the previous request to continue listing results after the first page.account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The Amazon Web Services account IDs to retrieve usage totals for.
- On success, responds with
ListUsageTotalsOutput
with field(s):next_token(Option<String>)
:The pagination parameter to be used on the next list operation to retrieve more items.
totals(Option<Vec<UsageTotal>>)
:An object with details on the total usage for the requested account.
- On failure, responds with
SdkError<ListUsageTotalsError>
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the resource to apply a tag to.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The tags to be added to a resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) for the resource to remove tags from.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Constructs a fluent builder for the UpdateFilter
operation.
- The fluent builder is configurable:
action(FilterAction)
/set_action(Option<FilterAction>)
:Specifies the action that is to be applied to the findings that match the filter.
description(impl Into<String>)
/set_description(Option<String>)
:A description of the filter.
filter_criteria(FilterCriteria)
/set_filter_criteria(Option<FilterCriteria>)
:Defines the criteria to be update in the filter.
name(impl Into<String>)
/set_name(Option<String>)
:The name of the filter.
filter_arn(impl Into<String>)
/set_filter_arn(Option<String>)
:The Amazon Resource Number (ARN) of the filter to update.
- On success, responds with
UpdateFilterOutput
with field(s):arn(Option<String>)
:The Amazon Resource Number (ARN) of the successfully updated filter.
- On failure, responds with
SdkError<UpdateFilterError>
Constructs a fluent builder for the UpdateOrganizationConfiguration
operation.
- The fluent builder is configurable:
auto_enable(AutoEnable)
/set_auto_enable(Option<AutoEnable>)
:Defines which scan types are enabled automatically for new members of your Amazon Inspector organization.
- On success, responds with
UpdateOrganizationConfigurationOutput
with field(s):auto_enable(Option<AutoEnable>)
:The updated status of scan types automatically enabled for new members of your Amazon Inspector organization.
- On failure, responds with
SdkError<UpdateOrganizationConfigurationError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
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