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

com.pulumi.gcp.monitoring.kotlin.GroupArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.monitoring.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.monitoring.GroupArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * The description of a dynamic collection of monitored resources. Each group
 * has a filter that is matched against monitored resources and their
 * associated metadata. If a group's filter matches an available monitored
 * resource, then that resource is a member of that group.
 * To get more information about Group, see:
 * * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.groups)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/monitoring/groups/)
 * ## Example Usage
 * ### Monitoring Group Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const basic = new gcp.monitoring.Group("basic", {
 *     displayName: "tf-test MonitoringGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * basic = gcp.monitoring.Group("basic",
 *     display_name="tf-test MonitoringGroup",
 *     filter="resource.metadata.region=\"europe-west2\"")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var basic = new Gcp.Monitoring.Group("basic", new()
 *     {
 *         DisplayName = "tf-test MonitoringGroup",
 *         Filter = "resource.metadata.region=\"europe-west2\"",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/monitoring"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := monitoring.NewGroup(ctx, "basic", &monitoring.GroupArgs{
 * 			DisplayName: pulumi.String("tf-test MonitoringGroup"),
 * 			Filter:      pulumi.String("resource.metadata.region=\"europe-west2\""),
 * 		})
 * 		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.monitoring.Group;
 * import com.pulumi.gcp.monitoring.GroupArgs;
 * 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 basic = new Group("basic", GroupArgs.builder()
 *             .displayName("tf-test MonitoringGroup")
 *             .filter("resource.metadata.region=\"europe-west2\"")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   basic:
 *     type: gcp:monitoring:Group
 *     properties:
 *       displayName: tf-test MonitoringGroup
 *       filter: resource.metadata.region="europe-west2"
 * ```
 * 
 * ### Monitoring Group Subgroup
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const parent = new gcp.monitoring.Group("parent", {
 *     displayName: "tf-test MonitoringParentGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 * });
 * const subgroup = new gcp.monitoring.Group("subgroup", {
 *     displayName: "tf-test MonitoringSubGroup",
 *     filter: "resource.metadata.region=\"europe-west2\"",
 *     parentName: parent.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * parent = gcp.monitoring.Group("parent",
 *     display_name="tf-test MonitoringParentGroup",
 *     filter="resource.metadata.region=\"europe-west2\"")
 * subgroup = gcp.monitoring.Group("subgroup",
 *     display_name="tf-test MonitoringSubGroup",
 *     filter="resource.metadata.region=\"europe-west2\"",
 *     parent_name=parent.name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var parent = new Gcp.Monitoring.Group("parent", new()
 *     {
 *         DisplayName = "tf-test MonitoringParentGroup",
 *         Filter = "resource.metadata.region=\"europe-west2\"",
 *     });
 *     var subgroup = new Gcp.Monitoring.Group("subgroup", new()
 *     {
 *         DisplayName = "tf-test MonitoringSubGroup",
 *         Filter = "resource.metadata.region=\"europe-west2\"",
 *         ParentName = parent.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/monitoring"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		parent, err := monitoring.NewGroup(ctx, "parent", &monitoring.GroupArgs{
 * 			DisplayName: pulumi.String("tf-test MonitoringParentGroup"),
 * 			Filter:      pulumi.String("resource.metadata.region=\"europe-west2\""),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = monitoring.NewGroup(ctx, "subgroup", &monitoring.GroupArgs{
 * 			DisplayName: pulumi.String("tf-test MonitoringSubGroup"),
 * 			Filter:      pulumi.String("resource.metadata.region=\"europe-west2\""),
 * 			ParentName:  parent.Name,
 * 		})
 * 		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.monitoring.Group;
 * import com.pulumi.gcp.monitoring.GroupArgs;
 * 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 parent = new Group("parent", GroupArgs.builder()
 *             .displayName("tf-test MonitoringParentGroup")
 *             .filter("resource.metadata.region=\"europe-west2\"")
 *             .build());
 *         var subgroup = new Group("subgroup", GroupArgs.builder()
 *             .displayName("tf-test MonitoringSubGroup")
 *             .filter("resource.metadata.region=\"europe-west2\"")
 *             .parentName(parent.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   parent:
 *     type: gcp:monitoring:Group
 *     properties:
 *       displayName: tf-test MonitoringParentGroup
 *       filter: resource.metadata.region="europe-west2"
 *   subgroup:
 *     type: gcp:monitoring:Group
 *     properties:
 *       displayName: tf-test MonitoringSubGroup
 *       filter: resource.metadata.region="europe-west2"
 *       parentName: ${parent.name}
 * ```
 * 
 * ## Import
 * Group can be imported using any of these accepted formats:
 * * `{{name}}`
 * When using the `pulumi import` command, Group can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:monitoring/group:Group default {{name}}
 * ```
 * @property displayName A user-assigned name for this group, used only for display
 * purposes.
 * @property filter The filter used to determine which monitored resources
 * belong to this group.
 * - - -
 * @property isCluster If true, the members of this group are considered to be a
 * cluster. The system can perform additional analysis on
 * groups that are clusters.
 * @property parentName The name of the group's parent, if it has one. The format is
 * "projects/{project_id_or_number}/groups/{group_id}". For
 * groups with no parent, parentName is the empty string, "".
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 */
public data class GroupArgs(
    public val displayName: Output? = null,
    public val filter: Output? = null,
    public val isCluster: Output? = null,
    public val parentName: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.monitoring.GroupArgs =
        com.pulumi.gcp.monitoring.GroupArgs.builder()
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .filter(filter?.applyValue({ args0 -> args0 }))
            .isCluster(isCluster?.applyValue({ args0 -> args0 }))
            .parentName(parentName?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupArgs].
 */
@PulumiTagMarker
public class GroupArgsBuilder internal constructor() {
    private var displayName: Output? = null

    private var filter: Output? = null

    private var isCluster: Output? = null

    private var parentName: Output? = null

    private var project: Output? = null

    /**
     * @param value A user-assigned name for this group, used only for display
     * purposes.
     */
    @JvmName("hhqtklwclhdcnead")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The filter used to determine which monitored resources
     * belong to this group.
     * - - -
     */
    @JvmName("cpljbpitwbhyejrd")
    public suspend fun filter(`value`: Output) {
        this.filter = value
    }

    /**
     * @param value If true, the members of this group are considered to be a
     * cluster. The system can perform additional analysis on
     * groups that are clusters.
     */
    @JvmName("osmspmolhoiqfnke")
    public suspend fun isCluster(`value`: Output) {
        this.isCluster = value
    }

    /**
     * @param value The name of the group's parent, if it has one. The format is
     * "projects/{project_id_or_number}/groups/{group_id}". For
     * groups with no parent, parentName is the empty string, "".
     */
    @JvmName("hmkqkyqogfacrigk")
    public suspend fun parentName(`value`: Output) {
        this.parentName = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("olhiinijsdiexmdn")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value A user-assigned name for this group, used only for display
     * purposes.
     */
    @JvmName("jalvdddcphgafvqp")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The filter used to determine which monitored resources
     * belong to this group.
     * - - -
     */
    @JvmName("joumvlmtxdhsxvnn")
    public suspend fun filter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filter = mapped
    }

    /**
     * @param value If true, the members of this group are considered to be a
     * cluster. The system can perform additional analysis on
     * groups that are clusters.
     */
    @JvmName("riopxlarthgldfbr")
    public suspend fun isCluster(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isCluster = mapped
    }

    /**
     * @param value The name of the group's parent, if it has one. The format is
     * "projects/{project_id_or_number}/groups/{group_id}". For
     * groups with no parent, parentName is the empty string, "".
     */
    @JvmName("uxoifwovavtuomgw")
    public suspend fun parentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentName = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("sblvyjdrorlohpsa")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): GroupArgs = GroupArgs(
        displayName = displayName,
        filter = filter,
        isCluster = isCluster,
        parentName = parentName,
        project = project,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy