Struct aws_sdk_accessanalyzer::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Client for Access Analyzer
Client for invoking operations on Access Analyzer. Each operation on Access Analyzer 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_accessanalyzer::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_accessanalyzer::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_accessanalyzer::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 ApplyArchiveRule operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The Amazon resource name (ARN) of the analyzer.
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the rule to apply.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
ApplyArchiveRuleOutput - On failure, responds with
SdkError<ApplyArchiveRuleError>
Constructs a fluent builder for the CancelPolicyGeneration operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):The
JobIdthat is returned by theStartPolicyGenerationoperation. TheJobIdcan be used withGetGeneratedPolicyto retrieve the generated policies or used withCancelPolicyGenerationto cancel the policy generation request.
- On success, responds with
CancelPolicyGenerationOutput - On failure, responds with
SdkError<CancelPolicyGenerationError>
Constructs a fluent builder for the CreateAccessPreview operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the account analyzer used to generate the access preview. You can only create an access preview for analyzers with an
Accounttype andActivestatus.configurations(HashMap<String, Configuration>)/set_configurations(Option<HashMap<String, Configuration>>):Access control configuration for your resource that is used to generate the access preview. The access preview includes findings for external access allowed to the resource with the proposed access control configuration. The configuration must contain exactly one element.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
CreateAccessPreviewOutputwith field(s):id(Option<String>):The unique ID for the access preview.
- On failure, responds with
SdkError<CreateAccessPreviewError>
Constructs a fluent builder for the CreateAnalyzer operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer to create.
r#type(Type)/set_type(Option<Type>):The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers are supported. You can create only one analyzer per account per Region. You can create up to 5 analyzers per organization per Region.
archive_rules(Vec<InlineArchiveRule>)/set_archive_rules(Option<Vec<InlineArchiveRule>>):Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):The tags to apply to the analyzer.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
CreateAnalyzerOutputwith field(s):arn(Option<String>):The ARN of the analyzer that was created by the request.
- On failure, responds with
SdkError<CreateAnalyzerError>
Constructs a fluent builder for the CreateArchiveRule operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the created analyzer.
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the rule to create.
filter(HashMap<String, Criterion>)/set_filter(Option<HashMap<String, Criterion>>):The criteria for the rule.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
CreateArchiveRuleOutput - On failure, responds with
SdkError<CreateArchiveRuleError>
Constructs a fluent builder for the DeleteAnalyzer operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer to delete.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
DeleteAnalyzerOutput - On failure, responds with
SdkError<DeleteAnalyzerError>
Constructs a fluent builder for the DeleteArchiveRule operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer that associated with the archive rule to delete.
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the rule to delete.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
DeleteArchiveRuleOutput - On failure, responds with
SdkError<DeleteArchiveRuleError>
Constructs a fluent builder for the GetAccessPreview operation.
- The fluent builder is configurable:
access_preview_id(impl Into<String>)/set_access_preview_id(Option<String>):The unique ID for the access preview.
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer used to generate the access preview.
- On success, responds with
GetAccessPreviewOutputwith field(s):access_preview(Option<AccessPreview>):An object that contains information about the access preview.
- On failure, responds with
SdkError<GetAccessPreviewError>
Constructs a fluent builder for the GetAnalyzedResource operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer to retrieve information from.
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of the resource to retrieve information about.
- On success, responds with
GetAnalyzedResourceOutputwith field(s):resource(Option<AnalyzedResource>):An
AnalyzedResourceobject that contains information that IAM Access Analyzer found when it analyzed the resource.
- On failure, responds with
SdkError<GetAnalyzedResourceError>
Constructs a fluent builder for the GetAnalyzer operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer retrieved.
- On success, responds with
GetAnalyzerOutputwith field(s):analyzer(Option<AnalyzerSummary>):An
AnalyzerSummaryobject that contains information about the analyzer.
- On failure, responds with
SdkError<GetAnalyzerError>
Constructs a fluent builder for the GetArchiveRule operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer to retrieve rules from.
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the rule to retrieve.
- On success, responds with
GetArchiveRuleOutputwith field(s):archive_rule(Option<ArchiveRuleSummary>):Contains information about an archive rule.
- On failure, responds with
SdkError<GetArchiveRuleError>
Constructs a fluent builder for the GetFinding operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer that generated the finding.
id(impl Into<String>)/set_id(Option<String>):The ID of the finding to retrieve.
- On success, responds with
GetFindingOutputwith field(s):finding(Option<Finding>):A
findingobject that contains finding details.
- On failure, responds with
SdkError<GetFindingError>
Constructs a fluent builder for the GetGeneratedPolicy operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):The
JobIdthat is returned by theStartPolicyGenerationoperation. TheJobIdcan be used withGetGeneratedPolicyto retrieve the generated policies or used withCancelPolicyGenerationto cancel the policy generation request.include_resource_placeholders(bool)/set_include_resource_placeholders(Option<bool>):The level of detail that you want to generate. You can specify whether to generate policies with placeholders for resource ARNs for actions that support resource level granularity in policies.
For example, in the resource section of a policy, you can receive a placeholder such as
“Resource”:“arn:aws:s3:::${BucketName}”instead of“*”.include_service_level_template(bool)/set_include_service_level_template(Option<bool>):The level of detail that you want to generate. You can specify whether to generate service-level policies.
IAM Access Analyzer uses
iam:servicelastaccessedto identify services that have been used recently to create this service-level template.
- On success, responds with
GetGeneratedPolicyOutputwith field(s):job_details(Option<JobDetails>):A
GeneratedPolicyDetailsobject that contains details about the generated policy.generated_policy_result(Option<GeneratedPolicyResult>):A
GeneratedPolicyResultobject that contains the generated policies and associated details.
- On failure, responds with
SdkError<GetGeneratedPolicyError>
Constructs a fluent builder for the ListAccessPreviewFindings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
access_preview_id(impl Into<String>)/set_access_preview_id(Option<String>):The unique ID for the access preview.
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer used to generate the access.
filter(HashMap<String, Criterion>)/set_filter(Option<HashMap<String, Criterion>>):Criteria to filter the returned findings.
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the response.
- On success, responds with
ListAccessPreviewFindingsOutputwith field(s):findings(Option<Vec<AccessPreviewFinding>>):A list of access preview findings that match the specified filter criteria.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListAccessPreviewFindingsError>
Constructs a fluent builder for the ListAccessPreviews operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer used to generate the access preview.
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the response.
- On success, responds with
ListAccessPreviewsOutputwith field(s):access_previews(Option<Vec<AccessPreviewSummary>>):A list of access previews retrieved for the analyzer.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListAccessPreviewsError>
Constructs a fluent builder for the ListAnalyzedResources operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer to retrieve a list of analyzed resources from.
resource_type(ResourceType)/set_resource_type(Option<ResourceType>):The type of resource.
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the response.
- On success, responds with
ListAnalyzedResourcesOutputwith field(s):analyzed_resources(Option<Vec<AnalyzedResourceSummary>>):A list of resources that were analyzed.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListAnalyzedResourcesError>
Constructs a fluent builder for the ListAnalyzers operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the response.
r#type(Type)/set_type(Option<Type>):The type of analyzer.
- On success, responds with
ListAnalyzersOutputwith field(s):analyzers(Option<Vec<AnalyzerSummary>>):The analyzers retrieved.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListAnalyzersError>
Constructs a fluent builder for the ListArchiveRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer to retrieve rules from.
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the request.
- On success, responds with
ListArchiveRulesOutputwith field(s):archive_rules(Option<Vec<ArchiveRuleSummary>>):A list of archive rules created for the specified analyzer.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListArchiveRulesError>
Constructs a fluent builder for the ListFindings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer to retrieve findings from.
filter(HashMap<String, Criterion>)/set_filter(Option<HashMap<String, Criterion>>):A filter to match for the findings to return.
sort(SortCriteria)/set_sort(Option<SortCriteria>):The sort order for the findings returned.
next_token(impl Into<String>)/set_next_token(Option<String>):A token used for pagination of results returned.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return in the response.
- On success, responds with
ListFindingsOutputwith field(s):findings(Option<Vec<FindingSummary>>):A list of findings retrieved from the analyzer that match the filter criteria specified, if any.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListFindingsError>
Constructs a fluent builder for the ListPolicyGenerations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
principal_arn(impl Into<String>)/set_principal_arn(Option<String>):The ARN of the IAM entity (user or role) for which you are generating a policy. Use this with
ListGeneratedPoliciesto filter the results to only include results for a specific principal.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 used for pagination of results returned.
- On success, responds with
ListPolicyGenerationsOutputwith field(s):policy_generations(Option<Vec<PolicyGeneration>>):A
PolicyGenerationobject that contains details about the generated policy.next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ListPolicyGenerationsError>
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 resource to retrieve tags from.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap<String, String>>):The tags that are applied to the specified resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Constructs a fluent builder for the StartPolicyGeneration operation.
- The fluent builder is configurable:
policy_generation_details(PolicyGenerationDetails)/set_policy_generation_details(Option<PolicyGenerationDetails>):Contains the ARN of the IAM entity (user or role) for which you are generating a policy.
cloud_trail_details(CloudTrailDetails)/set_cloud_trail_details(Option<CloudTrailDetails>):A
CloudTrailDetailsobject that contains details about aTrailthat you want to analyze to generate policies.client_token(impl Into<String>)/set_client_token(Option<String>):A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
- On success, responds with
StartPolicyGenerationOutputwith field(s):job_id(Option<String>):The
JobIdthat is returned by theStartPolicyGenerationoperation. TheJobIdcan be used withGetGeneratedPolicyto retrieve the generated policies or used withCancelPolicyGenerationto cancel the policy generation request.
- On failure, responds with
SdkError<StartPolicyGenerationError>
Constructs a fluent builder for the StartResourceScan operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer to use to scan the policies applied to the specified resource.
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of the resource to scan.
- On success, responds with
StartResourceScanOutput - On failure, responds with
SdkError<StartResourceScanError>
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 resource to add the tag to.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):The tags to add to the 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 ARN of the resource to remove the tag from.
tag_keys(Vec<String>)/set_tag_keys(Option<Vec<String>>):The key for the tag to add.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Constructs a fluent builder for the UpdateArchiveRule operation.
- The fluent builder is configurable:
analyzer_name(impl Into<String>)/set_analyzer_name(Option<String>):The name of the analyzer to update the archive rules for.
rule_name(impl Into<String>)/set_rule_name(Option<String>):The name of the rule to update.
filter(HashMap<String, Criterion>)/set_filter(Option<HashMap<String, Criterion>>):A filter to match for the rules to update. Only rules that match the filter are updated.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
UpdateArchiveRuleOutput - On failure, responds with
SdkError<UpdateArchiveRuleError>
Constructs a fluent builder for the UpdateFindings operation.
- The fluent builder is configurable:
analyzer_arn(impl Into<String>)/set_analyzer_arn(Option<String>):The ARN of the analyzer that generated the findings to update.
status(FindingStatusUpdate)/set_status(Option<FindingStatusUpdate>):The state represents the action to take to update the finding Status. Use
ARCHIVEto change an Active finding to an Archived finding. UseACTIVEto change an Archived finding to an Active finding.ids(Vec<String>)/set_ids(Option<Vec<String>>):The IDs of the findings to update.
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The ARN of the resource identified in the finding.
client_token(impl Into<String>)/set_client_token(Option<String>):A client token.
- On success, responds with
UpdateFindingsOutput - On failure, responds with
SdkError<UpdateFindingsError>
Constructs a fluent builder for the ValidatePolicy operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
locale(Locale)/set_locale(Option<Locale>):The locale to use for localizing the findings.
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 used for pagination of results returned.
policy_document(impl Into<String>)/set_policy_document(Option<String>):The JSON policy document to use as the content for the policy.
policy_type(PolicyType)/set_policy_type(Option<PolicyType>):The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. They also include service-control policies (SCPs) that are attached to an Amazon Web Services organization, organizational unit (OU), or an account.
Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.
validate_policy_resource_type(ValidatePolicyResourceType)/set_validate_policy_resource_type(Option<ValidatePolicyResourceType>):The type of resource to attach to your resource policy. Specify a value for the policy validation resource type only if the policy type is
RESOURCE_POLICY. For example, to validate a resource policy to attach to an Amazon S3 bucket, you can chooseAWS::S3::Bucketfor the policy validation resource type.For resource types not supported as valid values, IAM Access Analyzer runs policy checks that apply to all resource policies. For example, to validate a resource policy to attach to a KMS key, do not specify a value for the policy validation resource type and IAM Access Analyzer will run policy checks that apply to all resource policies.
- On success, responds with
ValidatePolicyOutputwith field(s):findings(Option<Vec<ValidatePolicyFinding>>):The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks.
next_token(Option<String>):A token used for pagination of results returned.
- On failure, responds with
SdkError<ValidatePolicyError>
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