
com.pulumi.awsnative.wafv2.kotlin.IpSet.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.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetIpAddressVersion
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetScope
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
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetIpAddressVersion.Companion.toKotlin as ipSetIpAddressVersionToKotlin
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetScope.Companion.toKotlin as ipSetScopeToKotlin
/**
* Builder for [IpSet].
*/
@PulumiTagMarker
public class IpSetResourceBuilder internal constructor() {
public var name: String? = null
public var args: IpSetArgs = IpSetArgs()
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 IpSetArgsBuilder.() -> Unit) {
val builder = IpSetArgsBuilder()
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(): IpSet {
val builtJavaResource = com.pulumi.awsnative.wafv2.IpSet(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IpSet(builtJavaResource)
}
}
/**
* Contains a list of IP addresses. This can be either IPV4 or IPV6. The list will be mutually
*/
public class IpSet internal constructor(
override val javaResource: com.pulumi.awsnative.wafv2.IpSet,
) : KotlinCustomResource(javaResource, IpSetMapper) {
/**
* List of IPAddresses.
*/
public val addresses: Output>
get() = javaResource.addresses().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The Amazon Resource Name (ARN) of the IP set.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The ID of the IP set.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* A description of the IP set that helps with identification.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The version of the IP addresses, either `IPV4` or `IPV6` .
*/
public val ipAddressVersion: Output
get() = javaResource.ipAddressVersion().applyValue({ args0 ->
args0.let({ args0 ->
ipSetIpAddressVersionToKotlin(args0)
})
})
/**
* The name of the IP set. You cannot change the name of an `IPSet` after you create it.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
* > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
*/
public val scope: Output
get() = javaResource.scope().applyValue({ args0 ->
args0.let({ args0 ->
ipSetScopeToKotlin(args0)
})
})
/**
* Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
* > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object IpSetMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.wafv2.IpSet::class == javaResource::class
override fun map(javaResource: Resource): IpSet = IpSet(
javaResource as
com.pulumi.awsnative.wafv2.IpSet,
)
}
/**
* @see [IpSet].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IpSet].
*/
public suspend fun ipSet(name: String, block: suspend IpSetResourceBuilder.() -> Unit): IpSet {
val builder = IpSetResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IpSet].
* @param name The _unique_ name of the resulting resource.
*/
public fun ipSet(name: String): IpSet {
val builder = IpSetResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy