All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.googlenative.compute.beta.kotlin.FirewallPolicyArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.compute.beta.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.beta.FirewallPolicyArgs.builder
import com.pulumi.googlenative.compute.beta.kotlin.inputs.FirewallPolicyAssociationArgs
import com.pulumi.googlenative.compute.beta.kotlin.inputs.FirewallPolicyAssociationArgsBuilder
import com.pulumi.googlenative.compute.beta.kotlin.inputs.FirewallPolicyRuleArgs
import com.pulumi.googlenative.compute.beta.kotlin.inputs.FirewallPolicyRuleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a new policy in the specified project using the data included in the request.
 * @property associations A list of associations that belong to this firewall policy.
 * @property description An optional description of this resource. Provide this property when you create the resource.
 * @property displayName Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
 * @property name Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
 * @property parentId Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.
 * @property requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
 * @property rules A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
 * @property shortName User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
 */
public data class FirewallPolicyArgs(
    public val associations: Output>? = null,
    public val description: Output? = null,
    @Deprecated(
        message = """
  Deprecated, please use short name instead. User-provided name of the Organization firewall policy.
      The name should be unique in the organization in which the firewall policy is created. This
      field is not applicable to network firewall policies. This name must be set on creation and
      cannot be changed. The name must be 1-63 characters long, and comply with RFC1035.
      Specifically, the name must be 1-63 characters long and match the regular expression
      `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and
      all following characters must be a dash, lowercase letter, or digit, except the last
      character, which cannot be a dash.
  """,
    )
    public val displayName: Output? = null,
    public val name: Output? = null,
    public val parentId: Output? = null,
    public val requestId: Output? = null,
    public val rules: Output>? = null,
    public val shortName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.beta.FirewallPolicyArgs =
        com.pulumi.googlenative.compute.beta.FirewallPolicyArgs.builder()
            .associations(
                associations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parentId(parentId?.applyValue({ args0 -> args0 }))
            .requestId(requestId?.applyValue({ args0 -> args0 }))
            .rules(rules?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .shortName(shortName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FirewallPolicyArgs].
 */
@PulumiTagMarker
public class FirewallPolicyArgsBuilder internal constructor() {
    private var associations: Output>? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var name: Output? = null

    private var parentId: Output? = null

    private var requestId: Output? = null

    private var rules: Output>? = null

    private var shortName: Output? = null

    /**
     * @param value A list of associations that belong to this firewall policy.
     */
    @JvmName("trdonwgbnesgkmfj")
    public suspend fun associations(`value`: Output>) {
        this.associations = value
    }

    @JvmName("jctawefrgsekovxl")
    public suspend fun associations(vararg values: Output) {
        this.associations = Output.all(values.asList())
    }

    /**
     * @param values A list of associations that belong to this firewall policy.
     */
    @JvmName("hdbyfxhlsykxoucc")
    public suspend fun associations(values: List>) {
        this.associations = Output.all(values)
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("mywmrhdguxkoedjm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @Deprecated(
        message = """
  Deprecated, please use short name instead. User-provided name of the Organization firewall policy.
      The name should be unique in the organization in which the firewall policy is created. This
      field is not applicable to network firewall policies. This name must be set on creation and
      cannot be changed. The name must be 1-63 characters long, and comply with RFC1035.
      Specifically, the name must be 1-63 characters long and match the regular expression
      `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and
      all following characters must be a dash, lowercase letter, or digit, except the last
      character, which cannot be a dash.
  """,
    )
    @JvmName("aurgntyxsosxulhi")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
     */
    @JvmName("sfeacxumxqkeghxa")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.
     */
    @JvmName("cfsptujbuavaeaan")
    public suspend fun parentId(`value`: Output) {
        this.parentId = value
    }

    /**
     * @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
     */
    @JvmName("lixqwonwtdtumkhq")
    public suspend fun requestId(`value`: Output) {
        this.requestId = value
    }

    /**
     * @param value A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("mgfxpiagksrpagwk")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

    @JvmName("symvhhtijqwyaiuc")
    public suspend fun rules(vararg values: Output) {
        this.rules = Output.all(values.asList())
    }

    /**
     * @param values A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("oiniuygpxejxjakq")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @JvmName("loruggqrghrtkpvj")
    public suspend fun shortName(`value`: Output) {
        this.shortName = value
    }

    /**
     * @param value A list of associations that belong to this firewall policy.
     */
    @JvmName("xlfqumxbmemnudvv")
    public suspend fun associations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associations = mapped
    }

    /**
     * @param argument A list of associations that belong to this firewall policy.
     */
    @JvmName("pnkimfsarbojnhtq")
    public suspend fun associations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.associations = mapped
    }

    /**
     * @param argument A list of associations that belong to this firewall policy.
     */
    @JvmName("ooueamerpakqvqpt")
    public suspend fun associations(vararg argument: suspend FirewallPolicyAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.associations = mapped
    }

    /**
     * @param argument A list of associations that belong to this firewall policy.
     */
    @JvmName("ucjwtafpdwreddxf")
    public suspend fun associations(argument: suspend FirewallPolicyAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FirewallPolicyAssociationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.associations = mapped
    }

    /**
     * @param values A list of associations that belong to this firewall policy.
     */
    @JvmName("okomxcuproultrnu")
    public suspend fun associations(vararg values: FirewallPolicyAssociationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.associations = mapped
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("qwcupsyinpachdxd")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @Deprecated(
        message = """
  Deprecated, please use short name instead. User-provided name of the Organization firewall policy.
      The name should be unique in the organization in which the firewall policy is created. This
      field is not applicable to network firewall policies. This name must be set on creation and
      cannot be changed. The name must be 1-63 characters long, and comply with RFC1035.
      Specifically, the name must be 1-63 characters long and match the regular expression
      `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and
      all following characters must be a dash, lowercase letter, or digit, except the last
      character, which cannot be a dash.
  """,
    )
    @JvmName("tdnublohwkdkcpkp")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
     */
    @JvmName("mjgfwreidvoeyepl")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.
     */
    @JvmName("pwvdnllxihjqbyhg")
    public suspend fun parentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentId = mapped
    }

    /**
     * @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
     */
    @JvmName("cboxnqclashqlfab")
    public suspend fun requestId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestId = mapped
    }

    /**
     * @param value A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("tnkmmbjsqqaxvedm")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("nlebjqrxvqacyorf")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("kybpqnathxiwdqbh")
    public suspend fun rules(vararg argument: suspend FirewallPolicyRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FirewallPolicyRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("kidmjfqoavshbwqs")
    public suspend fun rules(argument: suspend FirewallPolicyRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FirewallPolicyRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
     */
    @JvmName("bgflafvnjsmkrttl")
    public suspend fun rules(vararg values: FirewallPolicyRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param value User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @JvmName("nydopabbbqtuqtet")
    public suspend fun shortName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shortName = mapped
    }

    internal fun build(): FirewallPolicyArgs = FirewallPolicyArgs(
        associations = associations,
        description = description,
        displayName = displayName,
        name = name,
        parentId = parentId,
        requestId = requestId,
        rules = rules,
        shortName = shortName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy