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* @Nullable */ List> 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* @Nullable */ String> 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* @Nullable */ WorkspaceNetworkAccessControl> 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* @Nullable */ List> 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* @Nullable */ String> 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* @Nullable */ List> 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* @Nullable */ String> 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* @Nullable */ String> 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* @Nullable */ Map> 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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy