com.pulumi.gcp.compute.kotlin.RegionNetworkFirewallPolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RegionNetworkFirewallPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* The Compute NetworkFirewallPolicy resource
* ## Example Usage
* ### Region Network Firewall Policy Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const policy = new gcp.compute.RegionNetworkFirewallPolicy("policy", {
* name: "tf-test-policy",
* description: "Terraform test",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* policy = gcp.compute.RegionNetworkFirewallPolicy("policy",
* name="tf-test-policy",
* description="Terraform test")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var policy = new Gcp.Compute.RegionNetworkFirewallPolicy("policy", new()
* {
* Name = "tf-test-policy",
* Description = "Terraform test",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewRegionNetworkFirewallPolicy(ctx, "policy", &compute.RegionNetworkFirewallPolicyArgs{
* Name: pulumi.String("tf-test-policy"),
* Description: pulumi.String("Terraform test"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.RegionNetworkFirewallPolicy;
* import com.pulumi.gcp.compute.RegionNetworkFirewallPolicyArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var policy = new RegionNetworkFirewallPolicy("policy", RegionNetworkFirewallPolicyArgs.builder()
* .name("tf-test-policy")
* .description("Terraform test")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* policy:
* type: gcp:compute:RegionNetworkFirewallPolicy
* properties:
* name: tf-test-policy
* description: Terraform test
* ```
*
* ## Import
* RegionNetworkFirewallPolicy can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}`
* * `{{project}}/{{region}}/{{name}}`
* * `{{region}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, RegionNetworkFirewallPolicy can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{project}}/{{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{name}}
* ```
* @property description An optional description of this resource. Provide this property when you create the resource.
* @property name User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall policy is created. 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? 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 project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property region The region of this resource.
*/
public data class RegionNetworkFirewallPolicyArgs(
public val description: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
public val region: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RegionNetworkFirewallPolicyArgs =
com.pulumi.gcp.compute.RegionNetworkFirewallPolicyArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionNetworkFirewallPolicyArgs].
*/
@PulumiTagMarker
public class RegionNetworkFirewallPolicyArgsBuilder internal constructor() {
private var description: Output? = null
private var name: Output? = null
private var project: Output? = null
private var region: Output? = null
/**
* @param value An optional description of this resource. Provide this property when you create the resource.
*/
@JvmName("ftbvaeqlcracfbwg")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall policy is created. 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? 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("ykgauvqisanhocaf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("mdbauckstqgipwra")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The region of this resource.
*/
@JvmName("roccucyjyrqwpvsi")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value An optional description of this resource. Provide this property when you create the resource.
*/
@JvmName("uqlghddhncamywbf")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall policy is created. 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? 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("gkgurqbqvkuglddy")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("vopoubgpvsidygfu")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value The region of this resource.
*/
@JvmName("oreenmndclbhigcb")
public suspend fun region(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.region = mapped
}
internal fun build(): RegionNetworkFirewallPolicyArgs = RegionNetworkFirewallPolicyArgs(
description = description,
name = name,
project = project,
region = region,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy