Struct aws_sdk_inspector::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon Inspector
Client for invoking operations on Amazon Inspector. Each operation on Amazon Inspector 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_inspector::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_inspector::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 CreateAssessmentTarget operation has
a Client::create_assessment_target, 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.create_assessment_target()
.assessment_target_name("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 add_attributes_to_findings(&self) -> AddAttributesToFindingsFluentBuilder
pub fn add_attributes_to_findings(&self) -> AddAttributesToFindingsFluentBuilder
Constructs a fluent builder for the AddAttributesToFindings operation.
- The fluent builder is configurable:
finding_arns(impl Into<String>)/set_finding_arns(Option<Vec::<String>>):
required: trueThe ARNs that specify the findings that you want to assign attributes to.
attributes(Attribute)/set_attributes(Option<Vec::<Attribute>>):
required: trueThe array of attributes that you want to assign to specified findings.
- On success, responds with
AddAttributesToFindingsOutputwith field(s):failed_items(HashMap::<String, FailedItemDetails>):Attribute details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<AddAttributesToFindingsError>
source§impl Client
impl Client
sourcepub fn create_assessment_target(&self) -> CreateAssessmentTargetFluentBuilder
pub fn create_assessment_target(&self) -> CreateAssessmentTargetFluentBuilder
Constructs a fluent builder for the CreateAssessmentTarget operation.
- The fluent builder is configurable:
assessment_target_name(impl Into<String>)/set_assessment_target_name(Option<String>):
required: trueThe user-defined name that identifies the assessment target that you want to create. The name must be unique within the AWS account.
resource_group_arn(impl Into<String>)/set_resource_group_arn(Option<String>):
required: falseThe ARN that specifies the resource group that is used to create the assessment target. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.
- On success, responds with
CreateAssessmentTargetOutputwith field(s):assessment_target_arn(String):The ARN that specifies the assessment target that is created.
- On failure, responds with
SdkError<CreateAssessmentTargetError>
source§impl Client
impl Client
sourcepub fn create_assessment_template(
&self
) -> CreateAssessmentTemplateFluentBuilder
pub fn create_assessment_template( &self ) -> CreateAssessmentTemplateFluentBuilder
Constructs a fluent builder for the CreateAssessmentTemplate operation.
- The fluent builder is configurable:
assessment_target_arn(impl Into<String>)/set_assessment_target_arn(Option<String>):
required: trueThe ARN that specifies the assessment target for which you want to create the assessment template.
assessment_template_name(impl Into<String>)/set_assessment_template_name(Option<String>):
required: trueThe user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for an assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.
duration_in_seconds(i32)/set_duration_in_seconds(Option<i32>):
required: trueThe duration of the assessment run in seconds.
rules_package_arns(impl Into<String>)/set_rules_package_arns(Option<Vec::<String>>):
required: trueThe ARNs that specify the rules packages that you want to attach to the assessment template.
user_attributes_for_findings(Attribute)/set_user_attributes_for_findings(Option<Vec::<Attribute>>):
required: falseThe user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. An attribute is a key and value pair (an
Attributeobject). Within an assessment template, each key must be unique.
- On success, responds with
CreateAssessmentTemplateOutputwith field(s):assessment_template_arn(String):The ARN that specifies the assessment template that is created.
- On failure, responds with
SdkError<CreateAssessmentTemplateError>
source§impl Client
impl Client
sourcepub fn create_exclusions_preview(&self) -> CreateExclusionsPreviewFluentBuilder
pub fn create_exclusions_preview(&self) -> CreateExclusionsPreviewFluentBuilder
Constructs a fluent builder for the CreateExclusionsPreview operation.
- The fluent builder is configurable:
assessment_template_arn(impl Into<String>)/set_assessment_template_arn(Option<String>):
required: trueThe ARN that specifies the assessment template for which you want to create an exclusions preview.
- On success, responds with
CreateExclusionsPreviewOutputwith field(s):preview_token(String):Specifies the unique identifier of the requested exclusions preview. You can use the unique identifier to retrieve the exclusions preview when running the GetExclusionsPreview API.
- On failure, responds with
SdkError<CreateExclusionsPreviewError>
source§impl Client
impl Client
sourcepub fn create_resource_group(&self) -> CreateResourceGroupFluentBuilder
pub fn create_resource_group(&self) -> CreateResourceGroupFluentBuilder
Constructs a fluent builder for the CreateResourceGroup operation.
- The fluent builder is configurable:
resource_group_tags(ResourceGroupTag)/set_resource_group_tags(Option<Vec::<ResourceGroupTag>>):
required: trueA collection of keys and an array of possible values, ‘[{“key”:“key1”,“values”:[“Value1”,“Value2”]},{“key”:“Key2”,“values”:[“Value3”]}]’.
For example,‘[{“key”:“Name”,“values”:[“TestEC2Instance”]}]’.
- On success, responds with
CreateResourceGroupOutputwith field(s):resource_group_arn(String):The ARN that specifies the resource group that is created.
- On failure, responds with
SdkError<CreateResourceGroupError>
source§impl Client
impl Client
sourcepub fn delete_assessment_run(&self) -> DeleteAssessmentRunFluentBuilder
pub fn delete_assessment_run(&self) -> DeleteAssessmentRunFluentBuilder
Constructs a fluent builder for the DeleteAssessmentRun operation.
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN that specifies the assessment run that you want to delete.
- On success, responds with
DeleteAssessmentRunOutput - On failure, responds with
SdkError<DeleteAssessmentRunError>
source§impl Client
impl Client
sourcepub fn delete_assessment_target(&self) -> DeleteAssessmentTargetFluentBuilder
pub fn delete_assessment_target(&self) -> DeleteAssessmentTargetFluentBuilder
Constructs a fluent builder for the DeleteAssessmentTarget operation.
- The fluent builder is configurable:
assessment_target_arn(impl Into<String>)/set_assessment_target_arn(Option<String>):
required: trueThe ARN that specifies the assessment target that you want to delete.
- On success, responds with
DeleteAssessmentTargetOutput - On failure, responds with
SdkError<DeleteAssessmentTargetError>
source§impl Client
impl Client
sourcepub fn delete_assessment_template(
&self
) -> DeleteAssessmentTemplateFluentBuilder
pub fn delete_assessment_template( &self ) -> DeleteAssessmentTemplateFluentBuilder
Constructs a fluent builder for the DeleteAssessmentTemplate operation.
- The fluent builder is configurable:
assessment_template_arn(impl Into<String>)/set_assessment_template_arn(Option<String>):
required: trueThe ARN that specifies the assessment template that you want to delete.
- On success, responds with
DeleteAssessmentTemplateOutput - On failure, responds with
SdkError<DeleteAssessmentTemplateError>
source§impl Client
impl Client
sourcepub fn describe_assessment_runs(&self) -> DescribeAssessmentRunsFluentBuilder
pub fn describe_assessment_runs(&self) -> DescribeAssessmentRunsFluentBuilder
Constructs a fluent builder for the DescribeAssessmentRuns operation.
- The fluent builder is configurable:
assessment_run_arns(impl Into<String>)/set_assessment_run_arns(Option<Vec::<String>>):
required: trueThe ARN that specifies the assessment run that you want to describe.
- On success, responds with
DescribeAssessmentRunsOutputwith field(s):assessment_runs(Vec::<AssessmentRun>):Information about the assessment run.
failed_items(HashMap::<String, FailedItemDetails>):Assessment run details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeAssessmentRunsError>
source§impl Client
impl Client
sourcepub fn describe_assessment_targets(
&self
) -> DescribeAssessmentTargetsFluentBuilder
pub fn describe_assessment_targets( &self ) -> DescribeAssessmentTargetsFluentBuilder
Constructs a fluent builder for the DescribeAssessmentTargets operation.
- The fluent builder is configurable:
assessment_target_arns(impl Into<String>)/set_assessment_target_arns(Option<Vec::<String>>):
required: trueThe ARNs that specifies the assessment targets that you want to describe.
- On success, responds with
DescribeAssessmentTargetsOutputwith field(s):assessment_targets(Vec::<AssessmentTarget>):Information about the assessment targets.
failed_items(HashMap::<String, FailedItemDetails>):Assessment target details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeAssessmentTargetsError>
source§impl Client
impl Client
sourcepub fn describe_assessment_templates(
&self
) -> DescribeAssessmentTemplatesFluentBuilder
pub fn describe_assessment_templates( &self ) -> DescribeAssessmentTemplatesFluentBuilder
Constructs a fluent builder for the DescribeAssessmentTemplates operation.
- The fluent builder is configurable:
assessment_template_arns(impl Into<String>)/set_assessment_template_arns(Option<Vec::<String>>):
required: true
(undocumented)
- On success, responds with
DescribeAssessmentTemplatesOutputwith field(s):assessment_templates(Vec::<AssessmentTemplate>):Information about the assessment templates.
failed_items(HashMap::<String, FailedItemDetails>):Assessment template details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeAssessmentTemplatesError>
source§impl Client
impl Client
sourcepub fn describe_cross_account_access_role(
&self
) -> DescribeCrossAccountAccessRoleFluentBuilder
pub fn describe_cross_account_access_role( &self ) -> DescribeCrossAccountAccessRoleFluentBuilder
Constructs a fluent builder for the DescribeCrossAccountAccessRole operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
DescribeCrossAccountAccessRoleOutputwith field(s):role_arn(String):The ARN that specifies the IAM role that Amazon Inspector uses to access your AWS account.
valid(bool):A Boolean value that specifies whether the IAM role has the necessary policies attached to enable Amazon Inspector to access your AWS account.
registered_at(DateTime):The date when the cross-account access role was registered.
- On failure, responds with
SdkError<DescribeCrossAccountAccessRoleError>
source§impl Client
impl Client
sourcepub fn describe_exclusions(&self) -> DescribeExclusionsFluentBuilder
pub fn describe_exclusions(&self) -> DescribeExclusionsFluentBuilder
Constructs a fluent builder for the DescribeExclusions operation.
- The fluent builder is configurable:
exclusion_arns(impl Into<String>)/set_exclusion_arns(Option<Vec::<String>>):
required: trueThe list of ARNs that specify the exclusions that you want to describe.
locale(Locale)/set_locale(Option<Locale>):
required: falseThe locale into which you want to translate the exclusion’s title, description, and recommendation.
- On success, responds with
DescribeExclusionsOutputwith field(s):exclusions(HashMap::<String, Exclusion>):Information about the exclusions.
failed_items(HashMap::<String, FailedItemDetails>):Exclusion details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeExclusionsError>
source§impl Client
impl Client
sourcepub fn describe_findings(&self) -> DescribeFindingsFluentBuilder
pub fn describe_findings(&self) -> DescribeFindingsFluentBuilder
Constructs a fluent builder for the DescribeFindings operation.
- The fluent builder is configurable:
finding_arns(impl Into<String>)/set_finding_arns(Option<Vec::<String>>):
required: trueThe ARN that specifies the finding that you want to describe.
locale(Locale)/set_locale(Option<Locale>):
required: falseThe locale into which you want to translate a finding description, recommendation, and the short description that identifies the finding.
- On success, responds with
DescribeFindingsOutputwith field(s):findings(Vec::<Finding>):Information about the finding.
failed_items(HashMap::<String, FailedItemDetails>):Finding details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeFindingsError>
source§impl Client
impl Client
sourcepub fn describe_resource_groups(&self) -> DescribeResourceGroupsFluentBuilder
pub fn describe_resource_groups(&self) -> DescribeResourceGroupsFluentBuilder
Constructs a fluent builder for the DescribeResourceGroups operation.
- The fluent builder is configurable:
resource_group_arns(impl Into<String>)/set_resource_group_arns(Option<Vec::<String>>):
required: trueThe ARN that specifies the resource group that you want to describe.
- On success, responds with
DescribeResourceGroupsOutputwith field(s):resource_groups(Vec::<ResourceGroup>):Information about a resource group.
failed_items(HashMap::<String, FailedItemDetails>):Resource group details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeResourceGroupsError>
source§impl Client
impl Client
sourcepub fn describe_rules_packages(&self) -> DescribeRulesPackagesFluentBuilder
pub fn describe_rules_packages(&self) -> DescribeRulesPackagesFluentBuilder
Constructs a fluent builder for the DescribeRulesPackages operation.
- The fluent builder is configurable:
rules_package_arns(impl Into<String>)/set_rules_package_arns(Option<Vec::<String>>):
required: trueThe ARN that specifies the rules package that you want to describe.
locale(Locale)/set_locale(Option<Locale>):
required: falseThe locale that you want to translate a rules package description into.
- On success, responds with
DescribeRulesPackagesOutputwith field(s):rules_packages(Vec::<RulesPackage>):Information about the rules package.
failed_items(HashMap::<String, FailedItemDetails>):Rules package details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<DescribeRulesPackagesError>
source§impl Client
impl Client
sourcepub fn get_assessment_report(&self) -> GetAssessmentReportFluentBuilder
pub fn get_assessment_report(&self) -> GetAssessmentReportFluentBuilder
Constructs a fluent builder for the GetAssessmentReport operation.
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN that specifies the assessment run for which you want to generate a report.
report_file_format(ReportFileFormat)/set_report_file_format(Option<ReportFileFormat>):
required: trueSpecifies the file format (html or pdf) of the assessment report that you want to generate.
report_type(ReportType)/set_report_type(Option<ReportType>):
required: trueSpecifies the type of the assessment report that you want to generate. There are two types of assessment reports: a finding report and a full report. For more information, see Assessment Reports.
- On success, responds with
GetAssessmentReportOutputwith field(s):status(ReportStatus):Specifies the status of the request to generate an assessment report.
url(Option<String>):Specifies the URL where you can find the generated assessment report. This parameter is only returned if the report is successfully generated.
- On failure, responds with
SdkError<GetAssessmentReportError>
source§impl Client
impl Client
sourcepub fn get_exclusions_preview(&self) -> GetExclusionsPreviewFluentBuilder
pub fn get_exclusions_preview(&self) -> GetExclusionsPreviewFluentBuilder
Constructs a fluent builder for the GetExclusionsPreview operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_template_arn(impl Into<String>)/set_assessment_template_arn(Option<String>):
required: trueThe ARN that specifies the assessment template for which the exclusions preview was requested.
preview_token(impl Into<String>)/set_preview_token(Option<String>):
required: trueThe unique identifier associated of the exclusions preview.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the GetExclusionsPreviewRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.
locale(Locale)/set_locale(Option<Locale>):
required: falseThe locale into which you want to translate the exclusion’s title, description, and recommendation.
- On success, responds with
GetExclusionsPreviewOutputwith field(s):preview_status(PreviewStatus):Specifies the status of the request to generate an exclusions preview.
exclusion_previews(Option<Vec::<ExclusionPreview>>):Information about the exclusions included in the preview.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameters is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<GetExclusionsPreviewError>
source§impl Client
impl Client
sourcepub fn get_telemetry_metadata(&self) -> GetTelemetryMetadataFluentBuilder
pub fn get_telemetry_metadata(&self) -> GetTelemetryMetadataFluentBuilder
Constructs a fluent builder for the GetTelemetryMetadata operation.
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN that specifies the assessment run that has the telemetry data that you want to obtain.
- On success, responds with
GetTelemetryMetadataOutputwith field(s):telemetry_metadata(Vec::<TelemetryMetadata>):Telemetry details.
- On failure, responds with
SdkError<GetTelemetryMetadataError>
source§impl Client
impl Client
sourcepub fn list_assessment_run_agents(&self) -> ListAssessmentRunAgentsFluentBuilder
pub fn list_assessment_run_agents(&self) -> ListAssessmentRunAgentsFluentBuilder
Constructs a fluent builder for the ListAssessmentRunAgents operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN that specifies the assessment run whose agents you want to list.
filter(AgentFilter)/set_filter(Option<AgentFilter>):
required: falseYou can use this parameter to specify a subset of data to be included in the action’s response.
For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListAssessmentRunAgents action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items that you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListAssessmentRunAgentsOutputwith field(s):assessment_run_agents(Vec::<AssessmentRunAgent>):A list of ARNs that specifies the agents returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListAssessmentRunAgentsError>
source§impl Client
impl Client
sourcepub fn list_assessment_runs(&self) -> ListAssessmentRunsFluentBuilder
pub fn list_assessment_runs(&self) -> ListAssessmentRunsFluentBuilder
Constructs a fluent builder for the ListAssessmentRuns operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_template_arns(impl Into<String>)/set_assessment_template_arns(Option<Vec::<String>>):
required: falseThe ARNs that specify the assessment templates whose assessment runs you want to list.
filter(AssessmentRunFilter)/set_filter(Option<AssessmentRunFilter>):
required: falseYou can use this parameter to specify a subset of data to be included in the action’s response.
For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListAssessmentRuns action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items that you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListAssessmentRunsOutputwith field(s):assessment_run_arns(Vec::<String>):A list of ARNs that specifies the assessment runs that are returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListAssessmentRunsError>
source§impl Client
impl Client
sourcepub fn list_assessment_targets(&self) -> ListAssessmentTargetsFluentBuilder
pub fn list_assessment_targets(&self) -> ListAssessmentTargetsFluentBuilder
Constructs a fluent builder for the ListAssessmentTargets operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(AssessmentTargetFilter)/set_filter(Option<AssessmentTargetFilter>):
required: falseYou can use this parameter to specify a subset of data to be included in the action’s response.
For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListAssessmentTargets action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListAssessmentTargetsOutputwith field(s):assessment_target_arns(Vec::<String>):A list of ARNs that specifies the assessment targets that are returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListAssessmentTargetsError>
source§impl Client
impl Client
sourcepub fn list_assessment_templates(&self) -> ListAssessmentTemplatesFluentBuilder
pub fn list_assessment_templates(&self) -> ListAssessmentTemplatesFluentBuilder
Constructs a fluent builder for the ListAssessmentTemplates operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_target_arns(impl Into<String>)/set_assessment_target_arns(Option<Vec::<String>>):
required: falseA list of ARNs that specifies the assessment targets whose assessment templates you want to list.
filter(AssessmentTemplateFilter)/set_filter(Option<AssessmentTemplateFilter>):
required: falseYou can use this parameter to specify a subset of data to be included in the action’s response.
For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListAssessmentTemplates action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListAssessmentTemplatesOutputwith field(s):assessment_template_arns(Vec::<String>):A list of ARNs that specifies the assessment templates returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListAssessmentTemplatesError>
source§impl Client
impl Client
sourcepub fn list_event_subscriptions(&self) -> ListEventSubscriptionsFluentBuilder
pub fn list_event_subscriptions(&self) -> ListEventSubscriptionsFluentBuilder
Constructs a fluent builder for the ListEventSubscriptions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: falseThe ARN of the assessment template for which you want to list the existing event subscriptions.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListEventSubscriptions action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListEventSubscriptionsOutputwith field(s):subscriptions(Vec::<Subscription>):Details of the returned event subscriptions.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListEventSubscriptionsError>
source§impl Client
impl Client
sourcepub fn list_exclusions(&self) -> ListExclusionsFluentBuilder
pub fn list_exclusions(&self) -> ListExclusionsFluentBuilder
Constructs a fluent builder for the ListExclusions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN of the assessment run that generated the exclusions that you want to list.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListExclusionsRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.
- On success, responds with
ListExclusionsOutputwith field(s):exclusion_arns(Vec::<String>):A list of exclusions’ ARNs returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameters is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListExclusionsError>
source§impl Client
impl Client
sourcepub fn list_findings(&self) -> ListFindingsFluentBuilder
pub fn list_findings(&self) -> ListFindingsFluentBuilder
Constructs a fluent builder for the ListFindings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
assessment_run_arns(impl Into<String>)/set_assessment_run_arns(Option<Vec::<String>>):
required: falseThe ARNs of the assessment runs that generate the findings that you want to list.
filter(FindingFilter)/set_filter(Option<FindingFilter>):
required: falseYou can use this parameter to specify a subset of data to be included in the action’s response.
For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListFindings action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListFindingsOutputwith field(s):finding_arns(Vec::<String>):A list of ARNs that specifies the findings returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListFindingsError>
source§impl Client
impl Client
sourcepub fn list_rules_packages(&self) -> ListRulesPackagesFluentBuilder
pub fn list_rules_packages(&self) -> ListRulesPackagesFluentBuilder
Constructs a fluent builder for the ListRulesPackages operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListRulesPackages action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
ListRulesPackagesOutputwith field(s):rules_package_arns(Vec::<String>):The list of ARNs that specifies the rules packages returned by the action.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<ListRulesPackagesError>
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 that specifies the assessment template whose tags you want to list.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Vec::<Tag>):A collection of key and value pairs.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn preview_agents(&self) -> PreviewAgentsFluentBuilder
pub fn preview_agents(&self) -> PreviewAgentsFluentBuilder
Constructs a fluent builder for the PreviewAgents operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
preview_agents_arn(impl Into<String>)/set_preview_agents_arn(Option<String>):
required: trueThe ARN of the assessment target whose agents you want to preview.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseYou can use this parameter when paginating results. Set the value of this parameter to null on your first call to the PreviewAgents action. Subsequent calls to the action fill nextToken in the request with the value of NextToken from the previous response to continue listing data.
max_results(i32)/set_max_results(Option<i32>):
required: falseYou can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.
- On success, responds with
PreviewAgentsOutputwith field(s):agent_previews(Vec::<AgentPreview>):The resulting list of agents.
next_token(Option<String>):When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.
- On failure, responds with
SdkError<PreviewAgentsError>
source§impl Client
impl Client
sourcepub fn register_cross_account_access_role(
&self
) -> RegisterCrossAccountAccessRoleFluentBuilder
pub fn register_cross_account_access_role( &self ) -> RegisterCrossAccountAccessRoleFluentBuilder
Constructs a fluent builder for the RegisterCrossAccountAccessRole operation.
- The fluent builder is configurable:
role_arn(impl Into<String>)/set_role_arn(Option<String>):
required: trueThe ARN of the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.
- On success, responds with
RegisterCrossAccountAccessRoleOutput - On failure, responds with
SdkError<RegisterCrossAccountAccessRoleError>
source§impl Client
impl Client
sourcepub fn remove_attributes_from_findings(
&self
) -> RemoveAttributesFromFindingsFluentBuilder
pub fn remove_attributes_from_findings( &self ) -> RemoveAttributesFromFindingsFluentBuilder
Constructs a fluent builder for the RemoveAttributesFromFindings operation.
- The fluent builder is configurable:
finding_arns(impl Into<String>)/set_finding_arns(Option<Vec::<String>>):
required: trueThe ARNs that specify the findings that you want to remove attributes from.
attribute_keys(impl Into<String>)/set_attribute_keys(Option<Vec::<String>>):
required: trueThe array of attribute keys that you want to remove from specified findings.
- On success, responds with
RemoveAttributesFromFindingsOutputwith field(s):failed_items(HashMap::<String, FailedItemDetails>):Attributes details that cannot be described. An error code is provided for each failed item.
- On failure, responds with
SdkError<RemoveAttributesFromFindingsError>
source§impl Client
impl Client
Constructs a fluent builder for the SetTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the assessment template that you want to set tags to.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseA collection of key and value pairs that you want to set to the assessment template.
- On success, responds with
SetTagsForResourceOutput - On failure, responds with
SdkError<SetTagsForResourceError>
source§impl Client
impl Client
sourcepub fn start_assessment_run(&self) -> StartAssessmentRunFluentBuilder
pub fn start_assessment_run(&self) -> StartAssessmentRunFluentBuilder
Constructs a fluent builder for the StartAssessmentRun operation.
- The fluent builder is configurable:
assessment_template_arn(impl Into<String>)/set_assessment_template_arn(Option<String>):
required: trueThe ARN of the assessment template of the assessment run that you want to start.
assessment_run_name(impl Into<String>)/set_assessment_run_name(Option<String>):
required: falseYou can specify the name for the assessment run. The name must be unique for the assessment template whose ARN is used to start the assessment run.
- On success, responds with
StartAssessmentRunOutputwith field(s):assessment_run_arn(String):The ARN of the assessment run that has been started.
- On failure, responds with
SdkError<StartAssessmentRunError>
source§impl Client
impl Client
sourcepub fn stop_assessment_run(&self) -> StopAssessmentRunFluentBuilder
pub fn stop_assessment_run(&self) -> StopAssessmentRunFluentBuilder
Constructs a fluent builder for the StopAssessmentRun operation.
- The fluent builder is configurable:
assessment_run_arn(impl Into<String>)/set_assessment_run_arn(Option<String>):
required: trueThe ARN of the assessment run that you want to stop.
stop_action(StopAction)/set_stop_action(Option<StopAction>):
required: falseAn input option that can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value), stops the AWS agent from collecting data and begins the results evaluation and the findings generation process. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.
- On success, responds with
StopAssessmentRunOutput - On failure, responds with
SdkError<StopAssessmentRunError>
source§impl Client
impl Client
sourcepub fn subscribe_to_event(&self) -> SubscribeToEventFluentBuilder
pub fn subscribe_to_event(&self) -> SubscribeToEventFluentBuilder
Constructs a fluent builder for the SubscribeToEvent operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the assessment template that is used during the event for which you want to receive SNS notifications.
event(InspectorEvent)/set_event(Option<InspectorEvent>):
required: trueThe event for which you want to receive SNS notifications.
topic_arn(impl Into<String>)/set_topic_arn(Option<String>):
required: trueThe ARN of the SNS topic to which the SNS notifications are sent.
- On success, responds with
SubscribeToEventOutput - On failure, responds with
SdkError<SubscribeToEventError>
source§impl Client
impl Client
sourcepub fn unsubscribe_from_event(&self) -> UnsubscribeFromEventFluentBuilder
pub fn unsubscribe_from_event(&self) -> UnsubscribeFromEventFluentBuilder
Constructs a fluent builder for the UnsubscribeFromEvent operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the assessment template that is used during the event for which you want to stop receiving SNS notifications.
event(InspectorEvent)/set_event(Option<InspectorEvent>):
required: trueThe event for which you want to stop receiving SNS notifications.
topic_arn(impl Into<String>)/set_topic_arn(Option<String>):
required: trueThe ARN of the SNS topic to which SNS notifications are sent.
- On success, responds with
UnsubscribeFromEventOutput - On failure, responds with
SdkError<UnsubscribeFromEventError>
source§impl Client
impl Client
sourcepub fn update_assessment_target(&self) -> UpdateAssessmentTargetFluentBuilder
pub fn update_assessment_target(&self) -> UpdateAssessmentTargetFluentBuilder
Constructs a fluent builder for the UpdateAssessmentTarget operation.
- The fluent builder is configurable:
assessment_target_arn(impl Into<String>)/set_assessment_target_arn(Option<String>):
required: trueThe ARN of the assessment target that you want to update.
assessment_target_name(impl Into<String>)/set_assessment_target_name(Option<String>):
required: trueThe name of the assessment target that you want to update.
resource_group_arn(impl Into<String>)/set_resource_group_arn(Option<String>):
required: falseThe ARN of the resource group that is used to specify the new resource group to associate with the assessment target.
- On success, responds with
UpdateAssessmentTargetOutput - On failure, responds with
SdkError<UpdateAssessmentTargetError>
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.