You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Inspector::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#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(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 152

def initialize(*args)
  super
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.

Examples:

Example: Add attributes to findings


# Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.

resp = client.add_attributes_to_findings({
  attributes: [
    {
      key: "Example", 
      value: "example", 
    }, 
  ], 
  finding_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU", 
  ], 
})

resp.to_h outputs the following:
{
  failed_items: {
  }, 
}

Request syntax with placeholder values


resp = client.add_attributes_to_findings({
  finding_arns: ["Arn"], # required
  attributes: [ # required
    {
      key: "AttributeKey", # required
      value: "AttributeValue",
    },
  ],
})

Response structure


resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :finding_arns (required, Array<String>)

    The ARNs that specify the findings that you want to assign attributes to.

  • :attributes (required, Array<Types::Attribute>)

    The array of attributes that you want to assign to specified findings.

Returns:

See Also:



217
218
219
220
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 217

def add_attributes_to_findings(params = {}, options = {})
  req = build_request(:add_attributes_to_findings, params)
  req.send_request(options)
end

#create_assessment_target(params = {}) ⇒ Types::CreateAssessmentTargetResponse

Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup. 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.

Examples:

Example: Create assessment target


# Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup. You can
# create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account.

resp = client.create_assessment_target({
  assessment_target_name: "ExampleAssessmentTarget", 
  resource_group_arn: "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv", 
})

resp.to_h outputs the following:
{
  assessment_target_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX", 
}

Request syntax with placeholder values


resp = client.create_assessment_target({
  assessment_target_name: "AssessmentTargetName", # required
  resource_group_arn: "Arn", # required
})

Response structure


resp.assessment_target_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_name (required, String)

    The 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 (required, String)

    The ARN that specifies the resource group that is used to create the assessment target.

Returns:

See Also:



275
276
277
278
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 275

def create_assessment_target(params = {}, options = {})
  req = build_request(:create_assessment_target, params)
  req.send_request(options)
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.

Examples:

Example: Create assessment template


# Creates an assessment template for the assessment target that is specified by the ARN of the assessment target.

