com.pulumi.aws.quicksight.kotlin.Theme.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.quicksight.kotlin
import com.pulumi.aws.quicksight.kotlin.outputs.ThemeConfiguration
import com.pulumi.aws.quicksight.kotlin.outputs.ThemePermission
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.Deprecated
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.aws.quicksight.kotlin.outputs.ThemeConfiguration.Companion.toKotlin as themeConfigurationToKotlin
import com.pulumi.aws.quicksight.kotlin.outputs.ThemePermission.Companion.toKotlin as themePermissionToKotlin
/**
* Builder for [Theme].
*/
@PulumiTagMarker
public class ThemeResourceBuilder internal constructor() {
public var name: String? = null
public var args: ThemeArgs = ThemeArgs()
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 ThemeArgsBuilder.() -> Unit) {
val builder = ThemeArgsBuilder()
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(): Theme {
val builtJavaResource = com.pulumi.aws.quicksight.Theme(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Theme(builtJavaResource)
}
}
/**
* Resource for managing a QuickSight Theme.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.quicksight.Theme("example", {
* themeId: "example",
* name: "example",
* baseThemeId: "MIDNIGHT",
* configuration: {
* dataColorPalette: {
* colors: [
* "#FFFFFF",
* "#111111",
* "#222222",
* "#333333",
* "#444444",
* "#555555",
* "#666666",
* "#777777",
* "#888888",
* "#999999",
* ],
* emptyFillColor: "#FFFFFF",
* minMaxGradients: [
* "#FFFFFF",
* "#111111",
* ],
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.quicksight.Theme("example",
* theme_id="example",
* name="example",
* base_theme_id="MIDNIGHT",
* configuration={
* "data_color_palette": {
* "colors": [
* "#FFFFFF",
* "#111111",
* "#222222",
* "#333333",
* "#444444",
* "#555555",
* "#666666",
* "#777777",
* "#888888",
* "#999999",
* ],
* "empty_fill_color": "#FFFFFF",
* "min_max_gradients": [
* "#FFFFFF",
* "#111111",
* ],
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Quicksight.Theme("example", new()
* {
* ThemeId = "example",
* Name = "example",
* BaseThemeId = "MIDNIGHT",
* Configuration = new Aws.Quicksight.Inputs.ThemeConfigurationArgs
* {
* DataColorPalette = new Aws.Quicksight.Inputs.ThemeConfigurationDataColorPaletteArgs
* {
* Colors = new[]
* {
* "#FFFFFF",
* "#111111",
* "#222222",
* "#333333",
* "#444444",
* "#555555",
* "#666666",
* "#777777",
* "#888888",
* "#999999",
* },
* EmptyFillColor = "#FFFFFF",
* MinMaxGradients = new[]
* {
* "#FFFFFF",
* "#111111",
* },
* },
* },
* });
* });
* ```
* ```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.NewTheme(ctx, "example", &quicksight.ThemeArgs{
* ThemeId: pulumi.String("example"),
* Name: pulumi.String("example"),
* BaseThemeId: pulumi.String("MIDNIGHT"),
* Configuration: &quicksight.ThemeConfigurationArgs{
* DataColorPalette: &quicksight.ThemeConfigurationDataColorPaletteArgs{
* Colors: pulumi.StringArray{
* pulumi.String("#FFFFFF"),
* pulumi.String("#111111"),
* pulumi.String("#222222"),
* pulumi.String("#333333"),
* pulumi.String("#444444"),
* pulumi.String("#555555"),
* pulumi.String("#666666"),
* pulumi.String("#777777"),
* pulumi.String("#888888"),
* pulumi.String("#999999"),
* },
* EmptyFillColor: pulumi.String("#FFFFFF"),
* MinMaxGradients: pulumi.StringArray{
* pulumi.String("#FFFFFF"),
* pulumi.String("#111111"),
* },
* },
* },
* })
* 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.Theme;
* import com.pulumi.aws.quicksight.ThemeArgs;
* import com.pulumi.aws.quicksight.inputs.ThemeConfigurationArgs;
* import com.pulumi.aws.quicksight.inputs.ThemeConfigurationDataColorPaletteArgs;
* 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 Theme("example", ThemeArgs.builder()
* .themeId("example")
* .name("example")
* .baseThemeId("MIDNIGHT")
* .configuration(ThemeConfigurationArgs.builder()
* .dataColorPalette(ThemeConfigurationDataColorPaletteArgs.builder()
* .colors(
* "#FFFFFF",
* "#111111",
* "#222222",
* "#333333",
* "#444444",
* "#555555",
* "#666666",
* "#777777",
* "#888888",
* "#999999")
* .emptyFillColor("#FFFFFF")
* .minMaxGradients(
* "#FFFFFF",
* "#111111")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:quicksight:Theme
* properties:
* themeId: example
* name: example
* baseThemeId: MIDNIGHT
* configuration:
* dataColorPalette:
* colors:
* - '#FFFFFF'
* - '#111111'
* - '#222222'
* - '#333333'
* - '#444444'
* - '#555555'
* - '#666666'
* - '#777777'
* - '#888888'
* - '#999999'
* emptyFillColor: '#FFFFFF'
* minMaxGradients:
* - '#FFFFFF'
* - '#111111'
* ```
*
* ## Import
* Using `pulumi import`, import a QuickSight Theme using the AWS account ID and theme ID separated by a comma (`,`). For example:
* ```sh
* $ pulumi import aws:quicksight/theme:Theme example 123456789012,example-id
* ```
*/
public class Theme internal constructor(
override val javaResource: com.pulumi.aws.quicksight.Theme,
) : KotlinCustomResource(javaResource, ThemeMapper) {
/**
* ARN of the theme.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* AWS account ID.
*/
public val awsAccountId: Output
get() = javaResource.awsAccountId().applyValue({ args0 -> args0 })
/**
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes defined by Amazon QuickSight. For a list of the starting themes, use ListThemes or choose Themes from within an analysis.
*/
public val baseThemeId: Output
get() = javaResource.baseThemeId().applyValue({ args0 -> args0 })
/**
* The theme configuration, which contains the theme display properties. See configuration.
* The following arguments are optional:
*/
public val configuration: Output?
get() = javaResource.configuration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> themeConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The time that the theme was created.
*/
public val createdTime: Output
get() = javaResource.createdTime().applyValue({ args0 -> args0 })
/**
* The time that the theme was last updated.
*/
public val lastUpdatedTime: Output
get() = javaResource.lastUpdatedTime().applyValue({ args0 -> args0 })
/**
* Display name of the theme.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A set of resource permissions on the theme. Maximum of 64 items. See permissions.
*/
public val permissions: Output>?
get() = javaResource.permissions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> themePermissionToKotlin(args0) })
})
}).orElse(null)
})
/**
* The theme creation status.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0 })
/**
* 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 val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy