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):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []] —

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider) —

    Your AWS credentials used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or 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, :session_token, and :account_id options.

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.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::InstanceProfileCredentials 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)
  • :account_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.

  • :auth_scheme_preference (Array<String>) —

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :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. Takes effect only when disable_clock_skew_correction is not set.

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

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

  • :disable_clock_skew_correction (Boolean) —

    Used only in standard and adaptive retry modes. When true, the SDK does not apply a clock skew correction, does not update its stored skew from responses, and does not retry clock skew errors. Clock skew correction is enabled by default.

  • :disable_host_prefix_injection (Boolean) — default: false —

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :disable_request_compression (Boolean) — default: false —

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP) —

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :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.

  • :ignore_configured_endpoint_urls (Boolean) —

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :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.

  • :request_checksum_calculation (String) — default: "when_supported" —

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :request_min_compression_size_bytes (Integer) — default: 10240 —

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :response_checksum_validation (String) — default: "when_supported" —

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :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 the 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 - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :sdk_ua_app_id (String) —

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array) —

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider —

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider) —

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

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

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :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.

  • :endpoint_provider (Aws::Inspector2::EndpointProvider) —

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::Inspector2::EndpointParameters.

  • :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.

  • :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_open_timeout (Float) — default: 15 —

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

  • :http_proxy (URI::HTTP, String) —

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

  • :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_wire_trace (Boolean) — default: false —

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

  • :on_chunk_received (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true —

    When true, response errors are raised.

  • :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.

  • :ssl_ca_store (String) —

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate) —

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey) —

    Sets a client key when creating http connections.

  • :ssl_timeout (Float) —

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true —

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



478
479
480
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 478

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. An HTTP 200 response indicates the association was successfully started, but doesn’t indicate whether it was completed. You can check if the association completed by using ListMembers for multiple accounts or GetMembers for a single account.

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:



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

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

#batch_associate_code_security_scan_configuration(params = {}) ⇒ Types::BatchAssociateCodeSecurityScanConfigurationResponse

Associates multiple code repositories with an Amazon Inspector code security scan configuration.

Examples:

Request syntax with placeholder values


resp = client.batch_associate_code_security_scan_configuration({
  associate_configuration_requests: [ # required
    {
      scan_configuration_arn: "ScanConfigurationArn", # required
      resource: { # required
        project_id: "ProjectId",
      },
    },
  ],
})

Response structure


resp.failed_associations #=> Array
resp.failed_associations[0].scan_configuration_arn #=> String
resp.failed_associations[0].resource.project_id #=> String
resp.failed_associations[0].status_code #=> String, one of "INTERNAL_ERROR", "ACCESS_DENIED", "SCAN_CONFIGURATION_NOT_FOUND", "INVALID_INPUT", "RESOURCE_NOT_FOUND", "QUOTA_EXCEEDED"
resp.failed_associations[0].status_message #=> String
resp.successful_associations #=> Array
resp.successful_associations[0].scan_configuration_arn #=> String
resp.successful_associations[0].resource.project_id #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



563
564
565
566
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 563

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

#batch_disassociate_code_security_scan_configuration(params = {}) ⇒ Types::BatchDisassociateCodeSecurityScanConfigurationResponse

Disassociates multiple code repositories from an Amazon Inspector code security scan configuration.

Examples:

Request syntax with placeholder values


resp = client.batch_disassociate_code_security_scan_configuration({
  disassociate_configuration_requests: [ # required
    {
      scan_configuration_arn: "ScanConfigurationArn", # required
      resource: { # required
        project_id: "ProjectId",
      },
    },
  ],
})

Response structure


resp.failed_associations #=> Array
resp.failed_associations[0].scan_configuration_arn #=> String
resp.failed_associations[0].resource.project_id #=> String
resp.failed_associations[0].status_code #=> String, one of "INTERNAL_ERROR", "ACCESS_DENIED", "SCAN_CONFIGURATION_NOT_FOUND", "INVALID_INPUT", "RESOURCE_NOT_FOUND", "QUOTA_EXCEEDED"
resp.failed_associations[0].status_message #=> String
resp.successful_associations #=> Array
resp.successful_associations[0].scan_configuration_arn #=> String
resp.successful_associations[0].resource.project_id #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



608
609
610
611
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 608

def batch_disassociate_code_security_scan_configuration(params = {}, options = {})
  req = build_request(:batch_disassociate_code_security_scan_configuration, 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].state.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].state.error_message #=> String
resp.accounts[0].resource_state.ec2.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.ec2.error_message #=> String
resp.accounts[0].resource_state.ecr.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.ecr.error_message #=> String
resp.accounts[0].resource_state.lambda.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_state.lambda.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.lambda.error_message #=> String
resp.accounts[0].resource_state.lambda_code.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_state.lambda_code.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.lambda_code.error_message #=> String
resp.accounts[0].resource_state.code_repository.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_state.code_repository.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.code_repository.error_message #=> String
resp.accounts[0].resource_state.ami.status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_state.ami.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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.accounts[0].resource_state.ami.error_message #=> String
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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].resource_status.lambda #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.lambda_code #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.code_repository #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ami #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.failed_accounts[0].error_message #=> String

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:



672
673
674
675
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 672

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

#batch_get_code_snippet(params = {}) ⇒ Types::BatchGetCodeSnippetResponse

Retrieves code snippets from findings that Amazon Inspector detected code vulnerabilities in.

Examples:

Request syntax with placeholder values


resp = client.batch_get_code_snippet({
  finding_arns: ["FindingArn"], # required
})

Response structure


resp.code_snippet_results #=> Array
resp.code_snippet_results[0].finding_arn #=> String
resp.code_snippet_results[0].start_line #=> Integer
resp.code_snippet_results[0].end_line #=> Integer
resp.code_snippet_results[0].code_snippet #=> Array
resp.code_snippet_results[0].code_snippet[0].content #=> String
resp.code_snippet_results[0].code_snippet[0].line_number #=> Integer
resp.code_snippet_results[0].suggested_fixes #=> Array
resp.code_snippet_results[0].suggested_fixes[0].description #=> String
resp.code_snippet_results[0].suggested_fixes[0].code #=> String
resp.errors #=> Array
resp.errors[0].finding_arn #=> String
resp.errors[0].error_code #=> String, one of "INTERNAL_ERROR", "ACCESS_DENIED", "CODE_SNIPPET_NOT_FOUND", "INVALID_INPUT"
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :finding_arns (required, Array<String>) —

    An array of finding ARNs for the findings you want to retrieve code snippets from.

Returns:

See Also:



716
717
718
719
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 716

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

#batch_get_finding_details(params = {}) ⇒ Types::BatchGetFindingDetailsResponse

Gets vulnerability details for findings.

Examples:

Example: Sample BatchGetFindingDetails Call


resp = client.batch_get_finding_details({
  finding_arns: [
    "arn:aws:inspector2:eu-west-1:123456789012:finding/78b88cc9aa1d78b6e14fde90d774dde7", 
    "arn:aws:inspector2:eu-west-1:111111111111:finding/78b88cc9aa1d78b6e14fde90d874dde7", 
  ], 
})