resp = client.create_assessment_template({
  assessment_target_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX", 
  assessment_template_name: "ExampleAssessmentTemplate", 
  duration_in_seconds: 180, 
  rules_package_arns: [
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp", 
  ], 
  user_attributes_for_findings: [
    {
      key: "Example", 
      value: "example", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  assessment_template_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T", 
}

Request syntax with placeholder values


resp = client.create_assessment_template({
  assessment_target_arn: "Arn", # required
  assessment_template_name: "AssessmentTemplateName", # required
  duration_in_seconds: 1, # required
  rules_package_arns: ["Arn"], # required
  user_attributes_for_findings: [
    {
      key: "AttributeKey", # required
      value: "AttributeValue",
    },
  ],
})

Response structure


resp.assessment_template_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_arn (required, String)

    The ARN that specifies the assessment target for which you want to create the assessment template.

  • :assessment_template_name (required, String)

    The 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 (required, Integer)

    The duration of the assessment run in seconds. The default value is 3600 seconds (one hour).

  • :rules_package_arns (required, Array<String>)

    The ARNs that specify the rules packages that you want to attach to the assessment template.

  • :user_attributes_for_findings (Array<Types::Attribute>)

    The 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 Attribute object). Within an assessment template, each key must be unique.

Returns:

See Also:



359
360
361
362
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 359

def create_assessment_template(params = {}, options = {})
  req = build_request(:create_assessment_template, params)
  req.send_request(options)
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.

Examples:

Example: Create resource group


# 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. 

resp = client.create_resource_group({
  resource_group_tags: [
    {
      key: "Name", 
      value: "example", 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  resource_group_arn: "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv", 
}

Request syntax with placeholder values


resp = client.create_resource_group({
  resource_group_tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.resource_group_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_group_tags (required, Array<Types::ResourceGroupTag>)

    A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]\},{"key":"Key2","values":["Value3"]\}]'.

    For example,'[{"key":"Name","values":["TestEC2Instance"]\}]'.

Returns:

See Also:



421
422
423
424
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 421

def create_resource_group(params = {}, options = {})
  req = build_request(:create_resource_group, params)
  req.send_request(options)
end

#delete_assessment_run(params = {}) ⇒ Struct

Deletes the assessment run that is specified by the ARN of the assessment run.

Examples:

Example: Delete assessment run


# Deletes the assessment run that is specified by the ARN of the assessment run.

resp = client.delete_assessment_run({
  assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-11LMTAVe", 
})

Request syntax with placeholder values


resp = client.delete_assessment_run({
  assessment_run_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arn (required, String)

    The ARN that specifies the assessment run that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



453
454
455
456
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 453

def delete_assessment_run(params = {}, options = {})
  req = build_request(:delete_assessment_run, params)
  req.send_request(options)
end

#delete_assessment_target(params = {}) ⇒ Struct

Deletes the assessment target that is specified by the ARN of the assessment target.

Examples:

Example: Delete assessment target


# Deletes the assessment target that is specified by the ARN of the assessment target.

resp = client.delete_assessment_target({
  assessment_target_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
})

Request syntax with placeholder values


resp = client.delete_assessment_target({
  assessment_target_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_arn (required, String)

    The ARN that specifies the assessment target that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



485
486
487
488
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 485

def delete_assessment_target(params = {}, options = {})
  req = build_request(:delete_assessment_target, params)
  req.send_request(options)
end

#delete_assessment_template(params = {}) ⇒ Struct

Deletes the assessment template that is specified by the ARN of the assessment template.

Examples:

Example: Delete assessment template


# Deletes the assessment template that is specified by the ARN of the assessment template.

resp = client.delete_assessment_template({
  assessment_template_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T", 
})

Request syntax with placeholder values


resp = client.delete_assessment_template({
  assessment_template_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_template_arn (required, String)

    The ARN that specifies the assessment template that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



518
519
520
521
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 518

def delete_assessment_template(params = {}, options = {})
  req = build_request(:delete_assessment_template, params)
  req.send_request(options)
end

#describe_assessment_runs(params = {}) ⇒ Types::DescribeAssessmentRunsResponse

Describes the assessment runs that are specified by the ARNs of the assessment runs.

Examples:

Example: Describte assessment runs


# Describes the assessment runs that are specified by the ARNs of the assessment runs.

resp = client.describe_assessment_runs({
  assessment_run_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
  ], 
})

resp.to_h outputs the following:
{
  assessment_runs: [
    {
      name: "Run 1 for ExampleAssessmentTemplate", 
      arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
      assessment_template_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", 
      completed_at: Time.parse("1458680301.4"), 
      created_at: Time.parse("1458680170.035"), 
      data_collected: true, 
      duration_in_seconds: 3600, 
      finding_counts: {
        "High" => 14, 
        "Informational" => 0, 
        "Low" => 0, 
        "Medium" => 2, 
        "Undefined" => 0, 
      }, 
      notifications: [
      ], 
      rules_package_arns: [
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-X1KXtawP", 
      ], 
      started_at: Time.parse("1458680170.161"), 
      state: "COMPLETED", 
      state_changed_at: Time.parse("1458680301.4"), 
      state_changes: [
        {
          state: "CREATED", 
          state_changed_at: Time.parse("1458680170.035"), 
        }, 
        {
          state: "START_DATA_COLLECTION_PENDING", 
          state_changed_at: Time.parse("1458680170.065"), 
        }, 
        {
          state: "START_DATA_COLLECTION_IN_PROGRESS", 
          state_changed_at: Time.parse("1458680170.096"), 
        }, 
        {
          state: "COLLECTING_DATA", 
          state_changed_at: Time.parse("1458680170.161"), 
        }, 
        {
          state: "STOP_DATA_COLLECTION_PENDING", 
          state_changed_at: Time.parse("1458680239.883"), 
        }, 
        {
          state: "DATA_COLLECTED", 
          state_changed_at: Time.parse("1458680299.847"), 
        }, 
        {
          state: "EVALUATING_RULES", 
          state_changed_at: Time.parse("1458680300.099"), 
        }, 
        {
          state: "COMPLETED", 
          state_changed_at: Time.parse("1458680301.4"), 
        }, 
      ], 
      user_attributes_for_findings: [
      ], 
    }, 
  ], 
  failed_items: {
  }, 
}

Request syntax with placeholder values


resp = client.describe_assessment_runs({
  assessment_run_arns: ["Arn"], # required
})

Response structure


resp.assessment_runs #=> Array
resp.assessment_runs[0].arn #=> String
resp.assessment_runs[0].name #=> String
resp.assessment_runs[0].assessment_template_arn #=> String
resp.assessment_runs[0].state #=> String, one of "CREATED", "START_DATA_COLLECTION_PENDING", "START_DATA_COLLECTION_IN_PROGRESS", "COLLECTING_DATA", "STOP_DATA_COLLECTION_PENDING", "DATA_COLLECTED", "START_EVALUATING_RULES_PENDING", "EVALUATING_RULES", "FAILED", "ERROR", "COMPLETED", "COMPLETED_WITH_ERRORS", "CANCELED"
resp.assessment_runs[0].duration_in_seconds #=> Integer
resp.assessment_runs[0].rules_package_arns #=> Array
resp.assessment_runs[0].rules_package_arns[0] #=> String
resp.assessment_runs[0].user_attributes_for_findings #=> Array
resp.assessment_runs[0].user_attributes_for_findings[0].key #=> String
resp.assessment_runs[0].user_attributes_for_findings[0].value #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.assessment_runs[0].created_at #=> Time
resp.assessment_runs[0].started_at #=> Time
resp.assessment_runs[0].completed_at #=> Time
resp.assessment_runs[0].state_changed_at #=> Time
resp.assessment_runs[0].data_collected #=> Boolean
resp.assessment_runs[0].state_changes #=> Array
resp.assessment_runs[0].state_changes[0].state_changed_at #=> Time
resp.assessment_runs[0].state_changes[0].state #=> String, one of "CREATED", "START_DATA_COLLECTION_PENDING", "START_DATA_COLLECTION_IN_PROGRESS", "COLLECTING_DATA", "STOP_DATA_COLLECTION_PENDING", "DATA_COLLECTED", "START_EVALUATING_RULES_PENDING", "EVALUATING_RULES", "FAILED", "ERROR", "COMPLETED", "COMPLETED_WITH_ERRORS", "CANCELED"
resp.assessment_runs[0].notifications #=> Array
resp.assessment_runs[0].notifications[0].date #=> Time
resp.assessment_runs[0].notifications[0].event #=> String, one of "ASSESSMENT_RUN_STARTED", "ASSESSMENT_RUN_COMPLETED", "ASSESSMENT_RUN_STATE_CHANGED", "FINDING_REPORTED", "OTHER"
resp.assessment_runs[0].notifications[0].message #=> String
resp.assessment_runs[0].notifications[0].error #=> Boolean
resp.assessment_runs[0].notifications[0].sns_topic_arn #=> String
resp.assessment_runs[0].notifications[0].sns_publish_status_code #=> String, one of "SUCCESS", "TOPIC_DOES_NOT_EXIST", "ACCESS_DENIED", "INTERNAL_ERROR"
resp.assessment_runs[0].finding_counts #=> Hash
resp.assessment_runs[0].finding_counts["Severity"] #=> Integer
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arns (required, Array<String>)

    The ARN that specifies the assessment run that you want to describe.

Returns:

See Also:



657
658
659
660
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 657

def describe_assessment_runs(params = {}, options = {})
  req = build_request(:describe_assessment_runs, params)
  req.send_request(options)
end

#describe_assessment_targets(params = {}) ⇒ Types::DescribeAssessmentTargetsResponse

Describes the assessment targets that are specified by the ARNs of the assessment targets.

Examples:

Example: Describte assessment targets


# Describes the assessment targets that are specified by the ARNs of the assessment targets.

resp = client.describe_assessment_targets({
  assessment_target_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
  ], 
})

resp.to_h outputs the following:
{
  assessment_targets: [
    {
      name: "ExampleAssessmentTarget", 
      arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
      created_at: Time.parse("1458074191.459"), 
      resource_group_arn: "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI", 
      updated_at: Time.parse("1458074191.459"), 
    }, 
  ], 
  failed_items: {
  }, 
}

Request syntax with placeholder values


resp = client.describe_assessment_targets({
  assessment_target_arns: ["Arn"], # required
})

Response structure


resp.assessment_targets #=> Array
resp.assessment_targets[0].arn #=> String
resp.assessment_targets[0].name #=> String
resp.assessment_targets[0].resource_group_arn #=> String
resp.assessment_targets[0].created_at #=> Time
resp.assessment_targets[0].updated_at #=> Time
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_arns (required, Array<String>)

    The ARNs that specifies the assessment targets that you want to describe.

Returns:

See Also:



722
723
724
725
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 722

def describe_assessment_targets(params = {}, options = {})
  req = build_request(:describe_assessment_targets, params)
  req.send_request(options)
end

#describe_assessment_templates(params = {}) ⇒ Types::DescribeAssessmentTemplatesResponse

Describes the assessment templates that are specified by the ARNs of the assessment templates.

Examples:

Example: Describte assessment templates


# Describes the assessment templates that are specified by the ARNs of the assessment templates.

resp = client.describe_assessment_templates({
  assessment_template_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", 
  ], 
})

resp.to_h outputs the following:
{
  assessment_templates: [
    {
      name: "ExampleAssessmentTemplate", 
      arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", 
      assessment_target_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
      created_at: Time.parse("1458074191.844"), 
      duration_in_seconds: 3600, 
      rules_package_arns: [
        "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-X1KXtawP", 
      ], 
      user_attributes_for_findings: [
      ], 
    }, 
  ], 
  failed_items: {
  }, 
}

Request syntax with placeholder values


resp = client.describe_assessment_templates({
  assessment_template_arns: ["Arn"], # required
})

Response structure


resp.assessment_templates #=> Array
resp.assessment_templates[0].arn #=> String
resp.assessment_templates[0].name #=> String
resp.assessment_templates[0].assessment_target_arn #=> String
resp.assessment_templates[0].duration_in_seconds #=> Integer
resp.assessment_templates[0].rules_package_arns #=> Array
resp.assessment_templates[0].rules_package_arns[0] #=> String
resp.assessment_templates[0].user_attributes_for_findings #=> Array
resp.assessment_templates[0].user_attributes_for_findings[0].key #=> String
resp.assessment_templates[0].user_attributes_for_findings[0].value #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.assessment_templates[0].created_at #=> Time
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_template_arns (required, Array<String>)

Returns:

See Also:



795
796
797
798
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 795

def describe_assessment_templates(params = {}, options = {})
  req = build_request(:describe_assessment_templates, params)
  req.send_request(options)
end

#describe_cross_account_access_role(params = {}) ⇒ Types::DescribeCrossAccountAccessRoleResponse

Describes the IAM role that enables Amazon Inspector to access your AWS account.

Examples:

Example: Describte cross account access role


# Describes the IAM role that enables Amazon Inspector to access your AWS account.

resp = client.({
})

resp.to_h outputs the following:
{
  registered_at: Time.parse("1458069182.826"), 
  role_arn: "arn:aws:iam::123456789012:role/inspector", 
  valid: true, 
}

Response structure


resp.role_arn #=> String
resp.valid #=> Boolean
resp.registered_at #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



834
835
836
837
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 834

def (params = {}, options = {})
  req = build_request(:describe_cross_account_access_role, params)
  req.send_request(options)
end

#describe_findings(params = {}) ⇒ Types::DescribeFindingsResponse

Describes the findings that are specified by the ARNs of the findings.

Examples:

Example: Describe findings


# Describes the findings that are specified by the ARNs of the findings.

resp = client.describe_findings({
  finding_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE/finding/0-HwPnsDm4", 
  ], 
})

resp.to_h outputs the following:
{
  failed_items: {
  }, 
  findings: [
    {
      arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE/finding/0-HwPnsDm4", 
      asset_attributes: {
        ipv4_addresses: [
        ], 
        schema_version: 1, 
      }, 
      asset_type: "ec2-instance", 
      attributes: [
      ], 
      confidence: 10, 
      created_at: Time.parse("1458680301.37"), 
      description: "Amazon Inspector did not find any potential security issues during this assessment.", 
      indicator_of_compromise: false, 
      numeric_severity: 0, 
      recommendation: "No remediation needed.", 
      schema_version: 1, 
      service: "Inspector", 
      service_attributes: {
        assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
        rules_package_arn: "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-X1KXtawP", 
        schema_version: 1, 
      }, 
      severity: "Informational", 
      title: "No potential security issues found", 
      updated_at: Time.parse("1458680301.37"), 
      user_attributes: [
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_findings({
  finding_arns: ["Arn"], # required
  locale: "EN_US", # accepts EN_US
})

Response structure


resp.findings #=> Array
resp.findings[0].arn #=> String
resp.findings[0].schema_version #=> Integer
resp.findings[0].service #=> String
resp.findings[0].service_attributes.schema_version #=> Integer
resp.findings[0].service_attributes.assessment_run_arn #=> String
resp.findings[0].service_attributes.rules_package_arn #=> String
resp.findings[0].asset_type #=> String, one of "ec2-instance"
resp.findings[0].asset_attributes.schema_version #=> Integer
resp.findings[0].asset_attributes.agent_id #=> String
resp.findings[0].asset_attributes.auto_scaling_group #=> String
resp.findings[0].asset_attributes.ami_id #=> String
resp.findings[0].asset_attributes.hostname #=> String
resp.findings[0].asset_attributes.ipv4_addresses #=> Array
resp.findings[0].asset_attributes.ipv4_addresses[0] #=> String
resp.findings[0].id #=> String
resp.findings[0].title #=> String
resp.findings[0].description #=> String
resp.findings[0].recommendation #=> String
resp.findings[0].severity #=> String, one of "Low", "Medium", "High", "Informational", "Undefined"
resp.findings[0].numeric_severity #=> Float
resp.findings[0].confidence #=> Integer
resp.findings[0].indicator_of_compromise #=> Boolean
resp.findings[0].attributes #=> Array
resp.findings[0].attributes[0].key #=> String
resp.findings[0].attributes[0].value #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.findings[0].user_attributes #=> Array
resp.findings[0].user_attributes[0].key #=> String
resp.findings[0].user_attributes[0].value #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
resp.findings[0].created_at #=> Time
resp.findings[0].updated_at #=> Time
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :finding_arns (required, Array<String>)

    The ARN that specifies the finding that you want to describe.

  • :locale (String)

    The locale into which you want to translate a finding description, recommendation, and the short description that identifies the finding.

Returns:

See Also:



949
950
951
952
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 949

def describe_findings(params = {}, options = {})
  req = build_request(:describe_findings, params)
  req.send_request(options)
end

#describe_resource_groups(params = {}) ⇒ Types::DescribeResourceGroupsResponse

Describes the resource groups that are specified by the ARNs of the resource groups.

Examples:

Example: Describe resource groups


# Describes the resource groups that are specified by the ARNs of the resource groups.

resp = client.describe_resource_groups({
  resource_group_arns: [
    "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI", 
  ], 
})

resp.to_h outputs the following:
{
  failed_items: {
  }, 
  resource_groups: [
    {
      arn: "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-PyGXopAI", 
      created_at: Time.parse("1458074191.098"), 
      tags: [
        {
          key: "Name", 
          value: "example", 
        }, 
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_resource_groups({
  resource_group_arns: ["Arn"], # required
})

Response structure


resp.resource_groups #=> Array
resp.resource_groups[0].arn #=> String
resp.resource_groups[0].tags #=> Array
resp.resource_groups[0].tags[0].key #=> String
resp.resource_groups[0].tags[0].value #=> String
resp.resource_groups[0].created_at #=> Time
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_group_arns (required, Array<String>)

    The ARN that specifies the resource group that you want to describe.

Returns:

See Also:



1016
1017
1018
1019
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1016

def describe_resource_groups(params = {}, options = {})
  req = build_request(:describe_resource_groups, params)
  req.send_request(options)
end

#describe_rules_packages(params = {}) ⇒ Types::DescribeRulesPackagesResponse

Describes the rules packages that are specified by the ARNs of the rules packages.

Examples:

Example: Describe rules packages


# Describes the rules packages that are specified by the ARNs of the rules packages.

resp = client.describe_rules_packages({
  rules_package_arns: [
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", 
  ], 
})

resp.to_h outputs the following:
{
  failed_items: {
  }, 
  rules_packages: [
    {
      version: "1.1", 
      name: "Security Best Practices", 
      arn: "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", 
      description: "The rules in this package help determine whether your systems are configured securely.", 
      provider: "Amazon Web Services, Inc.", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_rules_packages({
  rules_package_arns: ["Arn"], # required
  locale: "EN_US", # accepts EN_US
})

Response structure


resp.rules_packages #=> Array
resp.rules_packages[0].arn #=> String
resp.rules_packages[0].name #=> String
resp.rules_packages[0].version #=> String
resp.rules_packages[0].provider #=> String
resp.rules_packages[0].description #=> String
resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :rules_package_arns (required, Array<String>)

    The ARN that specifies the rules package that you want to describe.

  • :locale (String)

    The locale that you want to translate a rules package description into.

Returns:

See Also:



1085
1086
1087
1088
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1085

def describe_rules_packages(params = {}, options = {})
  req = build_request(:describe_rules_packages, params)
  req.send_request(options)
end

#get_assessment_report(params = {}) ⇒ Types::GetAssessmentReportResponse

Produces an assessment report that includes detailed and comprehensive results of a specified assessment run.

Examples:

Request syntax with placeholder values


resp = client.get_assessment_report({
  assessment_run_arn: "Arn", # required
  report_file_format: "HTML", # required, accepts HTML, PDF
  report_type: "FINDING", # required, accepts FINDING, FULL
})

Response structure


resp.status #=> String, one of "WORK_IN_PROGRESS", "FAILED", "COMPLETED"
resp.url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arn (required, String)

    The ARN that specifies the assessment run for which you want to generate a report.

  • :report_file_format (required, String)

    Specifies the file format (html or pdf) of the assessment report that you want to generate.

  • :report_type (required, String)

    Specifies 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.

Returns:

See Also:



1132
1133
1134
1135
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1132

def get_assessment_report(params = {}, options = {})
  req = build_request(:get_assessment_report, params)
  req.send_request(options)
end

#get_telemetry_metadata(params = {}) ⇒ Types::GetTelemetryMetadataResponse

Information about the data that is collected for the specified assessment run.

Examples:

Example: Get telemetry metadata


# Information about the data that is collected for the specified assessment run.

resp = client.({
  assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
})

resp.to_h outputs the following:
{
  telemetry_metadata: [
    {
      count: 2, 
      data_size: 345, 
      message_type: "InspectorDuplicateProcess", 
    }, 
    {
      count: 3, 
      data_size: 255, 
      message_type: "InspectorTimeEventMsg", 
    }, 
    {
      count: 4, 
      data_size: 1082, 
      message_type: "InspectorNetworkInterface", 
    }, 
    {
      count: 2, 
      data_size: 349, 
      message_type: "InspectorDnsEntry", 
    }, 
    {
      count: 11, 
      data_size: 2514, 
      message_type: "InspectorDirectoryInfoMsg", 
    }, 
    {
      count: 1, 
      data_size: 179, 
      message_type: "InspectorTcpV6ListeningPort", 
    }, 
    {
      count: 101, 
      data_size: 10949, 
      message_type: "InspectorTerminal", 
    }, 
    {
      count: 26, 
      data_size: 5916, 
      message_type: "InspectorUser", 
    }, 
    {
      count: 282, 
      data_size: 32148, 
      message_type: "InspectorDynamicallyLoadedCodeModule", 
    }, 
    {
      count: 18, 
      data_size: 10172, 
      message_type: "InspectorCreateProcess", 
    }, 
    {
      count: 3, 
      data_size: 8001, 
      message_type: "InspectorProcessPerformance", 
    }, 
    {
      count: 1, 
      data_size: 360, 
      message_type: "InspectorOperatingSystem", 
    }, 
    {
      count: 6, 
      data_size: 546, 
      message_type: "InspectorStopProcess", 
    }, 
    {
      count: 1, 
      data_size: 1553, 
      message_type: "InspectorInstanceMetaData", 
    }, 
    {
      count: 2, 
      data_size: 434, 
      message_type: "InspectorTcpV4Connection", 
    }, 
    {
      count: 474, 
      data_size: 2960322, 
      message_type: "InspectorPackageInfo", 
    }, 
    {
      count: 3, 
      data_size: 2235, 
      message_type: "InspectorSystemPerformance", 
    }, 
    {
      count: 105, 
      data_size: 46048, 
      message_type: "InspectorCodeModule", 
    }, 
    {
      count: 1, 
      data_size: 182, 
      message_type: "InspectorUdpV6ListeningPort", 
    }, 
    {
      count: 2, 
      data_size: 371, 
      message_type: "InspectorUdpV4ListeningPort", 
    }, 
    {
      count: 18, 
      data_size: 8362, 
      message_type: "InspectorKernelModule", 
    }, 
    {
      count: 29, 
      data_size: 48788, 
      message_type: "InspectorConfigurationInfo", 
    }, 
    {
      count: 1, 
      data_size: 79, 
      message_type: "InspectorMonitoringStart", 
    }, 
    {
      count: 5, 
      data_size: 0, 
      message_type: "InspectorSplitMsgBegin", 
    }, 
    {
      count: 51, 
      data_size: 4593, 
      message_type: "InspectorGroup", 
    }, 
    {
      count: 1, 
      data_size: 184, 
      message_type: "InspectorTcpV4ListeningPort", 
    }, 
    {
      count: 1159, 
      data_size: 3146579, 
      message_type: "Total", 
    }, 
    {
      count: 5, 
      data_size: 0, 
      message_type: "InspectorSplitMsgEnd", 
    }, 
    {
      count: 1, 
      data_size: 612, 
      message_type: "InspectorLoadImageInProcess", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.({
  assessment_run_arn: "Arn", # required
})

Response structure


resp. #=> Array
resp.[0].message_type #=> String
resp.[0].count #=> Integer
resp.[0].data_size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arn (required, String)

    The ARN that specifies the assessment run that has the telemetry data that you want to obtain.

Returns:

See Also:



1325
1326
1327
1328
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1325

def (params = {}, options = {})
  req = build_request(:get_telemetry_metadata, params)
  req.send_request(options)
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.

Examples:

Example: List assessment run agents


# Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.

resp = client.list_assessment_run_agents({
  assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
  max_results: 123, 
})

resp.to_h outputs the following:
{
  assessment_run_agents: [
    {
      agent_health: "HEALTHY", 
      agent_health_code: "RUNNING", 
      agent_id: "i-49113b93", 
      assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
      telemetry_metadata: [
        {
          count: 2, 
          data_size: 345, 
          message_type: "InspectorDuplicateProcess", 
        }, 
        {
          count: 3, 
          data_size: 255, 
          message_type: "InspectorTimeEventMsg", 
        }, 
        {
          count: 4, 
          data_size: 1082, 
          message_type: "InspectorNetworkInterface", 
        }, 
        {
          count: 2, 
          data_size: 349, 
          message_type: "InspectorDnsEntry", 
        }, 
        {
          count: 11, 
          data_size: 2514, 
          message_type: "InspectorDirectoryInfoMsg", 
        }, 
        {
          count: 1, 
          data_size: 179, 
          message_type: "InspectorTcpV6ListeningPort", 
        }, 
        {
          count: 101, 
          data_size: 10949, 
          message_type: "InspectorTerminal", 
        }, 
        {
          count: 26, 
          data_size: 5916, 
          message_type: "InspectorUser", 
        }, 
        {
          count: 282, 
          data_size: 32148, 
          message_type: "InspectorDynamicallyLoadedCodeModule", 
        }, 
        {
          count: 18, 
          data_size: 10172, 
          message_type: "InspectorCreateProcess", 
        }, 
        {
          count: 3, 
          data_size: 8001, 
          message_type: "InspectorProcessPerformance", 
        }, 
        {
          count: 1, 
          data_size: 360, 
          message_type: "InspectorOperatingSystem", 
        }, 
        {
          count: 6, 
          data_size: 546, 
          message_type: "InspectorStopProcess", 
        }, 
        {
          count: 1, 
          data_size: 1553, 
          message_type: "InspectorInstanceMetaData", 
        }, 
        {
          count: 2, 
          data_size: 434, 
          message_type: "InspectorTcpV4Connection", 
        }, 
        {
          count: 474, 
          data_size: 2960322, 
          message_type: "InspectorPackageInfo", 
        }, 
        {
          count: 3, 
          data_size: 2235, 
          message_type: "InspectorSystemPerformance", 
        }, 
        {
          count: 105, 
          data_size: 46048, 
          message_type: "InspectorCodeModule", 
        }, 
        {
          count: 1, 
          data_size: 182, 
          message_type: "InspectorUdpV6ListeningPort", 
        }, 
        {
          count: 2, 
          data_size: 371, 
          message_type: "InspectorUdpV4ListeningPort", 
        }, 
        {
          count: 18, 
          data_size: 8362, 
          message_type: "InspectorKernelModule", 
        }, 
        {
          count: 29, 
          data_size: 48788, 
          message_type: "InspectorConfigurationInfo", 
        }, 
        {
          count: 1, 
          data_size: 79, 
          message_type: "InspectorMonitoringStart", 
        }, 
        {
          count: 5, 
          data_size: 0, 
          message_type: "InspectorSplitMsgBegin", 
        }, 
        {
          count: 51, 
          data_size: 4593, 
          message_type: "InspectorGroup", 
        }, 
        {
          count: 1, 
          data_size: 184, 
          message_type: "InspectorTcpV4ListeningPort", 
        }, 
        {
          count: 1159, 
          data_size: 3146579, 
          message_type: "Total", 
        }, 
        {
          count: 5, 
          data_size: 0, 
          message_type: "InspectorSplitMsgEnd", 
        }, 
        {
          count: 1, 
          data_size: 612, 
          message_type: "InspectorLoadImageInProcess", 
        }, 
      ], 
    }, 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.list_assessment_run_agents({
  assessment_run_arn: "Arn", # required
  filter: {
    agent_healths: ["HEALTHY"], # required, accepts HEALTHY, UNHEALTHY
    agent_health_codes: ["IDLE"], # required, accepts IDLE, RUNNING, SHUTDOWN, UNHEALTHY, THROTTLED, UNKNOWN
  },
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.assessment_run_agents #=> Array
resp.assessment_run_agents[0].agent_id #=> String
resp.assessment_run_agents[0].assessment_run_arn #=> String
resp.assessment_run_agents[0].agent_health #=> String, one of "HEALTHY", "UNHEALTHY"
resp.assessment_run_agents[0].agent_health_code #=> String, one of "IDLE", "RUNNING", "SHUTDOWN", "UNHEALTHY", "THROTTLED", "UNKNOWN"
resp.assessment_run_agents[0].agent_health_details #=> String
resp.assessment_run_agents[0].auto_scaling_group #=> String
resp.assessment_run_agents[0]. #=> Array
resp.assessment_run_agents[0].[0].message_type #=> String
resp.assessment_run_agents[0].[0].count #=> Integer
resp.assessment_run_agents[0].[0].data_size #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arn (required, String)

    The ARN that specifies the assessment run whose agents you want to list.

  • :filter (Types::AgentFilter)

    You 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 (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1563
1564
1565
1566
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1563

def list_assessment_run_agents(params = {}, options = {})
  req = build_request(:list_assessment_run_agents, params)
  req.send_request(options)
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.

Examples:

Example: List assessment runs


# Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment
# templates.

resp = client.list_assessment_runs({
  assessment_template_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", 
  ], 
  max_results: 123, 
})

resp.to_h outputs the following:
{
  assessment_run_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-v5D6fI3v", 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.list_assessment_runs({
  assessment_template_arns: ["Arn"],
  filter: {
    name_pattern: "NamePattern",
    states: ["CREATED"], # accepts CREATED, START_DATA_COLLECTION_PENDING, START_DATA_COLLECTION_IN_PROGRESS, COLLECTING_DATA, STOP_DATA_COLLECTION_PENDING, DATA_COLLECTED, START_EVALUATING_RULES_PENDING, EVALUATING_RULES, FAILED, ERROR, COMPLETED, COMPLETED_WITH_ERRORS, CANCELED
    duration_range: {
      min_seconds: 1,
      max_seconds: 1,
    },
    rules_package_arns: ["Arn"],
    start_time_range: {
      begin_date: Time.now,
      end_date: Time.now,
    },
    completion_time_range: {
      begin_date: Time.now,
      end_date: Time.now,
    },
    state_change_time_range: {
      begin_date: Time.now,
      end_date: Time.now,
    },
  },
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.assessment_run_arns #=> Array
resp.assessment_run_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_template_arns (Array<String>)

    The ARNs that specify the assessment templates whose assessment runs you want to list.

  • :filter (Types::AssessmentRunFilter)

    You 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 (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1661
1662
1663
1664
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1661

def list_assessment_runs(params = {}, options = {})
  req = build_request(:list_assessment_runs, params)
  req.send_request(options)
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.

Examples:

Example: List assessment targets


# Lists the ARNs of the assessment targets within this AWS account. 

resp = client.list_assessment_targets({
  max_results: 123, 
})

resp.to_h outputs the following:
{
  assessment_target_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.list_assessment_targets({
  filter: {
    assessment_target_name_pattern: "NamePattern",
  },
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.assessment_target_arns #=> Array
resp.assessment_target_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filter (Types::AssessmentTargetFilter)

    You 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 (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1736
1737
1738
1739
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1736

def list_assessment_targets(params = {}, options = {})
  req = build_request(:list_assessment_targets, params)
  req.send_request(options)
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.

Examples:

Example: List assessment templates


# Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the
# assessment targets.

resp = client.list_assessment_templates({
  assessment_target_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
  ], 
  max_results: 123, 
})

resp.to_h outputs the following:
{
  assessment_template_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", 
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-Uza6ihLh", 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.list_assessment_templates({
  assessment_target_arns: ["Arn"],
  filter: {
    name_pattern: "NamePattern",
    duration_range: {
      min_seconds: 1,
      max_seconds: 1,
    },
    rules_package_arns: ["Arn"],
  },
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.assessment_template_arns #=> Array
resp.assessment_template_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_arns (Array<String>)

    A list of ARNs that specifies the assessment targets whose assessment templates you want to list.

  • :filter (Types::AssessmentTemplateFilter)

    You 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 (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1821
1822
1823
1824
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1821

def list_assessment_templates(params = {}, options = {})
  req = build_request(:list_assessment_templates, params)
  req.send_request(options)
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.

Examples:

Example: List event subscriptions


# Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. 

resp = client.list_event_subscriptions({
  max_results: 123, 
  resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", 
})

resp.to_h outputs the following:
{
  next_token: "1", 
  subscriptions: [
    {
      event_subscriptions: [
        {
          event: "ASSESSMENT_RUN_COMPLETED", 
          subscribed_at: Time.parse("1459455440.867"), 
        }, 
      ], 
      resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", 
      topic_arn: "arn:aws:sns:us-west-2:123456789012:exampletopic", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_event_subscriptions({
  resource_arn: "Arn",
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.subscriptions #=> Array
resp.subscriptions[0].resource_arn #=> String
resp.subscriptions[0].topic_arn #=> String
resp.subscriptions[0].event_subscriptions #=> Array
resp.subscriptions[0].event_subscriptions[0].event #=> String, one of "ASSESSMENT_RUN_STARTED", "ASSESSMENT_RUN_COMPLETED", "ASSESSMENT_RUN_STATE_CHANGED", "FINDING_REPORTED", "OTHER"
resp.subscriptions[0].event_subscriptions[0].subscribed_at #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (String)

    The ARN of the assessment template for which you want to list the existing event subscriptions.

  • :next_token (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1900
1901
1902
1903
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1900

def list_event_subscriptions(params = {}, options = {})
  req = build_request(:list_event_subscriptions, params)
  req.send_request(options)
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.

Examples:

Example: List findings


# Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.

resp = client.list_findings({
  assessment_run_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", 
  ], 
  max_results: 123, 
})

resp.to_h outputs the following:
{
  finding_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE/finding/0-HwPnsDm4", 
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-v5D6fI3v/finding/0-tyvmqBLy", 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.list_findings({
  assessment_run_arns: ["Arn"],
  filter: {
    agent_ids: ["AgentId"],
    auto_scaling_groups: ["AutoScalingGroup"],
    rule_names: ["RuleName"],
    severities: ["Low"], # accepts Low, Medium, High, Informational, Undefined
    rules_package_arns: ["Arn"],
    attributes: [
      {
        key: "AttributeKey", # required
        value: "AttributeValue",
      },
    ],
    user_attributes: [
      {
        key: "AttributeKey", # required
        value: "AttributeValue",
      },
    ],
    creation_time_range: {
      begin_date: Time.now,
      end_date: Time.now,
    },
  },
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.finding_arns #=> Array
resp.finding_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arns (Array<String>)

    The ARNs of the assessment runs that generate the findings that you want to list.

  • :filter (Types::FindingFilter)

    You 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 (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



1999
2000
2001
2002
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 1999

def list_findings(params = {}, options = {})
  req = build_request(:list_findings, params)
  req.send_request(options)
end

#list_rules_packages(params = {}) ⇒ Types::ListRulesPackagesResponse

Lists all available Amazon Inspector rules packages.

Examples:

Example: List rules packages


# Lists all available Amazon Inspector rules packages.

resp = client.list_rules_packages({
  max_results: 123, 
})

resp.to_h outputs the following:
{
  next_token: "1", 
  rules_package_arns: [
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p", 
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc", 
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", 
    "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD", 
  ], 
}

Request syntax with placeholder values


resp = client.list_rules_packages({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.rules_package_arns #=> Array
resp.rules_package_arns[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



2060
2061
2062
2063
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2060

def list_rules_packages(params = {}, options = {})
  req = build_request(:list_rules_packages, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists all tags associated with an assessment template.

Examples:

Example: List tags for resource


# Lists all tags associated with an assessment template.

resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-gcwFliYu", 
})

resp.to_h outputs the following:
{
  tags: [
    {
      key: "Name", 
      value: "Example", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN that specifies the assessment template whose tags you want to list.

Returns:

See Also:



2110
2111
2112
2113
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2110

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#preview_agents(params = {}) ⇒ Types::PreviewAgentsResponse

Previews the agents installed on the EC2 instances that are part of the specified assessment target.

Examples:

Example: Preview agents


# Previews the agents installed on the EC2 instances that are part of the specified assessment target.

resp = client.preview_agents({
  max_results: 123, 
  preview_agents_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", 
})

resp.to_h outputs the following:
{
  agent_previews: [
    {
      agent_id: "i-49113b93", 
    }, 
  ], 
  next_token: "1", 
}

Request syntax with placeholder values


resp = client.preview_agents({
  preview_agents_arn: "Arn", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.agent_previews #=> Array
resp.agent_previews[0].agent_id #=> String
resp.agent_previews[0].auto_scaling_group #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :preview_agents_arn (required, String)

    The ARN of the assessment target whose agents you want to preview.

  • :next_token (String)

    You 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 (Integer)

    You 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.

Returns:

See Also:



2177
2178
2179
2180
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2177

def preview_agents(params = {}, options = {})
  req = build_request(:preview_agents, params)
  req.send_request(options)
end

#register_cross_account_access_role(params = {}) ⇒ Struct

Registers the IAM role that Amazon Inspector uses to list your EC2 instances at the start of the assessment run or when you call the PreviewAgents action.

Examples:

Example: Register cross account access role


# Registers the IAM role that Amazon Inspector uses to list your EC2 instances at the start of the assessment run or when
# you call the PreviewAgents action.

resp = client.({
  role_arn: "arn:aws:iam::123456789012:role/inspector", 
})

Request syntax with placeholder values


resp = client.({
  role_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :role_arn (required, String)

    The ARN of the IAM role that Amazon Inspector uses to list your EC2 instances during the assessment run or when you call the PreviewAgents action.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2213
2214
2215
2216
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2213

def (params = {}, options = {})
  req = build_request(:register_cross_account_access_role, params)
  req.send_request(options)
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.

Examples:

Example: Remove attributes from findings


# 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.

resp = client.remove_attributes_from_findings({
  attribute_keys: [
    "key=Example,value=example", 
  ], 
  finding_arns: [
    "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU", 
  ], 
})

resp.to_h outputs the following:
{
  failed_items: {
  }, 
}

Request syntax with placeholder values


resp = client.remove_attributes_from_findings({
  finding_arns: ["Arn"], # required
  attribute_keys: ["AttributeKey"], # required
})

Response structure


resp.failed_items #=> Hash
resp.failed_items["Arn"].failure_code #=> String, one of "INVALID_ARN", "DUPLICATE_ARN", "ITEM_DOES_NOT_EXIST", "ACCESS_DENIED", "LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.failed_items["Arn"].retryable #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :finding_arns (required, Array<String>)

    The ARNs that specify the findings that you want to remove attributes from.

  • :attribute_keys (required, Array<String>)

    The array of attribute keys that you want to remove from specified findings.

Returns:

See Also:



2272
2273
2274
2275
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2272

def remove_attributes_from_findings(params = {}, options = {})
  req = build_request(:remove_attributes_from_findings, params)
  req.send_request(options)
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.

Examples:

Example: Set tags for resource


# Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.

resp = client.set_tags_for_resource({
  resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", 
  tags: [
    {
      key: "Example", 
      value: "example", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.set_tags_for_resource({
  resource_arn: "Arn", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the assessment template that you want to set tags to.

  • :tags (Array<Types::Tag>)

    A collection of key and value pairs that you want to set to the assessment template.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2320
2321
2322
2323
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2320

def set_tags_for_resource(params = {}, options = {})
  req = build_request(:set_tags_for_resource, params)
  req.send_request(options)
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.

Examples:

Example: Start assessment run


# 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.

resp = client.start_assessment_run({
  assessment_run_name: "examplerun", 
  assessment_template_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T", 
})

resp.to_h outputs the following:
{
  assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-jOoroxyY", 
}

Request syntax with placeholder values


resp = client.start_assessment_run({
  assessment_template_arn: "Arn", # required
  assessment_run_name: "AssessmentRunName",
})

Response structure


resp.assessment_run_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_template_arn (required, String)

    The ARN of the assessment template of the assessment run that you want to start.

  • :assessment_run_name (String)

    You 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.

Returns:

See Also:



2373
2374
2375
2376
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2373

def start_assessment_run(params = {}, options = {})
  req = build_request(:start_assessment_run, params)
  req.send_request(options)
end

#stop_assessment_run(params = {}) ⇒ Struct

Stops the assessment run that is specified by the ARN of the assessment run.

Examples:

Example: Stop assessment run


# Stops the assessment run that is specified by the ARN of the assessment run.

resp = client.stop_assessment_run({
  assessment_run_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-11LMTAVe", 
})

Request syntax with placeholder values


resp = client.stop_assessment_run({
  assessment_run_arn: "Arn", # required
  stop_action: "START_EVALUATION", # accepts START_EVALUATION, SKIP_EVALUATION
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_run_arn (required, String)

    The ARN of the assessment run that you want to stop.

  • :stop_action (String)

    An 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2413
2414
2415
2416
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2413

def stop_assessment_run(params = {}, options = {})
  req = build_request(:stop_assessment_run, params)
  req.send_request(options)
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.

Examples:

Example: Subscribe to event


# Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a
# specified SNS topic.

resp = client.subscribe_to_event({
  event: "ASSESSMENT_RUN_COMPLETED", 
  resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", 
  topic_arn: "arn:aws:sns:us-west-2:123456789012:exampletopic", 
})

Request syntax with placeholder values


resp = client.subscribe_to_event({
  resource_arn: "Arn", # required
  event: "ASSESSMENT_RUN_STARTED", # required, accepts ASSESSMENT_RUN_STARTED, ASSESSMENT_RUN_COMPLETED, ASSESSMENT_RUN_STATE_CHANGED, FINDING_REPORTED, OTHER
  topic_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the assessment template that is used during the event for which you want to receive SNS notifications.

  • :event (required, String)

    The event for which you want to receive SNS notifications.

  • :topic_arn (required, String)

    The ARN of the SNS topic to which the SNS notifications are sent.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2457
2458
2459
2460
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2457

def subscribe_to_event(params = {}, options = {})
  req = build_request(:subscribe_to_event, params)
  req.send_request(options)
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.

Examples:

Example: Unsubscribe from event


# Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a
# specified SNS topic.

resp = client.unsubscribe_from_event({
  event: "ASSESSMENT_RUN_COMPLETED", 
  resource_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", 
  topic_arn: "arn:aws:sns:us-west-2:123456789012:exampletopic", 
})

Request syntax with placeholder values


resp = client.unsubscribe_from_event({
  resource_arn: "Arn", # required
  event: "ASSESSMENT_RUN_STARTED", # required, accepts ASSESSMENT_RUN_STARTED, ASSESSMENT_RUN_COMPLETED, ASSESSMENT_RUN_STATE_CHANGED, FINDING_REPORTED, OTHER
  topic_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the assessment template that is used during the event for which you want to stop receiving SNS notifications.

  • :event (required, String)

    The event for which you want to stop receiving SNS notifications.

  • :topic_arn (required, String)

    The ARN of the SNS topic to which SNS notifications are sent.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2501
2502
2503
2504
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2501

def unsubscribe_from_event(params = {}, options = {})
  req = build_request(:unsubscribe_from_event, params)
  req.send_request(options)
end

#update_assessment_target(params = {}) ⇒ Struct

Updates the assessment target that is specified by the ARN of the assessment target.

Examples:

Example: Update assessment target


# Updates the assessment target that is specified by the ARN of the assessment target.

resp = client.update_assessment_target({
  assessment_target_arn: "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX", 
  assessment_target_name: "Example", 
  resource_group_arn: "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-yNbgL5Pt", 
})

Request syntax with placeholder values


resp = client.update_assessment_target({
  assessment_target_arn: "Arn", # required
  assessment_target_name: "AssessmentTargetName", # required
  resource_group_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :assessment_target_arn (required, String)

    The ARN of the assessment target that you want to update.

  • :assessment_target_name (required, String)

    The name of the assessment target that you want to update.

  • :resource_group_arn (required, String)

    The ARN of the resource group that is used to specify the new resource group to associate with the assessment target.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2544
2545
2546
2547
# File 'gems/aws-sdk-inspector/lib/aws-sdk-inspector/client.rb', line 2544

def update_assessment_target(params = {}, options = {})
  req = build_request(:update_assessment_target, params)
  req.send_request(options)
end