com.pulumi.aws.resourcegroups.kotlin.GroupArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.resourcegroups.kotlin
import com.pulumi.aws.resourcegroups.GroupArgs.builder
import com.pulumi.aws.resourcegroups.kotlin.inputs.GroupConfigurationArgs
import com.pulumi.aws.resourcegroups.kotlin.inputs.GroupConfigurationArgsBuilder
import com.pulumi.aws.resourcegroups.kotlin.inputs.GroupResourceQueryArgs
import com.pulumi.aws.resourcegroups.kotlin.inputs.GroupResourceQueryArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a Resource Group.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.resourcegroups.Group("test", {
* name: "test-group",
* resourceQuery: {
* query: `{
* "ResourceTypeFilters": [
* "AWS::EC2::Instance"
* ],
* "TagFilters": [
* {
* "Key": "Stage",
* "Values": ["Test"]
* }
* ]
* }
* `,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.resourcegroups.Group("test",
* name="test-group",
* resource_query={
* "query": """{
* "ResourceTypeFilters": [
* "AWS::EC2::Instance"
* ],
* "TagFilters": [
* {
* "Key": "Stage",
* "Values": ["Test"]
* }
* ]
* }
* """,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.ResourceGroups.Group("test", new()
* {
* Name = "test-group",
* ResourceQuery = new Aws.ResourceGroups.Inputs.GroupResourceQueryArgs
* {
* Query = @"{
* ""ResourceTypeFilters"": [
* ""AWS::EC2::Instance""
* ],
* ""TagFilters"": [
* {
* ""Key"": ""Stage"",
* ""Values"": [""Test""]
* }
* ]
* }
* ",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroups"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := resourcegroups.NewGroup(ctx, "test", &resourcegroups.GroupArgs{
* Name: pulumi.String("test-group"),
* ResourceQuery: &resourcegroups.GroupResourceQueryArgs{
* Query: pulumi.String(`{
* "ResourceTypeFilters": [
* "AWS::EC2::Instance"
* ],
* "TagFilters": [
* {
* "Key": "Stage",
* "Values": ["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.aws.resourcegroups.Group;
* import com.pulumi.aws.resourcegroups.GroupArgs;
* import com.pulumi.aws.resourcegroups.inputs.GroupResourceQueryArgs;
* 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 test = new Group("test", GroupArgs.builder()
* .name("test-group")
* .resourceQuery(GroupResourceQueryArgs.builder()
* .query("""
* {
* "ResourceTypeFilters": [
* "AWS::EC2::Instance"
* ],
* "TagFilters": [
* {
* "Key": "Stage",
* "Values": ["Test"]
* }
* ]
* }
* """)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:resourcegroups:Group
* properties:
* name: test-group
* resourceQuery:
* query: |
* {
* "ResourceTypeFilters": [
* "AWS::EC2::Instance"
* ],
* "TagFilters": [
* {
* "Key": "Stage",
* "Values": ["Test"]
* }
* ]
* }
* ```
*
* ## Import
* Using `pulumi import`, import resource groups using the `name`. For example:
* ```sh
* $ pulumi import aws:resourcegroups/group:Group foo resource-group-name
* ```
* @property configurations A configuration associates the resource group with an AWS service and specifies how the service can interact with the resources in the group. See below for details.
* @property description A description of the resource group.
* @property name The resource group's name. A resource group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with `AWS` or `aws`.
* @property resourceQuery A `resource_query` block. Resource queries are documented below.
* @property tags Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class GroupArgs(
public val configurations: Output>? = null,
public val description: Output? = null,
public val name: Output? = null,
public val resourceQuery: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy