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

com.pulumi.gcp.compute.kotlin.OrganizationSecurityPolicyArgs.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.

There is a newer version: 8.12.0.0
Show newest version
@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.OrganizationSecurityPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Organization security policies are used to control incoming/outgoing traffic.
 * To get more information about OrganizationSecurityPolicy, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies)
 * * How-to Guides
 *     * [Creating a firewall policy](https://cloud.google.com/vpc/docs/using-firewall-policies#create-policy)
 * ## Example Usage
 * ### Organization Security Policy Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const policy = new gcp.compute.OrganizationSecurityPolicy("policy", {
 *     displayName: "tf-test",
 *     parent: "organizations/123456789",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * policy = gcp.compute.OrganizationSecurityPolicy("policy",
 *     display_name="tf-test",
 *     parent="organizations/123456789")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var policy = new Gcp.Compute.OrganizationSecurityPolicy("policy", new()
 *     {
 *         DisplayName = "tf-test",
 *         Parent = "organizations/123456789",
 *     });
 * });
 * ```
 * ```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.NewOrganizationSecurityPolicy(ctx, "policy", &compute.OrganizationSecurityPolicyArgs{
 * 			DisplayName: pulumi.String("tf-test"),
 * 			Parent:      pulumi.String("organizations/123456789"),
 * 		})
 * 		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.OrganizationSecurityPolicy;
 * import com.pulumi.gcp.compute.OrganizationSecurityPolicyArgs;
 * 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 OrganizationSecurityPolicy("policy", OrganizationSecurityPolicyArgs.builder()
 *             .displayName("tf-test")
 *             .parent("organizations/123456789")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   policy:
 *     type: gcp:compute:OrganizationSecurityPolicy
 *     properties:
 *       displayName: tf-test
 *       parent: organizations/123456789
 * ```
 * 
 * ## Import
 * OrganizationSecurityPolicy can be imported using any of these accepted formats:
 * * `locations/global/securityPolicies/{{policy_id}}`
 * * `{{policy_id}}`
 * When using the `pulumi import` command, OrganizationSecurityPolicy can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default locations/global/securityPolicies/{{policy_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default {{policy_id}}
 * ```
 * @property description A textual description for the organization security policy.
 * @property displayName A textual name of the security policy.
 * @property parent The parent of this OrganizationSecurityPolicy in the Cloud Resource Hierarchy.
 * Format: organizations/{organization_id} or folders/{folder_id}
 * - - -
 * @property type The type indicates the intended use of the security policy.
 * For organization security policies, the only supported type
 * is "FIREWALL".
 * Default value is `FIREWALL`.
 * Possible values are: `FIREWALL`.
 */
public data class OrganizationSecurityPolicyArgs(
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val parent: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.OrganizationSecurityPolicyArgs =
        com.pulumi.gcp.compute.OrganizationSecurityPolicyArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .parent(parent?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [OrganizationSecurityPolicyArgs].
 */
@PulumiTagMarker
public class OrganizationSecurityPolicyArgsBuilder internal constructor() {
    private var description: Output? = null

    private var displayName: Output? = null

    private var parent: Output? = null

    private var type: Output? = null

    /**
     * @param value A textual description for the organization security policy.
     */
    @JvmName("mtyhubrwhkmtdbjv")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A textual name of the security policy.
     */
    @JvmName("agauqshuwwqnakdh")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The parent of this OrganizationSecurityPolicy in the Cloud Resource Hierarchy.
     * Format: organizations/{organization_id} or folders/{folder_id}
     * - - -
     */
    @JvmName("whjvrkcyccbfrfhf")
    public suspend fun parent(`value`: Output) {
        this.parent = value
    }

    /**
     * @param value The type indicates the intended use of the security policy.
     * For organization security policies, the only supported type
     * is "FIREWALL".
     * Default value is `FIREWALL`.
     * Possible values are: `FIREWALL`.
     */
    @JvmName("viscuogcefnnygyi")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A textual description for the organization security policy.
     */
    @JvmName("pgvwgnstxqyetxbb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A textual name of the security policy.
     */
    @JvmName("ofgdoloksfrojvwn")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The parent of this OrganizationSecurityPolicy in the Cloud Resource Hierarchy.
     * Format: organizations/{organization_id} or folders/{folder_id}
     * - - -
     */
    @JvmName("fgtopymxffqdddnd")
    public suspend fun parent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parent = mapped
    }

    /**
     * @param value The type indicates the intended use of the security policy.
     * For organization security policies, the only supported type
     * is "FIREWALL".
     * Default value is `FIREWALL`.
     * Possible values are: `FIREWALL`.
     */
    @JvmName("gfxalhmgwkmbvytn")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): OrganizationSecurityPolicyArgs = OrganizationSecurityPolicyArgs(
        description = description,
        displayName = displayName,
        parent = parent,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy