Class Workspace


  • public class Workspace
    extends com.pulumi.resources.CustomResource
    Provides an Amazon Managed Grafana workspace resource. ## Example Usage ### Basic configuration
     
     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.ArrayList;
     import java.util.Arrays;
     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());
     
         }
     }
     
     
    ### Workspace configuration options
     
     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.ArrayList;
     import java.util.Arrays;
     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());
     
         }
     }
     
     
    The optional argument `configuration` is a JSON string that disables the unified `Grafana Alerting` (Grafana version 10 or newer) and enables `Plugin 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 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Workspace​(java.lang.String name)  
      Workspace​(java.lang.String name, WorkspaceArgs args)  
      Workspace​(java.lang.String name, WorkspaceArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> accountAccessType()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> authenticationProviders()  
      com.pulumi.core.Output<java.lang.String> configuration()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> dataSources()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> endpoint()  
      static Workspace get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, WorkspaceState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> grafanaVersion()  
      com.pulumi.core.Output<java.lang.String> kmsKeyId()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<WorkspaceNetworkAccessControl>> networkAccessControl()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> notificationDestinations()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> organizationalUnits()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> organizationRoleName()  
      com.pulumi.core.Output<java.lang.String> permissionType()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleArn()  
      com.pulumi.core.Output<java.lang.String> samlConfigurationStatus()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> stackSetName()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.Optional<WorkspaceVpcConfiguration>> vpcConfiguration()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Workspace

        public Workspace​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Workspace

        public Workspace​(java.lang.String name,
                         WorkspaceArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Workspace

        public Workspace​(java.lang.String name,
                         WorkspaceArgs args,
                         @Nullable
                         com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • accountAccessType

        public com.pulumi.core.Output<java.lang.String> accountAccessType()
        Returns:
        Type of account access for the workspace. Valid values are `CURRENT_ACCOUNT` and `ORGANIZATION`. If `ORGANIZATION` is specified, then `organizationalUnits` must also be present.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the Grafana workspace.
      • authenticationProviders

        public com.pulumi.core.Output<java.util.List<java.lang.String>> authenticationProviders()
        Returns:
        Authentication providers for the workspace. Valid values are `AWS_SSO`, `SAML`, or both.
      • configuration

        public com.pulumi.core.Output<java.lang.String> configuration()
        Returns:
        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).
      • dataSources

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> dataSources()
        Returns:
        Data sources for the workspace. Valid values are `AMAZON_OPENSEARCH_SERVICE`, `ATHENA`, `CLOUDWATCH`, `PROMETHEUS`, `REDSHIFT`, `SITEWISE`, `TIMESTREAM`, `TWINMAKER`, `XRAY`
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Workspace description.
      • endpoint

        public com.pulumi.core.Output<java.lang.String> endpoint()
        Returns:
        Endpoint of the Grafana workspace.
      • grafanaVersion

        public com.pulumi.core.Output<java.lang.String> grafanaVersion()
        Returns:
        Version of Grafana to support in the new workspace. Supported values are `9.4`, `10.4`, `12.4` and `13.2`. If not specified, defaults to the latest version.
      • kmsKeyId

        public com.pulumi.core.Output<java.lang.String> kmsKeyId()
        Returns:
        ARN of the AWS KMS key for encrypting workspace data.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Grafana workspace name.
      • networkAccessControl

        public com.pulumi.core.Output<java.util.Optional<WorkspaceNetworkAccessControl>> networkAccessControl()
        Returns:
        Configuration for network access to your workspace. See `networkAccessControl` Block below.
      • notificationDestinations

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> notificationDestinations()
        Returns:
        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`.
      • organizationRoleName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> organizationRoleName()
        Returns:
        Role name that the workspace uses to access resources through Amazon Organizations.
      • organizationalUnits

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> organizationalUnits()
        Returns:
        Amazon Organizations organizational units that the workspace is authorized to use data sources from.
      • permissionType

        public com.pulumi.core.Output<java.lang.String> permissionType()
        Returns:
        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:
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • roleArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleArn()
        Returns:
        IAM role ARN that the workspace assumes.
      • samlConfigurationStatus

        public com.pulumi.core.Output<java.lang.String> samlConfigurationStatus()
        Returns:
        Status of the SAML configuration.
      • stackSetName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> stackSetName()
        Returns:
        AWS CloudFormation stack set name that provisions IAM roles to be used by the workspace.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • vpcConfiguration

        public com.pulumi.core.Output<java.util.Optional<WorkspaceVpcConfiguration>> vpcConfiguration()
        Returns:
        Configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. See `vpcConfiguration` Block below.
      • get

        public static Workspace get​(java.lang.String name,
                                    com.pulumi.core.Output<java.lang.String> id,
                                    @Nullable
                                    WorkspaceState state,
                                    @Nullable
                                    com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.