
com.pulumi.awsnative.wafv2.kotlin.WebAclAssociation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.wafv2.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [WebAclAssociation].
*/
@PulumiTagMarker
public class WebAclAssociationResourceBuilder internal constructor() {
public var name: String? = null
public var args: WebAclAssociationArgs = WebAclAssociationArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend WebAclAssociationArgsBuilder.() -> Unit) {
val builder = WebAclAssociationArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): WebAclAssociation {
val builtJavaResource = com.pulumi.awsnative.wafv2.WebAclAssociation(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return WebAclAssociation(builtJavaResource)
}
}
/**
* Associates WebACL to Application Load Balancer, CloudFront or API Gateway.
*/
public class WebAclAssociation internal constructor(
override val javaResource: com.pulumi.awsnative.wafv2.WebAclAssociation,
) : KotlinCustomResource(javaResource, WebAclAssociationMapper) {
/**
* The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
* The ARN must be in one of the following formats:
* - For an Application Load Balancer: `arn: *partition* :elasticloadbalancing: *region* : *account-id* :loadbalancer/app/ *load-balancer-name* / *load-balancer-id*`
* - For an Amazon API Gateway REST API: `arn: *partition* :apigateway: *region* ::/restapis/ *api-id* /stages/ *stage-name*`
* - For an AWS AppSync GraphQL API: `arn: *partition* :appsync: *region* : *account-id* :apis/ *GraphQLApiId*`
* - For an Amazon Cognito user pool: `arn: *partition* :cognito-idp: *region* : *account-id* :userpool/ *user-pool-id*`
* - For an AWS App Runner service: `arn: *partition* :apprunner: *region* : *account-id* :service/ *apprunner-service-name* / *apprunner-service-id*`
* - For an AWS Verified Access instance: `arn: *partition* :ec2: *region* : *account-id* :verified-access-instance/ *instance-id*`
*/
public val resourceArn: Output
get() = javaResource.resourceArn().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
*/
public val webAclArn: Output
get() = javaResource.webAclArn().applyValue({ args0 -> args0 })
}
public object WebAclAssociationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.wafv2.WebAclAssociation::class == javaResource::class
override fun map(javaResource: Resource): WebAclAssociation = WebAclAssociation(
javaResource as
com.pulumi.awsnative.wafv2.WebAclAssociation,
)
}
/**
* @see [WebAclAssociation].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [WebAclAssociation].
*/
public suspend fun webAclAssociation(
name: String,
block: suspend WebAclAssociationResourceBuilder.() -> Unit,
): WebAclAssociation {
val builder = WebAclAssociationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [WebAclAssociation].
* @param name The _unique_ name of the resulting resource.
*/
public fun webAclAssociation(name: String): WebAclAssociation {
val builder = WebAclAssociationResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy