Class: Aws::Inspector::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Inspector::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-inspector/client.rb
Overview
An API client for Inspector. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::Inspector::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_attributes_to_findings(params = {}) ⇒ Types::AddAttributesToFindingsResponse
Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.
-
#create_assessment_target(params = {}) ⇒ Types::CreateAssessmentTargetResponse
Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup.
-
#create_assessment_template(params = {}) ⇒ Types::CreateAssessmentTemplateResponse
Creates an assessment template for the assessment target that is specified by the ARN of the assessment target.
-
#create_exclusions_preview(params = {}) ⇒ Types::CreateExclusionsPreviewResponse
Starts the generation of an exclusions preview for the specified assessment template.
-
#create_resource_group(params = {}) ⇒ Types::CreateResourceGroupResponse
Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target.
-
#delete_assessment_run(params = {}) ⇒ Struct
Deletes the assessment run that is specified by the ARN of the assessment run.
-
#delete_assessment_target(params = {}) ⇒ Struct
Deletes the assessment target that is specified by the ARN of the assessment target.
-
#delete_assessment_template(params = {}) ⇒ Struct
Deletes the assessment template that is specified by the ARN of the assessment template.
-
#describe_assessment_runs(params = {}) ⇒ Types::DescribeAssessmentRunsResponse
Describes the assessment runs that are specified by the ARNs of the assessment runs.
-
#describe_assessment_targets(params = {}) ⇒ Types::DescribeAssessmentTargetsResponse
Describes the assessment targets that are specified by the ARNs of the assessment targets.
-
#describe_assessment_templates(params = {}) ⇒ Types::DescribeAssessmentTemplatesResponse
Describes the assessment templates that are specified by the ARNs of the assessment templates.
-
#describe_cross_account_access_role(params = {}) ⇒ Types::DescribeCrossAccountAccessRoleResponse
Describes the IAM role that enables Amazon Inspector to access your AWS account.
-
#describe_exclusions(params = {}) ⇒ Types::DescribeExclusionsResponse
Describes the exclusions that are specified by the exclusions’ ARNs.
-
#describe_findings(params = {}) ⇒ Types::DescribeFindingsResponse
Describes the findings that are specified by the ARNs of the findings.
-
#describe_resource_groups(params = {}) ⇒ Types::DescribeResourceGroupsResponse
Describes the resource groups that are specified by the ARNs of the resource groups.
-
#describe_rules_packages(params = {}) ⇒ Types::DescribeRulesPackagesResponse
Describes the rules packages that are specified by the ARNs of the rules packages.
-
#get_assessment_report(params = {}) ⇒ Types::GetAssessmentReportResponse
Produces an assessment report that includes detailed and comprehensive results of a specified assessment run.
-
#get_exclusions_preview(params = {}) ⇒ Types::GetExclusionsPreviewResponse
Retrieves the exclusions preview (a list of ExclusionPreview objects) specified by the preview token.
-
#get_telemetry_metadata(params = {}) ⇒ Types::GetTelemetryMetadataResponse
Information about the data that is collected for the specified assessment run.
-
#list_assessment_run_agents(params = {}) ⇒ Types::ListAssessmentRunAgentsResponse
Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.
-
#list_assessment_runs(params = {}) ⇒ Types::ListAssessmentRunsResponse
Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.
-
#list_assessment_targets(params = {}) ⇒ Types::ListAssessmentTargetsResponse
Lists the ARNs of the assessment targets within this AWS account.
-
#list_assessment_templates(params = {}) ⇒ Types::ListAssessmentTemplatesResponse
Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.
-
#list_event_subscriptions(params = {}) ⇒ Types::ListEventSubscriptionsResponse
Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template.
-
#list_exclusions(params = {}) ⇒ Types::ListExclusionsResponse
List exclusions that are generated by the assessment run.
-
#list_findings(params = {}) ⇒ Types::ListFindingsResponse
Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.
-
#list_rules_packages(params = {}) ⇒ Types::ListRulesPackagesResponse
Lists all available Amazon Inspector rules packages.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all tags associated with an assessment template.
-
#preview_agents(params = {}) ⇒ Types::PreviewAgentsResponse
Previews the agents installed on the EC2 instances that are part of the specified assessment target.
-
#register_cross_account_access_role(params = {}) ⇒ Struct
Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.
-
#remove_attributes_from_findings(params = {}) ⇒ Types::RemoveAttributesFromFindingsResponse
Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.
-
#set_tags_for_resource(params = {}) ⇒ Struct
Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.
-
#start_assessment_run(params = {}) ⇒ Types::StartAssessmentRunResponse
Starts the assessment run specified by the ARN of the assessment template.
-
#stop_assessment_run(params = {}) ⇒ Struct
Stops the assessment run that is specified by the ARN of the assessment run.
-
#subscribe_to_event(params = {}) ⇒ Struct
Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
-
#unsubscribe_from_event(params = {}) ⇒ Struct
Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
-
#update_assessment_target(params = {}) ⇒ Struct
Updates the assessment target that is specified by the ARN of the assessment target.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
441 442 443 |
# File 'lib/aws-sdk-inspector/client.rb', line 441 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3125 3126 3127 |
# File 'lib/aws-sdk-inspector/client.rb', line 3125 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3128 3129 3130 |
# File 'lib/aws-sdk-inspector/client.rb', line 3128 def errors_module Errors end |
Instance Method Details
#add_attributes_to_findings(params = {}) ⇒ Types::AddAttributesToFindingsResponse
Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.
506 507 508 509 |
# File 'lib/aws-sdk-inspector/client.rb', line 506 def add_attributes_to_findings(params = {}, = {}) req = build_request(:add_attributes_to_findings, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 |
# File 'lib/aws-sdk-inspector/client.rb', line 3098 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Inspector') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-inspector' context[:gem_version] = '1.63.0' Seahorse::Client::Request.new(handlers, context) end |
#create_assessment_target(params = {}) ⇒ Types::CreateAssessmentTargetResponse
Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target. If the [service-linked role] isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments. You can create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account. For more information, see [ Amazon Inspector Assessment Targets].
[1]: docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html [2]: docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html
572 573 574 575 |
# File 'lib/aws-sdk-inspector/client.rb', line 572 def create_assessment_target(params = {}, = {}) req = build_request(:create_assessment_target, params) req.send_request() end |
#create_assessment_template(params = {}) ⇒ Types::CreateAssessmentTemplateResponse
Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the [service-linked role] isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.
[1]: docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html
662 663 664 665 |
# File 'lib/aws-sdk-inspector/client.rb', line 662 def create_assessment_template(params = {}, = {}) req = build_request(:create_assessment_template, params) req.send_request() end |
#create_exclusions_preview(params = {}) ⇒ Types::CreateExclusionsPreviewResponse
Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment.
694 695 696 697 |
# File 'lib/aws-sdk-inspector/client.rb', line 694 def create_exclusions_preview(params = {}, = {}) req = build_request(:create_exclusions_preview, params) req.send_request() end |
#create_resource_group(params = {}) ⇒ Types::CreateResourceGroupResponse
Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see CreateAssessmentTarget.
756 757 758 759 |
# File 'lib/aws-sdk-inspector/client.rb', line 756 def create_resource_group(params = {}, = {}) req = build_request(:create_resource_group, params) req.send_request() end |
#delete_assessment_run(params = {}) ⇒ Struct
Deletes the assessment run that is specified by the ARN of the assessment run.
788 789 790 791 |
# File 'lib/aws-sdk-inspector/client.rb', line 788 def delete_assessment_run(params = {}, = {}) req = build_request(:delete_assessment_run, params) req.send_request() end |
#delete_assessment_target(params = {}) ⇒ Struct
Deletes the assessment target that is specified by the ARN of the assessment target.
820 821 822 823 |
# File 'lib/aws-sdk-inspector/client.rb', line 820 def delete_assessment_target(params = {}, = {}) req = build_request(:delete_assessment_target, params) req.send_request() end |
#delete_assessment_template(params = {}) ⇒ Struct
Deletes the assessment template that is specified by the ARN of the assessment template.
853 854 855 856 |
# File 'lib/aws-sdk-inspector/client.rb', line 853 def delete_assessment_template(params = {}, = {}) req = build_request(:delete_assessment_template, params) req.send_request() end |
#describe_assessment_runs(params = {}) ⇒ Types::DescribeAssessmentRunsResponse
Describes the assessment runs that are specified by the ARNs of the assessment runs.
992 993 994 995 |
# File 'lib/aws-sdk-inspector/client.rb', line 992 def describe_assessment_runs(params = {}, = {}) req = build_request(:describe_assessment_runs, params) req.send_request() end |
#describe_assessment_targets(params = {}) ⇒ Types::DescribeAssessmentTargetsResponse
Describes the assessment targets that are specified by the ARNs of the assessment targets.
1057 1058 1059 1060 |
# File 'lib/aws-sdk-inspector/client.rb', line 1057 def describe_assessment_targets(params = {}, = {}) req = build_request(:describe_assessment_targets, params) req.send_request() end |
#describe_assessment_templates(params = {}) ⇒ Types::DescribeAssessmentTemplatesResponse
Describes the assessment templates that are specified by the ARNs of the assessment templates.
1133 1134 1135 1136 |
# File 'lib/aws-sdk-inspector/client.rb', line 1133 def describe_assessment_templates(params = {}, = {}) req = build_request(:describe_assessment_templates, params) req.send_request() end |
#describe_cross_account_access_role(params = {}) ⇒ Types::DescribeCrossAccountAccessRoleResponse
Describes the IAM role that enables Amazon Inspector to access your AWS account.
1172 1173 1174 1175 |
# File 'lib/aws-sdk-inspector/client.rb', line 1172 def describe_cross_account_access_role(params = {}, = {}) req = build_request(:describe_cross_account_access_role, params) req.send_request() end |
#describe_exclusions(params = {}) ⇒ Types::DescribeExclusionsResponse
Describes the exclusions that are specified by the exclusions’ ARNs.
1220 1221 1222 1223 |
# File 'lib/aws-sdk-inspector/client.rb', line 1220 def describe_exclusions(params = {}, = {}) req = build_request(:describe_exclusions, params) req.send_request() end |
#describe_findings(params = {}) ⇒ Types::DescribeFindingsResponse
Describes the findings that are specified by the ARNs of the findings.
1354 1355 1356 1357 |
# File 'lib/aws-sdk-inspector/client.rb', line 1354 def describe_findings(params = {}, = {}) req = build_request(:describe_findings, params) req.send_request() end |
#describe_resource_groups(params = {}) ⇒ Types::DescribeResourceGroupsResponse
Describes the resource groups that are specified by the ARNs of the resource groups.
1421 1422 1423 1424 |
# File 'lib/aws-sdk-inspector/client.rb', line 1421 def describe_resource_groups(params = {}, = {}) req = build_request(:describe_resource_groups, params) req.send_request() end |
#describe_rules_packages(params = {}) ⇒ Types::DescribeRulesPackagesResponse
Describes the rules packages that are specified by the ARNs of the rules packages.
1490 1491 1492 1493 |
# File 'lib/aws-sdk-inspector/client.rb', line 1490 def describe_rules_packages(params = {}, = {}) req = build_request(:describe_rules_packages, params) req.send_request() end |
#get_assessment_report(params = {}) ⇒ Types::GetAssessmentReportResponse
Produces an assessment report that includes detailed and comprehensive results of a specified assessment run.
1537 1538 1539 1540 |
# File 'lib/aws-sdk-inspector/client.rb', line 1537 def get_assessment_report(params = {}, = {}) req = build_request(:get_assessment_report, params) req.send_request() end |
#get_exclusions_preview(params = {}) ⇒ Types::GetExclusionsPreviewResponse
Retrieves the exclusions preview (a list of ExclusionPreview objects) specified by the preview token. You can obtain the preview token by running the CreateExclusionsPreview API.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1606 1607 1608 1609 |
# File 'lib/aws-sdk-inspector/client.rb', line 1606 def get_exclusions_preview(params = {}, = {}) req = build_request(:get_exclusions_preview, params) req.send_request() end |
#get_telemetry_metadata(params = {}) ⇒ Types::GetTelemetryMetadataResponse
Information about the data that is collected for the specified assessment run.
1799 1800 1801 1802 |
# File 'lib/aws-sdk-inspector/client.rb', line 1799 def (params = {}, = {}) req = build_request(:get_telemetry_metadata, params) req.send_request() end |
#list_assessment_run_agents(params = {}) ⇒ Types::ListAssessmentRunAgentsResponse
Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2039 2040 2041 2042 |
# File 'lib/aws-sdk-inspector/client.rb', line 2039 def list_assessment_run_agents(params = {}, = {}) req = build_request(:list_assessment_run_agents, params) req.send_request() end |
#list_assessment_runs(params = {}) ⇒ Types::ListAssessmentRunsResponse
Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2139 2140 2141 2142 |
# File 'lib/aws-sdk-inspector/client.rb', line 2139 def list_assessment_runs(params = {}, = {}) req = build_request(:list_assessment_runs, params) req.send_request() end |
#list_assessment_targets(params = {}) ⇒ Types::ListAssessmentTargetsResponse
Lists the ARNs of the assessment targets within this AWS account. For more information about assessment targets, see [Amazon Inspector Assessment Targets].
[1]: docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2216 2217 2218 2219 |
# File 'lib/aws-sdk-inspector/client.rb', line 2216 def list_assessment_targets(params = {}, = {}) req = build_request(:list_assessment_targets, params) req.send_request() end |
#list_assessment_templates(params = {}) ⇒ Types::ListAssessmentTemplatesResponse
Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2303 2304 2305 2306 |
# File 'lib/aws-sdk-inspector/client.rb', line 2303 def list_assessment_templates(params = {}, = {}) req = build_request(:list_assessment_templates, params) req.send_request() end |
#list_event_subscriptions(params = {}) ⇒ Types::ListEventSubscriptionsResponse
Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. For more information, see SubscribeToEvent and UnsubscribeFromEvent.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2384 2385 2386 2387 |
# File 'lib/aws-sdk-inspector/client.rb', line 2384 def list_event_subscriptions(params = {}, = {}) req = build_request(:list_event_subscriptions, params) req.send_request() end |
#list_exclusions(params = {}) ⇒ Types::ListExclusionsResponse
List exclusions that are generated by the assessment run.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2432 2433 2434 2435 |
# File 'lib/aws-sdk-inspector/client.rb', line 2432 def list_exclusions(params = {}, = {}) req = build_request(:list_exclusions, params) req.send_request() end |
#list_findings(params = {}) ⇒ Types::ListFindingsResponse
Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2533 2534 2535 2536 |
# File 'lib/aws-sdk-inspector/client.rb', line 2533 def list_findings(params = {}, = {}) req = build_request(:list_findings, params) req.send_request() end |
#list_rules_packages(params = {}) ⇒ Types::ListRulesPackagesResponse
Lists all available Amazon Inspector rules packages.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2596 2597 2598 2599 |
# File 'lib/aws-sdk-inspector/client.rb', line 2596 def list_rules_packages(params = {}, = {}) req = build_request(:list_rules_packages, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists all tags associated with an assessment template.
2646 2647 2648 2649 |
# File 'lib/aws-sdk-inspector/client.rb', line 2646 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#preview_agents(params = {}) ⇒ Types::PreviewAgentsResponse
Previews the agents installed on the EC2 instances that are part of the specified assessment target.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2721 2722 2723 2724 |
# File 'lib/aws-sdk-inspector/client.rb', line 2721 def preview_agents(params = {}, = {}) req = build_request(:preview_agents, params) req.send_request() end |
#register_cross_account_access_role(params = {}) ⇒ Struct
Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.
2755 2756 2757 2758 |
# File 'lib/aws-sdk-inspector/client.rb', line 2755 def register_cross_account_access_role(params = {}, = {}) req = build_request(:register_cross_account_access_role, params) req.send_request() end |
#remove_attributes_from_findings(params = {}) ⇒ Types::RemoveAttributesFromFindingsResponse
Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.
2814 2815 2816 2817 |
# File 'lib/aws-sdk-inspector/client.rb', line 2814 def remove_attributes_from_findings(params = {}, = {}) req = build_request(:remove_attributes_from_findings, params) req.send_request() end |
#set_tags_for_resource(params = {}) ⇒ Struct
Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.
2862 2863 2864 2865 |
# File 'lib/aws-sdk-inspector/client.rb', line 2862 def (params = {}, = {}) req = build_request(:set_tags_for_resource, params) req.send_request() end |
#start_assessment_run(params = {}) ⇒ Types::StartAssessmentRunResponse
Starts the assessment run specified by the ARN of the assessment template. For this API to function properly, you must not exceed the limit of running up to 500 concurrent agents per AWS account.
2915 2916 2917 2918 |
# File 'lib/aws-sdk-inspector/client.rb', line 2915 def start_assessment_run(params = {}, = {}) req = build_request(:start_assessment_run, params) req.send_request() end |
#stop_assessment_run(params = {}) ⇒ Struct
Stops the assessment run that is specified by the ARN of the assessment run.
2955 2956 2957 2958 |
# File 'lib/aws-sdk-inspector/client.rb', line 2955 def stop_assessment_run(params = {}, = {}) req = build_request(:stop_assessment_run, params) req.send_request() end |
#subscribe_to_event(params = {}) ⇒ Struct
Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
2999 3000 3001 3002 |
# File 'lib/aws-sdk-inspector/client.rb', line 2999 def subscribe_to_event(params = {}, = {}) req = build_request(:subscribe_to_event, params) req.send_request() end |
#unsubscribe_from_event(params = {}) ⇒ Struct
Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.
3043 3044 3045 3046 |
# File 'lib/aws-sdk-inspector/client.rb', line 3043 def unsubscribe_from_event(params = {}, = {}) req = build_request(:unsubscribe_from_event, params) req.send_request() end |
#update_assessment_target(params = {}) ⇒ Struct
Updates the assessment target that is specified by the ARN of the assessment target.
If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.
3089 3090 3091 3092 |
# File 'lib/aws-sdk-inspector/client.rb', line 3089 def update_assessment_target(params = {}, = {}) req = build_request(:update_assessment_target, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3118 3119 3120 |
# File 'lib/aws-sdk-inspector/client.rb', line 3118 def waiter_names [] end |