Class ScanResultConditionRequest

java.lang.Object
software.amazon.awssdk.services.ec2.model.ScanResultConditionRequest
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ScanResultConditionRequest.Builder,ScanResultConditionRequest>

@Generated("software.amazon.awssdk:codegen") public final class ScanResultConditionRequest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ScanResultConditionRequest.Builder,ScanResultConditionRequest>

The Amazon Inspector scan-result criteria that an AMI must meet to be allowed. The criteria can limit the highest finding severity. They can also limit, for each severity, the days since Amazon Inspector reported a fix as available.

The severity limit applies to all findings, whether or not a fix is available. The day limits for each severity apply only to findings that have a fix available. A scanned AMI that has no fix-available finding of a given severity meets that severity's day limit. AMIs that Amazon Inspector has not scanned are not allowed when you specify this condition.

See Also:
  • Method Details

    • maxDaysSinceLastFindingScan

      public final Integer maxDaysSinceLastFindingScan()

      The maximum number of days that have elapsed since Amazon Inspector last scanned the AMI. For example, a value of 7 allows AMIs that were scanned within the last 7 days. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days that have elapsed since Amazon Inspector last scanned the AMI. For example, a value of 7 allows AMIs that were scanned within the last 7 days. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • maximumSeverityLabel

      public final SeverityLabel maximumSeverityLabel()

      The maximum severity that an AMI's Amazon Inspector findings can have for the AMI to be allowed. Findings count whether or not a fix is available. For example, a value of medium allows AMIs whose highest severity is informational, low, or medium.

      The valid values are the following Amazon Inspector severity levels, which correspond to CVSS score ranges:

      • informational - CVSS score of 0.

      • low - CVSS score of 0.1 to 3.9.

      • medium - CVSS score of 4.0 to 6.9.

      • high - CVSS score of 7.0 to 8.9.

      • critical - CVSS score of 9.0 to 10.0.

      For more information, see Software package vulnerability severity in the Amazon Inspector User Guide.

      A scanned AMI that has no findings meets this limit.

      AMIs that Amazon Inspector has not scanned are not allowed when you specify this condition.

      If the service returns an enum value that is not available in the current SDK version, maximumSeverityLabel will return SeverityLabel.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from maximumSeverityLabelAsString().

      Returns:
      The maximum severity that an AMI's Amazon Inspector findings can have for the AMI to be allowed. Findings count whether or not a fix is available. For example, a value of medium allows AMIs whose highest severity is informational, low, or medium.

      The valid values are the following Amazon Inspector severity levels, which correspond to CVSS score ranges:

      • informational - CVSS score of 0.

      • low - CVSS score of 0.1 to 3.9.

      • medium - CVSS score of 4.0 to 6.9.

      • high - CVSS score of 7.0 to 8.9.

      • critical - CVSS score of 9.0 to 10.0.

      For more information, see Software package vulnerability severity in the Amazon Inspector User Guide.

      A scanned AMI that has no findings meets this limit.

      AMIs that Amazon Inspector has not scanned are not allowed when you specify this condition.

      See Also:
    • maximumSeverityLabelAsString

      public final String maximumSeverityLabelAsString()

      The maximum severity that an AMI's Amazon Inspector findings can have for the AMI to be allowed. Findings count whether or not a fix is available. For example, a value of medium allows AMIs whose highest severity is informational, low, or medium.

      The valid values are the following Amazon Inspector severity levels, which correspond to CVSS score ranges:

      • informational - CVSS score of 0.

      • low - CVSS score of 0.1 to 3.9.

      • medium - CVSS score of 4.0 to 6.9.

      • high - CVSS score of 7.0 to 8.9.

      • critical - CVSS score of 9.0 to 10.0.

      For more information, see Software package vulnerability severity in the Amazon Inspector User Guide.

      A scanned AMI that has no findings meets this limit.

      AMIs that Amazon Inspector has not scanned are not allowed when you specify this condition.

      If the service returns an enum value that is not available in the current SDK version, maximumSeverityLabel will return SeverityLabel.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from maximumSeverityLabelAsString().

      Returns:
      The maximum severity that an AMI's Amazon Inspector findings can have for the AMI to be allowed. Findings count whether or not a fix is available. For example, a value of medium allows AMIs whose highest severity is informational, low, or medium.

      The valid values are the following Amazon Inspector severity levels, which correspond to CVSS score ranges:

      • informational - CVSS score of 0.

      • low - CVSS score of 0.1 to 3.9.

      • medium - CVSS score of 4.0 to 6.9.

      • high - CVSS score of 7.0 to 8.9.

      • critical - CVSS score of 9.0 to 10.0.

      For more information, see Software package vulnerability severity in the Amazon Inspector User Guide.

      A scanned AMI that has no findings meets this limit.

      AMIs that Amazon Inspector has not scanned are not allowed when you specify this condition.

      See Also:
    • maxDaysSinceInformationalFixAvailable

      public final Integer maxDaysSinceInformationalFixAvailable()

      The maximum number of days since Amazon Inspector reported a fix as available for an informational severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no informational severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days since Amazon Inspector reported a fix as available for an informational severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no informational severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • maxDaysSinceLowFixAvailable

      public final Integer maxDaysSinceLowFixAvailable()

      The maximum number of days since Amazon Inspector reported a fix as available for a low severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no low severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days since Amazon Inspector reported a fix as available for a low severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no low severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • maxDaysSinceMediumFixAvailable

      public final Integer maxDaysSinceMediumFixAvailable()

      The maximum number of days since Amazon Inspector reported a fix as available for a medium severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no medium severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days since Amazon Inspector reported a fix as available for a medium severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no medium severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • maxDaysSinceHighFixAvailable

      public final Integer maxDaysSinceHighFixAvailable()

      The maximum number of days since Amazon Inspector reported a fix as available for a high severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no high severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days since Amazon Inspector reported a fix as available for a high severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no high severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • maxDaysSinceCriticalFixAvailable

      public final Integer maxDaysSinceCriticalFixAvailable()

      The maximum number of days since Amazon Inspector reported a fix as available for a critical severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no critical severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

      Returns:
      The maximum number of days since Amazon Inspector reported a fix as available for a critical severity finding on the AMI. For example, a value of 7 does not allow an AMI if Amazon Inspector reported such a fix more than 7 days ago.

      A scanned AMI that has no critical severity finding with a fix available meets this limit. AMIs that Amazon Inspector has not scanned are not allowed.

      Constraints: Minimum value of 0. Maximum value of 2147483647.

    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ScanResultConditionRequest.Builder,ScanResultConditionRequest>
      Returns:
      a builder for type T
    • builder

      public static ScanResultConditionRequest.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ScanResultConditionRequest.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.