Class: Aws::Inspector2::Client

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

Overview

An API client for Inspector2. To construct a client, you need to configure a :region and :credentials.

client = Aws::Inspector2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



348
349
350
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 348

def initialize(*args)
  super
end

Instance Method Details

#associate_member(params = {}) ⇒ Types::AssociateMemberResponse

Associates an Amazon Web Services account with an Amazon Inspector delegated administrator.

Examples:

Request syntax with placeholder values


resp = client.associate_member({
  account_id: "AccountId", # required
})

Response structure


resp. #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :account_id (required, String)

    The Amazon Web Services account ID of the member account to be associated.

Returns:

See Also:



379
380
381
382
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 379

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

#batch_get_account_status(params = {}) ⇒ Types::BatchGetAccountStatusResponse

Retrieves the Amazon Inspector status of multiple Amazon Web Services accounts within your environment.

Examples:

Request syntax with placeholder values


resp = client.({
  account_ids: ["AccountId"],
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].resource_state.ec2.error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.accounts[0].resource_state.ec2.error_message #=> String
resp.accounts[0].resource_state.ec2.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_state.ecr.error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.accounts[0].resource_state.ecr.error_message #=> String
resp.accounts[0].resource_state.ecr.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].state.error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.accounts[0].state.error_message #=> String
resp.accounts[0].state.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.failed_accounts[0].error_message #=> String
resp.failed_accounts[0].resource_status.ec2 #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ecr #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<String>)

    The 12-digit Amazon Web Services account IDs of the accounts to retrieve Amazon Inspector status for.

Returns:

See Also:



427
428
429
430
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 427

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

#batch_get_free_trial_info(params = {}) ⇒ Types::BatchGetFreeTrialInfoResponse

Gets free trial status for multiple Amazon Web Services accounts.

Examples:

Request syntax with placeholder values