resp.to_h outputs the following:
{
  errors: [
    {
      error_code: "ACCESS_DENIED", 
      error_message: "You don't have permission to access this finding", 
      finding_arn: "arn:aws:inspector2:eu-west-1:111111111111:finding/78b88cc9aa1d78b6e14fde90d874dde7", 
    }, 
  ], 
  finding_details: [
    {
      cisa_data: {
        action: "For all affected software assets for which updates exist, the only acceptable remediation actions are: 1) Apply updates; OR 2) remove affected assets from agency networks.", 
        date_added: Time.parse(1688580990), 
        date_due: Time.parse(1688580999), 
      }, 
      cwes: [
        "cwe-1234", 
      ], 
      epss_score: 0.85, 
      evidences: [
        {
          evidence_detail: "2 sightings on 1 source", 
          evidence_rule: "Historically Linked to Penetration Testing Tools", 
          severity: "Low", 
        }, 
      ], 
      exploit_observed: {
        first_seen: Time.parse(1688580800), 
        last_seen: Time.parse(1688580990), 
      }, 
      finding_arn: "arn:aws:inspector2:eu-west-1:123456789012:finding/78b88cc9aa1d78b6e14fde90d774dde7", 
      reference_urls: [
        "https://nvd.nist.gov/vuln/detail/CVE-2019-20367", 
      ], 
      risk_score: 66, 
      tools: [
        "Metasploit", 
      ], 
      ttps: [
        "TA0001", 
        "TA0002", 
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.batch_get_finding_details({
  finding_arns: ["FindingArn"], # required
})

Response structure


resp.finding_details #=> Array
resp.finding_details[0].finding_arn #=> String
resp.finding_details[0].cisa_data.date_added #=> Time
resp.finding_details[0].cisa_data.date_due #=> Time
resp.finding_details[0].cisa_data.action #=> String
resp.finding_details[0].risk_score #=> Integer
resp.finding_details[0].evidences #=> Array
resp.finding_details[0].evidences[0].evidence_rule #=> String
resp.finding_details[0].evidences[0].evidence_detail #=> String
resp.finding_details[0].evidences[0].severity #=> String
resp.finding_details[0].ttps #=> Array
resp.finding_details[0].ttps[0] #=> String
resp.finding_details[0].tools #=> Array
resp.finding_details[0].tools[0] #=> String
resp.finding_details[0].exploit_observed.last_seen #=> Time
resp.finding_details[0].exploit_observed.first_seen #=> Time
resp.finding_details[0].reference_urls #=> Array
resp.finding_details[0].reference_urls[0] #=> String
resp.finding_details[0].cwes #=> Array
resp.finding_details[0].cwes[0] #=> String
resp.finding_details[0].epss_score #=> Float
resp.errors #=> Array
resp.errors[0].finding_arn #=> String
resp.errors[0].error_code #=> String, one of "INTERNAL_ERROR", "ACCESS_DENIED", "FINDING_DETAILS_NOT_FOUND", "INVALID_INPUT"
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :finding_arns (required, Array<String>) —

    A list of finding ARNs.

Returns:

See Also:



826
827
828
829
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 826

def batch_get_finding_details(params = {}, options = {})
  req = build_request(:batch_get_finding_details, 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].type #=> String, one of "EC2", "ECR", "LAMBDA", "LAMBDA_CODE", "CODE_REPOSITORY", "VM", "CONTAINER_IMAGE", "SERVERLESS_FUNCTION", "MACHINE_IMAGE"
resp.accounts[0].free_trial_info[0].start #=> Time
resp.accounts[0].free_trial_info[0].end #=> Time
resp.accounts[0].free_trial_info[0].status #=> String, one of "ACTIVE", "INACTIVE"
resp.accounts[0].free_trial_info[0].cloud_provider #=> String, one of "AWS", "AZURE", "NOT_APPLICABLE"
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:



866
867
868
869
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 866

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

#batch_get_member_ec2_deep_inspection_status(params = {}) ⇒ Types::BatchGetMemberEc2DeepInspectionStatusResponse

Retrieves Amazon Inspector deep inspection activation status of multiple member accounts within your organization. You must be the delegated administrator of an organization in Amazon Inspector to use this API.

Examples:

Request syntax with placeholder values


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

Response structure


resp. #=> Array
resp.[0]. #=> String
resp.[0].status #=> String, one of "ACTIVATED", "DEACTIVATED", "PENDING", "FAILED"
resp.[0].error_message #=> String
resp. #=> Array
resp.[0]. #=> String
resp.[0].ec2_scan_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :account_ids (Array<String>) —

    The unique identifiers for the Amazon Web Services accounts to retrieve Amazon Inspector deep inspection activation status for.

Returns:

See Also:



906
907
908
909
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 906

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

#batch_update_member_ec2_deep_inspection_status(params = {}) ⇒ Types::BatchUpdateMemberEc2DeepInspectionStatusResponse

Activates or deactivates Amazon Inspector deep inspection for the provided member accounts in your organization. You must be the delegated administrator of an organization in Amazon Inspector to use this API.

Examples:

Request syntax with placeholder values


resp = client.batch_update_member_ec2_deep_inspection_status({
  account_ids: [ # required
    {
      account_id: "AccountId", # required
      activate_deep_inspection: false, # required
    },
  ],
})

Response structure


resp. #=> Array
resp.[0]. #=> String
resp.[0].status #=> String, one of "ACTIVATED", "DEACTIVATED", "PENDING", "FAILED"
resp.[0].error_message #=> String
resp. #=> Array
resp.[0]. #=> String
resp.[0].ec2_scan_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



951
952
953
954
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 951

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



979
980
981
982
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 979

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

#cancel_sbom_export(params = {}) ⇒ Types::CancelSbomExportResponse

Cancels a software bill of materials (SBOM) report.

Examples:

Request syntax with placeholder values


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

Response structure


resp.report_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :report_id (required, String) —

    The report ID of the SBOM export to cancel.

Returns:

See Also:



1007
1008
1009
1010
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1007

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

#create_cis_scan_configuration(params = {}) ⇒ Types::CreateCisScanConfigurationResponse

Creates a CIS scan configuration.

Examples:

Example: Sample CreateCisScanConfiguration Call


resp = client.create_cis_scan_configuration({
  scan_name: "sample", 
  schedule: {
    daily: {
      start_time: {
        time_of_day: "12:34", 
        timezone: "UTC", 
      }, 
    }, 
  }, 
  security_level: "LEVEL_1", 
  targets: {
    account_ids: [
      "SELF", 
    ], 
    target_resource_tags: {
      "key" => [
        "value", 
      ], 
    }, 
  }, 
})

resp.to_h outputs the following:
{
  scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
}

Request syntax with placeholder values


resp = client.create_cis_scan_configuration({
  scan_name: "CisScanName", # required
  security_level: "LEVEL_1", # required, accepts LEVEL_1, LEVEL_2
  schedule: { # required
    one_time: {
    },
    daily: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
    },
    weekly: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
      days: ["SUN"], # required, accepts SUN, MON, TUE, WED, THU, FRI, SAT
    },
    monthly: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
      day: "SUN", # required, accepts SUN, MON, TUE, WED, THU, FRI, SAT
    },
  },
  targets: { # required
    account_ids: ["TargetAccount"], # required
    target_resource_tags: { # required
      "TargetResourceTagsKey" => ["TargetResourceTagsValue"],
    },
  },
  tags: {
    "MapKey" => "MapValue",
  },
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_name (required, String) —

    The scan name for the CIS scan configuration.

  • :security_level (required, String) —

    The security level for the CIS scan configuration. Security level refers to the Benchmark levels that CIS assigns to a profile.

  • :schedule (required, Types::Schedule) —

    The schedule for the CIS scan configuration.

  • :targets (required, Types::CreateCisTargets) —

    The targets for the CIS scan configuration.

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

    The tags for the CIS scan configuration.

Returns:

See Also:



1113
1114
1115
1116
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1113

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

#create_code_security_integration(params = {}) ⇒ Types::CreateCodeSecurityIntegrationResponse

Creates a code security integration with a source code repository provider.

After calling the CreateCodeSecurityIntegration operation, you complete authentication and authorization with your provider. Next you call the UpdateCodeSecurityIntegration operation to provide the details to complete the integration setup

Examples:

Request syntax with placeholder values


resp = client.create_code_security_integration({
  name: "IntegrationName", # required
  type: "GITLAB_SELF_MANAGED", # required, accepts GITLAB_SELF_MANAGED, GITHUB
  details: {
    gitlab_self_managed: {
      instance_url: "InstanceUrl", # required
      access_token: "GitLabAccessToken", # required
    },
  },
  tags: {
    "MapKey" => "MapValue",
  },
})

Response structure


resp.integration_arn #=> String
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "ACTIVE", "INACTIVE", "DISABLING"
resp.authorization_url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the code security integration.

  • :type (required, String) —

    The type of repository provider for the integration.

  • :details (Types::CreateIntegrationDetail) —

    The integration details specific to the repository provider type.

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

    The tags to apply to the code security integration.

Returns:

See Also:



1170
1171
1172
1173
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1170

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

#create_code_security_scan_configuration(params = {}) ⇒ Types::CreateCodeSecurityScanConfigurationResponse

Creates a scan configuration for code security scanning.

Examples:

Request syntax with placeholder values


resp = client.create_code_security_scan_configuration({
  name: "ScanConfigurationName", # required
  level: "ORGANIZATION", # required, accepts ORGANIZATION, ACCOUNT
  configuration: { # required
    periodic_scan_configuration: {
      frequency: "WEEKLY", # accepts WEEKLY, MONTHLY, NEVER
      frequency_expression: "FrequencyExpression",
    },
    continuous_integration_scan_configuration: {
      supported_events: ["PULL_REQUEST"], # required, accepts PULL_REQUEST, PUSH
    },
    rule_set_categories: ["SAST"], # required, accepts SAST, IAC, SCA
  },
  scope_settings: {
    project_selection_scope: "ALL", # accepts ALL
  },
  tags: {
    "MapKey" => "MapValue",
  },
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the scan configuration.

  • :level (required, String) —

    The security level for the scan configuration.

  • :configuration (required, Types::CodeSecurityScanConfiguration) —

    The configuration settings for the code security scan.

  • :scope_settings (Types::ScopeSettings) —

    The scope settings that define which repositories will be scanned. Include this parameter to create a default scan configuration. Otherwise Amazon Inspector creates a general scan configuration.

    A default scan configuration automatically applies to all existing and future projects imported into Amazon Inspector. Use the BatchAssociateCodeSecurityScanConfiguration operation to associate a general scan configuration with projects.

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

    The tags to apply to the scan configuration.

Returns:

See Also:



1234
1235
1236
1237
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1234

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

#create_connector(params = {}) ⇒ Types::CreateConnectorResponse

Creates a connector that links an external cloud provider to Amazon Inspector for vulnerability scanning.

Examples:

Example: Create an Azure customer-managed connector for VM scanning at SUBSCRIPTION scope


resp = client.create_connector({
  name: "my-azure-connector", 
  description: "Azure subscription scanner", 
  provider: "AZURE", 
  provider_detail: {
    azure: {
      auto_install_vm_scanner: true, 
      aws_config_connector_arn: "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae", 
      azure_regions: [
        "eastus", 
      ], 
      scope_configuration: {
        vm_scanning: {
          scope_type: "SUBSCRIPTION", 
          scope_values: [
            "552802f5-1492-4184-bbae-7291c9939b16", 
          ], 
        }, 
      }, 
    }, 
  }, 
  tags: {
    "env" => "prod", 
    "owner" => "security-team", 
  }, 
})

resp.to_h outputs the following:
{
  connector_arn: "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
}

Request syntax with placeholder values


resp = client.create_connector({
  client_token: "String",
  name: "ConnectorName", # required
  provider: "AZURE", # required, accepts AZURE
  description: "ConnectorDescription",
  provider_detail: { # required
    azure: {
      aws_config_connector_arn: "AwsConfigConnectorArn", # required
      scope_configuration: { # required
        vm_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
        container_image_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
        serverless_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
      },
      azure_regions: ["AzureRegion"], # required
      auto_install_vm_scanner: false,
    },
  },
  tags: {
    "ConnectorTagKey" => "ConnectorTagValue",
  },
})

Response structure


resp.connector_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

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

  • :name (required, String) —

    The name of the connector.

  • :provider (required, String) —

    The cloud provider for the connector.

  • :description (String) —

    A description of the connector.

  • :provider_detail (required, Types::ProviderDetailCreate) —

    The provider-specific configuration details for the connector.

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

    The tags to apply to the connector.

Returns:

See Also:



1346
1347
1348
1349
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1346

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

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

Creates a filter resource using specified filter criteria. When the filter action is set to SUPPRESS this action creates a suppression rule.

Examples:

Request syntax with placeholder values


resp = client.create_filter({
  action: "NONE", # required, accepts NONE, SUPPRESS
  description: "FilterDescription",
  filter_criteria: { # required
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    last_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    updated_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    inspector_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    resource_type: [
      {
        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",
      },
    ],
    ec2_instance_image_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
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    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
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    network_protocol: [
      {
        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
      },
    ],
    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
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        architecture: {
          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
        },
        source_lambda_layer_arn: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        file_path: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    fix_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_layers: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    lambda_function_execution_role_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    exploit_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_file_path: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    epss_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_owner_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_platform: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_image_reference: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_network_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_subnet_ids: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_digest: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_serverless_function_execution_role: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
  },
  name: "FilterName", # required
  tags: {
    "MapKey" => "MapValue",
  },
  reason: "FilterReason",
})

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.

  • :reason (String) —

    The reason for creating the filter.

Returns:

See Also:



1847
1848
1849
1850
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 1847

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. By default only ACTIVE findings are returned in the report. To see SUPRESSED or CLOSED findings you must specify a value for the findingStatus filter criteria.

Examples:

Request syntax with placeholder values


resp = client.create_findings_report({
  filter_criteria: {
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    last_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    updated_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    inspector_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    resource_type: [
      {
        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",
      },
    ],
    ec2_instance_image_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
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    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
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    network_protocol: [
      {
        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
      },
    ],
    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
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        architecture: {
          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
        },
        source_lambda_layer_arn: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        file_path: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    fix_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_layers: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    lambda_function_execution_role_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    exploit_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_file_path: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    epss_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_owner_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_platform: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_image_reference: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_network_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_subnet_ids: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_digest: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_serverless_function_execution_role: [
      {
        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
    expected_bucket_owner: "AccountId",
  },
})

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:



2336
2337
2338
2339
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2336

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

#create_sbom_export(params = {}) ⇒ Types::CreateSbomExportResponse

Creates a software bill of materials (SBOM) report.

Examples:

Request syntax with placeholder values


resp = client.create_sbom_export({
  resource_filter_criteria: {
    account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    resource_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    resource_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    ecr_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    ec2_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    lambda_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_vm_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_container_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_container_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_container_registry_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "ResourceStringInput", # required
      },
    ],
    cloud_serverless_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
  },
  report_format: "CYCLONEDX_1_4", # required, accepts CYCLONEDX_1_4, SPDX_2_3
  s3_destination: { # required
    bucket_name: "String", # required
    key_prefix: "String",
    kms_key_arn: "String", # required
    expected_bucket_owner: "AccountId",
  },
})

Response structure


resp.report_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_filter_criteria (Types::ResourceFilterCriteria) —

    The resource filter criteria for the software bill of materials (SBOM) report.

  • :report_format (required, String) —

    The output format for the software bill of materials (SBOM) report.

  • :s3_destination (required, Types::Destination) —

    Contains details of the Amazon S3 bucket and KMS key used to export findings.

Returns:

See Also:



2498
2499
2500
2501
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2498

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

#delete_cis_scan_configuration(params = {}) ⇒ Types::DeleteCisScanConfigurationResponse

Deletes a CIS scan configuration.

Examples:

Example: Sample DeleteCisScanConfiguration Call


resp = client.delete_cis_scan_configuration({
  scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
})

resp.to_h outputs the following:
{
  scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
}

Request syntax with placeholder values


resp = client.delete_cis_scan_configuration({
  scan_configuration_arn: "CisScanConfigurationArn", # required
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The ARN of the CIS scan configuration.

Returns:

See Also:



2538
2539
2540
2541
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2538

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

#delete_code_security_integration(params = {}) ⇒ Types::DeleteCodeSecurityIntegrationResponse

Deletes a code security integration.

Examples:

Request syntax with placeholder values


resp = client.delete_code_security_integration({
  integration_arn: "CodeSecurityIntegrationArn", # required
})

Response structure


resp.integration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :integration_arn (required, String) —

    The Amazon Resource Name (ARN) of the code security integration to delete.

Returns:

See Also:



2567
2568
2569
2570
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2567

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

#delete_code_security_scan_configuration(params = {}) ⇒ Types::DeleteCodeSecurityScanConfigurationResponse

Deletes a code security scan configuration.

Examples:

Request syntax with placeholder values


resp = client.delete_code_security_scan_configuration({
  scan_configuration_arn: "ScanConfigurationArn", # required
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The Amazon Resource Name (ARN) of the scan configuration to delete.

Returns:

See Also:



2595
2596
2597
2598
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2595

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

#delete_connector(params = {}) ⇒ Struct

Deletes a connector from your account.

Examples:

Example: Delete a customer-managed connector


resp = client.delete_connector({
  connector_arn: "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_connector({
  connector_arn: "ConnectorArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :connector_arn (required, String) —

    The Amazon Resource Name (ARN) of the connector to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



2628
2629
2630
2631
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2628

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



2656
2657
2658
2659
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2656

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.auto_enable.lambda #=> Boolean
resp.auto_enable.lambda_code #=> Boolean
resp.auto_enable.code_repository #=> Boolean
resp.auto_enable.ami #=> Boolean
resp. #=> Boolean

Parameters:

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

    ({})

Returns:

See Also:



2683
2684
2685
2686
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2683

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, LAMBDA, LAMBDA_CODE, CODE_REPOSITORY
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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].resource_status.lambda #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.lambda_code #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.code_repository #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.ami #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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].resource_status.lambda #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.lambda_code #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.code_repository #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ami #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.failed_accounts[0].error_message #=> String

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:



2738
2739
2740
2741
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2738

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:



2768
2769
2770
2771
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2768

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:



2798
2799
2800
2801
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2798

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"],
  resource_types: ["EC2"], # required, accepts EC2, ECR, LAMBDA, LAMBDA_CODE, CODE_REPOSITORY
  client_token: "ClientToken",
})

Response structure


resp.accounts #=> Array
resp.accounts[0]. #=> String
resp.accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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].resource_status.lambda #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.lambda_code #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.code_repository #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.accounts[0].resource_status.ami #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts #=> Array
resp.failed_accounts[0]. #=> String
resp.failed_accounts[0].status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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].resource_status.lambda #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.lambda_code #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.code_repository #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
resp.failed_accounts[0].resource_status.ami #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "SUSPENDING", "SUSPENDED"
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", "ACCOUNT_IS_ISOLATED", "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", "BLOCKED_BY_ORGANIZATION_POLICY"
resp.failed_accounts[0].error_message #=> String

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.

  • :resource_types (required, Array<String>) —

    The resource scan types you want to enable.

  • :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.**

Returns:

See Also:



2858
2859
2860
2861
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2858

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.({
  delegated_admin_account_id: "AccountId", # required
  client_token: "ClientToken",
})

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 Amazon Inspector delegated administrator.

  • :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.**

Returns:

See Also:



2895
2896
2897
2898
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2895

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

#get_cis_scan_report(params = {}) ⇒ Types::GetCisScanReportResponse

Retrieves a CIS scan report.

Examples:

Example: Sample GetCisScanReport Call


resp = client.get_cis_scan_report({
  report_format: "PDF", 
  scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
})

resp.to_h outputs the following:
{
  status: "SUCCEEDED", 
  url: "www.s3.amazon.com/abcdef", 
}

Request syntax with placeholder values


resp = client.get_cis_scan_report({
  scan_arn: "CisScanArn", # required
  target_accounts: ["AccountId"],
  report_format: "PDF", # accepts PDF, CSV
})

Response structure


resp.url #=> String
resp.status #=> String, one of "SUCCEEDED", "FAILED", "IN_PROGRESS"

Parameters:

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

    ({})

Options Hash (params):

  • :scan_arn (required, String) —

    The scan ARN.

  • :target_accounts (Array<String>) —

    The target accounts.

  • :report_format (String) —

    The format of the report. Valid values are PDF and CSV. If no value is specified, the report format defaults to PDF.

Returns:

See Also:



2948
2949
2950
2951
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 2948

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

#get_cis_scan_result_details(params = {}) ⇒ Types::GetCisScanResultDetailsResponse

Retrieves CIS scan result details.

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

Examples:

Example: Sample GetCisScanResultDetails Call


resp = client.get_cis_scan_result_details({
  account_id: "123412341234", 
  scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
  target_resource_id: "i-12341234", 
})

resp.to_h outputs the following:
{
  scan_result_details: [
    {
      account_id: "123412341234", 
      check_description: "description", 
      check_id: "1.1.1.1", 
      level: "LEVEL_1", 
      platform: "AMAZON_LINUX_2", 
      remediation: "fix", 
      scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
      status: "PASSED", 
      target_resource_id: "i-12341234", 
      title: "title1", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.get_cis_scan_result_details({
  scan_arn: "CisScanArn", # required
  target_resource_id: "ResourceId", # required
  account_id: "AccountId", # required
  filter_criteria: {
    finding_status_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "PASSED", # required, accepts PASSED, FAILED, SKIPPED
      },
    ],
    check_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    title_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    security_level_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "LEVEL_1", # required, accepts LEVEL_1, LEVEL_2
      },
    ],
    finding_arn_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
  },
  sort_by: "CHECK_ID", # accepts CHECK_ID, STATUS
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.scan_result_details #=> Array
resp.scan_result_details[0].scan_arn #=> String
resp.scan_result_details[0]. #=> String
resp.scan_result_details[0].target_resource_id #=> String
resp.scan_result_details[0].platform #=> String
resp.scan_result_details[0].status #=> String, one of "PASSED", "FAILED", "SKIPPED"
resp.scan_result_details[0].status_reason #=> String
resp.scan_result_details[0].check_id #=> String
resp.scan_result_details[0].title #=> String
resp.scan_result_details[0].check_description #=> String
resp.scan_result_details[0].remediation #=> String
resp.scan_result_details[0].level #=> String, one of "LEVEL_1", "LEVEL_2"
resp.scan_result_details[0].finding_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_arn (required, String) —

    The scan ARN.

  • :target_resource_id (required, String) —

    The target resource ID.

  • :account_id (required, String) —

    The account ID.

  • :filter_criteria (Types::CisScanResultDetailsFilterCriteria) —

    The filter criteria.

  • :sort_by (String) —

    The sort by order.

  • :sort_order (String) —

    The sort order.

  • :next_token (String) —

    The pagination token from a previous request that's used to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of CIS scan result details to be returned in a single page of results.

Returns:

See Also:



3080
3081
3082
3083
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3080

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

#get_clusters_for_image(params = {}) ⇒ Types::GetClustersForImageResponse

Returns a list of clusters and metadata associated with an image.

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

Examples:

Request syntax with placeholder values


resp = client.get_clusters_for_image({
  filter: { # required
    resource_id: "ClusterForImageFilterCriteriaResourceIdString", # required
  },
  max_results: 1,
  next_token: "GetClustersForImageNextToken",
})

Response structure


resp.cluster #=> Array
resp.cluster[0].cluster_arn #=> String
resp.cluster[0].cluster_details #=> Array
resp.cluster[0].cluster_details[0].last_in_use #=> Time
resp.cluster[0].cluster_details[0].running_unit_count #=> Integer
resp.cluster[0].cluster_details[0].stopped_unit_count #=> Integer
resp.cluster[0].cluster_details[0]...details_group #=> String
resp.cluster[0].cluster_details[0]...task_definition_arn #=> String
resp.cluster[0].cluster_details[0]...namespace #=> String
resp.cluster[0].cluster_details[0]...workload_info_list #=> Array
resp.cluster[0].cluster_details[0]...workload_info_list[0].name #=> String
resp.cluster[0].cluster_details[0]...workload_info_list[0].type #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter (required, Types::ClusterForImageFilterCriteria) —

    The resource Id for the Amazon ECR image.

  • :max_results (Integer) —

    The maximum number of results to be returned in a single page of results.

  • :next_token (String) —

    The pagination token from a previous request used to retrieve the next page of results.

Returns:

See Also:



3135
3136
3137
3138
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3135

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

#get_code_security_integration(params = {}) ⇒ Types::GetCodeSecurityIntegrationResponse

Retrieves information about a code security integration.

Examples:

Request syntax with placeholder values


resp = client.get_code_security_integration({
  integration_arn: "CodeSecurityIntegrationArn", # required
  tags: {
    "MapKey" => "MapValue",
  },
})

Response structure


resp.integration_arn #=> String
resp.name #=> String
resp.type #=> String, one of "GITLAB_SELF_MANAGED", "GITHUB"
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "ACTIVE", "INACTIVE", "DISABLING"
resp.status_reason #=> String
resp.created_on #=> Time
resp.last_update_on #=> Time
resp.authorization_url #=> String
resp.tags #=> Hash
resp.tags["MapKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :integration_arn (required, String) —

    The Amazon Resource Name (ARN) of the code security integration to retrieve.

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

    The tags associated with the code security integration.

Returns:

See Also:



3187
3188
3189
3190
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3187

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

#get_code_security_scan(params = {}) ⇒ Types::GetCodeSecurityScanResponse

Retrieves information about a specific code security scan.

Examples:

Request syntax with placeholder values


resp = client.get_code_security_scan({
  resource: { # required
    project_id: "ProjectId",
  },
  scan_id: "CodeSecurityUuid", # required
})

Response structure


resp.scan_id #=> String
resp.resource.project_id #=> String
resp. #=> String
resp.status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "SKIPPED"
resp.status_reason #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.last_commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource (required, Types::CodeSecurityResource) —

    The resource identifier for the code repository that was scanned.

  • :scan_id (required, String) —

    The unique identifier of the scan to retrieve.

Returns:

See Also:



3235
3236
3237
3238
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3235

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

#get_code_security_scan_configuration(params = {}) ⇒ Types::GetCodeSecurityScanConfigurationResponse

Retrieves information about a code security scan configuration.

Examples:

Request syntax with placeholder values


resp = client.get_code_security_scan_configuration({
  scan_configuration_arn: "ScanConfigurationArn", # required
})

Response structure


resp.scan_configuration_arn #=> String
resp.name #=> String
resp.configuration.periodic_scan_configuration.frequency #=> String, one of "WEEKLY", "MONTHLY", "NEVER"
resp.configuration.periodic_scan_configuration.frequency_expression #=> String
resp.configuration.continuous_integration_scan_configuration.supported_events #=> Array
resp.configuration.continuous_integration_scan_configuration.supported_events[0] #=> String, one of "PULL_REQUEST", "PUSH"
resp.configuration.rule_set_categories #=> Array
resp.configuration.rule_set_categories[0] #=> String, one of "SAST", "IAC", "SCA"
resp.level #=> String, one of "ORGANIZATION", "ACCOUNT"
resp.scope_settings.project_selection_scope #=> String, one of "ALL"
resp.created_at #=> Time
resp.last_updated_at #=> Time
resp.tags #=> Hash
resp.tags["MapKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The Amazon Resource Name (ARN) of the scan configuration to retrieve.

Returns:

See Also:



3283
3284
3285
3286
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3283

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

#get_configuration(params = {}) ⇒ Types::GetConfigurationResponse

Retrieves setting configurations for Amazon Inspector scans. If you specify an accountId, this operation returns the scan configuration for that member account. You must be the delegated administrator for the specified member account. If you do not specify an accountId, this operation returns your own scan configuration.

Examples:

Request syntax with placeholder values


resp = client.get_configuration({
  account_id: "AccountId",
})

Response structure


resp.ecr_configuration.rescan_duration_state.rescan_duration #=> String, one of "LIFETIME", "DAYS_30", "DAYS_180", "DAYS_14", "DAYS_60", "DAYS_90", "DAYS_3", "DAYS_7"
resp.ecr_configuration.rescan_duration_state.status #=> String, one of "SUCCESS", "PENDING", "FAILED"
resp.ecr_configuration.rescan_duration_state.updated_at #=> Time
resp.ecr_configuration.rescan_duration_state.pull_date_rescan_duration #=> String, one of "DAYS_14", "DAYS_30", "DAYS_60", "DAYS_90", "DAYS_180", "DAYS_3", "DAYS_7"
resp.ecr_configuration.rescan_duration_state.pull_date_rescan_mode #=> String, one of "LAST_PULL_DATE", "LAST_IN_USE_AT"
resp.ec2_configuration.scan_mode_state.scan_mode #=> String, one of "EC2_SSM_AGENT_BASED", "EC2_HYBRID"
resp.ec2_configuration.scan_mode_state.scan_mode_status #=> String, one of "SUCCESS", "PENDING"
resp.ec2_configuration.vm_scanner_state.activated #=> Boolean
resp.ec2_configuration.vm_scanner_state.activated_at #=> Time
resp.ec2_configuration.vm_scanner_state.status #=> String, one of "SUCCESS", "PENDING", "FAILED"
resp.ami_configuration.last_launched_within #=> String, one of "DAYS_180", "DAYS_90", "DAYS_60", "DAYS_30", "DAYS_14", "DAYS_7"
resp.ami_configuration.created_within #=> String, one of "DAYS_180", "DAYS_90", "DAYS_60", "DAYS_30", "DAYS_14", "DAYS_7"
resp.ami_configuration.scan_mode_configuration.scan_mode #=> String, one of "SCAN_ALL", "TARGET_SCANNING"
resp.ami_configuration.scan_mode_configuration.tags #=> Array
resp.ami_configuration.scan_mode_configuration.tags[0].key #=> String
resp.ami_configuration.scan_mode_configuration.tags[0].value #=> String
resp.ami_configuration.scan_mode_configuration.exclude_copied_amis #=> Boolean
resp.ami_configuration.scan_mode_configuration.exclude_backup_dlm_amis #=> Boolean
resp.ami_configuration.status #=> String, one of "SUCCESS", "PENDING", "FAILED"
resp.ami_configuration.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :account_id (String) —

    The 12-digit Amazon Web Services account ID of the member account whose scan configuration you want to retrieve. When specified, you must be the delegated administrator for this member account. If not specified, the operation returns your own configuration.

Returns:

See Also:



3339
3340
3341
3342
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3339

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



3360
3361
3362
3363
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3360

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

#get_ec2_deep_inspection_configuration(params = {}) ⇒ Types::GetEc2DeepInspectionConfigurationResponse

Retrieves the activation status of Amazon Inspector deep inspection and custom paths associated with your account.

Examples:

Response structure


resp.package_paths #=> Array
resp.package_paths[0] #=> String
resp.org_package_paths #=> Array
resp.org_package_paths[0] #=> String
resp.status #=> String, one of "ACTIVATED", "DEACTIVATED", "PENDING", "FAILED"
resp.error_message #=> String

Parameters:

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

    ({})

Returns:

See Also:



3388
3389
3390
3391
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3388

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

#get_encryption_key(params = {}) ⇒ Types::GetEncryptionKeyResponse

Gets an encryption key.

Examples:

Request syntax with placeholder values


resp = client.get_encryption_key({
  scan_type: "NETWORK", # required, accepts NETWORK, PACKAGE, CODE
  resource_type: "AWS_EC2_INSTANCE", # required, accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_ECR_REPOSITORY, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites, MACHINE_IMAGE
})

Response structure


resp.kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_type (required, String) —

    The scan type the key encrypts.

  • :resource_type (required, String) —

    The resource type the key encrypts.

Returns:

See Also:



3420
3421
3422
3423
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3420

def get_encryption_key(params = {}, options = {})
  req = build_request(:get_encryption_key, 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.report_id #=> String
resp.status #=> String, one of "SUCCEEDED", "IN_PROGRESS", "CANCELLED", "FAILED"
resp.error_code #=> String, one of "INTERNAL_ERROR", "INVALID_PERMISSIONS", "NO_FINDINGS_FOUND", "BUCKET_NOT_FOUND", "INCOMPATIBLE_BUCKET_REGION", "MALFORMED_KMS_KEY"
resp.error_message #=> String
resp.destination.bucket_name #=> String
resp.destination.key_prefix #=> String
resp.destination.kms_key_arn #=> String
resp.destination.expected_bucket_owner #=> 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. #=> Array
resp.filter_criteria.[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.[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.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.first_observed_at #=> Array
resp.filter_criteria.first_observed_at[0].start_inclusive #=> Time
resp.filter_criteria.first_observed_at[0].end_inclusive #=> Time
resp.filter_criteria.last_observed_at #=> Array
resp.filter_criteria.last_observed_at[0].start_inclusive #=> Time
resp.filter_criteria.last_observed_at[0].end_inclusive #=> Time
resp.filter_criteria.updated_at #=> Array
resp.filter_criteria.updated_at[0].start_inclusive #=> Time
resp.filter_criteria.updated_at[0].end_inclusive #=> Time
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.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.inspector_score #=> Array
resp.filter_criteria.inspector_score[0].upper_inclusive #=> Float
resp.filter_criteria.inspector_score[0].lower_inclusive #=> Float
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.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.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_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.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.ecr_image_pushed_at #=> Array
resp.filter_criteria.ecr_image_pushed_at[0].start_inclusive #=> Time
resp.filter_criteria.ecr_image_pushed_at[0].end_inclusive #=> Time
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_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.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_last_in_use_at #=> Array
resp.filter_criteria.ecr_image_last_in_use_at[0].start_inclusive #=> Time
resp.filter_criteria.ecr_image_last_in_use_at[0].end_inclusive #=> Time
resp.filter_criteria.ecr_image_in_use_count #=> Array
resp.filter_criteria.ecr_image_in_use_count[0].upper_inclusive #=> Float
resp.filter_criteria.ecr_image_in_use_count[0].lower_inclusive #=> Float
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.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.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.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.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.vulnerable_packages #=> Array
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].version.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].version.value #=> String
resp.filter_criteria.vulnerable_packages[0].epoch.upper_inclusive #=> Float
resp.filter_criteria.vulnerable_packages[0].epoch.lower_inclusive #=> Float
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].architecture.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].architecture.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].source_lambda_layer_arn.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].source_lambda_layer_arn.value #=> String
resp.filter_criteria.vulnerable_packages[0].file_path.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.vulnerable_packages[0].file_path.value #=> String
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.fix_available #=> Array
resp.filter_criteria.fix_available[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.fix_available[0].value #=> String
resp.filter_criteria.lambda_function_name #=> Array
resp.filter_criteria.lambda_function_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.lambda_function_name[0].value #=> String
resp.filter_criteria.lambda_function_layers #=> Array
resp.filter_criteria.lambda_function_layers[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.lambda_function_layers[0].value #=> String
resp.filter_criteria.lambda_function_runtime #=> Array
resp.filter_criteria.lambda_function_runtime[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.lambda_function_runtime[0].value #=> String
resp.filter_criteria.lambda_function_last_modified_at #=> Array
resp.filter_criteria.lambda_function_last_modified_at[0].start_inclusive #=> Time
resp.filter_criteria.lambda_function_last_modified_at[0].end_inclusive #=> Time
resp.filter_criteria.lambda_function_execution_role_arn #=> Array
resp.filter_criteria.lambda_function_execution_role_arn[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.lambda_function_execution_role_arn[0].value #=> String
resp.filter_criteria.exploit_available #=> Array
resp.filter_criteria.exploit_available[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.exploit_available[0].value #=> String
resp.filter_criteria.code_vulnerability_detector_name #=> Array
resp.filter_criteria.code_vulnerability_detector_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.code_vulnerability_detector_name[0].value #=> String
resp.filter_criteria.code_vulnerability_detector_tags #=> Array
resp.filter_criteria.code_vulnerability_detector_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.code_vulnerability_detector_tags[0].value #=> String
resp.filter_criteria.code_vulnerability_file_path #=> Array
resp.filter_criteria.code_vulnerability_file_path[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.code_vulnerability_file_path[0].value #=> String
resp.filter_criteria.epss_score #=> Array
resp.filter_criteria.epss_score[0].upper_inclusive #=> Float
resp.filter_criteria.epss_score[0].lower_inclusive #=> Float
resp.filter_criteria.code_repository_project_name #=> Array
resp.filter_criteria.code_repository_project_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.code_repository_project_name[0].value #=> String
resp.filter_criteria.code_repository_provider_type #=> Array
resp.filter_criteria.code_repository_provider_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.code_repository_provider_type[0].value #=> String
resp.filter_criteria.machine_image_id #=> Array
resp.filter_criteria.machine_image_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.machine_image_id[0].value #=> String
resp.filter_criteria.machine_image_name #=> Array
resp.filter_criteria.machine_image_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.machine_image_name[0].value #=> 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.machine_image_platform #=> Array
resp.filter_criteria.machine_image_platform[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.machine_image_platform[0].value #=> String
resp.filter_criteria.cloud_provider #=> Array
resp.filter_criteria.cloud_provider[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_provider[0].value #=> String
resp.filter_criteria.cloud_provider_region #=> Array
resp.filter_criteria.cloud_provider_region[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_provider_region[0].value #=> 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.cloud_provider_org_id #=> Array
resp.filter_criteria.cloud_provider_org_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_provider_org_id[0].value #=> String
resp.filter_criteria.cloud_vm_image_reference #=> Array
resp.filter_criteria.cloud_vm_image_reference[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_vm_image_reference[0].value #=> String
resp.filter_criteria.cloud_vm_network_id #=> Array
resp.filter_criteria.cloud_vm_network_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_vm_network_id[0].value #=> String
resp.filter_criteria.cloud_vm_subnet_ids #=> Array
resp.filter_criteria.cloud_vm_subnet_ids[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_vm_subnet_ids[0].value #=> String
resp.filter_criteria.cloud_image_repository_name #=> Array
resp.filter_criteria.cloud_image_repository_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_image_repository_name[0].value #=> String
resp.filter_criteria.cloud_image_registry #=> Array
resp.filter_criteria.cloud_image_registry[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_image_registry[0].value #=> String
resp.filter_criteria.cloud_image_digest #=> Array
resp.filter_criteria.cloud_image_digest[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_image_digest[0].value #=> String
resp.filter_criteria.cloud_image_tags #=> Array
resp.filter_criteria.cloud_image_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_image_tags[0].value #=> String
resp.filter_criteria.cloud_image_pushed_at #=> Array
resp.filter_criteria.cloud_image_pushed_at[0].start_inclusive #=> Time
resp.filter_criteria.cloud_image_pushed_at[0].end_inclusive #=> Time
resp.filter_criteria.cloud_image_architecture #=> Array
resp.filter_criteria.cloud_image_architecture[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_image_architecture[0].value #=> String
resp.filter_criteria.cloud_image_last_in_use_at #=> Array
resp.filter_criteria.cloud_image_last_in_use_at[0].start_inclusive #=> Time
resp.filter_criteria.cloud_image_last_in_use_at[0].end_inclusive #=> Time
resp.filter_criteria.cloud_image_in_use_count #=> Array
resp.filter_criteria.cloud_image_in_use_count[0].upper_inclusive #=> Float
resp.filter_criteria.cloud_image_in_use_count[0].lower_inclusive #=> Float
resp.filter_criteria.cloud_serverless_function_name #=> Array
resp.filter_criteria.cloud_serverless_function_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_serverless_function_name[0].value #=> String
resp.filter_criteria.cloud_serverless_function_runtime #=> Array
resp.filter_criteria.cloud_serverless_function_runtime[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_serverless_function_runtime[0].value #=> String
resp.filter_criteria.cloud_serverless_function_last_modified_at #=> Array
resp.filter_criteria.cloud_serverless_function_last_modified_at[0].start_inclusive #=> Time
resp.filter_criteria.cloud_serverless_function_last_modified_at[0].end_inclusive #=> Time
resp.filter_criteria.cloud_serverless_function_execution_role #=> Array
resp.filter_criteria.cloud_serverless_function_execution_role[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filter_criteria.cloud_serverless_function_execution_role[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :report_id (String) —

    The ID of the report to retrieve the status of.

Returns:

See Also:



3682
3683
3684
3685
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3682

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.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. #=> String
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:



3714
3715
3716
3717
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3714

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

#get_on_demand_scan_status(params = {}) ⇒ Types::GetOnDemandScanStatusResponse

Retrieves the status of a specific on-demand scan for a resource.

Examples:

Request syntax with placeholder values


resp = client.get_on_demand_scan_status({
  resource_id: "ResourceId", # required
  scan_id: "ScanId", # required
  resource_type: "AMI", # required, accepts AMI
})

Response structure


resp.scan_id #=> String
resp.resource_id #=> String
resp.resource_type #=> String, one of "AMI"
resp.scan_status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED"
resp.scan_status_reason #=> String, one of "ACCESS_DENIED", "INTERNAL_ERROR", "STORAGE_LIMIT_EXCEEDED", "EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED", "UNSUPPORTED_OS", "RESOURCE_TERMINATED"
resp.started_at #=> Time
resp.completed_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String) —

    The ID of the resource whose on-demand scan status is being requested.

  • :scan_id (required, String) —

    The unique identifier of the on-demand scan whose status is being requested.

  • :resource_type (required, String) —

    The type of the resource whose on-demand scan status is being requested.

Returns:

See Also:



3764
3765
3766
3767
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3764

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

#get_sbom_export(params = {}) ⇒ Types::GetSbomExportResponse

Gets details of a software bill of materials (SBOM) report.

Examples:

Request syntax with placeholder values


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

Response structure


resp.report_id #=> String
resp.format #=> String, one of "CYCLONEDX_1_4", "SPDX_2_3"
resp.status #=> String, one of "SUCCEEDED", "IN_PROGRESS", "CANCELLED", "FAILED"
resp.error_code #=> String, one of "INTERNAL_ERROR", "INVALID_PERMISSIONS", "NO_FINDINGS_FOUND", "BUCKET_NOT_FOUND", "INCOMPATIBLE_BUCKET_REGION", "MALFORMED_KMS_KEY"
resp.error_message #=> String
resp.s3_destination.bucket_name #=> String
resp.s3_destination.key_prefix #=> String
resp.s3_destination.kms_key_arn #=> String
resp.s3_destination.expected_bucket_owner #=> String
resp.filter_criteria. #=> Array
resp.filter_criteria.[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.[0].value #=> String
resp.filter_criteria.resource_id #=> Array
resp.filter_criteria.resource_id[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.resource_id[0].value #=> String
resp.filter_criteria.resource_type #=> Array
resp.filter_criteria.resource_type[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.resource_type[0].value #=> String
resp.filter_criteria.ecr_repository_name #=> Array
resp.filter_criteria.ecr_repository_name[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.ecr_repository_name[0].value #=> String
resp.filter_criteria.lambda_function_name #=> Array
resp.filter_criteria.lambda_function_name[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.lambda_function_name[0].value #=> String
resp.filter_criteria.ecr_image_tags #=> Array
resp.filter_criteria.ecr_image_tags[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.ecr_image_tags[0].value #=> String
resp.filter_criteria.ec2_instance_tags #=> Array
resp.filter_criteria.ec2_instance_tags[0].comparison #=> String, one of "EQUALS"
resp.filter_criteria.ec2_instance_tags[0].key #=> String
resp.filter_criteria.ec2_instance_tags[0].value #=> String
resp.filter_criteria.lambda_function_tags #=> Array
resp.filter_criteria.lambda_function_tags[0].comparison #=> String, one of "EQUALS"
resp.filter_criteria.lambda_function_tags[0].key #=> String
resp.filter_criteria.lambda_function_tags[0].value #=> String
resp.filter_criteria.cloud_provider #=> Array
resp.filter_criteria.cloud_provider[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_provider[0].value #=> String
resp.filter_criteria. #=> Array
resp.filter_criteria.[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.[0].value #=> String
resp.filter_criteria.cloud_provider_org_id #=> Array
resp.filter_criteria.cloud_provider_org_id[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_provider_org_id[0].value #=> String
resp.filter_criteria.cloud_provider_region #=> Array
resp.filter_criteria.cloud_provider_region[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_provider_region[0].value #=> String
resp.filter_criteria.cloud_vm_instance_tags #=> Array
resp.filter_criteria.cloud_vm_instance_tags[0].comparison #=> String, one of "EQUALS"
resp.filter_criteria.cloud_vm_instance_tags[0].key #=> String
resp.filter_criteria.cloud_vm_instance_tags[0].value #=> String
resp.filter_criteria.cloud_container_image_tags #=> Array
resp.filter_criteria.cloud_container_image_tags[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_container_image_tags[0].value #=> String
resp.filter_criteria.cloud_container_repository_name #=> Array
resp.filter_criteria.cloud_container_repository_name[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_container_repository_name[0].value #=> String
resp.filter_criteria.cloud_container_registry_name #=> Array
resp.filter_criteria.cloud_container_registry_name[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_container_registry_name[0].value #=> String
resp.filter_criteria.cloud_serverless_function_name #=> Array
resp.filter_criteria.cloud_serverless_function_name[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_serverless_function_name[0].value #=> String
resp.filter_criteria.cloud_serverless_function_runtime #=> Array
resp.filter_criteria.cloud_serverless_function_runtime[0].comparison #=> String, one of "EQUALS", "NOT_EQUALS"
resp.filter_criteria.cloud_serverless_function_runtime[0].value #=> String
resp.filter_criteria.cloud_serverless_function_tags #=> Array
resp.filter_criteria.cloud_serverless_function_tags[0].comparison #=> String, one of "EQUALS"
resp.filter_criteria.cloud_serverless_function_tags[0].key #=> String
resp.filter_criteria.cloud_serverless_function_tags[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :report_id (required, String) —

    The report ID of the SBOM export to get details for.

Returns:

See Also:



3867
3868
3869
3870
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3867

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

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

Lists the permissions an account has to configure Amazon Inspector. If the account is a member account or standalone account with resources managed by an Organizations policy, the operation returns fewer permissions.

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :service (String) —

    The service scan type to check permissions for.

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



3920
3921
3922
3923
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 3920

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

#list_cis_scan_configurations(params = {}) ⇒ Types::ListCisScanConfigurationsResponse

Lists CIS scan configurations.

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

Examples:

Example: Sample ListCisScanConfigurations Call


resp = client.list_cis_scan_configurations({
})

resp.to_h outputs the following:
{
  scan_configurations: [
    {
      owner_id: "123412341234", 
      scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
      scan_name: "sample", 
      schedule: {
        daily: {
          start_time: {
            time_of_day: "12:34", 
            timezone: "UTC", 
          }, 
        }, 
      }, 
      security_level: "LEVEL_1", 
      targets: {
        account_ids: [
          "123412341234", 
        ], 
        target_resource_tags: {
          "key" => [
            "value", 
          ], 
        }, 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_cis_scan_configurations({
  filter_criteria: {
    scan_name_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    target_resource_tag_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString", # required
      },
    ],
    scan_configuration_arn_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
  },
  sort_by: "SCAN_NAME", # accepts SCAN_NAME, SCAN_CONFIGURATION_ARN
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.scan_configurations #=> Array
resp.scan_configurations[0].scan_configuration_arn #=> String
resp.scan_configurations[0].owner_id #=> String
resp.scan_configurations[0].scan_name #=> String
resp.scan_configurations[0].security_level #=> String, one of "LEVEL_1", "LEVEL_2"
resp.scan_configurations[0].schedule.daily.start_time.time_of_day #=> String
resp.scan_configurations[0].schedule.daily.start_time.timezone #=> String
resp.scan_configurations[0].schedule.weekly.start_time.time_of_day #=> String
resp.scan_configurations[0].schedule.weekly.start_time.timezone #=> String
resp.scan_configurations[0].schedule.weekly.days #=> Array
resp.scan_configurations[0].schedule.weekly.days[0] #=> String, one of "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"
resp.scan_configurations[0].schedule.monthly.start_time.time_of_day #=> String
resp.scan_configurations[0].schedule.monthly.start_time.timezone #=> String
resp.scan_configurations[0].schedule.monthly.day #=> String, one of "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"
resp.scan_configurations[0].targets. #=> Array
resp.scan_configurations[0].targets.[0] #=> String
resp.scan_configurations[0].targets.target_resource_tags #=> Hash
resp.scan_configurations[0].targets.target_resource_tags["TargetResourceTagsKey"] #=> Array
resp.scan_configurations[0].targets.target_resource_tags["TargetResourceTagsKey"][0] #=> String
resp.scan_configurations[0].tags #=> Hash
resp.scan_configurations[0].tags["MapKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::ListCisScanConfigurationsFilterCriteria) —

    The CIS scan configuration filter criteria.

  • :sort_by (String) —

    The CIS scan configuration sort by order.

  • :sort_order (String) —

    The CIS scan configuration sort order order.

  • :next_token (String) —

    The pagination token from a previous request that's used to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of CIS scan configurations to be returned in a single page of results.

Returns:

See Also:



4046
4047
4048
4049
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4046

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

#list_cis_scan_results_aggregated_by_checks(params = {}) ⇒ Types::ListCisScanResultsAggregatedByChecksResponse

Lists scan results aggregated by checks.

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

Examples:

Example: Sample ListCisScanResultsAggregatedByChecks Call


resp = client.list_cis_scan_results_aggregated_by_checks({
  scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
})

resp.to_h outputs the following:
{
  check_aggregations: [
    {
      account_id: "123412341234", 
      check_description: "description", 
      check_id: "1.1.1.1", 
      level: "LEVEL_1", 
      platform: "AMAZON_LINUX_2", 
      scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
      status_counts: {
        failed: 0, 
        passed: 2, 
        skipped: 1, 
      }, 
      title: "title1", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_cis_scan_results_aggregated_by_checks({
  scan_arn: "CisScanArn", # required
  filter_criteria: {
    account_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    check_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    title_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    platform_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    failed_resources_filters: [
      {
        upper_inclusive: 1,
        lower_inclusive: 1,
      },
    ],
    security_level_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "LEVEL_1", # required, accepts LEVEL_1, LEVEL_2
      },
    ],
  },
  sort_by: "CHECK_ID", # accepts CHECK_ID, TITLE, PLATFORM, FAILED_COUNTS, SECURITY_LEVEL
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.check_aggregations #=> Array
resp.check_aggregations[0].scan_arn #=> String
resp.check_aggregations[0].check_id #=> String
resp.check_aggregations[0].title #=> String
resp.check_aggregations[0].check_description #=> String
resp.check_aggregations[0].level #=> String, one of "LEVEL_1", "LEVEL_2"
resp.check_aggregations[0]. #=> String
resp.check_aggregations[0].status_counts.failed #=> Integer
resp.check_aggregations[0].status_counts.skipped #=> Integer
resp.check_aggregations[0].status_counts.passed #=> Integer
resp.check_aggregations[0].platform #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_arn (required, String) —

    The scan ARN.

  • :filter_criteria (Types::CisScanResultsAggregatedByChecksFilterCriteria) —

    The filter criteria.

  • :sort_by (String) —

    The sort by order.

  • :sort_order (String) —

    The sort order.

  • :next_token (String) —

    The pagination token from a previous request that's used to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of scan results aggregated by checks to be returned in a single page of results.

Returns:

See Also:



4174
4175
4176
4177
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4174

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

#list_cis_scan_results_aggregated_by_target_resource(params = {}) ⇒ Types::ListCisScanResultsAggregatedByTargetResourceResponse

Lists scan results aggregated by a target resource.

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

Examples:

Example: Sample ListCisScanResultsAggregatedByTargetResource Call


resp = client.list_cis_scan_results_aggregated_by_target_resource({
  scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
})

resp.to_h outputs the following:
{
  target_resource_aggregations: [
    {
      account_id: "123412341234", 
      platform: "AMAZON_LINUX_2", 
      scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
      status_counts: {
        failed: 0, 
        passed: 2, 
        skipped: 1, 
      }, 
      target_resource_id: "i-12341234", 
      target_resource_tags: {
        "key" => [
          "value", 
        ], 
      }, 
      target_status: "COMPLETED", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_cis_scan_results_aggregated_by_target_resource({
  scan_arn: "CisScanArn", # required
  filter_criteria: {
    account_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    status_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "PASSED", # required, accepts PASSED, FAILED, SKIPPED
      },
    ],
    check_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    target_resource_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    target_resource_tag_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString", # required
      },
    ],
    platform_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    target_status_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "TIMED_OUT", # required, accepts TIMED_OUT, CANCELLED, COMPLETED
      },
    ],
    target_status_reason_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "SCAN_IN_PROGRESS", # required, accepts SCAN_IN_PROGRESS, UNSUPPORTED_OS, SSM_UNMANAGED
      },
    ],
    failed_checks_filters: [
      {
        upper_inclusive: 1,
        lower_inclusive: 1,
      },
    ],
  },
  sort_by: "RESOURCE_ID", # accepts RESOURCE_ID, FAILED_COUNTS, ACCOUNT_ID, PLATFORM, TARGET_STATUS, TARGET_STATUS_REASON
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.target_resource_aggregations #=> Array
resp.target_resource_aggregations[0].scan_arn #=> String
resp.target_resource_aggregations[0].target_resource_id #=> String
resp.target_resource_aggregations[0]. #=> String
resp.target_resource_aggregations[0].target_resource_tags #=> Hash
resp.target_resource_aggregations[0].target_resource_tags["TargetResourceTagsKey"] #=> Array
resp.target_resource_aggregations[0].target_resource_tags["TargetResourceTagsKey"][0] #=> String
resp.target_resource_aggregations[0].status_counts.failed #=> Integer
resp.target_resource_aggregations[0].status_counts.skipped #=> Integer
resp.target_resource_aggregations[0].status_counts.passed #=> Integer
resp.target_resource_aggregations[0].platform #=> String
resp.target_resource_aggregations[0].target_status #=> String, one of "TIMED_OUT", "CANCELLED", "COMPLETED"
resp.target_resource_aggregations[0].target_status_reason #=> String, one of "SCAN_IN_PROGRESS", "UNSUPPORTED_OS", "SSM_UNMANAGED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_arn (required, String) —

    The scan ARN.

  • :filter_criteria (Types::CisScanResultsAggregatedByTargetResourceFilterCriteria) —

    The filter criteria.

  • :sort_by (String) —

    The sort by order.

  • :sort_order (String) —

    The sort order.

  • :next_token (String) —

    The pagination token from a previous request that's used to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of scan results aggregated by a target resource to be returned in a single page of results.

Returns:

See Also:



4326
4327
4328
4329
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4326

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

#list_cis_scans(params = {}) ⇒ Types::ListCisScansResponse

Returns a CIS scan list.

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

Examples:

Example: Sample ListCisScans Call


resp = client.list_cis_scans({
})

resp.to_h outputs the following:
{
  scans: [
    {
      failed_checks: 2, 
      scan_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-scan/624b746d-e080-44ae-8c1d-48e653365a38", 
      scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
      scan_date: Time.parse("2023-04-12T23:20:50.52Z"), 
      scan_name: "sample", 
      scheduled_by: "Delegated Admin", 
      security_level: "LEVEL_1", 
      status: "COMPLETED", 
      targets: {
        account_ids: [
          "123412341234", 
        ], 
        target_resource_tags: {
          "key" => [
            "value", 
          ], 
        }, 
      }, 
      total_checks: 150, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_cis_scans({
  filter_criteria: {
    scan_name_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    target_resource_tag_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString", # required
      },
    ],
    target_resource_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    scan_status_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "FAILED", # required, accepts FAILED, COMPLETED, CANCELLED, IN_PROGRESS
      },
    ],
    scan_at_filters: [
      {
        earliest_scan_start_time: Time.now,
        latest_scan_start_time: Time.now,
      },
    ],
    scan_configuration_arn_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    scan_arn_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    scheduled_by_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
    failed_checks_filters: [
      {
        upper_inclusive: 1,
        lower_inclusive: 1,
      },
    ],
    target_account_id_filters: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "String", # required
      },
    ],
  },
  detail_level: "ORGANIZATION", # accepts ORGANIZATION, MEMBER
  sort_by: "STATUS", # accepts STATUS, SCHEDULED_BY, SCAN_START_DATE, FAILED_CHECKS
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.scans #=> Array
resp.scans[0].scan_arn #=> String
resp.scans[0].scan_configuration_arn #=> String
resp.scans[0].status #=> String, one of "FAILED", "COMPLETED", "CANCELLED", "IN_PROGRESS"
resp.scans[0].scan_name #=> String
resp.scans[0].scan_date #=> Time
resp.scans[0].failed_checks #=> Integer
resp.scans[0].total_checks #=> Integer
resp.scans[0].targets. #=> Array
resp.scans[0].targets.[0] #=> String
resp.scans[0].targets.target_resource_tags #=> Hash
resp.scans[0].targets.target_resource_tags["TargetResourceTagsKey"] #=> Array
resp.scans[0].targets.target_resource_tags["TargetResourceTagsKey"][0] #=> String
resp.scans[0].scheduled_by #=> String
resp.scans[0].security_level #=> String, one of "LEVEL_1", "LEVEL_2"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (Types::ListCisScansFilterCriteria) —

    The CIS scan filter criteria.

  • :detail_level (String) —

    The detail applied to the CIS scan.

  • :sort_by (String) —

    The CIS scans sort by order.

  • :sort_order (String) —

    The CIS scans sort order.

  • :next_token (String) —

    The pagination token from a previous request that's used to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of results to be returned.

Returns:

See Also:



4488
4489
4490
4491
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4488

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

#list_code_security_integrations(params = {}) ⇒ Types::ListCodeSecurityIntegrationsResponse

Lists all code security integrations in your account.

Examples:

Request syntax with placeholder values


resp = client.list_code_security_integrations({
  next_token: "String",
  max_results: 1,
})

Response structure


resp.integrations #=> Array
resp.integrations[0].integration_arn #=> String
resp.integrations[0].name #=> String
resp.integrations[0].type #=> String, one of "GITLAB_SELF_MANAGED", "GITHUB"
resp.integrations[0].status #=> String, one of "PENDING", "IN_PROGRESS", "ACTIVE", "INACTIVE", "DISABLING"
resp.integrations[0].status_reason #=> String
resp.integrations[0].created_on #=> Time
resp.integrations[0].last_update_on #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

  • :max_results (Integer) —

    The maximum number of results to return in a single call.

Returns:

See Also:



4532
4533
4534
4535
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4532

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

#list_code_security_scan_configuration_associations(params = {}) ⇒ Types::ListCodeSecurityScanConfigurationAssociationsResponse

Lists the associations between code repositories and Amazon Inspector code security scan configurations.

Examples:

Request syntax with placeholder values


resp = client.list_code_security_scan_configuration_associations({
  scan_configuration_arn: "ScanConfigurationArn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.associations #=> Array
resp.associations[0].resource.project_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The Amazon Resource Name (ARN) of the scan configuration to list associations for.

  • :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.

  • :max_results (Integer) —

    The maximum number of results to return in the response. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

Returns:

See Also:



4580
4581
4582
4583
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4580

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

#list_code_security_scan_configurations(params = {}) ⇒ Types::ListCodeSecurityScanConfigurationsResponse

Lists all code security scan configurations in your account.

Examples:

Request syntax with placeholder values


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

Response structure


resp.configurations #=> Array
resp.configurations[0].scan_configuration_arn #=> String
resp.configurations[0].name #=> String
resp.configurations[0]. #=> String
resp.configurations[0].periodic_scan_frequency #=> String, one of "WEEKLY", "MONTHLY", "NEVER"
resp.configurations[0].frequency_expression #=> String
resp.configurations[0].continuous_integration_scan_supported_events #=> Array
resp.configurations[0].continuous_integration_scan_supported_events[0] #=> String, one of "PULL_REQUEST", "PUSH"
resp.configurations[0].rule_set_categories #=> Array
resp.configurations[0].rule_set_categories[0] #=> String, one of "SAST", "IAC", "SCA"
resp.configurations[0].scope_settings.project_selection_scope #=> String, one of "ALL"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

  • :max_results (Integer) —

    The maximum number of results to return in a single call.

Returns:

See Also:



4627
4628
4629
4630
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4627

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

#list_connector_scan_configurations(params = {}) ⇒ Types::ListConnectorScanConfigurationsResponse

Lists scan configurations for Amazon Web Services Config connectors. Results are paginated. Use the nextToken parameter to retrieve the next page of results.

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

Examples:

Example: List scan configurations for a specific AWS Config connector


resp = client.list_connector_scan_configurations({
  aws_config_connector_arns: [
    "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae", 
  ], 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  scan_configurations: [
    {
      aws_config_connector_arn: "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae", 
      connector_arns: [
        "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
      ], 
      scan_configuration: {
        container_image_scanning: {
          pull_duration: "DAYS_14", 
          push_duration: "DAYS_30", 
        }, 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_connector_scan_configurations({
  aws_config_connector_arns: ["AwsConfigConnectorArn"],
  max_results: 1,
  next_token: "ConnectorNextToken",
})

Response structure


resp.scan_configurations #=> Array
resp.scan_configurations[0].aws_config_connector_arn #=> String
resp.scan_configurations[0].connector_arns #=> Array
resp.scan_configurations[0].connector_arns[0] #=> String
resp.scan_configurations[0].scan_configuration.container_image_scanning.push_duration #=> String, one of "LIFETIME", "DAYS_3", "DAYS_7", "DAYS_30", "DAYS_180", "DAYS_14", "DAYS_60", "DAYS_90"
resp.scan_configurations[0].scan_configuration.container_image_scanning.pull_duration #=> String, one of "DAYS_3", "DAYS_7", "DAYS_14", "DAYS_30", "DAYS_60", "DAYS_90", "DAYS_180"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :aws_config_connector_arns (Array<String>) —

    The list of Amazon Web Services Config connector ARNs to filter results.

  • :max_results (Integer) —

    The maximum number of results to return in a single call. Valid range is 1 to 50. To retrieve the remaining results, make another request with the nextToken value returned from this request.

  • :next_token (String) —

    A token to use for paginating results. Set this value to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

Returns:

See Also:



4707
4708
4709
4710
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4707

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

#list_connectors(params = {}) ⇒ Types::ListConnectorsResponse

Lists connectors in your account. Results are paginated. Use the nextToken parameter to retrieve the next page of results.

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

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • connector_connected
  • connector_deleted
  • connector_enabled

Examples:

Example: List all Azure customer-managed connectors


resp = client.list_connectors({
  filter_criteria: {
    connector_type: [
      {
        value: "CUSTOMER_MANAGED", 
        comparison: "EQUALS", 
      }, 
    ], 
    provider: [
      {
        value: "AZURE", 
        comparison: "EQUALS", 
      }, 
    ], 
  }, 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "my-azure-connector", 
      aws_config_connector_arn: "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae", 
      azure_regions: [
        "eastus", 
      ], 
      connector_arn: "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
      created_at: Time.parse("2026-04-20T21:00:00.000Z"), 
      description: "Azure subscription scanner", 
      enablement_status: "ENABLED", 
      health: {
        connector_status: "CONNECTED", 
        last_checked_at: Time.parse("2026-04-20T21:57:06.400Z"), 
      }, 
      provider: "AZURE", 
      scope_configuration: {
        vm_scanning: {
          scope_type: "SUBSCRIPTION", 
          scope_values: [
            "552802f5-1492-4184-bbae-7291c9939b16", 
          ], 
          state: "ACTIVE", 
        }, 
      }, 
      updated_at: Time.parse("2026-04-20T21:57:06.400Z"), 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_connectors({
  max_results: 1,
  next_token: "ConnectorNextToken",
  filter_criteria: {
    connector_arns: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "ConnectorArn", # required
      },
    ],
    accounts: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    aws_config_connector_arns: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "AwsConfigConnectorArn", # required
      },
    ],
    connector_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "CUSTOMER_MANAGED", # required, accepts CUSTOMER_MANAGED, SERVICE_LINKED
      },
    ],
    provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        value: "AZURE", # required, accepts AZURE
      },
    ],
  },
})

Response structure


resp.items #=> Array
resp.items[0].connector_arn #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].provider #=> String, one of "AZURE"
resp.items[0].enablement_status #=> String, one of "ENABLED", "PENDING_ENABLEMENT", "FAILED_TO_ENABLE", "PENDING_UPDATE", "FAILED_TO_UPDATE", "PENDING_DELETION", "DELETED", "FAILED_TO_DELETE"
resp.items[0].enablement_status_reason #=> String
resp.items[0].health.connector_status #=> String, one of "CONNECTED", "DEGRADED", "FAILED_TO_CONNECT", "PENDING_AUTHORIZATION", "PENDING_CONFIGURATION", "UNKNOWN"
resp.items[0].health.last_checked_at #=> Time
resp.items[0].health.message #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].azure_regions #=> Array
resp.items[0].azure_regions[0] #=> String
resp.items[0].aws_config_connector_arn #=> String
resp.items[0].scope_configuration.vm_scanning.scope_type #=> String, one of "TENANT", "SUBSCRIPTION"
resp.items[0].scope_configuration.vm_scanning.scope_values #=> Array
resp.items[0].scope_configuration.vm_scanning.scope_values[0] #=> String
resp.items[0].scope_configuration.vm_scanning.state #=> String, one of "ACTIVE", "PENDING", "ERROR", "DISABLED"
resp.items[0].scope_configuration.vm_scanning.state_reason #=> String
resp.items[0].scope_configuration.container_image_scanning.scope_type #=> String, one of "TENANT", "SUBSCRIPTION"
resp.items[0].scope_configuration.container_image_scanning.scope_values #=> Array
resp.items[0].scope_configuration.container_image_scanning.scope_values[0] #=> String
resp.items[0].scope_configuration.container_image_scanning.state #=> String, one of "ACTIVE", "PENDING", "ERROR", "DISABLED"
resp.items[0].scope_configuration.container_image_scanning.state_reason #=> String
resp.items[0].scope_configuration.serverless_scanning.scope_type #=> String, one of "TENANT", "SUBSCRIPTION"
resp.items[0].scope_configuration.serverless_scanning.scope_values #=> Array
resp.items[0].scope_configuration.serverless_scanning.scope_values[0] #=> String
resp.items[0].scope_configuration.serverless_scanning.state #=> String, one of "ACTIVE", "PENDING", "ERROR", "DISABLED"
resp.items[0].scope_configuration.serverless_scanning.state_reason #=> String
resp.items[0].tags #=> Hash
resp.items[0].tags["ConnectorTagKey"] #=> String
resp.items[0].auto_install_vm_scanner #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the nextToken value returned from this request.

  • :next_token (String) —

    A token to use for paginating results. Set this value to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

  • :filter_criteria (Types::ConnectorFilterCriteria) —

    The filter criteria to apply to the list of connectors.

Returns:

See Also:



4875
4876
4877
4878
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 4875

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

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

Lists coverage details 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({
  max_results: 1,
  next_token: "NextToken",
  filter_criteria: {
    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
      },
    ],
    account_id: [
      {
        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_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ec2_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    lambda_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    machine_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    last_scanned_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    scan_mode: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    image_pulled_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1,
        lower_inclusive: 1,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    code_repository_provider_type_visibility: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    last_scanned_commit_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_vm_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_container_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_container_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_container_registry_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
  },
})

Response structure


resp.next_token #=> String
resp.covered_resources #=> Array
resp.covered_resources[0].resource_type #=> String, one of "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER_IMAGE", "AWS_ECR_REPOSITORY", "AWS_LAMBDA_FUNCTION", "CODE_REPOSITORY", "Microsoft.Compute/virtualMachines", "Microsoft.ContainerRegistry/registry/containerImage", "Microsoft.ContainerRegistry/registry/containerRepository", "Microsoft.Web/sites", "Microsoft.ContainerRegistry/registries", "MACHINE_IMAGE"
resp.covered_resources[0].resource_id #=> String
resp.covered_resources[0]. #=> String
resp.covered_resources[0].scan_type #=> String, one of "NETWORK", "PACKAGE", "CODE"
resp.covered_resources[0].scan_status.status_code #=> String, one of "ACTIVE", "INACTIVE"
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", "PENDING_DISABLE", "NO_INVENTORY", "STALE_INVENTORY", "EXCLUDED_BY_TAG", "UNSUPPORTED_RUNTIME", "UNSUPPORTED_MEDIA_TYPE", "UNSUPPORTED_CONFIG_FILE", "DEEP_INSPECTION_PACKAGE_COLLECTION_LIMIT_EXCEEDED", "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED", "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED", "DEEP_INSPECTION_NO_INVENTORY", "AGENTLESS_INSTANCE_STORAGE_LIMIT_EXCEEDED", "AGENTLESS_INSTANCE_COLLECTION_TIME_LIMIT_EXCEEDED", "PENDING_REVIVAL_SCAN", "INTEGRATION_CONNECTION_LOST", "ACCESS_DENIED_TO_ENCRYPTION_KEY", "UNSUPPORTED_LANGUAGE", "NO_SCAN_CONFIGURATION_ASSOCIATED", "SCAN_IN_PROGRESS", "IMAGE_ARCHIVED", "UNSUPPORTED_CODE_ARTIFACTS", "RESOURCE_UNMANAGED", "RESOURCE_STOPPED", "EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED", "STORAGE_LIMIT_EXCEEDED", "INVALID_ARTIFACT"
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]..ecr_image.tags #=> Array
resp.covered_resources[0]..ecr_image.tags[0] #=> String
resp.covered_resources[0]..ecr_image.image_pulled_at #=> Time
resp.covered_resources[0]..ecr_image.last_in_use_at #=> Time
resp.covered_resources[0]..ecr_image.in_use_count #=> Integer
resp.covered_resources[0]..ec2.tags #=> Hash
resp.covered_resources[0]..ec2.tags["MapKey"] #=> String
resp.covered_resources[0]..ec2.ami_id #=> String
resp.covered_resources[0]..ec2.platform #=> String, one of "WINDOWS", "LINUX", "UNKNOWN", "MACOS"
resp.covered_resources[0]..lambda_function.function_tags #=> Hash
resp.covered_resources[0]..lambda_function.function_tags["MapKey"] #=> String
resp.covered_resources[0]..lambda_function.layers #=> Array
resp.covered_resources[0]..lambda_function.layers[0] #=> String
resp.covered_resources[0]..lambda_function.function_name #=> String
resp.covered_resources[0]..lambda_function.runtime #=> String, one of "NODEJS", "NODEJS_12_X", "NODEJS_14_X", "NODEJS_16_X", "JAVA_8", "JAVA_8_AL2", "JAVA_11", "PYTHON_3_7", "PYTHON_3_8", "PYTHON_3_9", "UNSUPPORTED", "NODEJS_18_X", "GO_1_X", "JAVA_17", "PYTHON_3_10", "PYTHON_3_11", "DOTNETCORE_3_1", "DOTNET_6", "DOTNET_7", "RUBY_2_7", "RUBY_3_2", "DOTNET_10", "NODEJS_24_X", "NODEJS_22_X", "JAVA_21", "JAVA_25", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14", "RUBY_3_3", "DOTNET_8", "NODEJS_20_X"
resp.covered_resources[0]..code_repository.project_name #=> String
resp.covered_resources[0]..code_repository.integration_arn #=> String
resp.covered_resources[0]..code_repository.provider_type #=> String
resp.covered_resources[0]..code_repository.provider_type_visibility #=> String
resp.covered_resources[0]..code_repository.last_scanned_commit_id #=> String
resp.covered_resources[0]..code_repository.scan_configuration.periodic_scan_configurations #=> Array
resp.covered_resources[0]..code_repository.scan_configuration.periodic_scan_configurations[0].frequency_expression #=> String
resp.covered_resources[0]..code_repository.scan_configuration.periodic_scan_configurations[0].rule_set_categories #=> Array
resp.covered_resources[0]..code_repository.scan_configuration.periodic_scan_configurations[0].rule_set_categories[0] #=> String, one of "SAST", "IAC", "SCA"
resp.covered_resources[0]..code_repository.scan_configuration.continuous_integration_scan_configurations #=> Array
resp.covered_resources[0]..code_repository.scan_configuration.continuous_integration_scan_configurations[0].supported_event #=> String, one of "PULL_REQUEST", "PUSH"
resp.covered_resources[0]..code_repository.scan_configuration.continuous_integration_scan_configurations[0].rule_set_categories #=> Array
resp.covered_resources[0]..code_repository.scan_configuration.continuous_integration_scan_configurations[0].rule_set_categories[0] #=> String, one of "SAST", "IAC", "SCA"
resp.covered_resources[0]..code_repository.on_demand_scan.last_scanned_commit_id #=> String
resp.covered_resources[0]..code_repository.on_demand_scan.last_scan_at #=> Time
resp.covered_resources[0]..code_repository.on_demand_scan.scan_status.status_code #=> String, one of "ACTIVE", "INACTIVE"
resp.covered_resources[0]..code_repository.on_demand_scan.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", "PENDING_DISABLE", "NO_INVENTORY", "STALE_INVENTORY", "EXCLUDED_BY_TAG", "UNSUPPORTED_RUNTIME", "UNSUPPORTED_MEDIA_TYPE", "UNSUPPORTED_CONFIG_FILE", "DEEP_INSPECTION_PACKAGE_COLLECTION_LIMIT_EXCEEDED", "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED", "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED", "DEEP_INSPECTION_NO_INVENTORY", "AGENTLESS_INSTANCE_STORAGE_LIMIT_EXCEEDED", "AGENTLESS_INSTANCE_COLLECTION_TIME_LIMIT_EXCEEDED", "PENDING_REVIVAL_SCAN", "INTEGRATION_CONNECTION_LOST", "ACCESS_DENIED_TO_ENCRYPTION_KEY", "UNSUPPORTED_LANGUAGE", "NO_SCAN_CONFIGURATION_ASSOCIATED", "SCAN_IN_PROGRESS", "IMAGE_ARCHIVED", "UNSUPPORTED_CODE_ARTIFACTS", "RESOURCE_UNMANAGED", "RESOURCE_STOPPED", "EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED", "STORAGE_LIMIT_EXCEEDED", "INVALID_ARTIFACT"
resp.covered_resources[0]..vm_instance.tags #=> Hash
resp.covered_resources[0]..vm_instance.tags["MapKey"] #=> String
resp.covered_resources[0]..vm_instance.platform #=> String, one of "WINDOWS", "LINUX", "UNKNOWN"
resp.covered_resources[0]..vm_instance.inventory_hash #=> String
resp.covered_resources[0]..vm_instance.vm_image_reference #=> String
resp.covered_resources[0]..container_image.image_tags #=> Array
resp.covered_resources[0]..container_image.image_tags[0] #=> String
resp.covered_resources[0]..container_image.image_pulled_at #=> Time
resp.covered_resources[0]..container_image.last_in_use_at #=> Time
resp.covered_resources[0]..container_image.in_use_count #=> Integer
resp.covered_resources[0]..container_repository.name #=> String
resp.covered_resources[0]..container_repository.scan_frequency #=> String
resp.covered_resources[0]..container_registry.name #=> String
resp.covered_resources[0]..serverless_function.serverless_function_name #=> String
resp.covered_resources[0]..serverless_function.runtime #=> String
resp.covered_resources[0]..serverless_function.function_tags #=> Hash
resp.covered_resources[0]..serverless_function.function_tags["MapKey"] #=> String
resp.covered_resources[0]..machine_image.tags #=> Hash
resp.covered_resources[0]..machine_image.tags["MapKey"] #=> String
resp.covered_resources[0]..machine_image.platform #=> String, one of "WINDOWS", "LINUX", "UNKNOWN"
resp.covered_resources[0].last_scanned_at #=> Time
resp.covered_resources[0].scan_mode #=> String, one of "EC2_SSM_AGENT_BASED", "EC2_AGENTLESS", "EC2_INSPECTOR_AGENT_BASED", "VM_INSPECTOR_AGENT_BASED"
resp.covered_resources[0].provider #=> String, one of "AWS", "AZURE"
resp.covered_resources[0]. #=> String
resp.covered_resources[0].provider_org_id #=> String
resp.covered_resources[0].provider_region #=> String
resp.covered_resources[0].provider_partition #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • :filter_criteria (Types::CoverageFilterCriteria) —

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

Returns:

See Also:



5195
5196
5197
5198
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 5195

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: {
    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
      },
    ],
    account_id: [
      {
        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_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ecr_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    ec2_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    lambda_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    machine_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    last_scanned_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    scan_mode: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    image_pulled_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1,
        lower_inclusive: 1,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    code_repository_provider_type_visibility: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    last_scanned_commit_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_vm_instance_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_container_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_container_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_container_registry_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, NOT_EQUALS
        value: "CoverageStringInput", # required
      },
    ],
    cloud_serverless_function_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS
        key: "NonEmptyString", # required
        value: "NonEmptyString",
      },
    ],
    cloud_provider_org_id: [
      {
        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, PROVIDER, PROVIDER_ACCOUNT_ID, PROVIDER_REGION, PROVIDER_ORG_ID
  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", "PROVIDER", "PROVIDER_ACCOUNT_ID", "PROVIDER_REGION", "PROVIDER_ORG_ID"
resp.total_counts #=> Integer
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.

  • :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:



5448
5449
5450
5451
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 5448

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 the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



5495
5496
5497
5498
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 5495

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({
  arns: ["FilterArn"],
  action: "NONE", # accepts NONE, SUPPRESS
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.filters #=> Array
resp.filters[0].arn #=> String
resp.filters[0].owner_id #=> String
resp.filters[0].name #=> 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. #=> 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.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.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.first_observed_at #=> Array
resp.filters[0].criteria.first_observed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.first_observed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.last_observed_at #=> Array
resp.filters[0].criteria.last_observed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.last_observed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.updated_at #=> Array
resp.filters[0].criteria.updated_at[0].start_inclusive #=> Time
resp.filters[0].criteria.updated_at[0].end_inclusive #=> Time
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.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.inspector_score #=> Array
resp.filters[0].criteria.inspector_score[0].upper_inclusive #=> Float
resp.filters[0].criteria.inspector_score[0].lower_inclusive #=> Float
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.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.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_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.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.ecr_image_pushed_at #=> Array
resp.filters[0].criteria.ecr_image_pushed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.ecr_image_pushed_at[0].end_inclusive #=> Time
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_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.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_last_in_use_at #=> Array
resp.filters[0].criteria.ecr_image_last_in_use_at[0].start_inclusive #=> Time
resp.filters[0].criteria.ecr_image_last_in_use_at[0].end_inclusive #=> Time
resp.filters[0].criteria.ecr_image_in_use_count #=> Array
resp.filters[0].criteria.ecr_image_in_use_count[0].upper_inclusive #=> Float
resp.filters[0].criteria.ecr_image_in_use_count[0].lower_inclusive #=> Float
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.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.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.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.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.vulnerable_packages #=> Array
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].version.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].version.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].epoch.upper_inclusive #=> Float
resp.filters[0].criteria.vulnerable_packages[0].epoch.lower_inclusive #=> Float
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].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].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].source_lambda_layer_arn.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].source_lambda_layer_arn.value #=> String
resp.filters[0].criteria.vulnerable_packages[0].file_path.comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.vulnerable_packages[0].file_path.value #=> String
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.fix_available #=> Array
resp.filters[0].criteria.fix_available[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.fix_available[0].value #=> String
resp.filters[0].criteria.lambda_function_name #=> Array
resp.filters[0].criteria.lambda_function_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.lambda_function_name[0].value #=> String
resp.filters[0].criteria.lambda_function_layers #=> Array
resp.filters[0].criteria.lambda_function_layers[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.lambda_function_layers[0].value #=> String
resp.filters[0].criteria.lambda_function_runtime #=> Array
resp.filters[0].criteria.lambda_function_runtime[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.lambda_function_runtime[0].value #=> String
resp.filters[0].criteria.lambda_function_last_modified_at #=> Array
resp.filters[0].criteria.lambda_function_last_modified_at[0].start_inclusive #=> Time
resp.filters[0].criteria.lambda_function_last_modified_at[0].end_inclusive #=> Time
resp.filters[0].criteria.lambda_function_execution_role_arn #=> Array
resp.filters[0].criteria.lambda_function_execution_role_arn[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.lambda_function_execution_role_arn[0].value #=> String
resp.filters[0].criteria.exploit_available #=> Array
resp.filters[0].criteria.exploit_available[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.exploit_available[0].value #=> String
resp.filters[0].criteria.code_vulnerability_detector_name #=> Array
resp.filters[0].criteria.code_vulnerability_detector_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.code_vulnerability_detector_name[0].value #=> String
resp.filters[0].criteria.code_vulnerability_detector_tags #=> Array
resp.filters[0].criteria.code_vulnerability_detector_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.code_vulnerability_detector_tags[0].value #=> String
resp.filters[0].criteria.code_vulnerability_file_path #=> Array
resp.filters[0].criteria.code_vulnerability_file_path[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.code_vulnerability_file_path[0].value #=> String
resp.filters[0].criteria.epss_score #=> Array
resp.filters[0].criteria.epss_score[0].upper_inclusive #=> Float
resp.filters[0].criteria.epss_score[0].lower_inclusive #=> Float
resp.filters[0].criteria.code_repository_project_name #=> Array
resp.filters[0].criteria.code_repository_project_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.code_repository_project_name[0].value #=> String
resp.filters[0].criteria.code_repository_provider_type #=> Array
resp.filters[0].criteria.code_repository_provider_type[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.code_repository_provider_type[0].value #=> String
resp.filters[0].criteria.machine_image_id #=> Array
resp.filters[0].criteria.machine_image_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.machine_image_id[0].value #=> String
resp.filters[0].criteria.machine_image_name #=> Array
resp.filters[0].criteria.machine_image_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.machine_image_name[0].value #=> String
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.machine_image_platform #=> Array
resp.filters[0].criteria.machine_image_platform[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.machine_image_platform[0].value #=> String
resp.filters[0].criteria.cloud_provider #=> Array
resp.filters[0].criteria.cloud_provider[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_provider[0].value #=> String
resp.filters[0].criteria.cloud_provider_region #=> Array
resp.filters[0].criteria.cloud_provider_region[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_provider_region[0].value #=> String
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.cloud_provider_org_id #=> Array
resp.filters[0].criteria.cloud_provider_org_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_provider_org_id[0].value #=> String
resp.filters[0].criteria.cloud_vm_image_reference #=> Array
resp.filters[0].criteria.cloud_vm_image_reference[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_vm_image_reference[0].value #=> String
resp.filters[0].criteria.cloud_vm_network_id #=> Array
resp.filters[0].criteria.cloud_vm_network_id[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_vm_network_id[0].value #=> String
resp.filters[0].criteria.cloud_vm_subnet_ids #=> Array
resp.filters[0].criteria.cloud_vm_subnet_ids[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_vm_subnet_ids[0].value #=> String
resp.filters[0].criteria.cloud_image_repository_name #=> Array
resp.filters[0].criteria.cloud_image_repository_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_image_repository_name[0].value #=> String
resp.filters[0].criteria.cloud_image_registry #=> Array
resp.filters[0].criteria.cloud_image_registry[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_image_registry[0].value #=> String
resp.filters[0].criteria.cloud_image_digest #=> Array
resp.filters[0].criteria.cloud_image_digest[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_image_digest[0].value #=> String
resp.filters[0].criteria.cloud_image_tags #=> Array
resp.filters[0].criteria.cloud_image_tags[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_image_tags[0].value #=> String
resp.filters[0].criteria.cloud_image_pushed_at #=> Array
resp.filters[0].criteria.cloud_image_pushed_at[0].start_inclusive #=> Time
resp.filters[0].criteria.cloud_image_pushed_at[0].end_inclusive #=> Time
resp.filters[0].criteria.cloud_image_architecture #=> Array
resp.filters[0].criteria.cloud_image_architecture[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_image_architecture[0].value #=> String
resp.filters[0].criteria.cloud_image_last_in_use_at #=> Array
resp.filters[0].criteria.cloud_image_last_in_use_at[0].start_inclusive #=> Time
resp.filters[0].criteria.cloud_image_last_in_use_at[0].end_inclusive #=> Time
resp.filters[0].criteria.cloud_image_in_use_count #=> Array
resp.filters[0].criteria.cloud_image_in_use_count[0].upper_inclusive #=> Float
resp.filters[0].criteria.cloud_image_in_use_count[0].lower_inclusive #=> Float
resp.filters[0].criteria.cloud_serverless_function_name #=> Array
resp.filters[0].criteria.cloud_serverless_function_name[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_serverless_function_name[0].value #=> String
resp.filters[0].criteria.cloud_serverless_function_runtime #=> Array
resp.filters[0].criteria.cloud_serverless_function_runtime[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_serverless_function_runtime[0].value #=> String
resp.filters[0].criteria.cloud_serverless_function_last_modified_at #=> Array
resp.filters[0].criteria.cloud_serverless_function_last_modified_at[0].start_inclusive #=> Time
resp.filters[0].criteria.cloud_serverless_function_last_modified_at[0].end_inclusive #=> Time
resp.filters[0].criteria.cloud_serverless_function_execution_role #=> Array
resp.filters[0].criteria.cloud_serverless_function_execution_role[0].comparison #=> String, one of "EQUALS", "PREFIX", "NOT_EQUALS"
resp.filters[0].criteria.cloud_serverless_function_execution_role[0].value #=> String
resp.filters[0].action #=> String, one of "NONE", "SUPPRESS"
resp.filters[0].created_at #=> Time
resp.filters[0].updated_at #=> Time
resp.filters[0].description #=> String
resp.filters[0].reason #=> String
resp.filters[0].tags #=> Hash
resp.filters[0].tags["MapKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arns (Array<String>) —

    The Amazon resource number (ARN) of the filter.

  • :action (String) —

    The action the filter applies to matched findings.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

Returns:

See Also:



5779
5780
5781
5782
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 5779

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({
  aggregation_type: "FINDING_TYPE", # required, accepts FINDING_TYPE, PACKAGE, TITLE, REPOSITORY, AMI, AWS_EC2_INSTANCE, AWS_ECR_CONTAINER, IMAGE_LAYER, ACCOUNT, AWS_LAMBDA_FUNCTION, LAMBDA_LAYER, CODE_REPOSITORY, VM_INSTANCE, CONTAINER_IMAGE, SERVERLESS_FUNCTION
  next_token: "NextToken",
  max_results: 1,
  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, CODE_VULNERABILITY
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    ami_aggregation: {
      amis: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL, AFFECTED_INSTANCES
      scan_sources: ["INSTANCE_SCAN"], # accepts INSTANCE_SCAN, MACHINE_IMAGE_SCAN
    },
    aws_ecr_container_aggregation: {
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_shas: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      architectures: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      last_in_use_at: [
        {
          start_inclusive: Time.now,
          end_inclusive: Time.now,
        },
      ],
      in_use_count: [
        {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
      ],
    },
    ec2_instance_aggregation: {
      amis: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      operating_systems: [
        {
          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",
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "NETWORK_FINDINGS", # accepts NETWORK_FINDINGS, CRITICAL, HIGH, ALL
    },
    finding_type_aggregation: {
      finding_type: "NETWORK_REACHABILITY", # accepts NETWORK_REACHABILITY, PACKAGE_VULNERABILITY, CODE_VULNERABILITY
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    image_layer_aggregation: {
      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
        },
      ],
      layer_hashes: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_providers: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_account_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_org_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_regions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_partitions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    package_aggregation: {
      package_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    repository_aggregation: {
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL, AFFECTED_IMAGES
    },
    title_aggregation: {
      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
        },
      ],
      resource_type: "AWS_EC2_INSTANCE", # accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites
      finding_type: "NETWORK_REACHABILITY", # accepts NETWORK_REACHABILITY, PACKAGE_VULNERABILITY, CODE_VULNERABILITY
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    lambda_layer_aggregation: {
      function_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      layer_arns: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    lambda_function_aggregation: {
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      function_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      runtimes: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      function_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS
          key: "MapKey", # required
          value: "MapValue",
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    code_repository_aggregation: {
      project_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      provider_types: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
    },
    vm_instance_aggregation: {
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      operating_systems: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      instance_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS
          key: "MapKey", # required
          value: "MapValue",
        },
      ],
      vm_image_references: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_providers: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_partitions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_regions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_org_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_account_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL, NETWORK_FINDINGS
    },
    container_image_aggregation: {
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_digests: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      repositories: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      registries: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      architectures: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      image_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_providers: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_partitions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_regions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_org_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_account_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      last_in_use_at: [
        {
          start_inclusive: Time.now,
          end_inclusive: Time.now,
        },
      ],
      in_use_count: [
        {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
    serverless_function_aggregation: {
      resource_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      function_names: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      runtimes: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      function_tags: [
        {
          comparison: "EQUALS", # required, accepts EQUALS
          key: "MapKey", # required
          value: "MapValue",
        },
      ],
      cloud_providers: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_partitions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_regions: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_org_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      cloud_account_ids: [
        {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      ],
      sort_order: "ASC", # accepts ASC, DESC
      sort_by: "CRITICAL", # accepts CRITICAL, HIGH, ALL
    },
  },
})

Response structure


resp.aggregation_type #=> String, one of "FINDING_TYPE", "PACKAGE", "TITLE", "REPOSITORY", "AMI", "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER", "IMAGE_LAYER", "ACCOUNT", "AWS_LAMBDA_FUNCTION", "LAMBDA_LAYER", "CODE_REPOSITORY", "VM_INSTANCE", "CONTAINER_IMAGE", "SERVERLESS_FUNCTION"
resp.responses #=> Array
resp.responses[0].. #=> String
resp.responses[0]..severity_counts.all #=> Integer
resp.responses[0]..severity_counts.medium #=> Integer
resp.responses[0]..severity_counts.high #=> Integer
resp.responses[0]..severity_counts.critical #=> Integer
resp.responses[0]..severity_counts.low #=> Integer
resp.responses[0]..severity_counts.informational #=> Integer
resp.responses[0]..severity_counts.untriaged #=> Integer
resp.responses[0]..exploit_available_count #=> Integer
resp.responses[0]..fix_available_count #=> Integer
resp.responses[0].ami_aggregation.ami #=> String
resp.responses[0].ami_aggregation. #=> String
resp.responses[0].ami_aggregation.cloud_provider #=> String, one of "AWS", "AZURE"
resp.responses[0].ami_aggregation.cloud_partition #=> String
resp.responses[0].ami_aggregation.cloud_region #=> String
resp.responses[0].ami_aggregation.cloud_org_id #=> String
resp.responses[0].ami_aggregation. #=> String
resp.responses[0].ami_aggregation.severity_counts.all #=> Integer
resp.responses[0].ami_aggregation.severity_counts.medium #=> Integer
resp.responses[0].ami_aggregation.severity_counts.high #=> Integer
resp.responses[0].ami_aggregation.severity_counts.critical #=> Integer
resp.responses[0].ami_aggregation.severity_counts.low #=> Integer
resp.responses[0].ami_aggregation.severity_counts.informational #=> Integer
resp.responses[0].ami_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].ami_aggregation.affected_instances #=> Integer
resp.responses[0].ami_aggregation.scan_source #=> String, one of "INSTANCE_SCAN", "MACHINE_IMAGE_SCAN"
resp.responses[0].aws_ecr_container_aggregation.resource_id #=> String
resp.responses[0].aws_ecr_container_aggregation.image_sha #=> String
resp.responses[0].aws_ecr_container_aggregation.repository #=> String
resp.responses[0].aws_ecr_container_aggregation.architecture #=> 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. #=> String
resp.responses[0].aws_ecr_container_aggregation.severity_counts.all #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.medium #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.high #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.critical #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.low #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.informational #=> Integer
resp.responses[0].aws_ecr_container_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].aws_ecr_container_aggregation.last_in_use_at #=> Time
resp.responses[0].aws_ecr_container_aggregation.in_use_count #=> Integer
resp.responses[0].ec2_instance_aggregation.instance_id #=> String
resp.responses[0].ec2_instance_aggregation.ami #=> String
resp.responses[0].ec2_instance_aggregation.operating_system #=> 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. #=> String
resp.responses[0].ec2_instance_aggregation.severity_counts.all #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.medium #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.high #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.critical #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.low #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.informational #=> Integer
resp.responses[0].ec2_instance_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].ec2_instance_aggregation.network_findings #=> 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.medium #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.high #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.critical #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.low #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.informational #=> Integer
resp.responses[0].finding_type_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].finding_type_aggregation.exploit_available_count #=> Integer
resp.responses[0].finding_type_aggregation.fix_available_count #=> Integer
resp.responses[0].finding_type_aggregation.cloud_provider #=> String
resp.responses[0].finding_type_aggregation. #=> String
resp.responses[0].finding_type_aggregation.cloud_org_id #=> String
resp.responses[0].finding_type_aggregation.cloud_region #=> String
resp.responses[0].finding_type_aggregation.cloud_partition #=> String
resp.responses[0].image_layer_aggregation.repository #=> String
resp.responses[0].image_layer_aggregation.resource_id #=> String
resp.responses[0].image_layer_aggregation.layer_hash #=> String
resp.responses[0].image_layer_aggregation. #=> String
resp.responses[0].image_layer_aggregation.cloud_provider #=> String
resp.responses[0].image_layer_aggregation. #=> String
resp.responses[0].image_layer_aggregation.cloud_org_id #=> String
resp.responses[0].image_layer_aggregation.cloud_region #=> String
resp.responses[0].image_layer_aggregation.cloud_partition #=> String
resp.responses[0].image_layer_aggregation.severity_counts.all #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.medium #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.high #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.critical #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.low #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.informational #=> Integer
resp.responses[0].image_layer_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].package_aggregation.package_name #=> String
resp.responses[0].package_aggregation. #=> String
resp.responses[0].package_aggregation.severity_counts.all #=> Integer
resp.responses[0].package_aggregation.severity_counts.medium #=> Integer
resp.responses[0].package_aggregation.severity_counts.high #=> Integer
resp.responses[0].package_aggregation.severity_counts.critical #=> Integer
resp.responses[0].package_aggregation.severity_counts.low #=> Integer
resp.responses[0].package_aggregation.severity_counts.informational #=> Integer
resp.responses[0].package_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].repository_aggregation.repository #=> String
resp.responses[0].repository_aggregation. #=> String
resp.responses[0].repository_aggregation.cloud_provider #=> String, one of "AWS", "AZURE"
resp.responses[0].repository_aggregation.cloud_partition #=> String
resp.responses[0].repository_aggregation.cloud_region #=> String
resp.responses[0].repository_aggregation.cloud_org_id #=> String
resp.responses[0].repository_aggregation. #=> String
resp.responses[0].repository_aggregation.severity_counts.all #=> Integer
resp.responses[0].repository_aggregation.severity_counts.medium #=> Integer
resp.responses[0].repository_aggregation.severity_counts.high #=> Integer
resp.responses[0].repository_aggregation.severity_counts.critical #=> Integer
resp.responses[0].repository_aggregation.severity_counts.low #=> Integer
resp.responses[0].repository_aggregation.severity_counts.informational #=> Integer
resp.responses[0].repository_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].repository_aggregation.affected_images #=> Integer
resp.responses[0].title_aggregation.title #=> String
resp.responses[0].title_aggregation.vulnerability_id #=> String
resp.responses[0].title_aggregation. #=> String
resp.responses[0].title_aggregation.severity_counts.all #=> Integer
resp.responses[0].title_aggregation.severity_counts.medium #=> Integer
resp.responses[0].title_aggregation.severity_counts.high #=> Integer
resp.responses[0].title_aggregation.severity_counts.critical #=> Integer
resp.responses[0].title_aggregation.severity_counts.low #=> Integer
resp.responses[0].title_aggregation.severity_counts.informational #=> Integer
resp.responses[0].title_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].lambda_layer_aggregation.function_name #=> String
resp.responses[0].lambda_layer_aggregation.resource_id #=> String
resp.responses[0].lambda_layer_aggregation.layer_arn #=> String
resp.responses[0].lambda_layer_aggregation. #=> String
resp.responses[0].lambda_layer_aggregation.severity_counts.all #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.medium #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.high #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.critical #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.low #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.informational #=> Integer
resp.responses[0].lambda_layer_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].lambda_function_aggregation.resource_id #=> String
resp.responses[0].lambda_function_aggregation.function_name #=> String
resp.responses[0].lambda_function_aggregation.runtime #=> String
resp.responses[0].lambda_function_aggregation.lambda_tags #=> Hash
resp.responses[0].lambda_function_aggregation.lambda_tags["MapKey"] #=> String
resp.responses[0].lambda_function_aggregation. #=> String
resp.responses[0].lambda_function_aggregation.severity_counts.all #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.medium #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.high #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.critical #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.low #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.informational #=> Integer
resp.responses[0].lambda_function_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].lambda_function_aggregation.last_modified_at #=> Time
resp.responses[0].code_repository_aggregation.project_names #=> String
resp.responses[0].code_repository_aggregation.provider_type #=> String
resp.responses[0].code_repository_aggregation.severity_counts.all #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.medium #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.high #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.critical #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.low #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.informational #=> Integer
resp.responses[0].code_repository_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].code_repository_aggregation.exploit_available_active_findings_count #=> Integer
resp.responses[0].code_repository_aggregation.fix_available_active_findings_count #=> Integer
resp.responses[0].code_repository_aggregation. #=> String
resp.responses[0].code_repository_aggregation.resource_id #=> String
resp.responses[0].vm_instance_aggregation.resource_id #=> String
resp.responses[0].vm_instance_aggregation.cloud_provider #=> String, one of "AWS", "AZURE"
resp.responses[0].vm_instance_aggregation. #=> String
resp.responses[0].vm_instance_aggregation.cloud_partition #=> String
resp.responses[0].vm_instance_aggregation.cloud_region #=> String
resp.responses[0].vm_instance_aggregation.cloud_org_id #=> String
resp.responses[0].vm_instance_aggregation.vm_image_reference #=> String
resp.responses[0].vm_instance_aggregation.operating_system #=> String
resp.responses[0].vm_instance_aggregation.tags #=> Hash
resp.responses[0].vm_instance_aggregation.tags["MapKey"] #=> String
resp.responses[0].vm_instance_aggregation. #=> String
resp.responses[0].vm_instance_aggregation.severity_counts.all #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.medium #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.high #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.critical #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.low #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.informational #=> Integer
resp.responses[0].vm_instance_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].vm_instance_aggregation.network_findings #=> Integer
resp.responses[0].vm_instance_aggregation.exploit_available_active_findings_count #=> Integer
resp.responses[0].vm_instance_aggregation.fix_available_active_findings_count #=> Integer
resp.responses[0].container_image_aggregation.resource_id #=> String
resp.responses[0].container_image_aggregation.cloud_provider #=> String, one of "AWS", "AZURE"
resp.responses[0].container_image_aggregation. #=> String
resp.responses[0].container_image_aggregation.cloud_partition #=> String
resp.responses[0].container_image_aggregation.cloud_region #=> String
resp.responses[0].container_image_aggregation.cloud_org_id #=> String
resp.responses[0].container_image_aggregation.image_digest #=> String
resp.responses[0].container_image_aggregation.repository #=> String
resp.responses[0].container_image_aggregation.registry #=> String
resp.responses[0].container_image_aggregation.architecture #=> String
resp.responses[0].container_image_aggregation.image_tags #=> Array
resp.responses[0].container_image_aggregation.image_tags[0] #=> String
resp.responses[0].container_image_aggregation. #=> String
resp.responses[0].container_image_aggregation.severity_counts.all #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.medium #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.high #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.critical #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.low #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.informational #=> Integer
resp.responses[0].container_image_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].container_image_aggregation.last_in_use_at #=> Time
resp.responses[0].container_image_aggregation.in_use_count #=> Integer
resp.responses[0].container_image_aggregation.exploit_available_active_findings_count #=> Integer
resp.responses[0].container_image_aggregation.fix_available_active_findings_count #=> Integer
resp.responses[0].serverless_function_aggregation.resource_id #=> String
resp.responses[0].serverless_function_aggregation.cloud_provider #=> String, one of "AWS", "AZURE"
resp.responses[0].serverless_function_aggregation. #=> String
resp.responses[0].serverless_function_aggregation.cloud_partition #=> String
resp.responses[0].serverless_function_aggregation.cloud_region #=> String
resp.responses[0].serverless_function_aggregation.cloud_org_id #=> String
resp.responses[0].serverless_function_aggregation.function_name #=> String
resp.responses[0].serverless_function_aggregation.runtime #=> String
resp.responses[0].serverless_function_aggregation.tags #=> Hash
resp.responses[0].serverless_function_aggregation.tags["MapKey"] #=> String
resp.responses[0].serverless_function_aggregation. #=> String
resp.responses[0].serverless_function_aggregation.severity_counts.all #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.medium #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.high #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.critical #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.low #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.informational #=> Integer
resp.responses[0].serverless_function_aggregation.severity_counts.untriaged #=> Integer
resp.responses[0].serverless_function_aggregation.last_modified_at #=> Time
resp.responses[0].serverless_function_aggregation.exploit_available_active_findings_count #=> Integer
resp.responses[0].serverless_function_aggregation.fix_available_active_findings_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :aggregation_type (required, String) —

    The type of the aggregation request.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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.

Returns:

See Also:



6532
6533
6534
6535
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 6532

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({
  max_results: 1,
  next_token: "NextToken",
  filter_criteria: {
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    last_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    updated_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    inspector_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    resource_type: [
      {
        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",
      },
    ],
    ec2_instance_image_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
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    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
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    network_protocol: [
      {
        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
      },
    ],
    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
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        architecture: {
          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
        },
        source_lambda_layer_arn: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        file_path: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    fix_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_layers: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    lambda_function_execution_role_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    exploit_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_file_path: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    epss_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_owner_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_platform: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_image_reference: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_network_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_subnet_ids: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_digest: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_serverless_function_execution_role: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
  },
  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, EPSS_SCORE
    sort_order: "ASC", # required, accepts ASC, DESC
  },
})

Response structure


resp.next_token #=> String
resp.findings #=> Array
resp.findings[0].finding_arn #=> String
resp.findings[0]. #=> String
resp.findings[0].type #=> String, one of "NETWORK_REACHABILITY", "PACKAGE_VULNERABILITY", "CODE_VULNERABILITY"
resp.findings[0].description #=> String
resp.findings[0].title #=> String
resp.findings[0].remediation.recommendation.text #=> String
resp.findings[0].remediation.recommendation.url #=> String
resp.findings[0].severity #=> String, one of "INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL", "UNTRIAGED"
resp.findings[0].first_observed_at #=> Time
resp.findings[0].last_observed_at #=> Time
resp.findings[0].updated_at #=> Time
resp.findings[0].status #=> String, one of "ACTIVE", "SUPPRESSED", "CLOSED"
resp.findings[0].resources #=> Array
resp.findings[0].resources[0].type #=> String, one of "AWS_EC2_INSTANCE", "AWS_ECR_CONTAINER_IMAGE", "AWS_ECR_REPOSITORY", "AWS_LAMBDA_FUNCTION", "CODE_REPOSITORY", "Microsoft.Compute/virtualMachines", "Microsoft.ContainerRegistry/registry/containerImage", "Microsoft.Web/sites", "MACHINE_IMAGE"
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].details.aws_ec2_instance.type #=> 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.iam_instance_profile_arn #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.vpc_id #=> String
resp.findings[0].resources[0].details.aws_ec2_instance.subnet_id #=> 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_ecr_container_image.repository_name #=> 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.pushed_at #=> Time
resp.findings[0].resources[0].details.aws_ecr_container_image.author #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.architecture #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.image_hash #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.registry #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.platform #=> String
resp.findings[0].resources[0].details.aws_ecr_container_image.last_in_use_at #=> Time
resp.findings[0].resources[0].details.aws_ecr_container_image.in_use_count #=> Integer
resp.findings[0].resources[0].details.aws_lambda_function.function_name #=> String
resp.findings[0].resources[0].details.aws_lambda_function.runtime #=> String, one of "NODEJS", "NODEJS_12_X", "NODEJS_14_X", "NODEJS_16_X", "JAVA_8", "JAVA_8_AL2", "JAVA_11", "PYTHON_3_7", "PYTHON_3_8", "PYTHON_3_9", "UNSUPPORTED", "NODEJS_18_X", "GO_1_X", "JAVA_17", "PYTHON_3_10", "PYTHON_3_11", "DOTNETCORE_3_1", "DOTNET_6", "DOTNET_7", "RUBY_2_7", "RUBY_3_2", "DOTNET_10", "NODEJS_24_X", "NODEJS_22_X", "JAVA_21", "JAVA_25", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14", "RUBY_3_3", "DOTNET_8", "NODEJS_20_X"
resp.findings[0].resources[0].details.aws_lambda_function.code_sha_256 #=> String
resp.findings[0].resources[0].details.aws_lambda_function.version #=> String
resp.findings[0].resources[0].details.aws_lambda_function.execution_role_arn #=> String
resp.findings[0].resources[0].details.aws_lambda_function.layers #=> Array
resp.findings[0].resources[0].details.aws_lambda_function.layers[0] #=> String
resp.findings[0].resources[0].details.aws_lambda_function.vpc_config.subnet_ids #=> Array
resp.findings[0].resources[0].details.aws_lambda_function.vpc_config.subnet_ids[0] #=> String
resp.findings[0].resources[0].details.aws_lambda_function.vpc_config.security_group_ids #=> Array
resp.findings[0].resources[0].details.aws_lambda_function.vpc_config.security_group_ids[0] #=> String
resp.findings[0].resources[0].details.aws_lambda_function.vpc_config.vpc_id #=> String
resp.findings[0].resources[0].details.aws_lambda_function.package_type #=> String, one of "IMAGE", "ZIP"
resp.findings[0].resources[0].details.aws_lambda_function.architectures #=> Array
resp.findings[0].resources[0].details.aws_lambda_function.architectures[0] #=> String, one of "X86_64", "ARM64"
resp.findings[0].resources[0].details.aws_lambda_function.last_modified_at #=> Time
resp.findings[0].resources[0].details.code_repository.project_name #=> String
resp.findings[0].resources[0].details.code_repository.integration_arn #=> String
resp.findings[0].resources[0].details.code_repository.provider_type #=> String, one of "GITHUB", "GITLAB_SELF_MANAGED"
resp.findings[0].resources[0].details.machine_image.machine_image_id #=> String
resp.findings[0].resources[0].details.machine_image.name #=> String
resp.findings[0].resources[0].details.machine_image. #=> String
resp.findings[0].resources[0].details.machine_image.platform #=> String
resp.findings[0].resources[0].details.machine_image.architecture #=> String, one of "X86_64", "ARM64"
resp.findings[0].resources[0].details.machine_image.creation_date #=> Time
resp.findings[0].resources[0].details.machine_image.state #=> String
resp.findings[0].resources[0].details.machine_image.is_public #=> Boolean
resp.findings[0].resources[0].details.machine_image.root_device_type #=> String
resp.findings[0].resources[0].details.machine_image.virtualization_type #=> String
resp.findings[0].resources[0].details.machine_image.source_resource_id #=> String
resp.findings[0].resources[0].details.vm.type #=> String
resp.findings[0].resources[0].details.vm.vm_name #=> String
resp.findings[0].resources[0].details.vm.vm_image_reference #=> String
resp.findings[0].resources[0].details.vm.ip_v4_addresses #=> Array
resp.findings[0].resources[0].details.vm.ip_v4_addresses[0] #=> String
resp.findings[0].resources[0].details.vm.ip_v6_addresses #=> Array
resp.findings[0].resources[0].details.vm.ip_v6_addresses[0] #=> String
resp.findings[0].resources[0].details.vm.network_id #=> String
resp.findings[0].resources[0].details.vm.subnet_ids #=> Array
resp.findings[0].resources[0].details.vm.subnet_ids[0] #=> String
resp.findings[0].resources[0].details.vm.security_group_ids #=> Array
resp.findings[0].resources[0].details.vm.security_group_ids[0] #=> String
resp.findings[0].resources[0].details.vm.launched_at #=> Time
resp.findings[0].resources[0].details.vm.platform #=> String
resp.findings[0].resources[0].details.vm.execution_role #=> String
resp.findings[0].resources[0].details.vm.key_name #=> String
resp.findings[0].resources[0].details.image.repository_name #=> String
resp.findings[0].resources[0].details.image.registry #=> String
resp.findings[0].resources[0].details.image.image_tags #=> Array
resp.findings[0].resources[0].details.image.image_tags[0] #=> String
resp.findings[0].resources[0].details.image.image_digest #=> String
resp.findings[0].resources[0].details.image.pushed_at #=> Time
resp.findings[0].resources[0].details.image.architecture #=> String
resp.findings[0].resources[0].details.image.author #=> String
resp.findings[0].resources[0].details.image.in_use_count #=> Integer
resp.findings[0].resources[0].details.image.last_in_use_at #=> Time
resp.findings[0].resources[0].details.image.platform #=> String
resp.findings[0].resources[0].details.serverless_function.serverless_function_name #=> String
resp.findings[0].resources[0].details.serverless_function.runtime #=> String
resp.findings[0].resources[0].details.serverless_function.version #=> String
resp.findings[0].resources[0].details.serverless_function.code_digest #=> String
resp.findings[0].resources[0].details.serverless_function.last_modified_at #=> Time
resp.findings[0].resources[0].details.serverless_function.network_id #=> String
resp.findings[0].resources[0].details.serverless_function.subnet_ids #=> Array
resp.findings[0].resources[0].details.serverless_function.subnet_ids[0] #=> String
resp.findings[0].resources[0].details.serverless_function.security_group_ids #=> Array
resp.findings[0].resources[0].details.serverless_function.security_group_ids[0] #=> String
resp.findings[0].resources[0].details.serverless_function.execution_role #=> String
resp.findings[0].resources[0].details.serverless_function.package_type #=> String, one of "IMAGE", "ZIP"
resp.findings[0].resources[0].details.serverless_function.architectures #=> Array
resp.findings[0].resources[0].details.serverless_function.architectures[0] #=> String, one of "X86_64", "ARM64"
resp.findings[0].resources[0].details.serverless_function.layers #=> Array
resp.findings[0].resources[0].details.serverless_function.layers[0] #=> String
resp.findings[0].resources[0].provider #=> String, one of "AWS", "AZURE"
resp.findings[0].resources[0]. #=> String
resp.findings[0].resources[0].provider_org_id #=> String
resp.findings[0].inspector_score #=> Float
resp.findings[0].inspector_score_details.adjusted_cvss.score_source #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.cvss_source #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.version #=> String
resp.findings[0].inspector_score_details.adjusted_cvss.score #=> Float
resp.findings[0].inspector_score_details.adjusted_cvss.scoring_vector #=> String
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].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].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.network_path.steps[0].component_arn #=> String
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].name #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].version #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].source_layer_hash #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].epoch #=> Integer
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].release #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].arch #=> 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", "PIP", "PYTHONPKG", "NODEPKG", "POM", "GEMSPEC", "DOTNET_CORE"
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].remediation #=> String
resp.findings[0].package_vulnerability_details.vulnerable_packages[0].source_lambda_layer_arn #=> String
resp.findings[0].package_vulnerability_details.source #=> String
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].version #=> String
resp.findings[0].package_vulnerability_details.cvss[0].source #=> 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_url #=> String
resp.findings[0].package_vulnerability_details.vendor_severity #=> String
resp.findings[0].package_vulnerability_details.vendor_created_at #=> Time
resp.findings[0].package_vulnerability_details.vendor_updated_at #=> Time
resp.findings[0].package_vulnerability_details.reference_urls #=> Array
resp.findings[0].package_vulnerability_details.reference_urls[0] #=> String
resp.findings[0].fix_available #=> String, one of "YES", "NO", "PARTIAL"
resp.findings[0].exploit_available #=> String, one of "YES", "NO"
resp.findings[0].exploitability_details.last_known_exploit_at #=> Time
resp.findings[0].code_vulnerability_details.file_path.file_name #=> String
resp.findings[0].code_vulnerability_details.file_path.file_path #=> String
resp.findings[0].code_vulnerability_details.file_path.start_line #=> Integer
resp.findings[0].code_vulnerability_details.file_path.end_line #=> Integer
resp.findings[0].code_vulnerability_details.detector_tags #=> Array
resp.findings[0].code_vulnerability_details.detector_tags[0] #=> String
resp.findings[0].code_vulnerability_details.reference_urls #=> Array
resp.findings[0].code_vulnerability_details.reference_urls[0] #=> String
resp.findings[0].code_vulnerability_details.rule_id #=> String
resp.findings[0].code_vulnerability_details.source_lambda_layer_arn #=> String
resp.findings[0].code_vulnerability_details.detector_id #=> String
resp.findings[0].code_vulnerability_details.detector_name #=> String
resp.findings[0].code_vulnerability_details.cwes #=> Array
resp.findings[0].code_vulnerability_details.cwes[0] #=> String
resp.findings[0].epss.score #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • :filter_criteria (Types::FilterCriteria) —

    Details on the filters to apply to your finding results.

  • :sort_criteria (Types::SortCriteria) —

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

Returns:

See Also:



7212
7213
7214
7215
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7212

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({
  only_associated: false,
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.members #=> Array
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]. #=> String
resp.members[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :only_associated (Boolean) —

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

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

Returns:

See Also:



7266
7267
7268
7269
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7266

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

#list_on_demand_scans(params = {}) ⇒ Types::ListOnDemandScansResponse

Lists the on-demand scans for a resource.

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_on_demand_scans({
  resource_id: "ResourceId", # required
  resource_type: "AMI", # required, accepts AMI
  max_results: 1,
  next_token: "OnDemandScanNextToken",
})

Response structure


resp.items #=> Array
resp.items[0].scan_id #=> String
resp.items[0].resource_id #=> String
resp.items[0].resource_type #=> String, one of "AMI"
resp.items[0].scan_status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED"
resp.items[0].scan_status_reason #=> String, one of "ACCESS_DENIED", "INTERNAL_ERROR", "STORAGE_LIMIT_EXCEEDED", "EXTRACTION_COLLECTION_TIME_LIMIT_EXCEEDED", "UNSUPPORTED_OS", "RESOURCE_TERMINATED"
resp.items[0].started_at #=> Time
resp.items[0].completed_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String) —

    The ID of the resource whose on-demand scans are being listed.

  • :resource_type (required, String) —

    The type of the resource whose on-demand scans are being listed.

  • :max_results (Integer) —

    The maximum number of results to return in a single page of the response.

  • :next_token (String) —

    A pagination token from a previous response used to retrieve the next page of results.

Returns:

See Also:



7319
7320
7321
7322
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7319

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



7348
7349
7350
7351
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7348

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({
  max_results: 1,
  next_token: "ListUsageTotalsNextToken",
  account_ids: ["UsageAccountId"],
})

Response structure


resp.next_token #=> String
resp.totals #=> Array
resp.totals[0]. #=> String
resp.totals[0].usage #=> Array
resp.totals[0].usage[0].type #=> String, one of "EC2_INSTANCE_HOURS", "ECR_INITIAL_SCAN", "ECR_RESCAN", "LAMBDA_FUNCTION_HOURS", "LAMBDA_FUNCTION_CODE_HOURS", "CODE_REPOSITORY_SAST", "CODE_REPOSITORY_IAC", "CODE_REPOSITORY_SCA", "EC2_AGENTLESS_INSTANCE_HOURS", "AZURE_CONTAINER_IMAGE_INITIAL_SCAN", "AZURE_CONTAINER_IMAGE_RESCAN", "AZURE_VM_AGENT_BASED_INSTANCE_HOURS", "AZURE_SERVERLESS_FUNCTION_HOURS", "EC2_AMI_HOURS"
resp.totals[0].usage[0].total #=> Float
resp.totals[0].usage[0].estimated_monthly_cost #=> Float
resp.totals[0].usage[0].currency #=> String, one of "USD"
resp.totals[0].usage[0].cloud_provider #=> String, one of "AWS", "AZURE", "NOT_APPLICABLE"

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

  • :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. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

  • :account_ids (Array<String>) —

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

Returns:

See Also:



7403
7404
7405
7406
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7403

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

#reset_encryption_key(params = {}) ⇒ Struct

Resets an encryption key. After the key is reset your resources will be encrypted by an Amazon Web Services owned key.

Examples:

Request syntax with placeholder values


resp = client.reset_encryption_key({
  scan_type: "NETWORK", # required, accepts NETWORK, PACKAGE, CODE
  resource_type: "AWS_EC2_INSTANCE", # required, accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_ECR_REPOSITORY, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites, MACHINE_IMAGE
})

Parameters:

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

    ({})

Options Hash (params):

  • :scan_type (required, String) —

    The scan type the key encrypts.

  • :resource_type (required, String) —

    The resource type the key encrypts.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



7430
7431
7432
7433
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7430

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

#search_vulnerabilities(params = {}) ⇒ Types::SearchVulnerabilitiesResponse

Lists Amazon Inspector coverage details for a specific vulnerability.

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

Examples:

Request syntax with placeholder values


resp = client.search_vulnerabilities({
  filter_criteria: { # required
    vulnerability_ids: ["VulnId"], # required
  },
  next_token: "NextToken",
})

Response structure


resp.vulnerabilities #=> Array
resp.vulnerabilities[0].id #=> String
resp.vulnerabilities[0].cwes #=> Array
resp.vulnerabilities[0].cwes[0] #=> String
resp.vulnerabilities[0].cisa_data.date_added #=> Time
resp.vulnerabilities[0].cisa_data.date_due #=> Time
resp.vulnerabilities[0].cisa_data.action #=> String
resp.vulnerabilities[0].source #=> String, one of "NVD"
resp.vulnerabilities[0].description #=> String
resp.vulnerabilities[0].atig_data.first_seen #=> Time
resp.vulnerabilities[0].atig_data.last_seen #=> Time
resp.vulnerabilities[0].atig_data.targets #=> Array
resp.vulnerabilities[0].atig_data.targets[0] #=> String
resp.vulnerabilities[0].atig_data.ttps #=> Array
resp.vulnerabilities[0].atig_data.ttps[0] #=> String
resp.vulnerabilities[0].vendor_severity #=> String
resp.vulnerabilities[0].cvss4.base_score #=> Float
resp.vulnerabilities[0].cvss4.scoring_vector #=> String
resp.vulnerabilities[0].cvss3.base_score #=> Float
resp.vulnerabilities[0].cvss3.scoring_vector #=> String
resp.vulnerabilities[0].related_vulnerabilities #=> Array
resp.vulnerabilities[0].related_vulnerabilities[0] #=> String
resp.vulnerabilities[0].cvss2.base_score #=> Float
resp.vulnerabilities[0].cvss2.scoring_vector #=> String
resp.vulnerabilities[0].vendor_created_at #=> Time
resp.vulnerabilities[0].vendor_updated_at #=> Time
resp.vulnerabilities[0].source_url #=> String
resp.vulnerabilities[0].reference_urls #=> Array
resp.vulnerabilities[0].reference_urls[0] #=> String
resp.vulnerabilities[0].exploit_observed.last_seen #=> Time
resp.vulnerabilities[0].exploit_observed.first_seen #=> Time
resp.vulnerabilities[0].detection_platforms #=> Array
resp.vulnerabilities[0].detection_platforms[0] #=> String
resp.vulnerabilities[0].epss.score #=> Float
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_criteria (required, Types::SearchVulnerabilitiesFilterCriteria) —

    The criteria used to filter the results of a vulnerability search.

  • :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:



7505
7506
7507
7508
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7505

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

#send_cis_session_health(params = {}) ⇒ Struct

Sends a CIS session health. This API is used by the Amazon Inspector SSM plugin to communicate with the Amazon Inspector service. The Amazon Inspector SSM plugin calls this API to start a CIS scan session for the scan ID supplied by the service.

Examples:

Example: Sample SendCisSessionHealth Call


resp = client.send_cis_session_health({
  scan_job_id: "624b746d-e080-44ae-8c1d-48e653365a38", 
  session_token: "624b746d-e080-44ae-8c1d-48e653365a31", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.send_cis_session_health({
  scan_job_id: "UUID", # required
  session_token: "UUID", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :scan_job_id (required, String) —

    A unique identifier for the scan job.

  • :session_token (required, String) —

    The unique token that identifies the CIS session.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



7546
7547
7548
7549
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7546

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

#send_cis_session_telemetry(params = {}) ⇒ Struct

Sends a CIS session telemetry. This API is used by the Amazon Inspector SSM plugin to communicate with the Amazon Inspector service. The Amazon Inspector SSM plugin calls this API to start a CIS scan session for the scan ID supplied by the service.

Examples:

Example: Sample SendCisSessionTelemetry Call


resp = client.send_cis_session_telemetry({
  messages: [
    {
      cis_rule_details: "dGVzdCBleGFtcGxlCg==", 
      rule_id: "1.12.1", 
      status: "FAILED", 
    }, 
    {
      cis_rule_details: "dGVzdCBleGFtcGxlCg==dGVzdCBleGFtcGxlCg", 
      rule_id: "1.2.1", 
      status: "PASSED", 
    }, 
  ], 
  scan_job_id: "624b746d-e080-44ae-8c1d-48e653365a38", 
  session_token: "624b746d-e080-44ae-8c1d-48e653365a31", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.send_cis_session_telemetry({
  scan_job_id: "UUID", # required
  session_token: "UUID", # required
  messages: [ # required
    {
      rule_id: "RuleId", # required
      status: "FAILED", # required, accepts FAILED, PASSED, NOT_EVALUATED, INFORMATIONAL, UNKNOWN, NOT_APPLICABLE, ERROR
      cis_rule_details: "data", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :scan_job_id (required, String) —

    A unique identifier for the scan job.

  • :session_token (required, String) —

    The unique token that identifies the CIS session.

  • :messages (required, Array<Types::CisSessionMessage>) —

    The CIS session telemetry messages.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



7609
7610
7611
7612
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7609

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

#start_cis_session(params = {}) ⇒ Struct

Starts a CIS session. This API is used by the Amazon Inspector SSM plugin to communicate with the Amazon Inspector service. The Amazon Inspector SSM plugin calls this API to start a CIS scan session for the scan ID supplied by the service.

Examples:

Example: Sample SendCisSessionHealth Call


resp = client.start_cis_session({
  message: {
    session_token: "624b746d-e080-44ae-8c1d-48e653365a31", 
  }, 
  scan_job_id: "624b746d-e080-44ae-8c1d-48e653365a38", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.start_cis_session({
  scan_job_id: "UUID", # required
  message: { # required
    session_token: "UUID", # required
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :scan_job_id (required, String) —

    A unique identifier for the scan job.

  • :message (required, Types::StartCisSessionMessage) —

    The start CIS session message.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



7654
7655
7656
7657
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7654

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

#start_code_security_scan(params = {}) ⇒ Types::StartCodeSecurityScanResponse

Initiates a code security scan on a specified repository.

Examples:

Request syntax with placeholder values


resp = client.start_code_security_scan({
  client_token: "CodeSecurityClientToken",
  resource: { # required
    project_id: "ProjectId",
  },
})

Response structure


resp.scan_id #=> String
resp.status #=> String, one of "IN_PROGRESS", "SUCCESSFUL", "FAILED", "SKIPPED"

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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

  • :resource (required, Types::CodeSecurityResource) —

    The resource identifier for the code repository to scan.

Returns:

See Also:



7694
7695
7696
7697
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7694

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

#start_on_demand_scan(params = {}) ⇒ Types::StartOnDemandScanResponse

Starts an on-demand scan of the specified resource, such as an Amazon Machine Image (AMI).

Examples:

Request syntax with placeholder values


resp = client.start_on_demand_scan({
  resource_id: "ResourceId", # required
  resource_type: "AMI", # required, accepts AMI
  client_token: "String",
})

Response structure


resp.scan_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String) —

    The ID of the resource to scan on demand.

  • :resource_type (required, String) —

    The type of the resource to scan on demand.

  • :client_token (String) —

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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

Returns:

See Also:



7735
7736
7737
7738
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7735

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

#stop_cis_session(params = {}) ⇒ Struct

Stops a CIS session. This API is used by the Amazon Inspector SSM plugin to communicate with the Amazon Inspector service. The Amazon Inspector SSM plugin calls this API to stop a CIS scan session for the scan ID supplied by the service.

Examples:

Example: Sample StopCisSession Call


resp = client.stop_cis_session({
  message: {
    benchmark_profile: "xccdf_org.cisecurity.benchmarks_profile_Level_1", 
    benchmark_version: "2.0.0", 
    compute_platform: {
      version: "20.04", 
      product: "ubuntu", 
      vendor: "canonical", 
    }, 
    progress: {
      error_checks: 1, 
      failed_checks: 0, 
      informational_checks: 1, 
      not_applicable_checks: 0, 
      not_evaluated_checks: 2, 
      successful_checks: 5, 
      total_checks: 10, 
      unknown_checks: 0, 
    }, 
    reason: "Failure Reason", 
    status: "FAILED", 
  }, 
  scan_job_id: "624b746d-e080-44ae-8c1d-48e653365a38", 
  session_token: "624b746d-e080-44ae-8c1d-48e653365a31", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.stop_cis_session({
  scan_job_id: "UUID", # required
  session_token: "UUID", # required
  message: { # required
    status: "SUCCESS", # required, accepts SUCCESS, FAILED, INTERRUPTED, UNSUPPORTED_OS
    reason: "Reason",
    progress: { # required
      total_checks: 1,
      successful_checks: 1,
      failed_checks: 1,
      not_evaluated_checks: 1,
      unknown_checks: 1,
      not_applicable_checks: 1,
      informational_checks: 1,
      error_checks: 1,
    },
    compute_platform: {
      vendor: "Vendor",
      product: "Product",
      version: "PlatformVersion",
    },
    benchmark_version: "BenchmarkVersion",
    benchmark_profile: "BenchmarkProfile",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :scan_job_id (required, String) —

    A unique identifier for the scan job.

  • :session_token (required, String) —

    The unique token that identifies the CIS session.

  • :message (required, Types::StopCisSessionMessage) —

    The stop CIS session message.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



7821
7822
7823
7824
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7821

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



7849
7850
7851
7852
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7849

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:



7875
7876
7877
7878
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7875

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

#update_cis_scan_configuration(params = {}) ⇒ Types::UpdateCisScanConfigurationResponse

Updates a CIS scan configuration.

Examples:

Example: Sample UpdateCisScanConfiguration Call


resp = client.update_cis_scan_configuration({
  scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
  scan_name: "sample_new", 
  schedule: {
    daily: {
      start_time: {
        time_of_day: "12:56", 
        timezone: "UTC", 
      }, 
    }, 
  }, 
  security_level: "LEVEL_2", 
  targets: {
    account_ids: [
      "SELF", 
    ], 
    target_resource_tags: {
      "key2" => [
        "value2", 
      ], 
    }, 
  }, 
})

resp.to_h outputs the following:
{
  scan_configuration_arn: "arn:aws:inspector2:us-east-1:123412341234:owner/123412341234/cis-configuration/624b746d-e080-44ae-8c1d-48e653365a38", 
}

Request syntax with placeholder values


resp = client.update_cis_scan_configuration({
  scan_configuration_arn: "CisScanConfigurationArn", # required
  scan_name: "CisScanName",
  security_level: "LEVEL_1", # accepts LEVEL_1, LEVEL_2
  schedule: {
    one_time: {
    },
    daily: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
    },
    weekly: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
      days: ["SUN"], # required, accepts SUN, MON, TUE, WED, THU, FRI, SAT
    },
    monthly: {
      start_time: { # required
        time_of_day: "TimeOfDay", # required
        timezone: "Timezone", # required
      },
      day: "SUN", # required, accepts SUN, MON, TUE, WED, THU, FRI, SAT
    },
  },
  targets: {
    account_ids: ["TargetAccount"],
    target_resource_tags: {
      "TargetResourceTagsKey" => ["TargetResourceTagsValue"],
    },
  },
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The CIS scan configuration ARN.

  • :scan_name (String) —

    The scan name for the CIS scan configuration.

  • :security_level (String) —

    The security level for the CIS scan configuration. Security level refers to the Benchmark levels that CIS assigns to a profile.

  • :schedule (Types::Schedule) —

    The schedule for the CIS scan configuration.

  • :targets (Types::UpdateCisTargets) —

    The targets for the CIS scan configuration.

Returns:

See Also:



7980
7981
7982
7983
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 7980

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

#update_code_security_integration(params = {}) ⇒ Types::UpdateCodeSecurityIntegrationResponse

Updates an existing code security integration.

After calling the CreateCodeSecurityIntegration operation, you complete authentication and authorization with your provider. Next you call the UpdateCodeSecurityIntegration operation to provide the details to complete the integration setup

Examples:

Request syntax with placeholder values


resp = client.update_code_security_integration({
  integration_arn: "CodeSecurityIntegrationArn", # required
  details: { # required
    gitlab_self_managed: {
      auth_code: "GitLabAuthCode", # required
    },
    github: {
      code: "GitHubAuthCode", # required
      installation_id: "GitHubInstallationId", # required
    },
  },
})

Response structure


resp.integration_arn #=> String
resp.status #=> String, one of "PENDING", "IN_PROGRESS", "ACTIVE", "INACTIVE", "DISABLING"

Parameters:

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

    ({})

Options Hash (params):

  • :integration_arn (required, String) —

    The Amazon Resource Name (ARN) of the code security integration to update.

  • :details (required, Types::UpdateIntegrationDetails) —

    The updated integration details specific to the repository provider type.

Returns:

See Also:



8029
8030
8031
8032
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8029

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

#update_code_security_scan_configuration(params = {}) ⇒ Types::UpdateCodeSecurityScanConfigurationResponse

Updates an existing code security scan configuration.

Examples:

Request syntax with placeholder values


resp = client.update_code_security_scan_configuration({
  scan_configuration_arn: "ScanConfigurationArn", # required
  configuration: { # required
    periodic_scan_configuration: {
      frequency: "WEEKLY", # accepts WEEKLY, MONTHLY, NEVER
      frequency_expression: "FrequencyExpression",
    },
    continuous_integration_scan_configuration: {
      supported_events: ["PULL_REQUEST"], # required, accepts PULL_REQUEST, PUSH
    },
    rule_set_categories: ["SAST"], # required, accepts SAST, IAC, SCA
  },
})

Response structure


resp.scan_configuration_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :scan_configuration_arn (required, String) —

    The Amazon Resource Name (ARN) of the scan configuration to update.

  • :configuration (required, Types::CodeSecurityScanConfiguration) —

    The updated configuration settings for the code security scan.

Returns:

See Also:



8070
8071
8072
8073
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8070

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

#update_configuration(params = {}) ⇒ Struct

Updates the scan configuration for your Amazon Inspector account. If you don't specify an accountId, this operation updates the delegated administrator's configuration and propagates it to member accounts that have not been individually configured. If you specify an accountId, this operation updates that member account's configuration. Only the delegated administrator can specify an accountId; member accounts cannot call this operation.

Examples:

Request syntax with placeholder values


resp = client.update_configuration({
  account_id: "AccountId",
  ecr_configuration: {
    rescan_duration: "LIFETIME", # required, accepts LIFETIME, DAYS_30, DAYS_180, DAYS_14, DAYS_60, DAYS_90, DAYS_3, DAYS_7
    pull_date_rescan_duration: "DAYS_14", # accepts DAYS_14, DAYS_30, DAYS_60, DAYS_90, DAYS_180, DAYS_3, DAYS_7
    pull_date_rescan_mode: "LAST_PULL_DATE", # accepts LAST_PULL_DATE, LAST_IN_USE_AT
  },
  ec2_configuration: {
    scan_mode: "EC2_SSM_AGENT_BASED", # required, accepts EC2_SSM_AGENT_BASED, EC2_HYBRID
    activate_vm_scanner: false,
  },
  ami_configuration: {
    last_launched_within: "DAYS_180", # accepts DAYS_180, DAYS_90, DAYS_60, DAYS_30, DAYS_14, DAYS_7
    created_within: "DAYS_180", # accepts DAYS_180, DAYS_90, DAYS_60, DAYS_30, DAYS_14, DAYS_7
    scan_mode_configuration: { # required
      scan_mode: "SCAN_ALL", # required, accepts SCAN_ALL, TARGET_SCANNING
      tags: [
        {
          key: "AmiTagKey", # required
          value: "AmiTagValue",
        },
      ],
      exclude_copied_amis: false,
      exclude_backup_dlm_amis: false,
    },
  },
  update_configuration_inheritance: {
    ec2_configuration: "INHERIT_FROM_ADMIN", # accepts INHERIT_FROM_ADMIN
    ecr_configuration: "INHERIT_FROM_ADMIN", # accepts INHERIT_FROM_ADMIN
    ami_configuration: "INHERIT_FROM_ADMIN", # accepts INHERIT_FROM_ADMIN
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :account_id (String) —

    The 12-digit Amazon Web Services account ID of the member account whose scan configuration you want to update. When specified, you must be the delegated administrator for this member account. If not specified, the operation updates your own configuration and propagates changes to any member accounts that have not been individually configured.

  • :ecr_configuration (Types::EcrConfiguration) —

    Specifies how the ECR automated re-scan will be updated for your environment.

  • :ec2_configuration (Types::Ec2Configuration) —

    Specifies how the Amazon EC2 automated scan will be updated for your environment.

  • :ami_configuration (Types::AmiConfiguration) —

    The Amazon Machine Image (AMI) scan configuration to apply to the account.

  • :update_configuration_inheritance (Types::UpdateConfigurationInheritance) —

    Specifies which scan-type configurations to reset to the delegated administrator's inherited values for the targeted member account. Each member of this structure is independently optional. When specified, ec2Configuration and ecrConfiguration must be absent, and accountId must also be present. Only INHERIT_FROM_ADMIN is valid for each member. If not specified, the operation uses the ec2Configuration and ecrConfiguration parameters instead.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



8153
8154
8155
8156
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8153

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

#update_connector(params = {}) ⇒ Types::UpdateConnectorResponse

Updates the description or provider-specific configuration details of an existing connector.

Examples:

Example: Expand the Azure regions covered by a connector


resp = client.update_connector({
  connector_arn: "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
  provider_detail: {
    azure: {
      azure_regions: [
        "eastus", 
        "westus", 
      ], 
    }, 
  }, 
})

resp.to_h outputs the following:
{
  connector_arn: "arn:aws:inspector2:us-east-1:123456789012:connector/6ccf8549-b52b-57ca-bf52-a2266da3c53a", 
}

Request syntax with placeholder values


resp = client.update_connector({
  connector_arn: "ConnectorArn", # required
  description: "ConnectorDescription",
  provider_detail: {
    azure: {
      azure_regions: ["AzureRegion"],
      scope_configuration: {
        vm_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
        container_image_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
        serverless_scanning: {
          scope_type: "TENANT", # required, accepts TENANT, SUBSCRIPTION
          scope_values: ["ScopeValue"],
        },
      },
      auto_install_vm_scanner: false,
    },
  },
})

Response structure


resp.connector_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :connector_arn (required, String) —

    The Amazon Resource Name (ARN) of the connector to update.

  • :description (String) —

    The updated description of the connector.

  • :provider_detail (Types::ProviderDetailUpdate) —

    The updated provider-specific configuration details for the connector.

Returns:

See Also:



8229
8230
8231
8232
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8229

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

#update_connector_scan_configuration(params = {}) ⇒ Struct

Updates scan configuration settings for resources associated with an Amazon Web Services Config connector.

Examples:

Example: Set 30-day push and 14-day pull rescan durations for an Azure container registry connector


resp = client.update_connector_scan_configuration({
  aws_config_connector_arn: "arn:aws:config:us-east-1:123456789012:connector/azure/a7bc5463-04ce-4b52-901e-f26f7292a4a7/2fbed4bd-5b95-4947-a751-8defc76ecdae", 
  scan_configuration: {
    container_image_scanning: {
      pull_duration: "DAYS_14", 
      push_duration: "DAYS_30", 
    }, 
  }, 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_connector_scan_configuration({
  aws_config_connector_arn: "AwsConfigConnectorArn", # required
  scan_configuration: { # required
    container_image_scanning: {
      push_duration: "LIFETIME", # accepts LIFETIME, DAYS_3, DAYS_7, DAYS_30, DAYS_180, DAYS_14, DAYS_60, DAYS_90
      pull_duration: "DAYS_3", # accepts DAYS_3, DAYS_7, DAYS_14, DAYS_30, DAYS_60, DAYS_90, DAYS_180
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :aws_config_connector_arn (required, String) —

    The ARN of the Amazon Web Services Config connector.

  • :scan_configuration (required, Types::ConnectorScanConfiguration) —

    The scan configuration settings to apply.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



8278
8279
8280
8281
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8278

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

#update_ec2_deep_inspection_configuration(params = {}) ⇒ Types::UpdateEc2DeepInspectionConfigurationResponse

Activates, deactivates Amazon Inspector deep inspection, or updates custom paths for your account.

Examples:

Request syntax with placeholder values


resp = client.update_ec2_deep_inspection_configuration({
  activate_deep_inspection: false,
  package_paths: ["Path"],
})

Response structure


resp.package_paths #=> Array
resp.package_paths[0] #=> String
resp.org_package_paths #=> Array
resp.org_package_paths[0] #=> String
resp.status #=> String, one of "ACTIVATED", "DEACTIVATED", "PENDING", "FAILED"
resp.error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :activate_deep_inspection (Boolean) —

    Specify TRUE to activate Amazon Inspector deep inspection in your account, or FALSE to deactivate. Member accounts in an organization cannot deactivate deep inspection, instead the delegated administrator for the organization can deactivate a member account using BatchUpdateMemberEc2DeepInspectionStatus.

  • :package_paths (Array<String>) —

    The Amazon Inspector deep inspection custom paths you are adding for your account.

Returns:

See Also:



8328
8329
8330
8331
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8328

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

#update_encryption_key(params = {}) ⇒ Struct

Updates an encryption key. A ResourceNotFoundException means that an Amazon Web Services owned key is being used for encryption.

Examples:

Request syntax with placeholder values


resp = client.update_encryption_key({
  kms_key_id: "KmsKeyArn", # required
  scan_type: "NETWORK", # required, accepts NETWORK, PACKAGE, CODE
  resource_type: "AWS_EC2_INSTANCE", # required, accepts AWS_EC2_INSTANCE, AWS_ECR_CONTAINER_IMAGE, AWS_ECR_REPOSITORY, AWS_LAMBDA_FUNCTION, CODE_REPOSITORY, Microsoft.Compute/virtualMachines, Microsoft.ContainerRegistry/registry/containerImage, Microsoft.Web/sites, MACHINE_IMAGE
})

Parameters:

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

    ({})

Options Hash (params):

  • :kms_key_id (required, String) —

    A KMS key ID for the encryption key.

  • :scan_type (required, String) —

    The scan type for the encryption key.

  • :resource_type (required, String) —

    The resource type for the encryption key.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



8359
8360
8361
8362
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8359

def update_encryption_key(params = {}, options = {})
  req = build_request(:update_encryption_key, 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_criteria: {
    finding_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    aws_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    finding_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    first_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    last_observed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    updated_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    finding_status: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    title: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    inspector_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    resource_type: [
      {
        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",
      },
    ],
    ec2_instance_image_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
      },
    ],
    ec2_instance_subnet_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    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
      },
    ],
    ecr_image_hash: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    ecr_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    ecr_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    port_range: [
      {
        begin_inclusive: 1,
        end_inclusive: 1,
      },
    ],
    network_protocol: [
      {
        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
      },
    ],
    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
      },
    ],
    vendor_severity: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    vulnerable_packages: [
      {
        name: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        version: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        epoch: {
          upper_inclusive: 1.0,
          lower_inclusive: 1.0,
        },
        release: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        architecture: {
          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
        },
        source_lambda_layer_arn: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
        file_path: {
          comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
          value: "StringInput", # required
        },
      },
    ],
    related_vulnerabilities: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    fix_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_layers: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    lambda_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    lambda_function_execution_role_arn: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    exploit_available: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_detector_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_vulnerability_file_path: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    epss_score: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    code_repository_project_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    code_repository_provider_type: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_owner_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    machine_image_platform: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_region: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_account_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_provider_org_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_image_reference: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_network_id: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_vm_subnet_ids: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_repository_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_registry: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_digest: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_tags: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_pushed_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_architecture: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_image_last_in_use_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_image_in_use_count: [
      {
        upper_inclusive: 1.0,
        lower_inclusive: 1.0,
      },
    ],
    cloud_serverless_function_name: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_runtime: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
    cloud_serverless_function_last_modified_at: [
      {
        start_inclusive: Time.now,
        end_inclusive: Time.now,
      },
    ],
    cloud_serverless_function_execution_role: [
      {
        comparison: "EQUALS", # required, accepts EQUALS, PREFIX, NOT_EQUALS
        value: "StringInput", # required
      },
    ],
  },
  name: "FilterName",
  filter_arn: "FilterArn", # required
  reason: "FilterReason",
})

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_criteria (Types::FilterCriteria) —

    Defines the criteria to be update in the filter.

  • :name (String) —

    The name of the filter.

  • :filter_arn (required, String) —

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

  • :reason (String) —

    The reason the filter was updated.

Returns:

See Also:



8855
8856
8857
8858
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8855

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

#update_org_ec2_deep_inspection_configuration(params = {}) ⇒ Struct

Updates the Amazon Inspector deep inspection custom paths for your organization. You must be an Amazon Inspector delegated administrator to use this API.

Examples:

Request syntax with placeholder values


resp = client.update_org_ec2_deep_inspection_configuration({
  org_package_paths: ["Path"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :org_package_paths (required, Array<String>) —

    The Amazon Inspector deep inspection custom paths you are adding for your organization.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



8880
8881
8882
8883
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8880

def update_org_ec2_deep_inspection_configuration(params = {}, options = {})
  req = build_request(:update_org_ec2_deep_inspection_configuration, 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
    lambda: false,
    lambda_code: false,
    code_repository: false,
    ami: false,
  },
})

Response structure


resp.auto_enable.ec2 #=> Boolean
resp.auto_enable.ecr #=> Boolean
resp.auto_enable.lambda #=> Boolean
resp.auto_enable.lambda_code #=> Boolean
resp.auto_enable.code_repository #=> Boolean
resp.auto_enable.ami #=> 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:



8921
8922
8923
8924
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 8921

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

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
connector_connected #list_connectors 30 5
connector_deleted #list_connectors 30 5
connector_enabled #list_connectors 30 5

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {}) —

    ({})

  • options (Hash) (defaults to: {}) —

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean) —

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError) —

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError) —

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError) —

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError) —

    Raised when you request to wait for an unknown state.



9038
9039
9040
9041
9042
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/client.rb', line 9038

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end