
commonMain.aws.sdk.kotlin.services.configservice.model.RemediationConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.model
/**
* An object that represents the details about the remediation configuration that includes the remediation action, parameters, and data to execute the action.
*/
class RemediationConfiguration private constructor(builder: Builder) {
/**
* Amazon Resource Name (ARN) of remediation configuration.
*/
val arn: kotlin.String? = builder.arn
/**
* The remediation is triggered automatically.
*/
val automatic: kotlin.Boolean = builder.automatic
/**
* The name of the Config rule.
*/
val configRuleName: kotlin.String? = builder.configRuleName
/**
* Name of the service that owns the service linked rule, if applicable.
*/
val createdByService: kotlin.String? = builder.createdByService
/**
* An ExecutionControls object.
*/
val executionControls: aws.sdk.kotlin.services.configservice.model.ExecutionControls? = builder.executionControls
/**
* The maximum number of failed attempts for auto-remediation. If you do not select a number, the default is 5.
*
* For example, if you specify MaximumAutomaticAttempts as 5 with RetryAttemptSeconds as 50 seconds, Config will put a RemediationException on your behalf for the failing resource after the 5th failed attempt within 50 seconds.
*/
val maximumAutomaticAttempts: kotlin.Int? = builder.maximumAutomaticAttempts
/**
* An object of the RemediationParameterValue.
*/
val parameters: Map? = builder.parameters
/**
* The type of a resource.
*/
val resourceType: kotlin.String? = builder.resourceType
/**
* Maximum time in seconds that Config runs auto-remediation. If you do not select a number, the default is 60 seconds.
*
* For example, if you specify RetryAttemptSeconds as 50 seconds and MaximumAutomaticAttempts as 5, Config will run auto-remediations 5 times within 50 seconds before throwing an exception.
*/
val retryAttemptSeconds: kotlin.Long? = builder.retryAttemptSeconds
/**
* Target ID is the name of the public document.
*/
val targetId: kotlin.String? = builder.targetId
/**
* The type of the target. Target executes remediation. For example, SSM document.
*/
val targetType: aws.sdk.kotlin.services.configservice.model.RemediationTargetType? = builder.targetType
/**
* Version of the target. For example, version of the SSM document.
*
* If you make backward incompatible changes to the SSM document, you must call PutRemediationConfiguration API again to ensure the remediations can run.
*/
val targetVersion: kotlin.String? = builder.targetVersion
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.configservice.model.RemediationConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RemediationConfiguration(")
append("arn=$arn,")
append("automatic=$automatic,")
append("configRuleName=$configRuleName,")
append("createdByService=$createdByService,")
append("executionControls=$executionControls,")
append("maximumAutomaticAttempts=$maximumAutomaticAttempts,")
append("parameters=$parameters,")
append("resourceType=$resourceType,")
append("retryAttemptSeconds=$retryAttemptSeconds,")
append("targetId=$targetId,")
append("targetType=$targetType,")
append("targetVersion=$targetVersion)")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (automatic.hashCode())
result = 31 * result + (configRuleName?.hashCode() ?: 0)
result = 31 * result + (createdByService?.hashCode() ?: 0)
result = 31 * result + (executionControls?.hashCode() ?: 0)
result = 31 * result + (maximumAutomaticAttempts ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (resourceType?.hashCode() ?: 0)
result = 31 * result + (retryAttemptSeconds?.hashCode() ?: 0)
result = 31 * result + (targetId?.hashCode() ?: 0)
result = 31 * result + (targetType?.hashCode() ?: 0)
result = 31 * result + (targetVersion?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as RemediationConfiguration
if (arn != other.arn) return false
if (automatic != other.automatic) return false
if (configRuleName != other.configRuleName) return false
if (createdByService != other.createdByService) return false
if (executionControls != other.executionControls) return false
if (maximumAutomaticAttempts != other.maximumAutomaticAttempts) return false
if (parameters != other.parameters) return false
if (resourceType != other.resourceType) return false
if (retryAttemptSeconds != other.retryAttemptSeconds) return false
if (targetId != other.targetId) return false
if (targetType != other.targetType) return false
if (targetVersion != other.targetVersion) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.configservice.model.RemediationConfiguration = Builder(this).apply(block).build()
class Builder {
/**
* Amazon Resource Name (ARN) of remediation configuration.
*/
var arn: kotlin.String? = null
/**
* The remediation is triggered automatically.
*/
var automatic: kotlin.Boolean = false
/**
* The name of the Config rule.
*/
var configRuleName: kotlin.String? = null
/**
* Name of the service that owns the service linked rule, if applicable.
*/
var createdByService: kotlin.String? = null
/**
* An ExecutionControls object.
*/
var executionControls: aws.sdk.kotlin.services.configservice.model.ExecutionControls? = null
/**
* The maximum number of failed attempts for auto-remediation. If you do not select a number, the default is 5.
*
* For example, if you specify MaximumAutomaticAttempts as 5 with RetryAttemptSeconds as 50 seconds, Config will put a RemediationException on your behalf for the failing resource after the 5th failed attempt within 50 seconds.
*/
var maximumAutomaticAttempts: kotlin.Int? = null
/**
* An object of the RemediationParameterValue.
*/
var parameters: Map? = null
/**
* The type of a resource.
*/
var resourceType: kotlin.String? = null
/**
* Maximum time in seconds that Config runs auto-remediation. If you do not select a number, the default is 60 seconds.
*
* For example, if you specify RetryAttemptSeconds as 50 seconds and MaximumAutomaticAttempts as 5, Config will run auto-remediations 5 times within 50 seconds before throwing an exception.
*/
var retryAttemptSeconds: kotlin.Long? = null
/**
* Target ID is the name of the public document.
*/
var targetId: kotlin.String? = null
/**
* The type of the target. Target executes remediation. For example, SSM document.
*/
var targetType: aws.sdk.kotlin.services.configservice.model.RemediationTargetType? = null
/**
* Version of the target. For example, version of the SSM document.
*
* If you make backward incompatible changes to the SSM document, you must call PutRemediationConfiguration API again to ensure the remediations can run.
*/
var targetVersion: kotlin.String? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.configservice.model.RemediationConfiguration) : this() {
this.arn = x.arn
this.automatic = x.automatic
this.configRuleName = x.configRuleName
this.createdByService = x.createdByService
this.executionControls = x.executionControls
this.maximumAutomaticAttempts = x.maximumAutomaticAttempts
this.parameters = x.parameters
this.resourceType = x.resourceType
this.retryAttemptSeconds = x.retryAttemptSeconds
this.targetId = x.targetId
this.targetType = x.targetType
this.targetVersion = x.targetVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.configservice.model.RemediationConfiguration = RemediationConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.configservice.model.ExecutionControls] inside the given [block]
*/
fun executionControls(block: aws.sdk.kotlin.services.configservice.model.ExecutionControls.Builder.() -> kotlin.Unit) {
this.executionControls = aws.sdk.kotlin.services.configservice.model.ExecutionControls.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy