Class CreateAutomationRuleRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.securityhub.model.SecurityHubRequest
-
- software.amazon.awssdk.services.securityhub.model.CreateAutomationRuleRequest
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateAutomationRuleRequest.Builder,CreateAutomationRuleRequest>
@Generated("software.amazon.awssdk:codegen") public final class CreateAutomationRuleRequest extends SecurityHubRequest implements ToCopyableBuilder<CreateAutomationRuleRequest.Builder,CreateAutomationRuleRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCreateAutomationRuleRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AutomationRulesAction>actions()One or more actions to update finding fields if a finding matches the conditions specified inCriteria.static CreateAutomationRuleRequest.Builderbuilder()AutomationRulesFindingFilterscriteria()A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter findings.Stringdescription()A description of the rule.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasActions()For responses, this returns true if the service returned a value for the Actions property.inthashCode()booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.BooleanisTerminal()Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria.StringruleName()The name of the rule.IntegerruleOrder()An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings.RuleStatusruleStatus()Whether the rule is active after it is created.StringruleStatusAsString()Whether the rule is active after it is created.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends CreateAutomationRuleRequest.Builder>serializableBuilderClass()Map<String,String>tags()User-defined tags associated with an automation rule.CreateAutomationRuleRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final Map<String,String> tags()
User-defined tags associated with an automation rule.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- User-defined tags associated with an automation rule.
-
ruleStatus
public final RuleStatus ruleStatus()
Whether the rule is active after it is created. If this parameter is equal to
ENABLED, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, useBatchUpdateAutomationRules.If the service returns an enum value that is not available in the current SDK version,
ruleStatuswill returnRuleStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromruleStatusAsString().- Returns:
- Whether the rule is active after it is created. If this parameter is equal to
ENABLED, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, useBatchUpdateAutomationRules. - See Also:
RuleStatus
-
ruleStatusAsString
public final String ruleStatusAsString()
Whether the rule is active after it is created. If this parameter is equal to
ENABLED, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, useBatchUpdateAutomationRules.If the service returns an enum value that is not available in the current SDK version,
ruleStatuswill returnRuleStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromruleStatusAsString().- Returns:
- Whether the rule is active after it is created. If this parameter is equal to
ENABLED, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, useBatchUpdateAutomationRules. - See Also:
RuleStatus
-
ruleOrder
public final Integer ruleOrder()
An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. Security Hub applies rules with lower values for this parameter first.
- Returns:
- An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. Security Hub applies rules with lower values for this parameter first.
-
ruleName
public final String ruleName()
The name of the rule.
- Returns:
- The name of the rule.
-
description
public final String description()
A description of the rule.
- Returns:
- A description of the rule.
-
isTerminal
public final Boolean isTerminal()
Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
- Returns:
- Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
-
criteria
public final AutomationRulesFindingFilters criteria()
A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub applies the rule action to the finding.
- Returns:
- A set of ASFF finding field attributes and corresponding expected values that Security Hub uses to filter findings. If a rule is enabled and a finding matches the conditions specified in this parameter, Security Hub applies the rule action to the finding.
-
hasActions
public final boolean hasActions()
For responses, this returns true if the service returned a value for the Actions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
actions
public final List<AutomationRulesAction> actions()
One or more actions to update finding fields if a finding matches the conditions specified in
Criteria.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasActions()method.- Returns:
- One or more actions to update finding fields if a finding matches the conditions specified in
Criteria.
-
toBuilder
public CreateAutomationRuleRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateAutomationRuleRequest.Builder,CreateAutomationRuleRequest>- Specified by:
toBuilderin classSecurityHubRequest
-
builder
public static CreateAutomationRuleRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends CreateAutomationRuleRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkRequest
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-