/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.iot.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Defines an action that can be applied to audit findings by using * StartAuditMitigationActionsTask. Only certain types of mitigation actions can * be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of * change. *
** Requires permission to access the CreateMitigationAction action. *
*/ public class CreateMitigationActionRequest extends AmazonWebServiceRequest implements Serializable { /** *
* A friendly name for the action. Choose a friendly name that accurately
* describes the action (for example, EnableLoggingAction
).
*
* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
*/
private String actionName;
/**
*
* The ARN of the IAM role that is used to apply the mitigation action. *
*
* Constraints:
* Length: 20 - 2048
*/
private String roleArn;
/**
*
* Defines the type of action and the parameters for that action. *
*/ private MitigationActionParams actionParams; /** ** Metadata that can be used to manage the mitigation action. *
*/ private java.util.List
* A friendly name for the action. Choose a friendly name that accurately
* describes the action (for example, EnableLoggingAction
).
*
* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* A friendly name for the action. Choose a friendly name that
* accurately describes the action (for example,
* EnableLoggingAction
).
*
* A friendly name for the action. Choose a friendly name that accurately
* describes the action (for example, EnableLoggingAction
).
*
* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @param actionName
* A friendly name for the action. Choose a friendly name that
* accurately describes the action (for example,
* EnableLoggingAction
).
*
* A friendly name for the action. Choose a friendly name that accurately
* describes the action (for example, EnableLoggingAction
).
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
*
* @param actionName
* A friendly name for the action. Choose a friendly name that
* accurately describes the action (for example,
* EnableLoggingAction
).
*
* The ARN of the IAM role that is used to apply the mitigation action. *
*
* Constraints:
* Length: 20 - 2048
*
* @return
* The ARN of the IAM role that is used to apply the mitigation * action. *
*/ public String getRoleArn() { return roleArn; } /** ** The ARN of the IAM role that is used to apply the mitigation action. *
*
* Constraints:
* Length: 20 - 2048
*
* @param roleArn
* The ARN of the IAM role that is used to apply the mitigation * action. *
*/ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The ARN of the IAM role that is used to apply the mitigation action. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 20 - 2048
*
* @param roleArn
* The ARN of the IAM role that is used to apply the mitigation * action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateMitigationActionRequest withRoleArn(String roleArn) { this.roleArn = roleArn; return this; } /** ** Defines the type of action and the parameters for that action. *
* * @return* Defines the type of action and the parameters for that action. *
*/ public MitigationActionParams getActionParams() { return actionParams; } /** ** Defines the type of action and the parameters for that action. *
* * @param actionParams* Defines the type of action and the parameters for that action. *
*/ public void setActionParams(MitigationActionParams actionParams) { this.actionParams = actionParams; } /** ** Defines the type of action and the parameters for that action. *
** Returns a reference to this object so that method calls can be chained * together. * * @param actionParams
* Defines the type of action and the parameters for that action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateMitigationActionRequest withActionParams(MitigationActionParams actionParams) { this.actionParams = actionParams; return this; } /** ** Metadata that can be used to manage the mitigation action. *
* * @return* Metadata that can be used to manage the mitigation action. *
*/ public java.util.List* Metadata that can be used to manage the mitigation action. *
* * @param tags* Metadata that can be used to manage the mitigation action. *
*/ public void setTags(java.util.Collection* Metadata that can be used to manage the mitigation action. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Metadata that can be used to manage the mitigation action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateMitigationActionRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList* Metadata that can be used to manage the mitigation action. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Metadata that can be used to manage the mitigation action. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateMitigationActionRequest withTags(java.util.Collection