commonMain.aws.sdk.kotlin.services.waf.model.WafServiceLinkedRoleErrorException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of waf-jvm Show documentation
Show all versions of waf-jvm Show documentation
The AWS SDK for Kotlin client for WAF
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.waf.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.ServiceErrorMetadata
/**
* AWS WAF is not able to access the service linked role. This can be caused by a previous `PutLoggingConfiguration` request, which can lock the service linked role for about 20 seconds. Please try your request again. The service linked role can also be locked by a previous `DeleteServiceLinkedRole` request, which can lock the role for 15 minutes or more. If you recently made a `DeleteServiceLinkedRole`, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.
*/
public class WafServiceLinkedRoleErrorException private constructor(builder: Builder) : WafException(builder.message) {
init {
sdkErrorMetadata.attributes[ServiceErrorMetadata.ErrorType] = ErrorType.Client
}
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.waf.model.WafServiceLinkedRoleErrorException = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("WafServiceLinkedRoleErrorException(")
append("message=$message")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message?.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 WafServiceLinkedRoleErrorException
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.waf.model.WafServiceLinkedRoleErrorException = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.waf.model.WafServiceLinkedRoleErrorException) : this() {
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.waf.model.WafServiceLinkedRoleErrorException = WafServiceLinkedRoleErrorException(this)
internal fun correctErrors(): Builder {
return this
}
}
}