resp = client.batch_get_free_trial_info({
  account_ids: ["MeteringAccountId"], # required
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].free_trial_info #=> Array
resp.accounts[0].free_trial_info[0].end #=> Time
resp.accounts[0].free_trial_info[0].start #=> Time
resp.accounts[0].free_trial_info[0].status #=> String, one of "ACTIVE", "INACTIVE"
resp.accounts[0].free_trial_info[0].type #=> String, one of "EC2", "ECR"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].code #=> String, one of "ACCESS_DENIED", "INTERNAL_ERROR"
resp.failed_accounts[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (required, Array<String>)

    The account IDs to get free trial status for.

Returns:

See Also:



466
467
468
469
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 466

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

#cancel_findings_report(params = {}) ⇒ Types::CancelFindingsReportResponse

Cancels the given findings report.

Examples:

Request syntax with placeholder values


resp = client.cancel_findings_report({
  report_id: "ReportId", # required
})

Response structure


resp.report_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :report_id (required, String)

    The ID of the report to be canceled.

Returns:

See Also:



494
495
496
497
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 494

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

#create_filter(params = {}) ⇒ Types::CreateFilterResponse

Creates a filter resource using specified filter criteria.

Examples:

Request syntax with placeholder values


resp = client.create_filter({
  action: "NONE", # required, accepts NONE, SUPPRESS
  description: "FilterDescription",
  filter_criteria: { # required
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_vpc_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    ecr_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    inspector_score: [
      {
        lower_inclusive: 1.0,
        upper_inclusive: 1.0,
      },
    ],
    last_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    network_protocol: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "MapKey", # required
        value: "MapValue",
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    updated_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_source: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        architecture: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          lower_inclusive: 1.0,
          upper_inclusive: 1.0,
        },
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        source_layer_hash: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
  },
  name: "FilterName", # required
  tags: {
    "MapKey" => "MapValue",
  },
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action (required, String)

    Defines the action that is to be applied to the findings that match the filter.

  • :description (String)

    A description of the filter.

  • :filter_criteria (required, Types::FilterCriteria)

    Defines the criteria to be used in the filter for querying findings.

  • :name (required, String)

    The name of the filter. Minimum length of 3. Maximum length of 64. Valid characters include alphanumeric characters, dot (.), underscore (_), and dash (-). Spaces are not allowed.

  • :tags (Hash<String,String>)

    A list of tags for the filter.

Returns:

See Also:



753
754
755
756
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 753

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

#create_findings_report(params = {}) ⇒ Types::CreateFindingsReportResponse

Creates a finding report.

Examples:

Request syntax with placeholder values


resp = client.create_findings_report({
  filter_criteria: {
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_vpc_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    ecr_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    inspector_score: [
      {
        lower_inclusive: 1.0,
        upper_inclusive: 1.0,
      },
    ],
    last_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    network_protocol: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "MapKey", # required
        value: "MapValue",
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    updated_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_source: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        architecture: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          lower_inclusive: 1.0,
          upper_inclusive: 1.0,
        },
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        source_layer_hash: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
  },
  report_format: "CSV", # required, accepts CSV, JSON
  s3_destination: { # required
    bucket_name: "String", # required
    key_prefix: "String",
    kms_key_arn: "String", # required
  },
})

Response structure


resp.report_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::FilterCriteria)

    The filter criteria to apply to the results of the finding report.

  • :report_format (required, String)

    The format to generate the report in.

  • :s3_destination (required, Types::Destination)

    The Amazon S3 export destination for the report.

Returns:

See Also:



1003
1004
1005
1006
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1003

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

#delete_filter(params = {}) ⇒ Types::DeleteFilterResponse

Deletes a filter resource.

Examples:

Request syntax with placeholder values


resp = client.delete_filter({
  arn: "FilterArn", # required
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Number (ARN) of the filter to be deleted.

Returns:

See Also:



1031
1032
1033
1034
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1031

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

#describe_organization_configuration(params = {}) ⇒ Types::DescribeOrganizationConfigurationResponse

Describe Amazon Inspector configuration settings for an Amazon Web Services organization

Examples:

Response structure


resp.auto_enable.ec2 #=> Boolean
resp.auto_enable.ecr #=> Boolean
resp. #=> Boolean

Parameters:

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

    ({})

Returns:

See Also:



1054
1055
1056
1057
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1054

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

#disable(params = {}) ⇒ Types::DisableResponse

Disables Amazon Inspector scans for one or more Amazon Web Services accounts. Disabling all scan types in an account disables the Amazon Inspector service.

Examples:

Request syntax with placeholder values


resp = client.disable({
  account_ids: ["AccountId"],
  resource_types: ["EC2"], # accepts EC2, ECR
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].resource_status.ec2 #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.ecr #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.failed_accounts[0].error_message #=> String
resp.failed_accounts[0].resource_status.ec2 #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ecr #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<String>)

    An array of account IDs you want to disable Amazon Inspector scans for.

  • :resource_types (Array<String>)

    The resource scan types you want to disable.

Returns:

See Also:



1101
1102
1103
1104
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1101

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

#disable_delegated_admin_account(params = {}) ⇒ Types::DisableDelegatedAdminAccountResponse

Disables the Amazon Inspector delegated administrator for your organization.

Examples:

Request syntax with placeholder values


resp = client.({
  delegated_admin_account_id: "AccountId", # required
})

Response structure


resp. #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :delegated_admin_account_id (required, String)

    The Amazon Web Services account ID of the current Amazon Inspector delegated administrator.

Returns:

See Also:



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

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

#disassociate_member(params = {}) ⇒ Types::DisassociateMemberResponse

Disassociates a member account from an Amazon Inspector delegated administrator.

Examples:

Request syntax with placeholder values


resp = client.disassociate_member({
  account_id: "AccountId", # required
})

Response structure


resp. #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :account_id (required, String)

    The Amazon Web Services account ID of the member account to disassociate.

Returns:

See Also:



1161
1162
1163
1164
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1161

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

#enable(params = {}) ⇒ Types::EnableResponse

Enables Amazon Inspector scans for one or more Amazon Web Services accounts.

Examples:

Request syntax with placeholder values


resp = client.enable({
  account_ids: ["AccountId"],
  client_token: "ClientToken",
  resource_types: ["EC2"], # required, accepts EC2, ECR
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].resource_status.ec2 #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.ecr #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].error_code #=> String, one of "ALREADY_ENABLED", "ENABLE_IN_PROGRESS", "DISABLE_IN_PROGRESS", "SUSPEND_IN_PROGRESS", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "INTERNAL_ERROR", "SSM_UNAVAILABLE", "SSM_THROTTLED", "EVENTBRIDGE_UNAVAILABLE", "EVENTBRIDGE_THROTTLED", "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS"
resp.failed_accounts[0].error_message #=> String
resp.failed_accounts[0].resource_status.ec2 #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ecr #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<String>)

    A list of account IDs you want to enable Amazon Inspector scans for.

  • :client_token (String)

    The idempotency token for the request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :resource_types (required, Array<String>)

    The resource scan types you want to enable.

Returns:

See Also:



1213
1214
1215
1216
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1213

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

#enable_delegated_admin_account(params = {}) ⇒ Types::EnableDelegatedAdminAccountResponse

Enables the Amazon Inspector delegated administrator for your Organizations organization.

Examples:

Request syntax with placeholder values


resp = client.({
  client_token: "ClientToken",
  delegated_admin_account_id: "AccountId", # required
})

Response structure


resp. #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    The idempotency token for the request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :delegated_admin_account_id (required, String)

    The Amazon Web Services account ID of the Amazon Inspector delegated administrator.

Returns:

See Also:



1250
1251
1252
1253
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1250

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

#get_delegated_admin_account(params = {}) ⇒ Types::GetDelegatedAdminAccountResponse

Retrieves information about the Amazon Inspector delegated administrator for your organization.

Examples:

Response structure


resp.delegated_admin. #=> String
resp.delegated_admin.relationship_status #=> String, one of "CREATED", "INVITED", "DISABLED", "ENABLED", "REMOVED", "RESIGNED", "DELETED", "EMAIL_VERIFICATION_IN_PROGRESS", "EMAIL_VERIFICATION_FAILED", "REGION_DISABLED", "ACCOUNT_SUSPENDED", "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER"

Parameters:

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

    ({})

Returns:

See Also:



1271
1272
1273
1274
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1271

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

#get_findings_report_status(params = {}) ⇒ Types::GetFindingsReportStatusResponse

Gets the status of a findings report.

Examples:

Request syntax with placeholder values


resp = client.get_findings_report_status({
  report_id: "ReportId",
})

Response structure


resp.destination.bucket_name #=> String
resp.destination.key_prefix #=> String
resp.destination.kms_key_arn #=> String
resp.error_code #=> String, one of "INTERNAL_ERROR", "INVALID_PERMISSIONS"
resp.error_message #=> String
resp.filter_criteria. #=> Array
resp.filter_criteria.[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.[0].value #=> String
resp.filter_criteria.component_id #=> Array
resp.filter_criteria.component_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.component_id[0].value #=> String
resp.filter_criteria.component_type #=> Array
resp.filter_criteria.component_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.component_type[0].value #=> String
resp.filter_criteria.ec2_instance_image_id #=> Array
resp.filter_criteria.ec2_instance_image_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ec2_instance_image_id[0].value #=> String
resp.filter_criteria.ec2_instance_subnet_id #=> Array
resp.filter_criteria.ec2_instance_subnet_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ec2_instance_subnet_id[0].value #=> String
resp.filter_criteria.ec2_instance_vpc_id #=> Array
resp.filter_criteria.ec2_instance_vpc_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ec2_instance_vpc_id[0].value #=> String
resp.filter_criteria.ecr_image_architecture #=> Array
resp.filter_criteria.ecr_image_architecture[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ecr_image_architecture[0].value #=> String
resp.filter_criteria.ecr_image_hash #=> Array
resp.filter_criteria.ecr_image_hash[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ecr_image_hash[0].value #=> String
resp.filter_criteria.ecr_image_pushed_at #=> Array
resp.filter_criteria.ecr_image_pushed_at[0].end_inclusive #=> Time
resp.filter_criteria.ecr_image_pushed_at[0].start_inclusive #=> Time
resp.filter_criteria.ecr_image_registry #=> Array
resp.filter_criteria.ecr_image_registry[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ecr_image_registry[0].value #=> String
resp.filter_criteria.ecr_image_repository_name #=> Array
resp.filter_criteria.ecr_image_repository_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ecr_image_repository_name[0].value #=> String
resp.filter_criteria.ecr_image_tags #=> Array
resp.filter_criteria.ecr_image_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.ecr_image_tags[0].value #=> String
resp.filter_criteria.finding_arn #=> Array
resp.filter_criteria.finding_arn[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.finding_arn[0].value #=> String
resp.filter_criteria.finding_status #=> Array
resp.filter_criteria.finding_status[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.finding_status[0].value #=> String
resp.filter_criteria.finding_type #=> Array
resp.filter_criteria.finding_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.finding_type[0].value #=> String
resp.filter_criteria.first_observed_at #=> Array
resp.filter_criteria.first_observed_at[0].end_inclusive #=> Time
resp.filter_criteria.first_observed_at[0].start_inclusive #=> Time
resp.filter_criteria.inspector_score #=> Array
resp.filter_criteria.inspector_score[0].lower_inclusive #=> Float
resp.filter_criteria.inspector_score[0].upper_inclusive #=> Float
resp.filter_criteria.last_observed_at #=> Array
resp.filter_criteria.last_observed_at[0].end_inclusive #=> Time
resp.filter_criteria.last_observed_at[0].start_inclusive #=> Time
resp.filter_criteria.network_protocol #=> Array
resp.filter_criteria.network_protocol[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.network_protocol[0].value #=> String
resp.filter_criteria.port_range #=> Array
resp.filter_criteria.port_range[0].begin_inclusive #=> Integer
resp.filter_criteria.port_range[0].end_inclusive #=> Integer
resp.filter_criteria.related_vulnerabilities #=> Array
resp.filter_criteria.related_vulnerabilities[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.related_vulnerabilities[0].value #=> String
resp.filter_criteria.resource_id #=> Array
resp.filter_criteria.resource_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.resource_id[0].value #=> String
resp.filter_criteria.resource_tags #=> Array
resp.filter_criteria.resource_tags[0].comparison #=> String, one of "EQUALS"
resp.filter_criteria.resource_tags[0].key #=> String
resp.filter_criteria.resource_tags[0].value #=> String
resp.filter_criteria.resource_type #=> Array
resp.filter_criteria.resource_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.resource_type[0].value #=> String
resp.filter_criteria.severity #=> Array
resp.filter_criteria.severity[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.severity[0].value #=> String
resp.filter_criteria.title #=> Array
resp.filter_criteria.title[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.title[0].value #=> String
resp.filter_criteria.updated_at #=> Array
resp.filter_criteria.updated_at[0].end_inclusive #=> Time
resp.filter_criteria.updated_at[0].start_inclusive #=> Time
resp.filter_criteria.vendor_severity #=> Array
resp.filter_criteria.vendor_severity[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vendor_severity[0].value #=> String
resp.filter_criteria.vulnerability_id #=> Array
resp.filter_criteria.vulnerability_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerability_id[0].value #=> String
resp.filter_criteria.vulnerability_source #=> Array
resp.filter_criteria.vulnerability_source[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerability_source[0].value #=> String
resp.filter_criteria.vulnerable_packages #=> Array
resp.filter_criteria.vulnerable_packages[0].architecture.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].architecture.value #=> String
resp.filter_criteria.vulnerable_packages[0].epoch.lower_inclusive #=> Float
resp.filter_criteria.vulnerable_packages[0].epoch.upper_inclusive #=> Float
resp.filter_criteria.vulnerable_packages[0].name.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].name.value #=> String
resp.filter_criteria.vulnerable_packages[0].release.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].release.value #=> String
resp.filter_criteria.vulnerable_packages[0].source_layer_hash.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].source_layer_hash.value #=> String
resp.filter_criteria.vulnerable_packages[0].version.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].version.value #=> String
resp.report_id #=> String
resp.status #=> String, one of "SUCCEEDED", "IN_PROGRESS", "CANCELLED", "FAILED"

Parameters:

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

    ({})

Options Hash (params):

  • :report_id (String)

    The ID of the report to retrieve the status of.

Returns:

See Also:



1414
1415
1416
1417
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1414

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

#get_member(params = {}) ⇒ Types::GetMemberResponse

Gets member information for your organization.

Examples:

Request syntax with placeholder values


resp = client.get_member({
  account_id: "AccountId", # required
})

Response structure


resp.member. #=> String
resp.member. #=> String
resp.member.relationship_status #=> String, one of "CREATED", "INVITED", "DISABLED", "ENABLED", "REMOVED", "RESIGNED", "DELETED", "EMAIL_VERIFICATION_IN_PROGRESS", "EMAIL_VERIFICATION_FAILED", "REGION_DISABLED", "ACCOUNT_SUSPENDED", "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER"
resp.member.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :account_id (required, String)

    The Amazon Web Services account ID of the member account to retrieve information on.

Returns:

See Also:



1446
1447
1448
1449
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1446

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

#list_account_permissions(params = {}) ⇒ Types::ListAccountPermissionsResponse

Lists the permissions an account has to configure Amazon Inspector.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.({
  max_results: 1,
  next_token: "NextToken",
  service: "EC2", # accepts EC2, ECR
})

Response structure


resp.next_token #=> String
resp.permissions #=> Array
resp.permissions[0].operation #=> String, one of "ENABLE_SCANNING", "DISABLE_SCANNING", "ENABLE_REPOSITORY", "DISABLE_REPOSITORY"
resp.permissions[0].service #=> String, one of "EC2", "ECR"

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

  • :service (String)

    The service scan type to check permissions for.

Returns:

See Also:



1492
1493
1494
1495
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1492

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

#list_coverage(params = {}) ⇒ Types::ListCoverageResponse

Lists coverage details for you environment.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_coverage({
  filter_criteria: {
    account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ec2_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_status_code: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_status_reason: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.covered_resources #=> Array
resp.covered_resources[0]. #=> String
resp.covered_resources[0].resource_id #=> String
resp.covered_resources[0]..ec2.ami_id #=> String
resp.covered_resources[0]..ec2.platform #=> String, one of "WINDOWS", "LINUX", "UNKNOWN"
resp.covered_resources[0]..ec2.tags #=> Hash
resp.covered_resources[0]..ec2.tags["MapKey"] #=> String
resp.covered_resources[0]..ecr_image.tags #=> Array
resp.covered_resources[0]..ecr_image.tags[0] #=> String
resp.covered_resources[0]..ecr_repository.name #=> String
resp.covered_resources[0]..ecr_repository.scan_frequency #=> String, one of "MANUAL", "SCAN_ON_PUSH", "CONTINUOUS_SCAN"
resp.covered_resources[0].resource_type #=> String, one of "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER_IMAGE", "AWS_ECR_REPOSITORY"
resp.covered_resources[0].scan_status.reason #=> String, one of "PENDING_INITIAL_SCAN", "ACCESS_DENIED", "INTERNAL_ERROR", "UNMANAGED_EC2_INSTANCE", "UNSUPPORTED_OS", "SCAN_ELIGIBILITY_EXPIRED", "RESOURCE_TERMINATED", "SUCCESSFUL", "NO_RESOURCES_FOUND", "IMAGE_SIZE_EXCEEDED", "SCAN_FREQUENCY_MANUAL", "SCAN_FREQUENCY_SCAN_ON_PUSH", "EC2_INSTANCE_STOPPED"
resp.covered_resources[0].scan_status.status_code #=> String, one of "ACTIVE", "INACTIVE"
resp.covered_resources[0].scan_type #=> String, one of "NETWORK", "PACKAGE"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::CoverageFilterCriteria)

    An object that contains details on the filters to apply to the coverage data for your environment.

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



1607
1608
1609
1610
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1607

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

#list_coverage_statistics(params = {}) ⇒ Types::ListCoverageStatisticsResponse

Lists Amazon Inspector coverage statistics for your environment.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_coverage_statistics({
  filter_criteria: {
    account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ec2_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_status_code: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_status_reason: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    scan_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
  },
  group_by: "SCAN_STATUS_CODE", # accepts SCAN_STATUS_CODE, SCAN_STATUS_REASON, ACCOUNT_ID, RESOURCE_TYPE, ECR_REPOSITORY_NAME
  next_token: "NextToken",
})

Response structure


resp.counts_by_group #=> Array
resp.counts_by_group[0].count #=> Integer
resp.counts_by_group[0].group_key #=> String, one of "SCAN_STATUS_CODE", "SCAN_STATUS_REASON", "ACCOUNT_ID", "RESOURCE_TYPE", "ECR_REPOSITORY_NAME"
resp.next_token #=> String
resp.total_counts #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::CoverageFilterCriteria)

    An object that contains details on the filters to apply to the coverage data for your environment.

  • :group_by (String)

    The value to group the results by.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



1712
1713
1714
1715
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1712

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

#list_delegated_admin_accounts(params = {}) ⇒ Types::ListDelegatedAdminAccountsResponse

Lists information about the Amazon Inspector delegated administrator of your organization.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_delegated_admin_accounts({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.delegated_admin_accounts #=> Array
resp.delegated_admin_accounts[0]. #=> String
resp.delegated_admin_accounts[0].status #=> String, one of "ENABLED", "DISABLE_IN_PROGRESS"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



1755
1756
1757
1758
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1755

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

#list_filters(params = {}) ⇒ Types::ListFiltersResponse

Lists the filters associated with your account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_filters({
  action: "NONE", # accepts NONE, SUPPRESS
  arns: ["FilterArn"],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.filters #=> Array
resp.filters[0].action #=> String, one of "NONE", "SUPPRESS"
resp.filters[0].arn #=> String
resp.filters[0].created_at #=> Time
resp.filters[0].criteria. #=> Array
resp.filters[0].criteria.[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.[0].value #=> String
resp.filters[0].criteria.component_id #=> Array
resp.filters[0].criteria.component_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.component_id[0].value #=> String
resp.filters[0].criteria.component_type #=> Array
resp.filters[0].criteria.component_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.component_type[0].value #=> String
resp.filters[0].criteria.ec2_instance_image_id #=> Array
resp.filters[0].criteria.ec2_instance_image_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ec2_instance_image_id[0].value #=> String
resp.filters[0].criteria.ec2_instance_subnet_id #=> Array
resp.filters[0].criteria.ec2_instance_subnet_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ec2_instance_subnet_id[0].value #=> String
resp.filters[0].criteria.ec2_instance_vpc_id #=> Array
resp.filters[0].criteria.ec2_instance_vpc_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ec2_instance_vpc_id[0].value #=> String
resp.filters[0].criteria.ecr_image_architecture #=> Array
resp.filters[0].criteria.ecr_image_architecture[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ecr_image_architecture[0].value #=> String
resp.filters[0].criteria.ecr_image_hash #=> Array
resp.filters[0].criteria.ecr_image_hash[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ecr_image_hash[0].value #=> String
resp.filters[0].criteria.ecr_image_pushed_at #=> Array
resp.filters[0].criteria.ecr_image_pushed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.ecr_image_pushed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.ecr_image_registry #=> Array
resp.filters[0].criteria.ecr_image_registry[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ecr_image_registry[0].value #=> String
resp.filters[0].criteria.ecr_image_repository_name #=> Array
resp.filters[0].criteria.ecr_image_repository_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ecr_image_repository_name[0].value #=> String
resp.filters[0].criteria.ecr_image_tags #=> Array
resp.filters[0].criteria.ecr_image_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.ecr_image_tags[0].value #=> String
resp.filters[0].criteria.finding_arn #=> Array
resp.filters[0].criteria.finding_arn[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.finding_arn[0].value #=> String
resp.filters[0].criteria.finding_status #=> Array
resp.filters[0].criteria.finding_status[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.finding_status[0].value #=> String
resp.filters[0].criteria.finding_type #=> Array
resp.filters[0].criteria.finding_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.finding_type[0].value #=> String
resp.filters[0].criteria.first_observed_at #=> Array
resp.filters[0].criteria.first_observed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.first_observed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.inspector_score #=> Array
resp.filters[0].criteria.inspector_score[0].lower_inclusive #=> Float
resp.filters[0].criteria.inspector_score[0].upper_inclusive #=> Float
resp.filters[0].criteria.last_observed_at #=> Array
resp.filters[0].criteria.last_observed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.last_observed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.network_protocol #=> Array
resp.filters[0].criteria.network_protocol[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.network_protocol[0].value #=> String
resp.filters[0].criteria.port_range #=> Array
resp.filters[0].criteria.port_range[0].begin_inclusive #=> Integer
resp.filters[0].criteria.port_range[0].end_inclusive #=> Integer
resp.filters[0].criteria.related_vulnerabilities #=> Array
resp.filters[0].criteria.related_vulnerabilities[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.related_vulnerabilities[0].value #=> String
resp.filters[0].criteria.resource_id #=> Array
resp.filters[0].criteria.resource_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.resource_id[0].value #=> String
resp.filters[0].criteria.resource_tags #=> Array
resp.filters[0].criteria.resource_tags[0].comparison #=> String, one of "EQUALS"
resp.filters[0].criteria.resource_tags[0].key #=> String
resp.filters[0].criteria.resource_tags[0].value #=> String
resp.filters[0].criteria.resource_type #=> Array
resp.filters[0].criteria.resource_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.resource_type[0].value #=> String
resp.filters[0].criteria.severity #=> Array
resp.filters[0].criteria.severity[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.severity[0].value #=> String
resp.filters[0].criteria.title #=> Array
resp.filters[0].criteria.title[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.title[0].value #=> String
resp.filters[0].criteria.updated_at #=> Array
resp.filters[0].criteria.updated_at[0].end_inclusive #=> Time
resp.filters[0].criteria.updated_at[0].start_inclusive #=> Time
resp.filters[0].criteria.vendor_severity #=> Array
resp.filters[0].criteria.vendor_severity[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vendor_severity[0].value #=> String
resp.filters[0].criteria.vulnerability_id #=> Array
resp.filters[0].criteria.vulnerability_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerability_id[0].value #=> String
resp.filters[0].criteria.vulnerability_source #=> Array
resp.filters[0].criteria.vulnerability_source[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerability_source[0].value #=> String
resp.filters[0].criteria.vulnerable_packages #=> Array
resp.filters[0].criteria.vulnerable_packages[0].architecture.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].architecture.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].epoch.lower_inclusive #=> Float
resp.filters[0].criteria.vulnerable_packages[0].epoch.upper_inclusive #=> Float
resp.filters[0].criteria.vulnerable_packages[0].name.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].name.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].release.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].release.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].source_layer_hash.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].source_layer_hash.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].version.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].version.value #=> String
resp.filters[0].description #=> String
resp.filters[0].name #=> String
resp.filters[0].owner_id #=> String
resp.filters[0].reason #=> String
resp.filters[0].tags #=> Hash
resp.filters[0].tags["MapKey"] #=> String
resp.filters[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action (String)

    The action the filter applies to matched findings.

  • :arns (Array<String>)

    The Amazon resource number (ARN) of the filter.

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



1917
1918
1919
1920
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1917

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

#list_finding_aggregations(params = {}) ⇒ Types::ListFindingAggregationsResponse

Lists aggregated finding data for your environment based on specific criteria.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_finding_aggregations({
  account_ids: [
    {
      comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
      value: "StringInput", # required
    },
  ],
  aggregation_request: {
    account_aggregation: {
      finding_type: "NETWORK_REACHABILITY", # accepts NETWORK_REACHABILITY, PACKAGE_VULNERABILITY
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    ami_aggregation: {
      amis: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL, AFFECTED_INSTANCES
      sort_order: "ASC", # accepts ASC, DESC
    },
    aws_ecr_container_aggregation: {
      architectures: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_shas: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    ec2_instance_aggregation: {
      amis: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      instance_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      instance_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS
          key: "MapKey", # required
          value: "MapValue",
        },
      ],
      operating_systems: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "NETWORK_FINDINGS", # accepts NETWORK_FINDINGS, CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    finding_type_aggregation: {
      finding_type: "NETWORK_REACHABILITY", # accepts NETWORK_REACHABILITY, PACKAGE_VULNERABILITY
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    image_layer_aggregation: {
      layer_hashes: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    package_aggregation: {
      package_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
    },
    repository_aggregation: {
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL, AFFECTED_IMAGES
      sort_order: "ASC", # accepts ASC, DESC
    },
    title_aggregation: {
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      sort_order: "ASC", # accepts ASC, DESC
      titles: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      vulnerability_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
    },
  },
  aggregation_type: "FINDING_TYPE", # required, accepts FINDING_TYPE, PACKAGE, TITLE, REPOSITORY, AMI, AWS_EC2_INSTANCE, AWS_ECR_CONTAINER, IMAGE_LAYER, ACCOUNT
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.aggregation_type #=> String, one of "FINDING_TYPE", "PACKAGE", "TITLE", "REPOSITORY", "AMI", "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER", "IMAGE_LAYER", "ACCOUNT"
resp.next_token #=> String
resp.responses #=> Array
resp.responses[0].. #=> String
resp.responses[0]..severity_counts.all #=> Integer
resp.responses[0]..severity_counts.critical #=> Integer
resp.responses[0]..severity_counts.high #=> Integer
resp.responses[0]..severity_counts.medium #=> Integer
resp.responses[0].ami_aggregation. #=> String
resp.responses[0].ami_aggregation.affected_instances #=> Integer
resp.responses[0].ami_aggregation.ami #=> String
resp.responses[0].ami_aggregation.severity_counts.all #=> Integer
resp.responses[0].ami_aggregation.severity_counts.critical #=> Integer
resp.responses[0].ami_aggregation.severity_counts.high #=> Integer
resp.responses[0].ami_aggregation.severity_counts.medium #=> Integer
resp.responses[0].aws_ecr_container_aggregation. #=> String
resp.responses[0].aws_ecr_container_aggregation.architecture #=> String
resp.responses[0].aws_ecr_container_aggregation.image_sha #=> String
resp.responses[0].aws_ecr_container_aggregation.image_tags #=> Array
resp.responses[0].aws_ecr_container_aggregation.image_tags[0] #=> String
resp.responses[0].aws_ecr_container_aggregation.repository #=> String
resp.responses[0].aws_ecr_container_aggregation.resource_id #=> String
resp.responses[0].aws_ecr_container_aggregation.severity_counts.all #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.critical #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.high #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.medium #=> Integer
resp.responses[0].ec2_instance_aggregation. #=> String
resp.responses[0].ec2_instance_aggregation.ami #=> String
resp.responses[0].ec2_instance_aggregation.instance_id #=> String
resp.responses[0].ec2_instance_aggregation.instance_tags #=> Hash
resp.responses[0].ec2_instance_aggregation.instance_tags["MapKey"] #=> String
resp.responses[0].ec2_instance_aggregation.network_findings #=> Integer
resp.responses[0].ec2_instance_aggregation.operating_system #=> String
resp.responses[0].ec2_instance_aggregation.severity_counts.all #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.critical #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.high #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.medium #=> Integer
resp.responses[0].finding_type_aggregation. #=> String
resp.responses[0].finding_type_aggregation.severity_counts.all #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.critical #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.high #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.medium #=> Integer
resp.responses[0].image_layer_aggregation. #=> String
resp.responses[0].image_layer_aggregation.layer_hash #=> String
resp.responses[0].image_layer_aggregation.repository #=> String
resp.responses[0].image_layer_aggregation.resource_id #=> String
resp.responses[0].image_layer_aggregation.severity_counts.all #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.critical #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.high #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.medium #=> Integer
resp.responses[0].package_aggregation. #=> String
resp.responses[0].package_aggregation.package_name #=> String
resp.responses[0].package_aggregation.severity_counts.all #=> Integer
resp.responses[0].package_aggregation.severity_counts.critical #=> Integer
resp.responses[0].package_aggregation.severity_counts.high #=> Integer
resp.responses[0].package_aggregation.severity_counts.medium #=> Integer
resp.responses[0].repository_aggregation. #=> String
resp.responses[0].repository_aggregation.affected_images #=> Integer
resp.responses[0].repository_aggregation.repository #=> String
resp.responses[0].repository_aggregation.severity_counts.all #=> Integer
resp.responses[0].repository_aggregation.severity_counts.critical #=> Integer
resp.responses[0].repository_aggregation.severity_counts.high #=> Integer
resp.responses[0].repository_aggregation.severity_counts.medium #=> Integer
resp.responses[0].title_aggregation. #=> String
resp.responses[0].title_aggregation.severity_counts.all #=> Integer
resp.responses[0].title_aggregation.severity_counts.critical #=> Integer
resp.responses[0].title_aggregation.severity_counts.high #=> Integer
resp.responses[0].title_aggregation.severity_counts.medium #=> Integer
resp.responses[0].title_aggregation.title #=> String
resp.responses[0].title_aggregation.vulnerability_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<Types::StringFilter>)

    The Amazon Web Services account IDs to retrieve finding aggregation data for.

  • :aggregation_request (Types::AggregationRequest)

    Details of the aggregation request that is used to filter your aggregation results.

  • :aggregation_type (required, String)

    The type of the aggregation request.

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



2191
2192
2193
2194
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2191

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

#list_findings(params = {}) ⇒ Types::ListFindingsResponse

Lists findings for your environment.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_findings({
  filter_criteria: {
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_vpc_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    ecr_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    inspector_score: [
      {
        lower_inclusive: 1.0,
        upper_inclusive: 1.0,
      },
    ],
    last_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    network_protocol: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "MapKey", # required
        value: "MapValue",
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    updated_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_source: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        architecture: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          lower_inclusive: 1.0,
          upper_inclusive: 1.0,
        },
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        source_layer_hash: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
  },
  max_results: 1,
  next_token: "NextToken",
  sort_criteria: {
    field: "AWS_ACCOUNT_ID", # required, accepts AWS_ACCOUNT_ID, FINDING_TYPE, SEVERITY, FIRST_OBSERVED_AT, LAST_OBSERVED_AT, FINDING_STATUS, RESOURCE_TYPE, ECR_IMAGE_PUSHED_AT, ECR_IMAGE_REPOSITORY_NAME, ECR_IMAGE_REGISTRY, NETWORK_PROTOCOL, COMPONENT_TYPE, VULNERABILITY_ID, VULNERABILITY_SOURCE, INSPECTOR_SCORE, VENDOR_SEVERITY
    sort_order: "ASC", # required, accepts ASC, DESC
  },
})

Response structure


resp.findings #=> Array
resp.findings[0]. #=> String
resp.findings[0].description #=> String
resp.findings[0].finding_arn #=> String
resp.findings[0].first_observed_at #=> Time
resp.findings[0].inspector_score #=> Float
resp.findings[0].inspector_score_details.adjusted_cvss.adjustments #=> Array
resp.findings[0].inspector_score_details.adjusted_cvss.adjustments[0].metric #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.adjustments[0].reason #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.cvss_source #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.score #=> Float
resp.findings[0].inspector_score_details.adjusted_cvss.score_source #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.scoring_vector #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.version #=> String
resp.findings[0].last_observed_at #=> Time
resp.findings[0].network_reachability_details.network_path.steps #=> Array
resp.findings[0].network_reachability_details.network_path.steps[0].component_id #=> String
resp.findings[0].network_reachability_details.network_path.steps[0].component_type #=> String
resp.findings[0].network_reachability_details.open_port_range.begin #=> Integer
resp.findings[0].network_reachability_details.open_port_range.end #=> Integer
resp.findings[0].network_reachability_details.protocol #=> String, one of "TCP", "UDP"
resp.findings[0].package_vulnerability_details.cvss #=> Array
resp.findings[0].package_vulnerability_details.cvss[0].base_score #=> Float
resp.findings[0].package_vulnerability_details.cvss[0].scoring_vector #=> String
resp.findings[0].package_vulnerability_details.cvss[0].source #=> String
resp.findings[0].package_vulnerability_details.cvss[0].version #=> String
resp.findings[0].package_vulnerability_details.reference_urls #=> Array
resp.findings[0].package_vulnerability_details.reference_urls[0] #=> String
resp.findings[0].package_vulnerability_details.related_vulnerabilities #=> Array
resp.findings[0].package_vulnerability_details.related_vulnerabilities[0] #=> String
resp.findings[0].package_vulnerability_details.source #=> String
resp.findings[0].package_vulnerability_details.source_url #=> String
resp.findings[0].package_vulnerability_details.vendor_created_at #=> Time
resp.findings[0].package_vulnerability_details.vendor_severity #=> String
resp.findings[0].package_vulnerability_details.vendor_updated_at #=> Time
resp.findings[0].package_vulnerability_details.vulnerability_id #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages #=> Array
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].arch #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].epoch #=> Integer
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].file_path #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].fixed_in_version #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].name #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].package_manager #=> String, one of "BUNDLER", "CARGO", "COMPOSER", "NPM", "NUGET", "PIPENV", "POETRY", "YARN", "GOBINARY", "GOMOD", "JAR", "OS"
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].release #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].source_layer_hash #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].version #=> String
resp.findings[0].remediation.recommendation.url #=> String
resp.findings[0].remediation.recommendation.text #=> String
resp.findings[0].resources #=> Array
resp.findings[0].resources[0].details.aws_ec2_instance.iam_instance_profile_arn #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.image_id #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.ip_v4_addresses #=> Array
resp.findings[0].resources[0].details.aws_ec2_instance.ip_v4_addresses[0] #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.ip_v6_addresses #=> Array
resp.findings[0].resources[0].details.aws_ec2_instance.ip_v6_addresses[0] #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.key_name #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.launched_at #=> Time
resp.findings[0].resources[0].details.aws_ec2_instance.platform #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.subnet_id #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.type #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.vpc_id #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.architecture #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.author #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.image_hash #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.image_tags #=> Array
resp.findings[0].resources[0].details.aws_ecr_container_image.image_tags[0] #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.platform #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.pushed_at #=> Time
resp.findings[0].resources[0].details.aws_ecr_container_image.registry #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.repository_name #=> String
resp.findings[0].resources[0].id #=> String
resp.findings[0].resources[0].partition #=> String
resp.findings[0].resources[0].region #=> String
resp.findings[0].resources[0].tags #=> Hash
resp.findings[0].resources[0].tags["MapKey"] #=> String
resp.findings[0].resources[0].type #=> String, one of "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER_IMAGE", "AWS_ECR_REPOSITORY"
resp.findings[0].severity #=> String, one of "INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL", "UNTRIAGED"
resp.findings[0].status #=> String, one of "ACTIVE", "SUPPRESSED", "CLOSED"
resp.findings[0].title #=> String
resp.findings[0].type #=> String, one of "NETWORK_REACHABILITY", "PACKAGE_VULNERABILITY"
resp.findings[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::FilterCriteria)

    Details on the filters to apply to your finding results.

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

  • :sort_criteria (Types::SortCriteria)

    Details on the sort criteria to apply to your finding results.

Returns:

See Also:



2532
2533
2534
2535
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2532

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

#list_members(params = {}) ⇒ Types::ListMembersResponse

List members associated with the Amazon Inspector delegated administrator for your organization.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_members({
  max_results: 1,
  next_token: "NextToken",
  only_associated: false,
})

Response structure


resp.members #=> Array
resp.members[0]. #=> String
resp.members[0]. #=> String
resp.members[0].relationship_status #=> String, one of "CREATED", "INVITED", "DISABLED", "ENABLED", "REMOVED", "RESIGNED", "DELETED", "EMAIL_VERIFICATION_IN_PROGRESS", "EMAIL_VERIFICATION_FAILED", "REGION_DISABLED", "ACCOUNT_SUSPENDED", "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER"
resp.members[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

  • :only_associated (Boolean)

    Specifies whether to list only currently associated members if True or to list all members within the organization if False.

Returns:

See Also:



2582
2583
2584
2585
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2582

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

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

Lists all tags attached to a given resource.

Examples:

Request syntax with placeholder values


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

Response structure


resp.tags #=> Hash
resp.tags["MapKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon resource number (ARN) of the resource to list tags of.

Returns:

See Also:



2611
2612
2613
2614
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2611

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

#list_usage_totals(params = {}) ⇒ Types::ListUsageTotalsResponse

Lists the Amazon Inspector usage totals over the last 30 days.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_usage_totals({
  account_ids: ["UsageAccountId"],
  max_results: 1,
  next_token: "ListUsageTotalsNextToken",
})

Response structure


resp.next_token #=> String
resp.totals #=> Array
resp.totals[0]. #=> String
resp.totals[0].usage #=> Array
resp.totals[0].usage[0].currency #=> String, one of "USD"
resp.totals[0].usage[0].estimated_monthly_cost #=> Float
resp.totals[0].usage[0].total #=> Float
resp.totals[0].usage[0].type #=> String, one of "EC2_INSTANCE_HOURS", "ECR_INITIAL_SCAN", "ECR_RESCAN"

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<String>)

    The Amazon Web Services account IDs to retrieve usage totals for.

  • :max_results (Integer)

    The maximum number of results to return in the response.

  • :next_token (String)

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



2661
2662
2663
2664
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2661

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

#tag_resource(params = {}) ⇒ Struct

Adds tags to a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "MapKey" => "MapValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to apply a tag to.

  • :tags (required, Hash<String,String>)

    The tags to be added to a resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2689
2690
2691
2692
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2689

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

#untag_resource(params = {}) ⇒ Struct

Removes tags from a resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) for the resource to remove tags from.

  • :tag_keys (required, Array<String>)

    The tag keys to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2715
2716
2717
2718
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2715

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

#update_filter(params = {}) ⇒ Types::UpdateFilterResponse

Specifies the action that is to be applied to the findings that match the filter.

Examples:

Request syntax with placeholder values


resp = client.update_filter({
  action: "NONE", # accepts NONE, SUPPRESS
  description: "FilterDescription",
  filter_arn: "FilterArn", # required
  filter_criteria: {
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    component_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ec2_instance_vpc_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    ecr_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    inspector_score: [
      {
        lower_inclusive: 1.0,
        upper_inclusive: 1.0,
      },
    ],
    last_observed_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    network_protocol: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    resource_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "MapKey", # required
        value: "MapValue",
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    updated_at: [
      {
        end_inclusive: Time.now,
        start_inclusive: Time.now,
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerability_source: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        architecture: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          lower_inclusive: 1.0,
          upper_inclusive: 1.0,
        },
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        source_layer_hash: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
  },
  name: "FilterName",
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action (String)

    Specifies the action that is to be applied to the findings that match the filter.

  • :description (String)

    A description of the filter.

  • :filter_arn (required, String)

    The Amazon Resource Number (ARN) of the filter to update.

  • :filter_criteria (Types::FilterCriteria)

    Defines the criteria to be update in the filter.

  • :name (String)

    The name of the filter.

Returns:

See Also:



2971
2972
2973
2974
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2971

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

#update_organization_configuration(params = {}) ⇒ Types::UpdateOrganizationConfigurationResponse

Updates the configurations for your Amazon Inspector organization.

Examples:

Request syntax with placeholder values


resp = client.update_organization_configuration({
  auto_enable: { # required
    ec2: false, # required
    ecr: false, # required
  },
})

Response structure


resp.auto_enable.ec2 #=> Boolean
resp.auto_enable.ecr #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :auto_enable (required, Types::AutoEnable)

    Defines which scan types are enabled automatically for new members of your Amazon Inspector organization.

Returns:

See Also:



3004
3005
3006
3007
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3004

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