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

com.pulumi.aws.quicksight.kotlin.FolderMembership.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.quicksight.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [FolderMembership].
 */
@PulumiTagMarker
public class FolderMembershipResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: FolderMembershipArgs = FolderMembershipArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend FolderMembershipArgsBuilder.() -> Unit) {
        val builder = FolderMembershipArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): FolderMembership {
        val builtJavaResource = com.pulumi.aws.quicksight.FolderMembership(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return FolderMembership(builtJavaResource)
    }
}

/**
 * Resource for managing an AWS QuickSight Folder Membership.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.quicksight.FolderMembership("example", {
 *     folderId: exampleAwsQuicksightFolder.folderId,
 *     memberType: "DATASET",
 *     memberId: exampleAwsQuicksightDataSet.dataSetId,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.quicksight.FolderMembership("example",
 *     folder_id=example_aws_quicksight_folder["folderId"],
 *     member_type="DATASET",
 *     member_id=example_aws_quicksight_data_set["dataSetId"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Quicksight.FolderMembership("example", new()
 *     {
 *         FolderId = exampleAwsQuicksightFolder.FolderId,
 *         MemberType = "DATASET",
 *         MemberId = exampleAwsQuicksightDataSet.DataSetId,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/quicksight"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := quicksight.NewFolderMembership(ctx, "example", &quicksight.FolderMembershipArgs{
 * 			FolderId:   pulumi.Any(exampleAwsQuicksightFolder.FolderId),
 * 			MemberType: pulumi.String("DATASET"),
 * 			MemberId:   pulumi.Any(exampleAwsQuicksightDataSet.DataSetId),
 * 		})
 * 		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.quicksight.FolderMembership;
 * import com.pulumi.aws.quicksight.FolderMembershipArgs;
 * 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 example = new FolderMembership("example", FolderMembershipArgs.builder()
 *             .folderId(exampleAwsQuicksightFolder.folderId())
 *             .memberType("DATASET")
 *             .memberId(exampleAwsQuicksightDataSet.dataSetId())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:quicksight:FolderMembership
 *     properties:
 *       folderId: ${exampleAwsQuicksightFolder.folderId}
 *       memberType: DATASET
 *       memberId: ${exampleAwsQuicksightDataSet.dataSetId}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import QuickSight Folder Membership using the AWS account ID, folder ID, member type, and member ID separated by commas (`,`). For example:
 * ```sh
 * $ pulumi import aws:quicksight/folderMembership:FolderMembership example 123456789012,example-folder,DATASET,example-dataset
 * ```
 */
public class FolderMembership internal constructor(
    override val javaResource: com.pulumi.aws.quicksight.FolderMembership,
) : KotlinCustomResource(javaResource, FolderMembershipMapper) {
    /**
     * AWS account ID.
     */
    public val awsAccountId: Output
        get() = javaResource.awsAccountId().applyValue({ args0 -> args0 })

    /**
     * Identifier for the folder.
     */
    public val folderId: Output
        get() = javaResource.folderId().applyValue({ args0 -> args0 })

    /**
     * ID of the asset (the dashboard, analysis, or dataset).
     */
    public val memberId: Output
        get() = javaResource.memberId().applyValue({ args0 -> args0 })

    /**
     * Type of the member. Valid values are `ANALYSIS`, `DASHBOARD`, and `DATASET`.
     * The following arguments are optional:
     */
    public val memberType: Output
        get() = javaResource.memberType().applyValue({ args0 -> args0 })
}

public object FolderMembershipMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.aws.quicksight.FolderMembership::class == javaResource::class

    override fun map(javaResource: Resource): FolderMembership = FolderMembership(
        javaResource as
            com.pulumi.aws.quicksight.FolderMembership,
    )
}

/**
 * @see [FolderMembership].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [FolderMembership].
 */
public suspend fun folderMembership(
    name: String,
    block: suspend FolderMembershipResourceBuilder.() -> Unit,
): FolderMembership {
    val builder = FolderMembershipResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [FolderMembership].
 * @param name The _unique_ name of the resulting resource.
 */
public fun folderMembership(name: String): FolderMembership {
    val builder = FolderMembershipResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy