![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.s3.kotlin.outputs.BucketRoutingRule.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin.outputs
import kotlin.Suppress
/**
* Specifies the redirect behavior and when a redirect is applied. For more information about routing rules, see [Configuring advanced conditional redirects](https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects) in the *Amazon S3 User Guide*.
* @property redirectRule Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.
* @property routingRuleCondition A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the ``/docs`` folder, redirect to the ``/documents`` folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.
*/
public data class BucketRoutingRule(
public val redirectRule: BucketRedirectRule,
public val routingRuleCondition: BucketRoutingRuleCondition? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.s3.outputs.BucketRoutingRule): BucketRoutingRule = BucketRoutingRule(
redirectRule = javaType.redirectRule().let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketRedirectRule.Companion.toKotlin(args0)
}),
routingRuleCondition = javaType.routingRuleCondition().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketRoutingRuleCondition.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy