Class: Aws::AccessAnalyzer::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::AccessAnalyzer::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb
Overview
An API client for AccessAnalyzer. To construct a client, you need to configure a :region and :credentials.
client = Aws::AccessAnalyzer::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#apply_archive_rule(params = {}) ⇒ Struct
Retroactively applies the archive rule to existing findings that meet the archive rule criteria.
-
#cancel_policy_generation(params = {}) ⇒ Struct
Cancels the requested policy generation.
-
#cancel_policy_preview_job(params = {}) ⇒ Struct
Cancels an in-progress policy preview job.
-
#check_access_not_granted(params = {}) ⇒ Types::CheckAccessNotGrantedResponse
Checks whether the specified access isn't allowed by a policy.
-
#check_no_new_access(params = {}) ⇒ Types::CheckNoNewAccessResponse
Checks whether new access is allowed for an updated policy when compared to the existing policy.
-
#check_no_public_access(params = {}) ⇒ Types::CheckNoPublicAccessResponse
Checks whether a resource policy can grant public access to the specified resource type.
-
#create_access_preview(params = {}) ⇒ Types::CreateAccessPreviewResponse
Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.
-
#create_analyzer(params = {}) ⇒ Types::CreateAnalyzerResponse
Creates an analyzer for your account.
-
#create_archive_rule(params = {}) ⇒ Struct
Creates an archive rule for the specified analyzer.
-
#create_policy_preview_configuration(params = {}) ⇒ Types::CreatePolicyPreviewConfigurationResponse
Creates a policy preview configuration for your account.
-
#delete_analyzer(params = {}) ⇒ Struct
Deletes the specified analyzer.
-
#delete_archive_rule(params = {}) ⇒ Struct
Deletes the specified archive rule.
-
#delete_policy_preview_configuration(params = {}) ⇒ Struct
Deletes the policy preview configuration for your account.
-
#generate_finding_recommendation(params = {}) ⇒ Struct
Creates a recommendation for an unused permissions finding.
-
#get_access_preview(params = {}) ⇒ Types::GetAccessPreviewResponse
Retrieves information about an access preview for the specified analyzer.
-
#get_analyzed_resource(params = {}) ⇒ Types::GetAnalyzedResourceResponse
Retrieves information about a resource that was analyzed.
-
#get_analyzer(params = {}) ⇒ Types::GetAnalyzerResponse
Retrieves information about the specified analyzer.
-
#get_archive_rule(params = {}) ⇒ Types::GetArchiveRuleResponse
Retrieves information about an archive rule.
-
#get_finding(params = {}) ⇒ Types::GetFindingResponse
Retrieves information about the specified finding.
-
#get_finding_recommendation(params = {}) ⇒ Types::GetFindingRecommendationResponse
Retrieves information about a finding recommendation for the specified analyzer.
-
#get_finding_v2(params = {}) ⇒ Types::GetFindingV2Response
Retrieves information about the specified finding.
-
#get_findings_statistics(params = {}) ⇒ Types::GetFindingsStatisticsResponse
Retrieves a list of aggregated finding statistics for an external access or unused access analyzer.
-
#get_generated_policy(params = {}) ⇒ Types::GetGeneratedPolicyResponse
Retrieves the policy that was generated using
StartPolicyGeneration. -
#get_policy_preview_configuration(params = {}) ⇒ Types::GetPolicyPreviewConfigurationResponse
Retrieves the policy preview configuration for your account.
-
#get_policy_preview_job(params = {}) ⇒ Types::GetPolicyPreviewJobResponse
Retrieves the metadata, parameters, and status for a policy preview job.
-
#list_access_preview_findings(params = {}) ⇒ Types::ListAccessPreviewFindingsResponse
Retrieves a list of access preview findings generated by the specified access preview.
-
#list_access_previews(params = {}) ⇒ Types::ListAccessPreviewsResponse
Retrieves a list of access previews for the specified analyzer.
-
#list_analyzed_resources(params = {}) ⇒ Types::ListAnalyzedResourcesResponse
Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer.
-
#list_analyzers(params = {}) ⇒ Types::ListAnalyzersResponse
Retrieves a list of analyzers.
-
#list_archive_rules(params = {}) ⇒ Types::ListArchiveRulesResponse
Retrieves a list of archive rules created for the specified analyzer.
-
#list_findings(params = {}) ⇒ Types::ListFindingsResponse
Retrieves a list of findings generated by the specified analyzer.
-
#list_findings_v2(params = {}) ⇒ Types::ListFindingsV2Response
Retrieves a list of findings generated by the specified analyzer.
-
#list_policy_generations(params = {}) ⇒ Types::ListPolicyGenerationsResponse
Lists all of the policy generations requested in the last seven days.
-
#list_policy_preview_jobs(params = {}) ⇒ Types::ListPolicyPreviewJobsResponse
Lists all policy preview jobs with optional filtering by job status or target ID.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Retrieves a list of tags applied to the specified resource.
-
#start_policy_generation(params = {}) ⇒ Types::StartPolicyGenerationResponse
Starts the policy generation request.
-
#start_policy_preview_job(params = {}) ⇒ Types::StartPolicyPreviewJobResponse
Creates a policy preview analysis job to evaluate the impact of Service Control Policies (SCPs) before deployment.
-
#start_resource_scan(params = {}) ⇒ Struct
Immediately starts a scan of the policies applied to the specified resource.
-
#tag_resource(params = {}) ⇒ Struct
Adds a tag to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes a tag from the specified resource.
-
#update_analyzer(params = {}) ⇒ Types::UpdateAnalyzerResponse
Modifies the configuration of an existing analyzer.
-
#update_archive_rule(params = {}) ⇒ Struct
Updates the criteria and values for the specified archive rule.
-
#update_findings(params = {}) ⇒ Struct
Updates the status for the specified findings.
-
#validate_policy(params = {}) ⇒ Types::ValidatePolicyResponse
Requests the validation of a policy and returns a list of findings.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 473 def initialize(*args) super end |
Instance Method Details
#apply_archive_rule(params = {}) ⇒ Struct
Retroactively applies the archive rule to existing findings that meet the archive rule criteria.
508 509 510 511 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 508 def apply_archive_rule(params = {}, = {}) req = build_request(:apply_archive_rule, params) req.send_request() end |
#cancel_policy_generation(params = {}) ⇒ Struct
Cancels the requested policy generation.
533 534 535 536 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 533 def cancel_policy_generation(params = {}, = {}) req = build_request(:cancel_policy_generation, params) req.send_request() end |
#cancel_policy_preview_job(params = {}) ⇒ Struct
Cancels an in-progress policy preview job. Jobs that are already completed, failed, or canceled cannot be canceled.
567 568 569 570 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 567 def cancel_policy_preview_job(params = {}, = {}) req = build_request(:cancel_policy_preview_job, params) req.send_request() end |
#check_access_not_granted(params = {}) ⇒ Types::CheckAccessNotGrantedResponse
Checks whether the specified access isn't allowed by a policy.
696 697 698 699 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 696 def check_access_not_granted(params = {}, = {}) req = build_request(:check_access_not_granted, params) req.send_request() end |
#check_no_new_access(params = {}) ⇒ Types::CheckNoNewAccessResponse
Checks whether new access is allowed for an updated policy when compared to the existing policy.
You can find examples for reference policies and learn how to set up
and run a custom policy check for new access in the IAM Access
Analyzer custom policy checks samples repository on GitHub. The
reference policies in this repository are meant to be passed to the
existingPolicyDocument request parameter.
759 760 761 762 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 759 def check_no_new_access(params = {}, = {}) req = build_request(:check_no_new_access, params) req.send_request() end |
#check_no_public_access(params = {}) ⇒ Types::CheckNoPublicAccessResponse
Checks whether a resource policy can grant public access to the specified resource type.
838 839 840 841 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 838 def check_no_public_access(params = {}, = {}) req = build_request(:check_no_public_access, params) req.send_request() end |
#create_access_preview(params = {}) ⇒ Types::CreateAccessPreviewResponse
Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before deploying resource permissions.
1006 1007 1008 1009 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1006 def create_access_preview(params = {}, = {}) req = build_request(:create_access_preview, params) req.send_request() end |
#create_analyzer(params = {}) ⇒ Types::CreateAnalyzerResponse
Creates an analyzer for your account.
1114 1115 1116 1117 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1114 def create_analyzer(params = {}, = {}) req = build_request(:create_analyzer, params) req.send_request() end |
#create_archive_rule(params = {}) ⇒ Struct
Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.
To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the IAM User Guide.
1167 1168 1169 1170 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1167 def create_archive_rule(params = {}, = {}) req = build_request(:create_archive_rule, params) req.send_request() end |
#create_policy_preview_configuration(params = {}) ⇒ Types::CreatePolicyPreviewConfigurationResponse
Creates a policy preview configuration for your account. The configuration enables IAM Access Analyzer to collect and store CloudTrail authorization events needed for policy preview analysis.
1223 1224 1225 1226 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1223 def create_policy_preview_configuration(params = {}, = {}) req = build_request(:create_policy_preview_configuration, params) req.send_request() end |
#delete_analyzer(params = {}) ⇒ Struct
Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.
1255 1256 1257 1258 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1255 def delete_analyzer(params = {}, = {}) req = build_request(:delete_analyzer, params) req.send_request() end |
#delete_archive_rule(params = {}) ⇒ Struct
Deletes the specified archive rule.
1289 1290 1291 1292 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1289 def delete_archive_rule(params = {}, = {}) req = build_request(:delete_archive_rule, params) req.send_request() end |
#delete_policy_preview_configuration(params = {}) ⇒ Struct
Deletes the policy preview configuration for your account. After deletion, IAM Access Analyzer will stop collecting CloudTrail authorization events for policy preview analysis.
1332 1333 1334 1335 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1332 def delete_policy_preview_configuration(params = {}, = {}) req = build_request(:delete_policy_preview_configuration, params) req.send_request() end |
#generate_finding_recommendation(params = {}) ⇒ Struct
Creates a recommendation for an unused permissions finding.
1382 1383 1384 1385 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1382 def generate_finding_recommendation(params = {}, = {}) req = build_request(:generate_finding_recommendation, params) req.send_request() end |
#get_access_preview(params = {}) ⇒ Types::GetAccessPreviewResponse
Retrieves information about an access preview for the specified analyzer.
1474 1475 1476 1477 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1474 def get_access_preview(params = {}, = {}) req = build_request(:get_access_preview, params) req.send_request() end |
#get_analyzed_resource(params = {}) ⇒ Types::GetAnalyzedResourceResponse
Retrieves information about a resource that was analyzed.
1526 1527 1528 1529 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1526 def get_analyzed_resource(params = {}, = {}) req = build_request(:get_analyzed_resource, params) req.send_request() end |
#get_analyzer(params = {}) ⇒ Types::GetAnalyzerResponse
Retrieves information about the specified analyzer.
1577 1578 1579 1580 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1577 def get_analyzer(params = {}, = {}) req = build_request(:get_analyzer, params) req.send_request() end |
#get_archive_rule(params = {}) ⇒ Types::GetArchiveRuleResponse
Retrieves information about an archive rule.
To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the IAM User Guide.
1626 1627 1628 1629 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1626 def get_archive_rule(params = {}, = {}) req = build_request(:get_archive_rule, params) req.send_request() end |
#get_finding(params = {}) ⇒ Types::GetFindingResponse
Retrieves information about the specified finding. GetFinding and
GetFindingV2 both use access-analyzer:GetFinding in the Action
element of an IAM policy statement. You must have permission to
perform the access-analyzer:GetFinding action.
1690 1691 1692 1693 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1690 def get_finding(params = {}, = {}) req = build_request(:get_finding, params) req.send_request() end |
#get_finding_recommendation(params = {}) ⇒ Types::GetFindingRecommendationResponse
Retrieves information about a finding recommendation for the specified analyzer.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1835 1836 1837 1838 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1835 def get_finding_recommendation(params = {}, = {}) req = build_request(:get_finding_recommendation, params) req.send_request() end |
#get_finding_v2(params = {}) ⇒ Types::GetFindingV2Response
Retrieves information about the specified finding. GetFinding and
GetFindingV2 both use access-analyzer:GetFinding in the Action
element of an IAM policy statement. You must have permission to
perform the access-analyzer:GetFinding action.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1942 1943 1944 1945 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 1942 def get_finding_v2(params = {}, = {}) req = build_request(:get_finding_v2, params) req.send_request() end |
#get_findings_statistics(params = {}) ⇒ Types::GetFindingsStatisticsResponse
Retrieves a list of aggregated finding statistics for an external access or unused access analyzer.
2002 2003 2004 2005 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2002 def get_findings_statistics(params = {}, = {}) req = build_request(:get_findings_statistics, params) req.send_request() end |
#get_generated_policy(params = {}) ⇒ Types::GetGeneratedPolicyResponse
Retrieves the policy that was generated using StartPolicyGeneration.
2069 2070 2071 2072 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2069 def get_generated_policy(params = {}, = {}) req = build_request(:get_generated_policy, params) req.send_request() end |
#get_policy_preview_configuration(params = {}) ⇒ Types::GetPolicyPreviewConfigurationResponse
Retrieves the policy preview configuration for your account.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- policy_preview_configuration_active
2115 2116 2117 2118 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2115 def get_policy_preview_configuration(params = {}, = {}) req = build_request(:get_policy_preview_configuration, params) req.send_request() end |
#get_policy_preview_job(params = {}) ⇒ Types::GetPolicyPreviewJobResponse
Retrieves the metadata, parameters, and status for a policy preview job. Use this operation to monitor job progress and retrieve the Amazon S3 location of the completed analysis report.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- policy_preview_job_completed
2240 2241 2242 2243 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2240 def get_policy_preview_job(params = {}, = {}) req = build_request(:get_policy_preview_job, params) req.send_request() end |
#list_access_preview_findings(params = {}) ⇒ Types::ListAccessPreviewFindingsResponse
Retrieves a list of access preview findings generated by the specified access preview.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2322 2323 2324 2325 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2322 def list_access_preview_findings(params = {}, = {}) req = build_request(:list_access_preview_findings, params) req.send_request() end |
#list_access_previews(params = {}) ⇒ Types::ListAccessPreviewsResponse
Retrieves a list of access previews for the specified analyzer.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2371 2372 2373 2374 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2371 def list_access_previews(params = {}, = {}) req = build_request(:list_access_previews, params) req.send_request() end |
#list_analyzed_resources(params = {}) ⇒ Types::ListAnalyzedResourcesResponse
Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2424 2425 2426 2427 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2424 def list_analyzed_resources(params = {}, = {}) req = build_request(:list_analyzed_resources, params) req.send_request() end |
#list_analyzers(params = {}) ⇒ Types::ListAnalyzersResponse
Retrieves a list of analyzers.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2488 2489 2490 2491 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2488 def list_analyzers(params = {}, = {}) req = build_request(:list_analyzers, params) req.send_request() end |
#list_archive_rules(params = {}) ⇒ Types::ListArchiveRulesResponse
Retrieves a list of archive rules created for the specified analyzer.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2539 2540 2541 2542 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2539 def list_archive_rules(params = {}, = {}) req = build_request(:list_archive_rules, params) req.send_request() end |
#list_findings(params = {}) ⇒ Types::ListFindingsResponse
Retrieves a list of findings generated by the specified analyzer.
ListFindings and ListFindingsV2 both use
access-analyzer:ListFindings in the Action element of an IAM
policy statement. You must have permission to perform the
access-analyzer:ListFindings action.
To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2639 2640 2641 2642 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2639 def list_findings(params = {}, = {}) req = build_request(:list_findings, params) req.send_request() end |
#list_findings_v2(params = {}) ⇒ Types::ListFindingsV2Response
Retrieves a list of findings generated by the specified analyzer.
ListFindings and ListFindingsV2 both use
access-analyzer:ListFindings in the Action element of an IAM
policy statement. You must have permission to perform the
access-analyzer:ListFindings action.
To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2723 2724 2725 2726 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2723 def list_findings_v2(params = {}, = {}) req = build_request(:list_findings_v2, params) req.send_request() end |
#list_policy_generations(params = {}) ⇒ Types::ListPolicyGenerationsResponse
Lists all of the policy generations requested in the last seven days.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2770 2771 2772 2773 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2770 def list_policy_generations(params = {}, = {}) req = build_request(:list_policy_generations, params) req.send_request() end |
#list_policy_preview_jobs(params = {}) ⇒ Types::ListPolicyPreviewJobsResponse
Lists all policy preview jobs with optional filtering by job status or target ID. Results are paginated for efficient retrieval of large result sets.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2858 2859 2860 2861 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2858 def list_policy_preview_jobs(params = {}, = {}) req = build_request(:list_policy_preview_jobs, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Retrieves a list of tags applied to the specified resource.
2887 2888 2889 2890 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2887 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#start_policy_generation(params = {}) ⇒ Types::StartPolicyGenerationResponse
Starts the policy generation request.
2949 2950 2951 2952 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 2949 def start_policy_generation(params = {}, = {}) req = build_request(:start_policy_generation, params) req.send_request() end |
#start_policy_preview_job(params = {}) ⇒ Types::StartPolicyPreviewJobResponse
Creates a policy preview analysis job to evaluate the impact of Service Control Policies (SCPs) before deployment. The analysis uses historical CloudTrail authorization events to identify potential access denials, helping you prevent service disruptions.
The job analyzes CloudTrail events within a specified time window and generates a report identifying which events would be denied by the proposed policy. The report is stored in the specified Amazon S3 location.
3063 3064 3065 3066 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3063 def start_policy_preview_job(params = {}, = {}) req = build_request(:start_policy_preview_job, params) req.send_request() end |
#start_resource_scan(params = {}) ⇒ Struct
Immediately starts a scan of the policies applied to the specified resource.
3105 3106 3107 3108 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3105 def start_resource_scan(params = {}, = {}) req = build_request(:start_resource_scan, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds a tag to the specified resource.
3133 3134 3135 3136 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3133 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes a tag from the specified resource.
3159 3160 3161 3162 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3159 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_analyzer(params = {}) ⇒ Types::UpdateAnalyzerResponse
Modifies the configuration of an existing analyzer.
3236 3237 3238 3239 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3236 def update_analyzer(params = {}, = {}) req = build_request(:update_analyzer, params) req.send_request() end |
#update_archive_rule(params = {}) ⇒ Struct
Updates the criteria and values for the specified archive rule.
3281 3282 3283 3284 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3281 def update_archive_rule(params = {}, = {}) req = build_request(:update_archive_rule, params) req.send_request() end |
#update_findings(params = {}) ⇒ Struct
Updates the status for the specified findings.
3328 3329 3330 3331 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3328 def update_findings(params = {}, = {}) req = build_request(:update_findings, params) req.send_request() end |
#validate_policy(params = {}) ⇒ Types::ValidatePolicyResponse
Requests the validation of a policy and returns a list of findings. The findings help you identify issues and provide actionable recommendations to resolve the issue and enable you to author functional policies that meet security best practices.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
3422 3423 3424 3425 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3422 def validate_policy(params = {}, = {}) req = build_request(:validate_policy, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| policy_preview_configuration_active | #get_policy_preview_configuration | 5 | 24 |
| policy_preview_job_completed | #get_policy_preview_job | 30 | 5 |
3538 3539 3540 3541 3542 |
# File 'gems/aws-sdk-accessanalyzer/lib/aws-sdk-accessanalyzer/client.rb', line 3538 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |