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

com.pulumi.aws.grafana.Workspace Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.grafana;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.grafana.WorkspaceArgs;
import com.pulumi.aws.grafana.inputs.WorkspaceState;
import com.pulumi.aws.grafana.outputs.WorkspaceNetworkAccessControl;
import com.pulumi.aws.grafana.outputs.WorkspaceVpcConfiguration;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides an Amazon Managed Grafana workspace resource.
 * 
 * ## Example Usage
 * 
 * ### Basic configuration
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.iam.Role;
 * import com.pulumi.aws.iam.RoleArgs;
 * import com.pulumi.aws.grafana.Workspace;
 * import com.pulumi.aws.grafana.WorkspaceArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 assume = new Role("assume", RoleArgs.builder()
 *             .name("grafana-assume")
 *             .assumeRolePolicy(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("Version", "2012-10-17"),
 *                     jsonProperty("Statement", jsonArray(jsonObject(
 *                         jsonProperty("Action", "sts:AssumeRole"),
 *                         jsonProperty("Effect", "Allow"),
 *                         jsonProperty("Sid", ""),
 *                         jsonProperty("Principal", jsonObject(
 *                             jsonProperty("Service", "grafana.amazonaws.com")
 *                         ))
 *                     )))
 *                 )))
 *             .build());
 * 
 *         var example = new Workspace("example", WorkspaceArgs.builder()
 *             .accountAccessType("CURRENT_ACCOUNT")
 *             .authenticationProviders("SAML")
 *             .permissionType("SERVICE_MANAGED")
 *             .roleArn(assume.arn())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Workspace configuration options * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.grafana.Workspace;
 * import com.pulumi.aws.grafana.WorkspaceArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 Workspace("example", WorkspaceArgs.builder()
 *             .accountAccessType("CURRENT_ACCOUNT")
 *             .authenticationProviders("SAML")
 *             .permissionType("SERVICE_MANAGED")
 *             .roleArn(assume.arn())
 *             .configuration(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("plugins", jsonObject(
 *                         jsonProperty("pluginAdminEnabled", true)
 *                     )),
 *                     jsonProperty("unifiedAlerting", jsonObject(
 *                         jsonProperty("enabled", false)
 *                     ))
 *                 )))
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * The optional argument `configuration` is a JSON string that enables the unified `Grafana Alerting` (Grafana version 10 or newer) and `Plugins Management` (Grafana version 9 or newer) on the Grafana Workspaces. * * For more information about using Grafana alerting, and the effects of turning it on or off, see [Alerts in Grafana version 10](https://docs.aws.amazon.com/grafana/latest/userguide/v10-alerts.html). * * ## Import * * Using `pulumi import`, import Grafana Workspace using the workspace's `id`. For example: * * ```sh * $ pulumi import aws:grafana/workspace:Workspace example g-2054c75a02 * ``` * */ @ResourceType(type="aws:grafana/workspace:Workspace") public class Workspace extends com.pulumi.resources.CustomResource { /** * The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizational_units` must also be present. * */ @Export(name="accountAccessType", refs={String.class}, tree="[0]") private Output accountAccessType; /** * @return The type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizational_units` must also be present. * */ public Output accountAccessType() { return this.accountAccessType; } /** * The Amazon Resource Name (ARN) of the Grafana workspace. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return The Amazon Resource Name (ARN) of the Grafana workspace. * */ public Output arn() { return this.arn; } /** * The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both. * */ @Export(name="authenticationProviders", refs={List.class,String.class}, tree="[0,1]") private Output> authenticationProviders; /** * @return The authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both. * */ public Output> authenticationProviders() { return this.authenticationProviders; } /** * The configuration string for the workspace that you create. For more information about the format and configuration options available, see [Working in your Grafana workspace](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html). * */ @Export(name="configuration", refs={String.class}, tree="[0]") private Output configuration; /** * @return The configuration string for the workspace that you create. For more information about the format and configuration options available, see [Working in your Grafana workspace](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-configure-workspace.html). * */ public Output configuration() { return this.configuration; } /** * The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY` * */ @Export(name="dataSources", refs={List.class,String.class}, tree="[0,1]") private Output> dataSources; /** * @return The data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `XRAY` * */ public Output>> dataSources() { return Codegen.optional(this.dataSources); } /** * The workspace description. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The workspace description. * */ public Output> description() { return Codegen.optional(this.description); } /** * The endpoint of the Grafana workspace. * */ @Export(name="endpoint", refs={String.class}, tree="[0]") private Output endpoint; /** * @return The endpoint of the Grafana workspace. * */ public Output endpoint() { return this.endpoint; } /** * Specifies the version of Grafana to support in the new workspace. Supported values are `8.4`, `9.4` and `10.4`. If not specified, defaults to the latest version. * */ @Export(name="grafanaVersion", refs={String.class}, tree="[0]") private Output grafanaVersion; /** * @return Specifies the version of Grafana to support in the new workspace. Supported values are `8.4`, `9.4` and `10.4`. If not specified, defaults to the latest version. * */ public Output grafanaVersion() { return this.grafanaVersion; } /** * The Grafana workspace name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The Grafana workspace name. * */ public Output name() { return this.name; } /** * Configuration for network access to your workspace.See Network Access Control below. * */ @Export(name="networkAccessControl", refs={WorkspaceNetworkAccessControl.class}, tree="[0]") private Output networkAccessControl; /** * @return Configuration for network access to your workspace.See Network Access Control below. * */ public Output> networkAccessControl() { return Codegen.optional(this.networkAccessControl); } /** * The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`. * */ @Export(name="notificationDestinations", refs={List.class,String.class}, tree="[0,1]") private Output> notificationDestinations; /** * @return The notification destinations. If a data source is specified here, Amazon Managed Grafana will create IAM roles and permissions needed to use these destinations. Must be set to `SNS`. * */ public Output>> notificationDestinations() { return Codegen.optional(this.notificationDestinations); } /** * The role name that the workspace uses to access resources through Amazon Organizations. * */ @Export(name="organizationRoleName", refs={String.class}, tree="[0]") private Output organizationRoleName; /** * @return The role name that the workspace uses to access resources through Amazon Organizations. * */ public Output> organizationRoleName() { return Codegen.optional(this.organizationRoleName); } /** * The Amazon Organizations organizational units that the workspace is authorized to use data sources from. * */ @Export(name="organizationalUnits", refs={List.class,String.class}, tree="[0,1]") private Output> organizationalUnits; /** * @return The Amazon Organizations organizational units that the workspace is authorized to use data sources from. * */ public Output>> organizationalUnits() { return Codegen.optional(this.organizationalUnits); } /** * The permission type of the workspace. If `SERVICE_MANAGED` is specified, the IAM roles and IAM policy attachments are generated automatically. If `CUSTOMER_MANAGED` is specified, the IAM roles and IAM policy attachments will not be created. * * The following arguments are optional: * */ @Export(name="permissionType", refs={String.class}, tree="[0]") private Output permissionType; /** * @return The permission type of the workspace. If `SERVICE_MANAGED` is specified, the IAM roles and IAM policy attachments are generated automatically. If `CUSTOMER_MANAGED` is specified, the IAM roles and IAM policy attachments will not be created. * * The following arguments are optional: * */ public Output permissionType() { return this.permissionType; } /** * The IAM role ARN that the workspace assumes. * */ @Export(name="roleArn", refs={String.class}, tree="[0]") private Output roleArn; /** * @return The IAM role ARN that the workspace assumes. * */ public Output> roleArn() { return Codegen.optional(this.roleArn); } @Export(name="samlConfigurationStatus", refs={String.class}, tree="[0]") private Output samlConfigurationStatus; public Output samlConfigurationStatus() { return this.samlConfigurationStatus; } /** * The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace. * */ @Export(name="stackSetName", refs={String.class}, tree="[0]") private Output stackSetName; /** * @return The AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace. * */ public Output> stackSetName() { return Codegen.optional(this.stackSetName); } /** * Key-value mapping 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 * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Key-value mapping 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 Output>> tags() { return Codegen.optional(this.tags); } /** * Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } /** * The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below. * */ @Export(name="vpcConfiguration", refs={WorkspaceVpcConfiguration.class}, tree="[0]") private Output vpcConfiguration; /** * @return The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See VPC Configuration below. * */ public Output> vpcConfiguration() { return Codegen.optional(this.vpcConfiguration); } /** * * @param name The _unique_ name of the resulting resource. */ public Workspace(java.lang.String name) { this(name, WorkspaceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Workspace(java.lang.String name, WorkspaceArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Workspace(java.lang.String name, WorkspaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:grafana/workspace:Workspace", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Workspace(java.lang.String name, Output id, @Nullable WorkspaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:grafana/workspace:Workspace", name, state, makeResourceOptions(options, id), false); } private static WorkspaceArgs makeArgs(WorkspaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkspaceArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Workspace get(java.lang.String name, Output id, @Nullable WorkspaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Workspace(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy